Sequential processing in nature

2
Sequential Processing in Nature,
‘Anything but’ in Scientific Computation
an observation
Dominic Jones
Netherhall House, London
January 2018
Nature - ‘It should just work’
Nature - ‘It should just work’
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 2 / 25
Nature - ‘It should just work’
Protein folding
Synthesising the chain
Finding the global minimum
Folding occurs in microseconds, but cannot be predicted
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 3 / 25
Nature - ‘It should just work’
Abnormal folding
Deformed proteins cannot be mended
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 4 / 25
Nature - ‘It should just work’
In brief
1 From a chain of amino acids a specific highly complex shape is
required
2 There is no apparent error correction in the process (or very little)
3 It is usually successful
4 When it isn’t, Creutzfeldt-Jakob disease, Parkinson’s, Alzheimer’s,
etc
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 5 / 25
Scientific computation - ‘T = abs(T)’
Scientific computation - ‘T = abs(T)’
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 6 / 25
Scientific computation - ‘T = abs(T)’
Attempts at prediction and projection
Numerical approximation Local sensitivities
Iterative, discretised and linearised algorithms
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 7 / 25
Scientific computation - ‘T = abs(T)’
All starts with a graph (mesh)
Resolve change at the small scales
Mesh implies graph, implies matrix, implies matrix inversion
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 8 / 25
Scientific computation - ‘T = abs(T)’
Matrix inversion: scaling up
void inverse(int n, float a[][2*n_max])
{
for (int i = 0; i < n; i++)
for (int j = n; j < 2*n; j++)
a[i][j] = (i == j-n? 1: 0);
for (int i = 0; i < n; i++) { // linear
float aii = a[i][i];
for (int j = i; j < 2*n; j++)
a[i][j] = a[i][j] / aii;
for (int j = 0; j < n; j++) { // quadratic!
if (i != j) {
float aji = a[j][i];
for (int k = 0; k < 2*n; k++) // cubic!!
a[j][k] = a[j][k] - aji * a[i][k]; }}}}
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 9 / 25
Scientific computation - ‘T = abs(T)’
Computation: slow but compact
Geometry and mesh Connectivity graph
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 10 / 25
Scientific computation - ‘T = abs(T)’
Topology Representation
Symmetric, sparse (48 non-zeros), irregular


a0,0 a0,1 a0,8
a1,0 a1,1 a1,2 a1,6
a2,1 a2,2 a2,3
a3,2 a3,3 a3,4
a4,3 a4,4 a4,5 a4,13
a5,4 a5,5 a5,6 a5,11
a6,1 a6,5 a6,6 a6,7
a7,6 a7,7 a7,8 a7,9
a8,0 a8,7 a8,8
a9,7 a9,9 a9,10
a10,9 a10,10 a10,11
a11,5 a11,10 a11,11 a11,12
a12,11 a12,12 a12,13
a13,4 a13,12 a13,13


Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 11 / 25
Scientific computation - ‘T = abs(T)’
Sparsity and Indirection
Dense storage: 196 values, 24% efficient
Direct access to values
float[14][14] A;
A[2][3] = 3.142;
Compressed row storage: 111 values, 56% efficient
Requires indirection to access values (10x slower)
int[15] IA = [0, 3, 7, 10, ...];
int[48] JA = [0, 1, 8, 0, 1, 2, 6, 1, 2, 3, ...];
float[48] A;
A[JA[IA[2]+2]] = 3.142; // i.e. A[2][3] = 3.142;
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 12 / 25
Scientific computation - ‘T = abs(T)’
In brief
1 Many scientific algorithms have graphs and matrices, and perform
matrix inversion at their core
2 They are often woefully inefficient due to the requirement to use
compressed storage of irregular data
3 The compromise on efficiency is to leverage compact memory
footprint
4 In the process of linearising, much of the ‘beauty’ of underlying the
mathematics gives way to crude approximation
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 13 / 25
Bridging the Nature — Computation dichotomy
Bridging the Nature — Computation dichotomy
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 14 / 25
Bridging the Nature — Computation dichotomy
Artificial Neural Networks
TensorFlow demo
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 15 / 25
Bridging the Nature — Computation dichotomy
Properties of ANN
1 Weights are associated with nodes and inter-nodal connections
2 Processes are relatively straight forward - matrix-vector products
and local reductions
3 Its kernel is essentially plastic - number of hidden layers and
number of nodes on each layer govern its form
4 It has somewhat of the ‘it should just work’ essence - a result will
always be produced
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 16 / 25
Bridging the Nature — Computation dichotomy
Where the analogy breaks down
1 These nodes and these connections are trained for this problem
2 Training is complicated - requires derivative of every output with
respect to every weight
3 Improvement of the weights requires vast resources relative to
evaluating the actual problem
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 17 / 25
Bridging the Nature — Computation dichotomy
In brief
1 Somehow, the need for feedback (or at least how it is presently
done) appears to lack a natural analogy
2 For protein folding, it is as though all possible solutions (and so
the right one) are ‘known’ at once
3 This is somewhat characteristic of quantum computing, and
moreover, its solution is probably correct
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 18 / 25
Incidentally...
Incidentally...
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 19 / 25
Incidentally...
Transpose is like dependency tracing
1 Given a sequence of operations: X(D), Q(X), L(Q),
the Jacobian of Q w.r.t. X can be written as
JQ =


∂Q1
∂X1
· · ·
∂Q1
∂Xn
...
...
...
∂Qm
∂X1
· · ·
∂Qm
∂Xn


=
dQ
dX
2 The derivative of the whole system is the chain of the Jacobians of
each operation, giving
dL
dD
=
dL
dQ
dQ
dX
dX
dD
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 20 / 25
Incidentally...
Transpose is like dependency tracing
1 The derivative of the system could be built up by inputting
tangents of JX
dL
dDi
=
dL
dQ
dQ
dX
dX
dDi
2 But by turning the tangents approach “inside-out”, taking the
transpose of the derivative of the system for a particular gradient
of JL
dLj
dD
T
=
dX
dD
T
dQ
dX
T dLj
dQ
T
offers an efficient way of relating an output to all of its inputs.
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 21 / 25
Incidentally...
Give the output a handle on its history
auto eval(A const &a,
B const &b)
{
auto c0 = 3;
auto c1 = 4;
auto t0 = a * b;
auto t1 = c0 + t0;
auto t2 = c1 + t0;
auto r = t1 / t2;
return r;
}
÷
+ +
c0 c1∗ ∗
a b a b
Left branch Right branch
Root
Instead of computing values, construct expression trees (graphs!)
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 22 / 25
Incidentally...
‘Adjoint’ differentiation
Apply the chain rule and transpose...
t0 = a * b // 1
t1 = c0 + t0 // 2
t2 = c1 + t0 // 3
r = t1 / t2 // 4 // 4
t1_d += (1 / t2) * r_d
t2_d -= (t1 / t2ˆ2) * r_d
// 3
t0_d += t2_d
// 2
t0_d += t1_d
// 1
a_d += b * t0_d
b_d += a * t0_d
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 23 / 25
Incidentally...
Directed design
Move surface in or out to reduce drag
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 24 / 25
Incidentally...
In brief
1 There is some analogy with entanglement and wave function
collapsing in classical computation
2 It gives all solutions in one evaluation
3 But, everything really is back-to-front! (and implementing it is a
nightmare!)
Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 25 / 25
1 of 25

Recommended

ADAPTIVESYNCHRONIZER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC ZH... by
ADAPTIVESYNCHRONIZER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC ZH...ADAPTIVESYNCHRONIZER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC ZH...
ADAPTIVESYNCHRONIZER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC ZH...ijitcs
320 views20 slides
ACTIVE CONTROLLER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC XU AN... by
ACTIVE CONTROLLER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC XU AN...ACTIVE CONTROLLER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC XU AN...
ACTIVE CONTROLLER DESIGN FOR THE HYBRID SYNCHRONIZATION OF HYPERCHAOTIC XU AN...Zac Darcy
261 views15 slides
How to calculate back propagation by
How to calculate back propagationHow to calculate back propagation
How to calculate back propagationShinagawa Seitaro
383 views5 slides
Yang mills theory by
Yang mills theoryYang mills theory
Yang mills theoryAlexander Decker
385 views76 slides
ADAPTIVE CONTROLLER DESIGN FOR THE ANTI-SYNCHRONIZATION OF HYPERCHAOTIC YANG ... by
ADAPTIVE CONTROLLER DESIGN FOR THE ANTI-SYNCHRONIZATION OF HYPERCHAOTIC YANG ...ADAPTIVE CONTROLLER DESIGN FOR THE ANTI-SYNCHRONIZATION OF HYPERCHAOTIC YANG ...
ADAPTIVE CONTROLLER DESIGN FOR THE ANTI-SYNCHRONIZATION OF HYPERCHAOTIC YANG ...ijics
467 views20 slides
An order seven implicit symmetric sheme applied to second order initial value... by
An order seven implicit symmetric sheme applied to second order initial value...An order seven implicit symmetric sheme applied to second order initial value...
An order seven implicit symmetric sheme applied to second order initial value...Alexander Decker
458 views8 slides

More Related Content

Similar to Sequential processing in nature

My data are incomplete and noisy: Information-reduction statistical methods f... by
My data are incomplete and noisy: Information-reduction statistical methods f...My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...Umberto Picchini
1.1K views63 slides
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and... by
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...
QMC: Operator Splitting Workshop, Projective Splitting with Forward Steps and...The Statistical and Applied Mathematical Sciences Institute
182 views22 slides
SIAM - Minisymposium on Guaranteed numerical algorithms by
SIAM - Minisymposium on Guaranteed numerical algorithmsSIAM - Minisymposium on Guaranteed numerical algorithms
SIAM - Minisymposium on Guaranteed numerical algorithmsJagadeeswaran Rathinavel
64 views48 slides
Slides econometrics-2018-graduate-2 by
Slides econometrics-2018-graduate-2Slides econometrics-2018-graduate-2
Slides econometrics-2018-graduate-2Arthur Charpentier
15.9K views97 slides
AINL 2016: Strijov by
AINL 2016: StrijovAINL 2016: Strijov
AINL 2016: StrijovLidia Pivovarova
391 views68 slides
2.pptx by
2.pptx2.pptx
2.pptxMohAlyasin1
2 views30 slides

Similar to Sequential processing in nature(20)

My data are incomplete and noisy: Information-reduction statistical methods f... by Umberto Picchini
My data are incomplete and noisy: Information-reduction statistical methods f...My data are incomplete and noisy: Information-reduction statistical methods f...
My data are incomplete and noisy: Information-reduction statistical methods f...
Umberto Picchini1.1K views
What is Algorithm - An Overview by Ramakant Soni
What is Algorithm - An OverviewWhat is Algorithm - An Overview
What is Algorithm - An Overview
Ramakant Soni3.7K views
Application of parallel hierarchical matrices and low-rank tensors in spatial... by Alexander Litvinenko
Application of parallel hierarchical matrices and low-rank tensors in spatial...Application of parallel hierarchical matrices and low-rank tensors in spatial...
Application of parallel hierarchical matrices and low-rank tensors in spatial...
Mit15 082 jf10_lec01 by Saad Liaqat
Mit15 082 jf10_lec01Mit15 082 jf10_lec01
Mit15 082 jf10_lec01
Saad Liaqat245 views
Mm chap08 -_lossy_compression_algorithms by Eellekwameowusu
Mm chap08 -_lossy_compression_algorithmsMm chap08 -_lossy_compression_algorithms
Mm chap08 -_lossy_compression_algorithms
Eellekwameowusu66 views
Lesson 15: Exponential Growth and Decay (Section 021 slides) by Matthew Leingang
Lesson 15: Exponential Growth and Decay (Section 021 slides)Lesson 15: Exponential Growth and Decay (Section 021 slides)
Lesson 15: Exponential Growth and Decay (Section 021 slides)
Matthew Leingang1.8K views
Lesson15 -exponential_growth_and_decay_021_slides by Matthew Leingang
Lesson15  -exponential_growth_and_decay_021_slidesLesson15  -exponential_growth_and_decay_021_slides
Lesson15 -exponential_growth_and_decay_021_slides
Matthew Leingang414 views
Count-Distinct Problem by Kai Zhang
Count-Distinct ProblemCount-Distinct Problem
Count-Distinct Problem
Kai Zhang3.4K views

More from 2idseminar

The importance of being human 3 by
The importance of being human 3The importance of being human 3
The importance of being human 32idseminar
139 views23 slides
On the axiom of choice by
On the axiom of choiceOn the axiom of choice
On the axiom of choice2idseminar
497 views21 slides
Can christian schools continue to teach only about traditional marriage by
Can christian schools continue to teach only about traditional marriageCan christian schools continue to teach only about traditional marriage
Can christian schools continue to teach only about traditional marriage2idseminar
81 views23 slides
The unlimited desire IIS2019 by
The unlimited desire IIS2019The unlimited desire IIS2019
The unlimited desire IIS20192idseminar
65 views16 slides
Causality from outside Time by
Causality from outside TimeCausality from outside Time
Causality from outside Time2idseminar
617 views36 slides
Can computers replace teachers? by
Can computers replace teachers?Can computers replace teachers?
Can computers replace teachers?2idseminar
500 views22 slides

More from 2idseminar(14)

The importance of being human 3 by 2idseminar
The importance of being human 3The importance of being human 3
The importance of being human 3
2idseminar139 views
On the axiom of choice by 2idseminar
On the axiom of choiceOn the axiom of choice
On the axiom of choice
2idseminar497 views
Can christian schools continue to teach only about traditional marriage by 2idseminar
Can christian schools continue to teach only about traditional marriageCan christian schools continue to teach only about traditional marriage
Can christian schools continue to teach only about traditional marriage
2idseminar81 views
The unlimited desire IIS2019 by 2idseminar
The unlimited desire IIS2019The unlimited desire IIS2019
The unlimited desire IIS2019
2idseminar65 views
Causality from outside Time by 2idseminar
Causality from outside TimeCausality from outside Time
Causality from outside Time
2idseminar617 views
Can computers replace teachers? by 2idseminar
Can computers replace teachers?Can computers replace teachers?
Can computers replace teachers?
2idseminar500 views
Future contingents and the Multiverse by 2idseminar
Future contingents and the MultiverseFuture contingents and the Multiverse
Future contingents and the Multiverse
2idseminar146 views
The CRISPR/CAS9 genome editing system and humans by 2idseminar
The CRISPR/CAS9 genome editing system and humansThe CRISPR/CAS9 genome editing system and humans
The CRISPR/CAS9 genome editing system and humans
2idseminar142 views
Achilles, the Tortoise and Quantum Mechanics by 2idseminar
Achilles, the Tortoise and Quantum MechanicsAchilles, the Tortoise and Quantum Mechanics
Achilles, the Tortoise and Quantum Mechanics
2idseminar235 views
Transpostgenderism 5 jean_davidponci by 2idseminar
Transpostgenderism 5 jean_davidponciTranspostgenderism 5 jean_davidponci
Transpostgenderism 5 jean_davidponci
2idseminar148 views
Transhumanism and brain by 2idseminar
Transhumanism and brainTranshumanism and brain
Transhumanism and brain
2idseminar51 views
Transhumanism and brain by 2idseminar
Transhumanism and brainTranshumanism and brain
Transhumanism and brain
2idseminar106 views
Netherhall 2018 m fox by 2idseminar
Netherhall 2018 m foxNetherhall 2018 m fox
Netherhall 2018 m fox
2idseminar330 views
Infinite Chess: winning and draw by 2idseminar
Infinite Chess: winning and drawInfinite Chess: winning and draw
Infinite Chess: winning and draw
2idseminar231 views

Recently uploaded

plasmids by
plasmidsplasmids
plasmidsscribddarkened352
7 views2 slides
"How can I develop my learning path in bioinformatics? by
"How can I develop my learning path in bioinformatics?"How can I develop my learning path in bioinformatics?
"How can I develop my learning path in bioinformatics?Bioinformy
17 views13 slides
journal of engineering and applied science.pdf by
journal of engineering and applied science.pdfjournal of engineering and applied science.pdf
journal of engineering and applied science.pdfKSAravindSrivastava
7 views7 slides
How to be(come) a successful PhD student by
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD studentTom Mens
374 views62 slides
Physical Characterization of Moon Impactor WE0913A by
Physical Characterization of Moon Impactor WE0913APhysical Characterization of Moon Impactor WE0913A
Physical Characterization of Moon Impactor WE0913ASérgio Sacani
42 views12 slides
Nitrosamine & NDSRI.pptx by
Nitrosamine & NDSRI.pptxNitrosamine & NDSRI.pptx
Nitrosamine & NDSRI.pptxNileshBonde4
6 views22 slides

Recently uploaded(20)

"How can I develop my learning path in bioinformatics? by Bioinformy
"How can I develop my learning path in bioinformatics?"How can I develop my learning path in bioinformatics?
"How can I develop my learning path in bioinformatics?
Bioinformy17 views
How to be(come) a successful PhD student by Tom Mens
How to be(come) a successful PhD studentHow to be(come) a successful PhD student
How to be(come) a successful PhD student
Tom Mens374 views
Physical Characterization of Moon Impactor WE0913A by Sérgio Sacani
Physical Characterization of Moon Impactor WE0913APhysical Characterization of Moon Impactor WE0913A
Physical Characterization of Moon Impactor WE0913A
Sérgio Sacani42 views
domestic waste_100013.pptx by padmasriv25
domestic waste_100013.pptxdomestic waste_100013.pptx
domestic waste_100013.pptx
padmasriv2510 views
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN... by gynomark
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
EVALUATION OF HEPATOPROTECTIVE ACTIVITY OF SALIX SUBSERRATA IN PARACETAMOL IN...
gynomark9 views
Workshop LLM Life Sciences ChemAI 231116.pptx by Marco Tibaldi
Workshop LLM Life Sciences ChemAI 231116.pptxWorkshop LLM Life Sciences ChemAI 231116.pptx
Workshop LLM Life Sciences ChemAI 231116.pptx
Marco Tibaldi96 views
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf by KerryNuez1
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdfMODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf
MODULE-9-Biotechnology, Genetically Modified Organisms, and Gene Therapy.pdf
KerryNuez119 views
Artificial Intelligence Helps in Drug Designing and Discovery.pptx by abhinashsahoo2001
Artificial Intelligence Helps in Drug Designing and Discovery.pptxArtificial Intelligence Helps in Drug Designing and Discovery.pptx
Artificial Intelligence Helps in Drug Designing and Discovery.pptx
abhinashsahoo2001112 views
MSC III_Advance Forensic Serology_Final.pptx by Suchita Rawat
MSC III_Advance Forensic Serology_Final.pptxMSC III_Advance Forensic Serology_Final.pptx
MSC III_Advance Forensic Serology_Final.pptx
Suchita Rawat10 views
Open Access Publishing in Astrophysics by Peter Coles
Open Access Publishing in AstrophysicsOpen Access Publishing in Astrophysics
Open Access Publishing in Astrophysics
Peter Coles380 views
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx by MN
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptxENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
ENTOMOLOGY PPT ON BOMBYCIDAE AND SATURNIIDAE.pptx
MN6 views
Light Pollution for LVIS students by CWBarthlmew
Light Pollution for LVIS studentsLight Pollution for LVIS students
Light Pollution for LVIS students
CWBarthlmew5 views
Workshop Chemical Robotics ChemAI 231116.pptx by Marco Tibaldi
Workshop Chemical Robotics ChemAI 231116.pptxWorkshop Chemical Robotics ChemAI 231116.pptx
Workshop Chemical Robotics ChemAI 231116.pptx
Marco Tibaldi90 views
A training, certification and marketing scheme for informal dairy vendors in ... by ILRI
A training, certification and marketing scheme for informal dairy vendors in ...A training, certification and marketing scheme for informal dairy vendors in ...
A training, certification and marketing scheme for informal dairy vendors in ...
ILRI8 views

Sequential processing in nature

  • 1. Sequential Processing in Nature, ‘Anything but’ in Scientific Computation an observation Dominic Jones Netherhall House, London January 2018
  • 2. Nature - ‘It should just work’ Nature - ‘It should just work’ Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 2 / 25
  • 3. Nature - ‘It should just work’ Protein folding Synthesising the chain Finding the global minimum Folding occurs in microseconds, but cannot be predicted Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 3 / 25
  • 4. Nature - ‘It should just work’ Abnormal folding Deformed proteins cannot be mended Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 4 / 25
  • 5. Nature - ‘It should just work’ In brief 1 From a chain of amino acids a specific highly complex shape is required 2 There is no apparent error correction in the process (or very little) 3 It is usually successful 4 When it isn’t, Creutzfeldt-Jakob disease, Parkinson’s, Alzheimer’s, etc Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 5 / 25
  • 6. Scientific computation - ‘T = abs(T)’ Scientific computation - ‘T = abs(T)’ Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 6 / 25
  • 7. Scientific computation - ‘T = abs(T)’ Attempts at prediction and projection Numerical approximation Local sensitivities Iterative, discretised and linearised algorithms Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 7 / 25
  • 8. Scientific computation - ‘T = abs(T)’ All starts with a graph (mesh) Resolve change at the small scales Mesh implies graph, implies matrix, implies matrix inversion Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 8 / 25
  • 9. Scientific computation - ‘T = abs(T)’ Matrix inversion: scaling up void inverse(int n, float a[][2*n_max]) { for (int i = 0; i < n; i++) for (int j = n; j < 2*n; j++) a[i][j] = (i == j-n? 1: 0); for (int i = 0; i < n; i++) { // linear float aii = a[i][i]; for (int j = i; j < 2*n; j++) a[i][j] = a[i][j] / aii; for (int j = 0; j < n; j++) { // quadratic! if (i != j) { float aji = a[j][i]; for (int k = 0; k < 2*n; k++) // cubic!! a[j][k] = a[j][k] - aji * a[i][k]; }}}} Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 9 / 25
  • 10. Scientific computation - ‘T = abs(T)’ Computation: slow but compact Geometry and mesh Connectivity graph Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 10 / 25
  • 11. Scientific computation - ‘T = abs(T)’ Topology Representation Symmetric, sparse (48 non-zeros), irregular   a0,0 a0,1 a0,8 a1,0 a1,1 a1,2 a1,6 a2,1 a2,2 a2,3 a3,2 a3,3 a3,4 a4,3 a4,4 a4,5 a4,13 a5,4 a5,5 a5,6 a5,11 a6,1 a6,5 a6,6 a6,7 a7,6 a7,7 a7,8 a7,9 a8,0 a8,7 a8,8 a9,7 a9,9 a9,10 a10,9 a10,10 a10,11 a11,5 a11,10 a11,11 a11,12 a12,11 a12,12 a12,13 a13,4 a13,12 a13,13   Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 11 / 25
  • 12. Scientific computation - ‘T = abs(T)’ Sparsity and Indirection Dense storage: 196 values, 24% efficient Direct access to values float[14][14] A; A[2][3] = 3.142; Compressed row storage: 111 values, 56% efficient Requires indirection to access values (10x slower) int[15] IA = [0, 3, 7, 10, ...]; int[48] JA = [0, 1, 8, 0, 1, 2, 6, 1, 2, 3, ...]; float[48] A; A[JA[IA[2]+2]] = 3.142; // i.e. A[2][3] = 3.142; Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 12 / 25
  • 13. Scientific computation - ‘T = abs(T)’ In brief 1 Many scientific algorithms have graphs and matrices, and perform matrix inversion at their core 2 They are often woefully inefficient due to the requirement to use compressed storage of irregular data 3 The compromise on efficiency is to leverage compact memory footprint 4 In the process of linearising, much of the ‘beauty’ of underlying the mathematics gives way to crude approximation Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 13 / 25
  • 14. Bridging the Nature — Computation dichotomy Bridging the Nature — Computation dichotomy Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 14 / 25
  • 15. Bridging the Nature — Computation dichotomy Artificial Neural Networks TensorFlow demo Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 15 / 25
  • 16. Bridging the Nature — Computation dichotomy Properties of ANN 1 Weights are associated with nodes and inter-nodal connections 2 Processes are relatively straight forward - matrix-vector products and local reductions 3 Its kernel is essentially plastic - number of hidden layers and number of nodes on each layer govern its form 4 It has somewhat of the ‘it should just work’ essence - a result will always be produced Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 16 / 25
  • 17. Bridging the Nature — Computation dichotomy Where the analogy breaks down 1 These nodes and these connections are trained for this problem 2 Training is complicated - requires derivative of every output with respect to every weight 3 Improvement of the weights requires vast resources relative to evaluating the actual problem Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 17 / 25
  • 18. Bridging the Nature — Computation dichotomy In brief 1 Somehow, the need for feedback (or at least how it is presently done) appears to lack a natural analogy 2 For protein folding, it is as though all possible solutions (and so the right one) are ‘known’ at once 3 This is somewhat characteristic of quantum computing, and moreover, its solution is probably correct Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 18 / 25
  • 19. Incidentally... Incidentally... Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 19 / 25
  • 20. Incidentally... Transpose is like dependency tracing 1 Given a sequence of operations: X(D), Q(X), L(Q), the Jacobian of Q w.r.t. X can be written as JQ =   ∂Q1 ∂X1 · · · ∂Q1 ∂Xn ... ... ... ∂Qm ∂X1 · · · ∂Qm ∂Xn   = dQ dX 2 The derivative of the whole system is the chain of the Jacobians of each operation, giving dL dD = dL dQ dQ dX dX dD Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 20 / 25
  • 21. Incidentally... Transpose is like dependency tracing 1 The derivative of the system could be built up by inputting tangents of JX dL dDi = dL dQ dQ dX dX dDi 2 But by turning the tangents approach “inside-out”, taking the transpose of the derivative of the system for a particular gradient of JL dLj dD T = dX dD T dQ dX T dLj dQ T offers an efficient way of relating an output to all of its inputs. Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 21 / 25
  • 22. Incidentally... Give the output a handle on its history auto eval(A const &a, B const &b) { auto c0 = 3; auto c1 = 4; auto t0 = a * b; auto t1 = c0 + t0; auto t2 = c1 + t0; auto r = t1 / t2; return r; } ÷ + + c0 c1∗ ∗ a b a b Left branch Right branch Root Instead of computing values, construct expression trees (graphs!) Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 22 / 25
  • 23. Incidentally... ‘Adjoint’ differentiation Apply the chain rule and transpose... t0 = a * b // 1 t1 = c0 + t0 // 2 t2 = c1 + t0 // 3 r = t1 / t2 // 4 // 4 t1_d += (1 / t2) * r_d t2_d -= (t1 / t2ˆ2) * r_d // 3 t0_d += t2_d // 2 t0_d += t1_d // 1 a_d += b * t0_d b_d += a * t0_d Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 23 / 25
  • 24. Incidentally... Directed design Move surface in or out to reduce drag Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 24 / 25
  • 25. Incidentally... In brief 1 There is some analogy with entanglement and wave function collapsing in classical computation 2 It gives all solutions in one evaluation 3 But, everything really is back-to-front! (and implementing it is a nightmare!) Dominic Jones (Netherhall House, London) Sequential Processing in Nature,‘Anything but’ in Scientific ComputationJanuary 2018 25 / 25