A planet crossing its star casts a shadow. Time those crossings precisely and, for a lone planet, they tick like a metronome: transit n arrives at t₀ + n·P. But put a second planet in the system and the metronome wavers. The two planets pull on each other gravitationally, nudging each transit a few seconds to a few minutes early or late. These are transit-timing variations (TTVs), and they carry something remarkable. The shape of that timing wobble encodes the planets' masses and orbits, including planets that never transit at all.
That makes TTVs a way to weigh worlds we cannot see directly. The catch is the direction of the problem. Going forward, from masses and orbits to transit times, is a straightforward N-body simulation. Going backward, from observed transit times to a distribution over masses and orbits with honest uncertainty, has no closed form. The standard tool is MCMC: guess the parameters, simulate, compare to data, repeat ten million to a billion times. Hours to days of compute, per system.
TESS has already delivered thousands of candidates; PLATO is about to deliver thousands more. A method that takes a day per system does not meet that moment. So I asked a narrow, testable question. Can a neural network learn the inverse map once, and then return a calibrated posterior over masses and orbits for any new system in milliseconds, without throwing away the hard, near-resonant systems where the signal is strongest and where prior methods give up?
This post is what I found. The short version: yes, and the surprise is where it struggles.
The gap I was aiming at
Two mature bodies of work bracket this problem with empty space between them.
On one side, fast forward models like TTVFast and TTVFaster accelerate the simulation, but the analytic ones provably break down in the resonant, high-eccentricity regime, which is exactly where TTV signals are largest. On the other side, machine learning for TTVs so far has mostly produced point estimates or priors, not calibrated posteriors, and has tended to exclude near-resonant systems outright. A 2026 LSTM paper literally filtered out the 3:2, 2:1, and 5:3 resonances, and even then reported "a deceptively tight confidence interval around an incorrect solution," a textbook calibration failure. The flagship ML-for-dynamics success, SPOCK, is a stability classifier, not a posterior estimator.
So the open niche is specific: amortized, calibration-validated posterior inference for TTVs that does not exclude the chaotic regime. Amortized, meaning the expensive training is paid once and every subsequent system is cheap. Calibration-validated, meaning the error bars are demonstrably truthful, not merely present.
What I built
A complete, runnable proof-of-concept, deliberately scoped so every claim is checkable. A two-planet system, both planets transiting, with a REBOUND (WHFast symplectic) N-body integrator as the forward model. From the simulated transit times I extract a fixed-length feature: the O−C residuals, "Observed minus Calculated," which are the transit times with their best-fit linear ephemeris subtracted off, leaving only the gravitational wobble in minutes. Forty residuals for the inner planet, twenty for the outer (it orbits slower, so fewer of its transits fit the same baseline): a 60-number summary of the system. The code, the trained model, and every experiment below are at github.com/brihat9135/ttv-experiment.
The target is a six-dimensional parameter vector θ = (m₁, m₂, h₁, k₁, h₂, k₂), the two masses and two eccentricity vectors (h, k) = (e·cos ϖ, e·sin ϖ). The eccentricity is stored as a vector rather than a magnitude-and-angle for two reasons: it avoids the singularity at zero eccentricity (a circle has no orientation) and the wraparound of the angle, and it is the combination TTVs actually constrain. Periods and phases are held fixed, since periods are read directly off the transit ephemerides, so they are measured, not inferred.
The method is amortized neural posterior estimation, the modern form of simulation-based inference. Draw θ from astrophysical priors, run the simulator to get the TTV feature (plus a realistic 0.5-minute timing noise), and train a network to map feature to a posterior over θ by maximizing the likelihood it assigns to each simulation's true parameters. The proof-of-concept uses a mixture-density network, because a mixture of Gaussians is the minimum needed to represent the curved, sometimes multimodal posterior this problem produces.
Here is what the training signal actually looks like. Each system is two wobble curves; the network sees thousands of them paired with their true parameters and learns to run the map backward.
The oscillation period you see is the super-period, a beat frequency set by how close the two planets sit to exact 2:1 commensurability. Its length, the amplitude of the swing, and the finer "chopping" structure on top are what the network reads to back out the masses and eccentricities.
On the headline metrics, the proof-of-concept does what it should. Across all six parameters the posterior recovers the truth within about one sigma; the posterior-predictive transit curves bracket the observed data; and inference costs 0.47 milliseconds per full posterior versus the tens of minutes to hours of N-body an MCMC would burn. But the metric that matters most is calibration, and it deserves its own section, because it is also where the interesting physics hides.
Why calibrated error bars are the hard part
Here is the problem the network is really up against. The dominant, easiest-to-measure feature of a TTV signal, the near-resonant amplitude, depends on the perturbing planet's mass and the planets' eccentricities through a combination, roughly mass times a function of eccentricity. So a given amplitude can be produced by a heavy planet on a near-circular orbit, or by a lighter planet on a more eccentric one. From the amplitude alone you cannot tell these apart. They trade off along a curved ridge in parameter space, the mass–eccentricity degeneracy.
This is exactly why a point estimate is a quiet lie. It picks one spot on that ridge and reports it as the answer, hiding the fact that a whole family of (mass, eccentricity) pairs fit the data equally well. The honest output is not a point but a shape: the full posterior, ridge and all.
I ran the trained network on one system and drew six thousand samples from its posterior. The degeneracy is right there in the data.
The network reports m₂ = 27.0 ± 5.6 M⊕ and e₂ = 0.061 ± 0.013 for a system whose true values are 28 M⊕ and 0.05, and, crucially, it reports the correlation between them. The truth lands inside, and the shape honestly records what the data does and does not pin down.
But "the truth lands inside this once" is an anecdote, not a guarantee. The rigorous test is calibration. Across many systems, does the X% credible interval contain the true value X% of the time? I checked coverage on hundreds of simulated systems, for every one of the six parameters. Nominal 50% gave measured 51%; 68% gave 70%; 90% gave 90%; 95% gave 94%. The simulation-based-calibration rank histograms come out flat. When this network says "X ± Y," X ± Y is true about as often as it claims. That is precisely the property the prior LSTM work lacked.
The surprise: it fails by going quiet, not by lying
The obvious worry going in was overconfidence near resonance, the network producing tight, wrong intervals, the LSTM failure mode. So I pushed it toward the 2:1 resonance and watched.
It did not break. It degraded gracefully. Driving a fixed period ratio toward resonance, even out to 164-minute TTV amplitudes with eccentricities up to 0.3, the model stayed calibrated (calibration error 1.5 to 2.6%) and simply widened its posteriors honestly as the signal grew non-sinusoidal. Instability stayed near zero, and was actually lower near resonance: the 2:1 resonance turns out to be dynamically protective, shielding against ejection rather than triggering it. One hypothesis I started with, "calibration breaks at the separatrix," was simply falsified.
The real strain showed up only when I forced a single model to span the whole resonance, conditioned on the measured period ratio over a range crossing from circulating, through librating, to circulating again. Two things broke, and neither was honesty:
- Training destabilized. The validation loss reached its best value and then diverged; only early stopping salvaged a usable model, where the fixed-ratio runs had converged smoothly.
- The posteriors went quiet. The best validation likelihood collapsed by about eleven nats compared to fixed-ratio training. The model stayed calibrated only by ballooning its posteriors out toward the prior. It kept its honesty by admitting it knew much less.
So the failure mode, consistent across every experiment, is trainability and informativeness, not miscalibration. The model does not become confidently wrong. It becomes honestly uncertain.
That raised the question that actually matters for the field. Is the near-resonance vagueness physical, the transit times genuinely under-constraining the parameters so the only fix is more data, or is it a model limitation, the mixture-density network over-widening, fixable with a fancier estimator? I built an independent reference posterior by approximate Bayesian computation and compared widths. The verdict came back mostly physical: the network's posterior widths track the independent reference and are never wider than it. The "model over-widens" case never triggered. A better density estimator will not sharpen these marginals, because the information is not there to begin with.
Where this leaves the project
The evidence reframes the original ambition. I set out to build "chaos-aware emulation," imagining the hard part would be keeping the model honest through the resonance. It turns out the model is honest through the resonance essentially for free. What it cannot do is manufacture information the data does not contain.
So the refined thesis: amortized simulation-based inference for TTVs is calibration-robust out of the box, even at large near-resonant amplitudes and across the separatrix. It fails by unstable training and an informativeness collapse, and that collapse is largely physical. The bottleneck for sharper posteriors near resonance is therefore observational, not algorithmic.
That points the genuine contributions somewhere concrete:
- Amortization at survey scale. Milliseconds per system is what makes a PLATO-sized catalog tractable at all.
- A normalizing-flow posterior in place of the mixture density network, not to tighten the marginals (the data limit forbids that) but for faithful multimodal posteriors and stable training across the resonance, which is the real defect to fix.
- More observables. Feeding the forward model transit durations and depths, and eventually radial velocities. This is the one lever that actually adds information and can legitimately break the degeneracy.
The immediate next steps follow directly: add transit durations and depths to the simulator and test whether the near-resonance posterior tightens; swap the mixture density network for a neural spline flow and re-test cross-resonance stability; and benchmark against a differentiable N-body HMC posterior on a real near-resonant system as a gold-standard check.
Follow-up: I ran the first of these. Adding transit durations to the forward model collapses the mass-eccentricity degeneracy, sharpening the mass posteriors by roughly 80% while calibration holds. The experiment and the before-and-after figure are in Breaking the TTV Degeneracy.
Honest caveats
The speed-up is measured against a coarse simulation grid; a fair comparison to a full MCMC posterior would show a larger amortized advantage, but it should be benchmarked properly against the differentiable-N-body incumbent, which is mature and exact per system. Several of the key results, including the separatrix calibration drift and the sim-to-real robustness gain from pretraining, are single-seed and suggestive rather than proven; they need multiple seeds before any formal write-up. The reference posterior used to argue "the limit is physical" was itself sparsity-limited, so that verdict leans partly on the calibration evidence rather than standing entirely on its own. And whether a deterministic surrogate is even well-posed inside a genuinely chaotic regime remains an open scientific question, not just an engineering one.
None of that dents the core finding, which is robust across five experiments. Point-estimate ML for TTVs was solving the wrong half of the problem. The honesty was never the hard part. The information is.