The Modern Mathematics of Deep Learningexplained for non-mathematicians

Learning meets science

Scientists already know equations about heat, measurements, molecules and movement. A learner does not have to ignore that knowledge.

First we will work backward from a measurement to a hidden picture. Then we will see how rules about heat and electrons can help a network choose its calculations.

8.1 Working back from measurements

Deep neural networks meet inverse problems · paper pp. 55–56

A camera or scanner takes a hidden object and produces a measurement. If we know the object, computing the measurement is the forward problem. If we have only the measurement and want the object back, that is an inverse problem.

Suppose a sensor reports only the sum of two hidden pixel values. Both (1, 3) and (2, 2) give the same measurement.

The measurement alone cannot tell these two images apart.

Simplified model

y=x1+x2y=x_1+x_2
1+3=4,2+2=41+3=4,\quad 2+2=4
function compareMeasurements(firstPair, secondPair) {
  const firstMeasurement = firstPair[0] + firstPair[1];
  const secondMeasurement = secondPair[0] + secondPair[1];
  return { firstMeasurement, secondMeasurement };
}
const result = compareMeasurements([1, 3], [2, 2]);

Choose a change. Predict, then run.

Result:
Enable JavaScript to run this example.

Go deeper in Concepts paper pp. 55

Unblur two pixels

Made-up example

Explore

Select two different photos with the same average brightness.

Tap the illustration or use the buttons

Photo 102Average 1Photo 211Average 1Photo 320Average 1
Photos

Selected: none

A sensor that reports only the sum 4 cannot tell whether two pixels were [1, 3] or [2, 2]: both add to 4. A measurement may leave several possible hidden objects. Noise makes the choice harder.

One common approach seeks a candidate object that reproduces the measurement and also matches a useful assumption, such as having mostly smooth regions. The formula balances measurement disagreement with a penalty for implausible candidates.

The paper describes three broad uses of neural networks: learn the reverse map from paired examples, learn a preference for plausible objects, or let a network itself represent the candidate object and fit the observed measurement.

Each approach can fail when training examples are unrepresentative, the measurement loses too much information, or the fitting process begins to match noise. A plausible reconstruction is not automatically the true hidden object.

8.2 Equations as guides

PDE-based models · paper pp. 56–60

A rod can be hot in one place and cool in another. In this simple heat model, heat flows from hotter parts toward cooler parts, so temperatures change over time. A rule relating the temperature pattern along the rod to its change over time is a partial differential equation, or PDE.

For heat, an initial temperature at every position matters. Knowing only the temperatures at the two ends does not specify what the middle looked like at the start. The paper discusses models in finance, control and molecules; they may have many input coordinates.

Temperature along a rod

Made-up example

Explore

Select both profiles with zero ends and different middles.

Tap the illustration or use the buttons

Profile 10°C0°C0°CKnown ends, guessed middleProfile 20°C1°C0°CKnown ends, guessed middle
Profiles

Selected: none; Ends and middle: none

We saw one heat method in chapter 4: sample random paths ending at initial positions, read INITIAL temperatures there and average to estimate the LATER value at the paths’ starting position. That requires the model and simulated time, not merely path positions.

For each possible arrangement of electron positions, the wavefunction ψ gives a number. It may be a complex number, pictured as an arrow as in chapter 7. This is an amplitude, not a probability. Square the arrow’s length and scale the whole spread so total probability is 1. The result is a probability density, which describes how concentrated the chance is near each arrangement. Add up the density over a region of arrangements to get that region’s probability.

The paper groups electrons by a property called spin; it is not a little ball literally spinning. Swapping the positions of two electrons within the same spin group must reverse the wavefunction’s sign. For a simple two-state example, compare amplitudes +1 and −1 before and after a swap, then square them.

In this two-state example, +1 and −1 both square to 1, giving equal chances after normalization.These toy amplitudes are real numbers.

From the paper

Pi,jψ=−ψP_{i,j}\psi=-\psi
(ψ1,ψ2)=(1,−1):Pψ=(−1,1)=−ψ,(p1,p2)=(1/2,1/2)(\psi_1,\psi_2)=(1,-1):\quad P\psi=(-1,1)=-\psi,\quad (p_1,p_2)=(1/2,1/2)
function probabilities(amplitudes) {
  const weights = [];
  let total = 0;
  for (const amplitude of amplitudes) {
    const weight = amplitude ** 2;
    weights.push(weight);
    total += weight;
  }
  if (total === 0) {
    throw new Error('Amplitudes must have nonzero total weight');
  }
  const probabilities = [];
  for (const weight of weights) probabilities.push(weight / total);
  const swappedAmplitudes = [amplitudes[1], amplitudes[0]];
  const negativeAmplitudes = [-amplitudes[0], -amplitudes[1]];
  return { amplitudes, swappedAmplitudes, negativeAmplitudes, probabilities };
}
const result = probabilities([1, -1]);

Choose a change. Predict, then run.

Result:
Enable JavaScript to run this example.

Go deeper in Concepts paper pp. 58 (8.2)

In this separate two-state toy, (+1)² = 1 and (−1)² = 1. Their total is 2, so each normalized weight is 1/2. Swapping changes the signs but not these toy probabilities. Actual electron positions form a continuous space; these two toy chances do not describe an actual molecule.

Swapping position entries within the same spin group flips the sign of ψ. This rule is called antisymmetry. The paper’s condition does not require the same swap rule between the two different spin groups.

We can also compute a weighted average of possible energy values. This is a toy version of an expected value, not a solution to the Schrödinger equation.

For two toy states with energies 1 and 3 and probabilities 0.75 and 0.25, multiply each energy by its probability and add.

The weighted average is 1.5 in the chosen energy units.

Definition / paper rule

E[E]=∑ipiEi\mathbb E[E]=\sum_i p_i E_i
E[E]=0.75(1)+0.25(3)=1.5\mathbb E[E]=0.75(1)+0.25(3)=1.5
function averageEnergy(chance, low, high) {
  if (!(chance >= 0 && chance <= 1)) {
    throw new Error('Chance must be between 0 and 1');
  }
  return { averageEnergy: (1 - chance) * low + chance * high };
}
const result = averageEnergy(0.25, 1, 3);

Choose a change. Predict, then run.

Result:
Enable JavaScript to run this example.

Go deeper in Concepts paper pp. 59

With energy levels 1 and 3 (arbitrary energy units), and chances 0.75 and 0.25, multiply and add: 0.75×1 + 0.25×3 = 1.5 energy units. The paper uses a more elaborate energy expression that must obey the physical equation.

Researchers build the same-spin swapping rule into certain network architectures and combine it with learned interaction information, rather than hoping an unconstrained network discovers the rule by chance.

These examples are not universal heat or quantum solvers. They show a recurring lesson of the paper: mathematical structure can make a very hard learning problem more manageable, but the results need their own conditions and careful numerical checks.

We began with one prediction and one loss. We end with models that must respect measurements and physical equations. Mathematics separates the ability to represent an answer, the ability to find it, and evidence that it works. These remain distinct questions even when a network is very large.

Try the chapter quiz

1. A camera blurs a picture. What is the inverse problem?

2. In the two-state example, the amplitudes are +1 and −1. After squaring and dividing by their total, what are the two probabilities?

3. What can a PDE model describe about a warm rod?

An independent educational explanation of The Modern Mathematics of Deep Learning — Julius Berner, Philipp Grohs, Gitta Kutyniok, Philipp Petersen. Examples use invented numbers unless a measured dataset is credited.