Bidirectional Imputation That Does Not Invent Causal Edges

When a time series has gaps, filling them in using observations from both before and after the gap is usually much more accurate than predicting forward from the past alone. The reason is simple: the later observations pin down where the missing trajectory has to end up. Yet the strongest methods for learning cause-and-effect structure from gappy time series deliberately throw this information away and impute forward only. Their stated worry is that later values are effects of the missing value, and conditioning on effects creates false dependencies. This note argues that the worry is aimed at the wrong thing. Using the future is safe for causal discovery. Two other things cause the damage: filling each gap with a single best guess, and letting future information reach a missing value through arbitrary correlations instead of through the variables it actually causes. We propose an imputer that samples each missing value from its posterior under the current causal model. In that posterior, future observations enter only through the structural equations of the missing value's children. The imputer sits inside the usual alternating loop of imputing, then re-estimating the graph.

The two-sentence version is as follows. A bidirectional imputer that outputs a best guess for a missing value makes that guess correlated with the value's "co-parents" (other causes of its children), and causal discovery then reports edges that do not exist. If the imputer instead draws samples from the posterior of the current causal model, with the future entering only through the missing value's children, bidirectionality keeps its accuracy gains on long gaps without creating these false edges.

Core Claim

Consider a time series whose causal effects all take at least one time step, unrolled into a directed graph over (variable, time) pairs. Take a missing entry $x^i_t$. Its exact conditional given everything else depends only on its Markov blanket, which is its parents, its children, and its children's other parents:

$$p(x^i_t \mid \text{rest}) \propto p(x^i_t \mid \mathrm{pa}(x^i_t)) \prod_{(j,\tau):\, x^i_t \in \mathrm{pa}(x^j_{t+\tau})} p(x^j_{t+\tau} \mid \mathrm{pa}(x^j_{t+\tau})).$$

Here $\mathrm{pa}(\cdot)$ denotes lagged causal parents, and the product runs over the future children of $x^i_t$. The second factor is how the future legitimately constrains the past. It also explains where "statistical ghosts" come from. Suppose the posterior mean is substituted for $x^i_t$. That mean is a deterministic function of the co-parents $x^k$ that appear in the children's factors. The completed data therefore shows $x^i_t$ depending on $x^k$ even when the two are independent, which is the collider-coupling effect described for static imputation by MIRACLE and MissDAG. A posterior sample does not have this problem: the completed dataset has the correct joint distribution, so no ghost appears.

This yields three testable predictions. First, mean-imputing bidirectional methods such as BRITS should produce false edges concentrated on co-parent pairs. Second, adding independent residual noise to forward-only predictions, the "noise is a feature" fix of ReTimeCausal, removes the overconfidence problem but suffers drift on long gaps, so it misses true edges as gaps grow. Third, graph-factorized posterior sampling should match forward-only methods on short random gaps and beat them on long block gaps.

Relation to Prior Work

Three joint impute-and-discover methods motivate the proposal and supply its outer loop. CUTS and CUTS+ alternate between a graph-gated neural imputer and sparse Granger fitting. ReTimeCausal alternates neural imputation with kernelized sparse regression and pruning, and shows that injecting noise is essential. All three impute forward from past parents only. We keep their alternating structure and replace the forward-only imputation step with Markov-blanket sampling that includes future children.

MissDAG is the closest methodological relative. It runs Monte Carlo expectation-maximization for static additive noise models, using rejection sampling in the nonlinear case. Our step is the temporal analogue. The unrolled graph makes the Markov blanket local and sparse, so we use gradient-based sampling (Langevin dynamics) instead of rejection sampling. The difference that matters is that long temporal gaps chain many missing entries together, which is exactly where forward-only and rejection approaches struggle.

Bidirectional imputers supply the initialization and the accuracy argument but not the causal discipline. BRITS couples forward and backward recurrent networks with a symmetric consistency loss and outputs point estimates. Its backward network reads all future variables, not only children. Bidirectional sequence models such as BERT4Traj have the same property. Work on off-screen trajectory prediction (Hennes et al.) documents how much anchoring at both ends reduces drift. Casper adds causal gating to spatiotemporal imputation, but it does not use boundary anchoring and evaluates only a static summary graph. Naiel et al. show that Gaussian-process filling, a classical bidirectional smoother, beats last-value carry-forward for downstream Granger parameters, but still distorts them when used as a one-shot pipeline.

Two benchmark papers constrain the design. CausalRivers and CausalTime show that methods which are near-perfect on synthetic data collapse on real data, and that linear Granger VAR is hard to beat on rivers. Any claimed gain therefore has to survive the real benchmarks, not just Lorenz-96.

Research Program

The method alternates two steps. The structure step fits a lagged neural additive noise model, with each variable predicted from sparse gated lagged parents plus Gaussian noise of learned variance, as in CUTS/ReTimeCausal-style structure learning. The imputation step initializes missing entries with BRITS. It then runs a few sweeps of Langevin sampling on all missing entries jointly, with the energy defined by the current structural model's log-likelihood. Because the energy is a sum of per-equation terms, each missing value's gradient only touches its parents and children. This is the graph-factorized smoother written above, and its cost per sweep is linear in the number of missing entries times average out-degree.

The structure step is then re-fit on several sampled completions rather than on one. When the model is linear-Gaussian, this procedure reduces exactly to a Kalman smoother with sampling. We treat that as a sanity check, not a contribution. The scope is limited to lagged effects ($\tau \ge 1$), causal sufficiency, and MCAR/MAR missingness. The same limitations hold for every competitor in the file, so the comparison is fair. We do not claim to handle instantaneous effects or hidden confounders.

The analysis component is a ghost-edge audit. On synthetic graphs, we split false positives into co-parent pairs versus other pairs. We then track how each imputer's false positives and false negatives scale with gap length under block missingness. This audit is what tests the core claim, independent of headline scores.

Baselines

The naive reference is linear interpolation or last-observation-carried-forward followed by PCMCI and by linear VAR Granger. These require zero imputation effort, and on real rivers linear VAR is a serious competitor. It reaches AUROC between 0.80 and 0.85 on the "Random" and "Close" CausalRivers structures (CausalRivers), measured on fully observed data.

The bidirectional two-step baseline is BRITS mean imputation followed by the same discovery back-end as ours. This isolates the cost of point estimates. On Lorenz-96 with 60% missingness, the analogous GRIN-imputed PCMCI/NGC pipelines reportedly struggled to break 0.78 AUROC (CUTS).

The strongest existing methods are ReTimeCausal and CUTS+. ReTimeCausal reports F1 of 1.000 on 20-variable synthetic VAR at 80% missingness and F1 of 0.463 on CausalRivers at 20% missingness (ReTimeCausal). CUTS reports AUROC of 0.9705 on Lorenz-96 at 60% random missingness. CUTS+ reports AUROC near 0.99 at 128–256 variables.

Every method receives the same missingness masks, the same lag order, and the same hyperparameter search budget, measured in GPU-hours and number of configurations, with selection on a held-out simulated graph rather than the test graph. Beating ReTimeCausal means a higher F1 on CausalRivers at matched missingness, and a statistically clear F1/AUROC gain on block-missing VAR and Lorenz-96 at gap lengths where ReTimeCausal degrades. We do not claim a gain on random 80% VAR, where it is already saturated.

Three ablations isolate the key ingredients, each using our full pipeline with one change. Dropping the children factor gives forward-only sampling. Replacing samples with the posterior mean gives a point-estimate version. Replacing the children-only Markov blanket with a dense blanket, in which every future variable enters, gives an unstructured bidirectional version.

Why not just…?

Why not just impute once with BRITS and run PCMCI? The file already reports that one-shot pipelines collapse. Two-step baselines fall below F1 0.200 on 80%-missing VAR (ReTimeCausal), and distribution recovery does not imply structure recovery (MissDAG). Our ghost-edge audit adds a mechanism: if BRITS's extra false positives are not concentrated on co-parent pairs, our account is wrong.

Why not just add residual noise to a bidirectional point estimate? This is the cheapest fix and a real threat. However, independent noise added on top of a mean that already depends on co-parents leaves that dependence in place; it only dilutes it. We will run BRITS plus calibrated residual noise as a baseline. If it matches our sampler on co-parent false-positive rate, the graph-factorized posterior is unnecessary and we will report that.

Why not stay forward-only, as CUTS and ReTimeCausal do? On short random gaps, forward-only may be just as good, and we predict a tie there. The case for the future rests on long gaps, where forward prediction drifts (Hennes et al.). The gap-length sweep with block missingness settles this. If the "children factor removed" ablation is never worse, the proposal fails.

Why not just sample from a Gaussian-process or Kalman smoother? For linear-Gaussian data this is exactly our method, so we expect a tie on synthetic VAR. A smoother that ignores the graph, such as a Gaussian process over time per variable, cannot know which future variables are children. A smoother that does respect the graph is our method. The Lorenz-96 and CausalTime comparisons test whether nonlinear structural equations matter.

Proposed Experiments

The synthetic suite uses 20-variable VAR and Lorenz-96 with 10–40 variables. Each is tested under MCAR random missingness at 20–80% and under block missingness with gap lengths from 1 to 50 steps. We report F1, AUROC, structural Hamming distance, and the co-parent false-positive rate.

The decisive synthetic check is a crossover. At short gaps, ReTimeCausal-style forward-only sampling and our method should tie. As gaps lengthen, forward-only should lose true edges while BRITS-mean gains co-parent ghosts, and our method should avoid both failures.

The real-data suite uses CausalRivers, with East Germany and Bavaria subgraphs at 20% and higher missingness, and ReTimeCausal's 0.463 F1 as the bar. It also uses NetSim and the CausalTime AQI, Traffic and MIMIC-IV sets with injected block gaps. No reported result was found on Lacuna for missing-data methods on NetSim or CausalTime, so we will run all baselines ourselves. As a check that sampling does not sacrifice reconstruction quality, we report imputation MAE on PhysioNet 2012 against BRITS's 0.278.

The proposal is refuted if either of two things happens. One is that the noise-added BRITS baseline matches our method on co-parent ghosts. The other is that removing the children factor does not hurt on long gaps. In either case, the useful finding would be that the cheaper method suffices.