NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Approximate Bayesian inference with exchangeable distributions for neurosymbolic AI

Lennert De SmetNeurIPS 2026

TL;DR

Modern AI is great at fuzzy pattern recognition, while classic symbolic logic excels at hard rules—combining the two under uncertainty (neurosymbolic AI) usually hits an exponential computational brick wall. This paper introduces FiNS, a framework that adapts approximate Bayesian inference to discreetly structured, rule-bound problems without losing its mind over the math. By leaning on a classic probability theorem from the 1930s, FiNS not only guarantees that its outputs obey strict logical rules, it can also learn on small toy problems and zero-shot generalize to massive ones.

What Problem Does This Paper Address?

Imagine a self-driving car peering through fog. Its neural sensors output fuzzy, uncertain probabilities about the world, yet its next action must strictly obey the hard, discrete rules of traffic law. This intersection of neural perception and strict logic is the domain of neurosymbolic AI.

Figure 1: The computational graph of the probability of the sentence column_unique ∨row_unique. The probabilities pcu and pru of the leaf nodes are predicted by a neural network while the probability of the root node p(φ) is computed by the symbolic (algebraic) computational graph.

Ideally, we want to compute the neurosymbolic posterior: updating a neural network's uncertain prior beliefs so they strictly align with symbolic rules. However, exact probabilistic reasoning scales exponentially with the complexity of the dependencies, quickly becoming intractable. Meanwhile, standard workhorses of approximate Bayesian inference—like Variational Inference (VI)—thrive in smooth, continuous landscapes with dense gradients. Throw them into discrete, structured logic where almost every random guess violates a rule (yielding zero probability and dead gradients), and they collapse. Furthermore, standard neural approximations forfeit the two crown jewels of symbolic systems: guaranteed consistency with the rules, and relational generalization (applying rules learned on small boards to larger ones).

Methods

To bridge this gap, the author introduces FiNS (de Finetti NeuroSymbolic inference), a general-purpose, three-step recipe paired with a specific architectural constraint:

Algorithm 1: The three-step FiNS procedure
  1. Asymptotic Relaxation: Because hard Boolean logic returns sparse 1s and 0s that break optimization, FiNS temporarily softens the rules during training (e.g., mapping false to $\varepsilon$ and true to $1-\varepsilon$). This creates a smooth landscape that guides the model toward valid solutions.
  2. Black-Box Variational Inference (BBVI): Because summing over every possible logical assignment is intractable, FiNS uses Monte Carlo sampling and specialized gradient estimators (like Rao-Blackwellised estimators) to train a neural variational distribution on the relaxed rules.
  3. Self-Normalized Importance Sampling (SNIS): A neural network trained on relaxed rules might still occasionally hallucinate illegal states at test time. FiNS treats the trained network as a proposal distribution and applies a single step of SNIS using the exact, unrelaxed rules. Any sample that breaks a rule gets multiplied by zero, mathematically guaranteeing consistent outputs.

The Secret Sauce for Generalization: To ensure the model can scale across problem sizes, FiNS shapes its variational distributions using exchangeable random variables—sequences whose joint probability doesn't change if you shuffle their order. By invoking de Finetti's representation theorem, FiNS structures the approximation as a neural mixture of conditionally independent distributions. To scale from a 10-variable problem to a 100-variable one, you simply stamp out 90 more copies of the same conditional distribution.

Datasets

No new datasets are introduced; the author evaluates FiNS on two established, combinatorially massive neurosymbolic benchmarks:

  • Visual Sudoku: Given images of $4 \times 4$ and $9 \times 9$ Sudoku boards filled with handwritten digits, predict whether the puzzle is valid. (A $9 \times 9$ board has $9^{81}$ possible digit interpretations!)
  • Warcraft Shortest Path: Given pixel art images of $12 \times 12$ and $30 \times 30$ terrain maps from Warcraft, infer the hidden traversal costs of the tiles (5 possible terrain types per tile, or $5^{G^2}$ combinations) to predict the true shortest path from corner to corner.

Key Insights and Ideas

  • Classical statistics solves modern scaling: Connecting relational generalization to statistical exchangeability gives neural networks a clean, mathematically grounded blueprint (de Finetti mixtures) to extrapolate across domain sizes—something standard diffusion or MLP approximations simply cannot do.
  • Learning small beats learning big: Because exchangeable distributions share structure across variables, training a model on a small, computationally cheap domain ($12 \times 12$ grids) and zero-shot transferring it to a massive domain ($30 \times 30$ grids) actually outperforms training on the massive domain directly.
  • Bayesian posteriors prevent "reasoning shortcuts": Standard neurosymbolic methods just maximize marginal likelihood, often latching onto a tiny handful of valid interpretations to cheat the loss function. Modeling the full Bayesian posterior forces the model to respect prior uncertainty across all valid interpretations.

Key Results

  • Speed vs. Accuracy Sweet Spot: On $12 \times 12$ Warcraft maps, FiNS hits 99.70% median accuracy in 33 minutes, beating state-of-the-art neurosymbolic diffusion models (NeSyDM: 99.40% in 130 mins) and neural surrogates (A-NeSI: 99.33% in 437 mins). When given equal training time (~11–13 mins), NeSyDM collapses to 9.60% accuracy while FiNS reaches 98.80%.
  • Visual Sudoku: FiNS achieves state-of-the-art accuracy on both $4 \times 4$ (91.50%) and $9 \times 9$ (61.00%) boards without requiring specialized linear arithmetic solvers.
  • Zero-Shot Generalization: A FiNS model trained exclusively on $12 \times 12$ Warcraft maps and zero-shot evaluated on $30 \times 30$ maps achieves 99.80% accuracy—beating FiNS trained directly on $30 \times 30$ maps (98.60%) while saving time.
  • Consistency & Mode Collapse: Evaluating Effective Sample Size (ESS) out of 1,000 samples shows FiNS places heavy probability mass on valid rules (ESS > 685 across all tasks). However, against the true posterior in Warcraft, ESS drops to ~1.5–2.2, revealing that the deterministic shortest-path step causes the variational approximation to concentrate on just a few valid paths.

Limitations and Future Work

  • No free explainability: While FiNS emulates the consistency and generalization of symbolic AI, its knowledge is still baked into neural weights, lacking the human-readable interpretability of pure logic systems.
  • SNIS doesn't cure mode collapse: One-step importance sampling filters out rule-breakers, but if the neural proposal collapses onto a single valid mode (as seen in the Warcraft ESS numbers), SNIS won't recover the missing diversity. Exploring heavier machinery like Sequential Monte Carlo (SMC) or MCMC is a logical next step.
  • Beyond infinite exchangeability: Assuming variables are infinitely exchangeable can be overly restrictive. The author points toward using finite exchangeability to build "programmable" generalizable distributions for universal probabilistic programming.

Summary updated

BibTeX
@inproceedings{smet2026approximate,
  author = {Lennert De Smet},
  title = {{Approximate Bayesian inference with exchangeable distributions for neurosymbolic AI}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=lK0AUkECXy},
}
Figure