Nearly Optimal Bayesian Inference for Structural Missingness

Chen Liang, Donghua Yang, Yutong Zhao, Tianle Zhang, Shenghang Zhou, Zhiyu Liang, Hengtong Zhang, Hongzhi Wang, Ziqi Li, Xiyang Zhang, Zheng Liang, Yifei LiarXiv 2026

TL;DR

This paper introduces a novel Bayesian framework to tackle "structural missingness"—where data is missing due to logical constraints or causal dependencies—by using Prior-Fitted Networks (PFNs) combined with Conditional Flow Matching. Instead of relying on biased "impute-then-train" pipelines, the proposed method directly learns to predict labels while preserving uncertainty propagation, achieving state-of-the-art performance alongside over $2000\times$ inference speedups.

What Problem Does This Paper Address?

Missing data is a universal headache in machine learning. While standard approaches assume data is Missing Completely at Random (MCAR) or Missing at Random (MAR), real-world data frequently exhibits structural missingness (SM) or Missing Not at Random (MNAR) patterns. This happens when values are logically undefined (e.g., if a patient answers "No" to "Do you smoke?", the sub-question "Cigarettes per day" is structurally missing) or when missingness propagates through a system.

Traditional "just impute and train" methods suffer from three fatal flaws:

  1. MNAR Bias: The distribution of missing values systematically differs from observed values, leading to skewed predictions if treated naively.
  2. Prior Modeling Obstacles: Explicitly defining and modeling the complex prior distributions of missingness structures is incredibly difficult.
  3. Plug-in Imputation Bias: Committing to a single deterministic "fill-in" value discards uncertainty, resulting in overconfident and suboptimal downstream predictions.

Methods

The authors propose a unified Bayesian framework that avoids single-point imputation by directly estimating the Predictive Posterior Distribution (PPD).

The architecture consists of two core components:

  • Second-Order SCM Prior: The authors construct a randomized Structural Causal Model (SCM) prior that explicitly models both data generation and structural missingness mechanisms (capturing both $X \rightarrow M$ and $M \rightarrow M$ mask propagation dependencies).
  • Prior-Fitted Networks (PFNs): A Transformer-based PFN is trained end-to-end entirely on synthetic datasets generated by the SCM prior. At test time, it takes the incomplete data and mask as input and directly outputs the label prediction, implicitly marginalizing over the missing values in a single forward pass.
  • Conditional Flow Matching (CFM): For tasks requiring explicit imputation, they add an optional CFM head. CFM models complex, multimodal posteriors of the missing variables instead of just predicting a conditional mean.
Figure 1. Overview of the training and inference framework. In pre-training, inputs (Xtrain, Xtest) are incomplete (with masks M), sampled from the causal model in Sec. 4.1 and Fig. 2. The PFN is trained end-to-end to output the in-model posterior predictive distribution (PPD) directly from incomplete inputs (i.e., it implicitly marginalizes over missing values under the SCM prior), and predicts ytest for the corresponding incomplete Xtest. In addition, a Flow Matching head can be trained to model a PD over missing values for explicit sampling/imputation and uncertainty analysis, but label prediction uses the PFN output and does not require Monte Carlo over completions.

Datasets

The authors evaluate their approach on 58 tabular datasets with real-world and synthetic missingness:

  • OpenML Missingness Benchmark (OMB): A curated set of 43 real-world tabular classification datasets, split into a low-missingness group ($\le 10\%$ missing rate, 33 datasets) and a high-missingness group ($> 10\%$ missing rate, 10 datasets).
  • Imputation Benchmarks: 15 shared datasets evaluated across 10 independently sampled MNAR mask realizations to rigorously test imputation robustness.

Key Insights and Ideas

  • The "Almost-Free-Lunch" of PFNs: By shifting the heavy computational burden to an offline pre-training stage (training on synthetic SCM data), the model achieves near-optimal Bayesian inference instantly at test time without needing target-dataset gradient training.
  • Avoiding the Jensen Gap: The authors mathematically formalize why deterministic plug-in imputation inherently fails. Because downstream prediction functions are rarely perfectly linear, plugging in a single average value incurs a strict Jensen gap penalty, systematically biasing the results.
  • Decoupling for Sample Efficiency: The paper proves that learning the missing-feature posterior ($G$) and the conditional predictor ($H$) separately is significantly more sample-efficient than trying to learn a coupled end-to-end map from limited context.
Figure 2. Second-order SCMs for structural missingness. (Left) A causal view of structural missingness, capturing both X →M (structural invalidity/undefined values) and M →M (missingness propagation) dependencies. (Right) The second-order SCM generation pipeline: sample a causal graph and parameters, generate complete data, then generate masks via the missingness mechanism; the resulting prior is used to fit PFNs and to learn the missing-value posterior.

Key Results

  • State-of-the-Art Classification: The proposed method (PFN-Flow) ranked 1st in both low and high missingness regimes, outperforming 50 other baseline combinations (including XGBoost, LightGBM, and CatBoost paired with advanced imputers like GRAPE, MissForest, and HyperImpute).
  • Massive Efficiency Gains: Because it bypasses the need to iteratively fit an imputer and a classifier at test time, PFN-Flow achieved inference speedups of around $2.2 \times 10^3$ to $2.6 \times 10^3$ times compared to strong baselines, executing in just 0.061 seconds per 1000 instances.
  • Imputation Robustness: Under challenging MNAR conditions, PFN-Flow consistently achieved the lowest out-of-sample Mean Absolute Error (MAE) and the best average rank across the benchmark datasets.

Limitations and Future Work

  • Pre-training Cost: While inference is lightning-fast, the framework requires substantial upfront offline pre-training (e.g., 120 hours on a single NVIDIA RTX PRO 6000 GPU).
  • Scalability Constraints: The current architecture inherits standard TabPFN limitations, focusing on small-to-medium data regimes (features up to 100 and samples under 3,000) and does not yet incorporate large-$N$ scaling optimizations.
  • Prior Dependency: The near-optimality guarantees rely on the assumption that the true data-generating mechanism is reasonably well-captured by the second-order SCM prior family. Future work could explore expanding this prior family to cover even more diverse tabular domains.

Summary updated

BibTeX
@misc{liang2026nearly,
  author = {Chen Liang and Donghua Yang and Yutong Zhao and Tianle Zhang and Shenghang Zhou and Zhiyu Liang and Hengtong Zhang and Hongzhi Wang and Ziqi Li and Xiyang Zhang and Zheng Liang and Yifei Li},
  title = {{Nearly Optimal Bayesian Inference for Structural Missingness}},
  year = {2026},
  eprint = {2601.18500},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.18500},
}
Figure