liyuz.com ~/
~ / research / untitled-2026-09-06

Time Without Timesteps

Research paper with Mark Shinyoung Lee.

Trajectories as objects

Write down a system of ODEs, fix the initial conditions, and you have picked out exactly one trajectory. Every solver builds that trajectory from left to right, one step at a time, because that is how integrators work. The trajectory itself has no direction. It is a single curve that satisfies every equation at once, and stepping forward is one way of finding it.

Coupled systems make the other way easy to see. Take two oscillators joined by a spring. If someone handed you the full motion of oscillator B for the next ten seconds, oscillator A would just be a driven oscillator, a textbook problem you could solve by itself. The same goes in the other direction. The only thing making this hard is that neither motion is known until the other one is. So you guess both, solve each against the other's guess, and repeat until the guesses stop moving. When they stop, you have the answer, and you never once stepped the whole system forward together.

This is waveform relaxation, and circuit simulation people worked it out in 1982. It never became a general tool, mostly because of cost. Each pass fully simulates every subsystem, so one iteration costs as much as just solving the problem, and its derivative costs that again.

TWT keeps the loop and replaces what happens inside it. For each type of subsystem we train a network that takes a whole input waveform and an initial condition and returns the whole output waveform in one forward pass. Once that call is cheap, the outer loop can be solved with methods nobody would have tried when every call was a full integration. That changes which solvers are practical.

Setup

K subsystems, each driven by signals from its neighbors:

x_i' = f_i(x_i, u_i(t), theta_i),    x_i(0) = x_i0
u_i(t) = g_i({x_j(t) : j in N(i)})

If every drive u_i were known, each subsystem would be its own separate problem. They aren't known, because they are built out of the trajectories we are trying to find.

The learned operator

For each module type we train a surrogate that approximates the isolated solution operator:

x_i_hat = S_phi(theta_i, u_i, x_i0)

It is a residual MLP. Time is still in the representation. For the oscillators we use 256 Chebyshev coefficients in place of 1500 samples, and for the neurons we use raw samples. The formulation doesn't care which.

Training data comes from simulating single modules under known drives with a conventional solver. The awkward part is that you don't know which drives a module will see once it is coupled to others. We used a rolling buffer: early samples get simple drives, and later ones are driven by weighted mixtures of outputs the generator already produced. This mattered more than any architecture choice, and it is where most of our mistakes came from.

Solving the fixed point

Stack all trajectories into X. The coupled solution is a fixed point:

X = F(X),    F(X)_i = S_phi(theta_i, g_i({X_j : j in N(i)}), x_i0)

The classical iteration is the obvious one: plug in, recompute, repeat. Whether it converges comes down to loop gain. Suppose oscillator A's guess is off by a small wiggle. That wiggle enters B's input, B's operator scales it by its sensitivity, and the coupling carries it back to A scaled by the coupling strength. If the round trip shrinks the wiggle, repeating kills it. If the round trip grows it, the iteration blows up, even though the physical system is perfectly well behaved. Formally the condition is

rho(J_F) < 1,    J_F = (dS_phi/du) W

with W the coupling operator. For the all-to-all diffusive coupling we use, ||W|| is exactly the coupling strength k_c. This limit belongs to the iteration, not to the physics.

Newton's method on G(X) = X - F(X) has no such limit:

(I - J_F) dX = -G(X),    X <- X + dX

It only needs I - J_F to be invertible. We never form the Jacobian; GMRES solves the system, and each GMRES step needs one Jacobian-vector product, which for a network is a single forward-mode pass.

We ran the same Newton solve with an exact RK4 integrator in place of the network, and at moderate coupling it took 1548 seconds, against 13.7 seconds for plain relaxation, because every Krylov step was a full numerical integration. Newton is only affordable with a learned operator, and the learned operator is only usable past the loop-gain limit with Newton.

On 20 van der Pol oscillators with all-to-all coupling, Newton converges in 4 to 10 iterations on trajectories 1500 timesteps long. At weak to moderate coupling the error against ground truth is 1 to 6 percent. The same surrogate with coupling switched off is wrong by more than 100 percent everywhere.

Predicting convergence

The loop-gain picture makes a prediction you can check without ever building a coupled system. Measure how much the isolated operator amplifies its input, rho(dS_phi/du), with power iteration. Since the coupling contributes exactly k_c, the iteration should fail past

k_c* = 1 / rho(dS_phi/du)

We measured rho across stiffness and compared against the observed sweep.

Stiffness mu rho (measured) Predicted k_c* Converged at k_c = 2
0.5 0.87 1.15 4/5
1.0 0.64 1.56 3/5
2.0 0.57 1.75 5/5
3.0 0.54 1.85 5/5
5.0 0.52 1.92 5/5

The ordering matches exactly, and iteration count, convergence rate and trajectory error all track rho.

The true operator at mu = 1 has rho around 0.54, while the learned one has 0.64. The networks are twitchier than the physics they imitate, so they amplify perturbations more and give up at weaker coupling than the real system would.

The surrogate fits worst in isolation at mu = 5, and composes best there. Across three separately trained models, a better fit came with a larger rho every single time. How well a model fits alone and how well it behaves when plugged into others are separate properties, and here they pulled in opposite directions.

We tried the obvious fix, penalizing the Jacobian norm during training, and it made things worse. A random directional probe in n dimensions puts only 1/n of its energy along any given direction, so what it actually measures is the Frobenius norm. Penalizing that flattened every direction except the one that mattered.

Gradients

Once the loop converges, the answer is defined by the equation X* = F(X*, theta). The path the solver took to get there doesn't enter into it. So the derivative can come from differentiating the equation instead of replaying the solve:

(I - J_F^T) v = dJ/dX*
dJ/dtheta = v^T (dF/dtheta)

That is one linear system. There is no backward sweep through time, and memory doesn't grow with the number of Newton iterations. Unrolling an integrator stores every intermediate state, and the continuous adjoint marches back across the whole horizon. Both inherit the sequential structure of the forward pass. This doesn't.

The standard backward pass for equilibrium models expands (I - J_F^T)^-1 as a Neumann series, which quietly brings back the loop-gain condition, so it fails in exactly the regime Newton was brought in for. Solving with GMRES avoids that.

Coupling 0.1, N = 6 Coupling 0.1, N = 50 Coupling 0.5, N = 6
Cosine sim. vs. unrolled 1.0000 1.0000 -0.13
Rel. err. vs. finite diff. 0.06% 0.04%
Neumann adjoint converges converges diverges
Unrolled memory, depth 2 to 160 102 to 146 MB 108 to 472 MB
Implicit memory 112 MB 169 MB 112 MB

Where the comparison means anything, implicit and unrolled gradients agree to five digits. Past the contraction boundary, unrolled backprop diverges by a factor of 83 and the Neumann adjoint returns non-finite values, while the implicit gradient is still within 0.04 percent of finite differences.

To check that the gradients are useful, we recovered the coupling weights of a six-oscillator ring from trajectories generated by the true physics. Parameter error went from 83 percent to a median of 1.2 percent.

Neurons

The second system is two Hodgkin-Huxley neurons connected by a recurrent synapse. The surrogate predicts only the synaptic variable s(t) and keeps voltage and gating hidden. The coupling here is nonlinear, since synaptic current depends on the state of both cells.

A feedforward model assumes recurrence does nothing, so its activity sits at 0.0551 whatever the recurrent weight. In reality activity drops steadily as recurrence gets stronger, because near the synaptic reversal potential strong input shunts the cell during a spike. The fixed point follows that trend. The feedforward view can't.

Self-consistency roughly halves the feedforward error, but solving the same fixed point with exact operators gets under 2 percent, so most of what remains is surrogate error made worse by a badly conditioned fixed point. At the strongest recurrence the solve doesn't converge.

Error decomposition

Every result in the paper comes with three numbers: the self-consistency residual ||X - F(X)||, the error against ground truth, and the error of the same fixed point solved with an exact integrator in each module slot. The third is what the formulation itself costs. The gap between it and the surrogate result is what learning costs.

This decomposition caught a bug. Our module simulator applied the drive at the end of each step and the reference applied it at the start. Both are valid first-order schemes, but they define different fixed points, and the mismatch grew from under 1 percent to over 10 percent as coupling increased. It looked exactly like surrogate error until the exact-operator check pulled it apart.

The residual measures agreement between surrogates, not agreement with the real equations. A residual of 1e-12 can sit next to 30 percent physical error, and at strong coupling it does.

Limitations

The systems are small: 20 oscillators and pairs of neurons. Nothing in the method depends on that, but the claims about sequential depth would mean a lot more at a thousand modules.

We report sequential depth, not wall-clock time. Neither our code nor the reference integrator is optimized, so a timing comparison would be meaningless. What we can say is that iteration count doesn't grow with trajectory length and each iteration is parallel across modules. Turning that into a real speedup needs an implementation we haven't built.

Surrogate error of 1 to 4 percent is far from solver grade, and the fixed point amplifies it. A converged solution is only as good as the operators inside it.

The failure we hit most was training coverage. Twice an experiment went into a parameter range the data generator had never sampled, and twice we blamed the method before finding it was the data. Composition makes this worse than in ordinary surrogate work, because the solver decides which inputs each operator sees, and you can't know those ahead of time. Generating training data that covers the inputs coupling actually produces is, I think, the main open problem for this whole family of methods.

Future work

Windowing the time axis is the classical cure for slow relaxation and would lower rho directly. We didn't try it, and it is the obvious next step. After that: learned preconditioners for the fixed-point solve, compressed trajectory representations for long horizons, and training objectives that control the spectral radius directly instead of through the proxy that failed.

Surrogates are almost always judged by how well they fit on their own. For anything built by plugging learned models into each other, how much a model amplifies its input looks at least as important, and you can measure it before composing anything.

∎

← cd ~/research