sepdek May 7, 2026
Conceptual illustration of two training paths and a loop representing optimizer memory.

Two training runs can have identical current parameters and still take different next steps. That is not mysterious if their optimizer states differ. It becomes easy to overlook when we inspect only the weights or the current prediction.

The question worth asking is therefore precise: what state are we observing, what history are we controlling, and which future difference would count as evidence that information from the past remains accessible?

Research context

Process-Tensor Tomography of SGD: Measuring Non-Markovian Memory via Back-Flow of Distinguishability, by Vasileios Sevetlidis and George Pavlidis, appears in AISTATS 2026, PMLR 300, pages 2521–2529, associated with 2–5 May 2026. The paper compares predictive distributions on a fixed probe set under controlled intervention histories. It uses increases in distinguishability as an observable-level memory witness and studies optimizer-state resets as causal breaks. The scalar momentum example below is independent pedagogy, not a reproduction of that protocol or its reported experiments.

A state is more than a weight

For a scalar parameter w, take a quadratic objective with gradient w − 1 and a momentum buffer v:

vt+1=βvt+(wt−1),wt+1=wt−ηvt+1.

The update depends on both w and v. If we include the pair as the state, the next state is determined by the current pair and the update rule. If we observe only w, two apparently identical states can hide different buffers. History dependence at the observed level does not establish that the complete algorithm lacks a state description.

Let both runs have w = 0, but let their buffers be +0.8 and −0.8. Use β = 0.9 and η = 0.1. Their next weights are 0.028 and 0.172. Equal visible weights did not imply equal future behavior.

from math import exp

def step(w, v, beta=.9, eta=.1):
    v = beta * v + (w - 1.)
    return w - eta * v, v

a = step(0., .8)
b = step(0., -.8)
prob = lambda w: 1. / (1. + exp(-w))
print(a[0], b[0], abs(prob(a[0]) - prob(b[0])))

Measure predictions on the same probe

To turn the weights into an observable, the example uses a sigmoid probability. For two Bernoulli distributions with positive-class probabilities p and q, total variation distance is:

DTV(p,q)=|p−q|.

Initially both probabilities are 0.5, so their distance is zero. After the common update, the probabilities differ. Resetting both buffers to zero before that update gives identical next weights and zero distance again.

This construction demonstrates how an unobserved buffer can carry information. It does not automatically reproduce a valid non-Markovianity test for an arbitrary network. In particular, simply seeing a distance grow between two unrelated training runs is insufficient: uncontrolled differences in data, randomness or parameters can explain it.

What a controlled experiment needs

For a larger experiment, I would save both weights and optimizer state, fix the probe examples and their order, and state exactly which batches or updates differ between histories. I would then apply the same subsequent intervention to the relevant branches. A reset should change the intended state component while preserving the others needed for the comparison.

The probe must remain fixed because changing the evaluated examples can change a distance even when the model does not. Preprocessing, augmentation, dropout and evaluation mode also matter. A repeatable probe evaluation should not accidentally add a new source of stochasticity to the measurement.

Positive, zero and uncertain results

A reported difference needs a scale and an uncertainty assessment. Repeated independent runs can reveal whether the observed effect is stable. Resampling should match the experimental unit: thousands of probe predictions from one shared training run are not thousands of independent training experiments.

A zero signal is also limited. It can mean that the selected histories, probe or time interval did not expose a difference. It does not prove that every hidden state has been erased. The reset comparison is valuable because it tests a proposed mechanism, rather than attaching a broad label to a changing learning curve.

Why this is useful in practice

This view suggests better training records. Alongside checkpoints, preserve optimizer configuration, buffers when appropriate, data-order seeds and schedule information. If a resumed run behaves differently, those records make it possible to investigate the difference instead of assuming that equal weights guarantee equivalent continuation.

The tutorial’s executable example checks equal starting predictions, different next predictions with different buffers, and equality after resetting the buffers. Those are modest claims, but they are directly inspectable.

Complete reproducible example

This standalone example uses fictional data or prescribed mathematical objects; it is not a reproduction of the source paper’s experiments.

"""Scalar hidden-buffer illustration, not the paper's experimental protocol."""
import json
from math import exp

def step(w, v, beta=.9, eta=.1):
    v = beta*v + w - 1.
    return w - eta*v, v

def probability(w):
    return 1/(1+exp(-w))

a, b = step(0., .8), step(0., -.8)
initial_tv = abs(probability(0.)-probability(0.))
next_tv = abs(probability(a[0])-probability(b[0]))
reset_a, reset_b = step(0., 0.), step(0., 0.)
assert initial_tv == 0 and next_tv > 0
assert reset_a == reset_b
assert abs(a[0]-.028) < 1e-12 and abs(b[0]-.172) < 1e-12
print(json.dumps({"initial_tv":initial_tv,"next_weights":[a[0],b[0]],"next_tv":next_tv,"reset_tv":abs(probability(reset_a[0])-probability(reset_b[0]))},indent=2))

Discussion

comments