Reconstruction Under Missing Data
What I built for a nine-method comparison, and what it actually did
Abstract
Some measurements arrive with holes in them. An instrument watches something fade, then stops watching. The orbit turns, the schedule changes, the weather closes in, and the record you are left with is missing exactly the stretch you needed. This note describes work on that problem, published as a comparison of nine reconstruction methods over 521 gamma-ray bursts [1]. My contribution was one of the nine: an attention-gated U-Net, which produced the largest reduction in parameter uncertainty of any method tested. It was also not the most accurate method by a different and equally reasonable measure, and that tension is the most interesting thing in the paper. Written for a reader who does not work on gamma-ray bursts, because the problem is not really about gamma-ray bursts.
Status of This Document
Stable. This note describes published, peer-reviewed work; the results will not change. Presentation may be revised. Where the paper and this note disagree, the paper [1] is authoritative. A follow-up study on the same signals, including a model of mine that failed, is WN-003.
1. The problem ¶
A gamma-ray burst is the brightest explosion in the universe. It flares, and then for hours or days afterwards there is an afterglow that slowly fades. A satellite watches that fade and records how bright the source is over time. The result is called a light curve: brightness on one axis, time on the other.
The satellite does not get to watch continuously. Its orbit carries it behind the Earth. It gets pointed at something else. Instruments drop out. So the light curve you actually receive is not a curve at all. It is a set of fragments with gaps between them.
That would be tolerable if the gaps landed in boring places. They do not. These curves have a characteristic shape: a flat stretch called the plateau, and then a break after which the brightness falls away. Three numbers describe that shape: when the plateau ends, how bright it is at that moment, and how steeply things fall afterwards. Almost everything anyone wants to do with these bursts depends on measuring those three numbers well. And the break is frequently inside a gap.
2. Why a gap is expensive ¶
It is fair to ask why anyone should care about filling in missing data on an explosion that happened billions of years ago.
The answer is that these bursts are being used as measuring instruments. There is a known relationship between when a burst's plateau ends and how luminous it is at that point. A relationship like that turns an object of unknown distance into one of estimable distance, and objects of estimable distance are how the expansion history of the universe gets measured. Gamma-ray bursts are visible far earlier in cosmic history than the supernovae normally used for this, which is precisely why people want them to work.
The obstacle is scatter. The relationship is real but loose, and a good part of that looseness comes not from the universe but from us, from having fitted those three numbers to curves with holes in them. Tighten the measurements and the relationship tightens with them.
The paper quantifies what that would be worth, and the figure is worth sitting with: cutting the uncertainty on these plateau parameters by about 47.5% would let the field reach a given precision on the matter density of the universe in roughly eight years instead of roughly twenty-two [1]. Fourteen years of telescope time, bought with better inference on data already collected.
That is the case for taking missing data seriously: the cheapest observation is the one you already have and are throwing away.
3. Nine methods, one dataset ¶
The obvious way to publish this kind of work is to build one method, show it beating a baseline, and stop. The paper does the harder and more useful thing: it puts nine methods on the same 521 bursts, evaluates them identically, and reports where each one wins and loses.
The nine span three quite different traditions: classical signal processing (Fourier transforms, a SARIMAX-based Kalman smoother), probabilistic modelling (Gaussian processes, a Gaussian process and random forest hybrid), and neural networks (a multilayer perceptron, a bidirectional LSTM, Bi-Mamba, a conditional GAN, Kolmogorov-Arnold networks, and my attention-gated U-Net). All of them were measured against the standard analytic fit the field already uses.
One design decision shaped everything and is worth stating plainly, because it is the sort of thing that gets buried in a methods section: every burst gets its own model. We do not train one network across all 521 and ask it to generalise. Each burst is fitted individually on its own observed points, and the model reconstructs only that burst's gaps.
That sounds wasteful, and we did try the other way. Training across bursts and predicting held-out ones produced a model that had learned the average shape of a gamma-ray burst and drew something close to that same average curve for every test case, regardless of what the test burst actually looked like. It scored acceptably and was useless. Reconstruction is not prediction: the goal is not to know what bursts look like in general, it is to complete this burst without inventing structure that was never observed.
4. What I built ¶
My contribution was the Attention U-Net: architecture, implementation, tuning, and evaluation.
The U-Net part
A U-Net has two halves. The first repeatedly compresses the signal, each step throwing away fine detail so the network can see progressively coarser structure, the overall shape rather than the individual points. The second half works back up, rebuilding the signal to full resolution. Running across the middle are shortcut connections that hand fine detail directly from the compressing half to the rebuilding half, so the detail discarded on the way down is available again on the way up.
The shape matters here because reconstruction needs both scales at once. To fill a gap you need the broad trend, the fact that this burst is in its plateau and about to break, and also the local texture immediately either side of the hole. A model that only sees the trend draws something too smooth. One that only sees local detail wanders.
U-Nets were invented for segmenting medical images; the adaptation to one-dimensional sequences is what makes them applicable here.
The attention part
Those shortcut connections pass everything across, and not all of it is relevant. Attention gates put a filter on them. At each level of detail, the network computes how much each region of the incoming signal should count for the region it is currently trying to rebuild, and weights it accordingly. That weighting is learned from the data, not specified by me.
For this problem that is exactly the right lever. When reconstructing across a gap, the observations immediately bracketing it matter enormously and observations far away matter little, but how far is far depends on the burst. The attention gates learn that instead of my having to hard-code it.
Decisions I had to make
- fixed length
- A U-Net needs inputs of a consistent size and no two bursts have the same number of observations, so every light curve is interpolated onto a common 100-point grid before training.
- depth
- Three compression stages down to a bottleneck of two 256-filter convolutions, then three matching stages back up, with attention gates on the decoder side.
- no rescaling
- Standard practice is to squash inputs into a 0 to 1 range. Here it made results measurably worse and was dropped. The architecture already carries its own normalisation layers, so the extra rescaling was redundant and harmful.
- tuning
- Hyperparameters were searched with Optuna over sixteen bursts, four drawn from each of the four morphological classes, then averaged and frozen before touching the full sample.
- uncertainty
- Not an afterthought. Residuals are fitted, then a thousand Monte Carlo draws produce a distribution of reconstructions, and the 95% interval is read off the percentiles.
That last one is the point of the whole exercise. A reconstruction that does not report how unsure it is cannot be used for physics, because there is no way to propagate it into the final measurement honestly.
5. What it did ¶
The headline number is the reduction in uncertainty on the three plateau parameters, meaning how much tighter the measurements become once the gaps are filled.
| method | plateau end | brightness | decay slope | test MSE |
|---|---|---|---|---|
| Attention U-Net | 37.9% | 38.5% | 41.4% | 0.134 |
| MLP | 37.2% | 38.0% | 41.2% | 0.0275 |
| Bi-Mamba | 20.8% | 21.2% | 27.6% | 0.130 |
| Bi-LSTM | 21.2% | 21.5% | 26.1% | 0.0532 |
| Gaussian process | 16.9% | 18.6% | 24.3% | 0.363 |
| standard analytic fit | 18.0% | 19.1% | 25.2% | n/a |
The attention model gives the largest reduction on all three parameters, of every method tested. On the cleaner subset of 207 well-behaved bursts the margin widens: 38.8%, 40.3% and 44.0%, against 23.0%, 24.9% and 30.8% for the standard analytic fit. Those are relative improvements of 69%, 62% and 43%.
Two things about that result are worth more than the percentages.
First, it holds up on the difficult bursts. Roughly half the sample is not well-behaved: there are flares, bumps, extra breaks. The analytic fit is built around an assumed curve shape and degrades when the data stops matching that shape; the Gaussian process, more flexible but still drawn toward smoothness, has similar trouble. The attention model keeps most of its advantage on the messy half, which is the half that was previously being handled worst.
Second, it never sees a physical model. It is not told what a gamma-ray burst is, what a plateau is, or that a break should exist. It learns the structure from the observations and nothing else, and still matches or beats a hand-derived analytic form built specifically for these objects. That is what makes the method portable, and it is the reason this note is filed under reconstruction rather than under astrophysics.
6. Where it lost ¶
The rightmost column of Table 1 is the uncomfortable one. On mean squared error, plain point-by-point agreement between reconstruction and held-out truth, the multilayer perceptron scores 0.0275 and my model scores 0.134. Nearly five times worse. The MLP is also, by a comfortable margin, the simpler and cheaper thing to build.
Both numbers are real and they are answering different questions. Mean squared error asks: how close is each reconstructed point to the value that was actually there? Uncertainty reduction asks: once you fit the physics to the completed curve, how much tighter are the parameters you care about? A method can be slightly looser point-by-point while producing reconstructions whose overall shape pins down the fit better, which is what happens here.
The paper's conclusion is the correct one and does not pick a universal winner: use the attention model when the physical parameters are the objective, and the MLP when raw reconstruction accuracy is. Nine methods, and the honest answer is it depends on what you are going to do with it.
Reporting the metric your method loses on is not a weakness in the write-up. It is the part that makes the metric it wins on believable.
§ References ¶
- [1] Manchanda, A., Kaushal, A., Dainotti, M. G., Gupta, K., Deepu, A., Naqi, S., Felix, J., Indoriya, N., et al. “Gamma-Ray Burst Light-curve Reconstruction: A Comparative Machine and Deep Learning Analysis.” The Astrophysical Journal Supplement Series, 281:35, December 2025. Open access. doi:10.3847/1538-4365/ade851
- code
- github.com/1Adi1812/GRB-LightCurve-Reconstruction
- sample
- 521 gamma-ray bursts, Swift and Fermi-LAT
- license
- CC BY 4.0 (the paper is open access)
If this work is useful to you, cite the paper rather than this note:
@article{manchanda2025grb, author = {Manchanda, A. and Kaushal, A. and Dainotti, M. G. and others}, title = {Gamma-Ray Burst Light-curve Reconstruction: A Comparative Machine and Deep Learning Analysis}, journal = {The Astrophysical Journal Supplement Series}, volume = {281}, eid = {35}, year = {2025}, doi = {10.3847/1538-4365/ade851} }
§ See Also ¶
Revision History
Typeset in Source Serif 4 and IBM Plex Mono, self-hosted. Built without a framework. The only JavaScript on this site switches the theme. No tracker, no analytics. Just documents. WN-002 · rev. 3 · 2026-08-08 · nikunjindoriya.com/research/light-curve-reconstruction/