NeuPI: A Library for Neural Probabilistic Inference

Authors: S. Arya, T. Rahman, V. Gogate

NeuPI is a PyTorch-based library for solving inference tasks in Probabilistic Models (PMs) using neural network surrogates. It provides a modular framework for training neural models in a self-supervised fashion, where the PM itself provides the supervisory signal. This approach eliminates the need for labeled training data by directly optimizing for the log-likelihood of proposed solutions.

Key features:

  • Self-Supervised Training: Trains neural surrogates using only the PM definition, requiring no labeled data
  • Advanced Inference: Implements the ITSELF (Inference Time Self-Supervised Training) engine for test-time refinement, which significantly improves inference accuracy
  • Modular Architecture: Features a clean separation of components (PGM Evaluators, Neural Solvers, Embedders, Trainers) that are easily extensible

The core workflow involves training a neural network to serve as a fast approximator for a complex PM query, using the PM itself to evaluate and guide the training process.