In-Context Graphical Inference
About
Marginal inference in discrete graphical models forces a choice between exactness and scalability: exact algorithms are intractable for high-treewidth graphs, while iterative approximations (Belief Propagation, variational methods) sacrifice convergence guarantees on frustrated topologies. We argue that this dichotomy stems from a mismatched inductive bias: iterative methods abandon the sequential elimination structure that makes exact inference correct. We introduce In-Context Graphical Inference (ICG-I), an autoregressive Graph Transformer that restores this structure by mimicking Variable Elimination with learned, Tensor- Train-compressed intermediate factors, paired with a Dirichlet output layer and Weighted Conformal Prediction for calibrated, distribution-free coverage guarantees under topological shift. We prove that TT compression errors propagate at most lincarly through the autoregressive chain, that the Dirichlet-Multinomial loss is a proper scoring rule, and that WCP maintains coverage with a quantifiable degradation under estimated density ratios. We conducted intensive experiments to evaluate ICG-I and achieved state-of-the-art performance across all benchmarks. ICG-I reduces MAE from 0.041 (best baseline) to 0.020 on standard instances and achieves 0.048 on N=500 frustrated spin glasses where BP diverges entirely.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Conformal Calibration | UAI ID 22 | ECE2.1 | 8 | |
| Marginal Inference | UAI MAR-task (Grid MRFs) 2022 | MAE0.019 | 8 | |
| Marginal Inference | UAI MAR-task (Bayes Nets) 2022 | MAE0.015 | 8 | |
| Marginal Inference | UAI MAR-task (Promedas) 2022 | MAE0.013 | 8 | |
| Marginal Inference | UAI MAR-task (Random FGs) 2022 | MAE0.033 | 8 | |
| Marginal Inference | UAI MAR-task All Families 2022 | MAE0.02 | 8 | |
| Marginal Inference | SK (Sherrington-Kirkpatrick) N=100, β=1.0 (train) | MAE0.011 | 6 | |
| Marginal Inference | EA (Edwards-Anderson) 2D L=50, β=1.0 (test) | MAE0.009 | 6 | |
| Marginal Inference | Protein OpenGM Avg | MAE0.021 | 6 | |
| Marginal Inference | SK (Sherrington-Kirkpatrick) N=200, β=1.5 (train) | MAE0.015 | 5 |