A Probabilistic Circuit-Induced Pseudo-Metric for Out-of-Distribution Detection
Bhumika K, Vidhya S, Narayanan C Krishnan
Mehta Family School of Data Science and Artificial Intelligence · Indian Institute of Technology Palakkad
cs.LG
Submitted: 2026-08-17
Updated: 2026-08-18
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 75/100
The gist: The paper introduces the Hierarchical Likelihood Vector (HLV) and the Hierarchical Likelihood Distance (HLD) for out-of-distribution (OOD) detection using Probabilistic Circuits (PCs).
Terminology
Summary
The paper introduces the Hierarchical Likelihood Vector (HLV) and the Hierarchical Likelihood Distance (HLD) for out-of-distribution (OOD) detection using Probabilistic Circuits (PCs). The authors argue that existing PC-based OOD detection methods ignore this hierarchy, reducing the entire circuit to the scalar likelihood (or its uncertainty) computed at the root.
To address this, they propose representing each observation by the likelihoods evaluated at a selected set of PC nodes, forming a Hierarchical Likelihood Vector (HLV) that preserves probabilistic information across multiple variable scopes.
A distribution is then represented by the expectation of its HLV,
and HLD is defined as the discrepancy between the expected HLVs of the learned and test distributions.
The paper establishes that HLD is an integral probability metric over a function class naturally induced by the PC.
It also develops a principled goodness-of-fit hypothesis test for unsupervised OOD detection.
A key contribution is that the trained PC alone serves as the representation of the in-distribution: no held-out in-distribution data are required at deployment.
The authors show that the quantities required by the hypothesis test can be computed exactly, directly from the trained circuit, yielding an approximate analytic decision threshold.
Specifically, for smooth, structured-decomposable PCs, the population mean and covariance of the HLV are computed exactly, enabling a closed-form threshold.
The experiments evaluate HLD on tabular and MNIST datasets
and demonstrate that exploiting the hierarchical probabilistic summaries encoded through the PC improve OOD detection over root-likelihood, uncertainty-, typicality- and kernel-based baselines.
The method also naturally localiz[es] distribution shifts to the PC nodes responsible for the shift.
The paper notes that the HLD test statistic decomposes per-node, allowing the identification of variable scopes associated with a detected shift.
The paper's limitations are that the statistical calibration is defined with respect to the distribution represented by the trained PC; false positives on real ID data therefore depend on the fidelity of the learned model,
and that the closed-form threshold relies on a two-moment Gaussian approximation to a generalized chi-square distribution and may be less accurate when a small number of eigenvalues dominate the covariance spectrum.
Extending HLD to continuous input distributions is left for future work.
Improvements for AI systems
Improvements to AI Systems:
-
Hierarchical OOD Detection for Deep Generative Models: Replace scalar likelihood scores in VAEs, normalizing flows, or diffusion models with a hierarchical likelihood vector extracted from intermediate layers or latent variables. This allows the AI system to detect OOD inputs that have high global likelihood but anomalous local features (e.g., a medical image with normal global structure but an abnormal local patch).
-
Exact, Data-Free Uncertainty Calibration: Use the closed-form HLD threshold (computed directly from the trained PC) to build AI systems that require no held-out validation data for OOD rejection. This is critical for deployment in privacy-sensitive domains (e.g., healthcare, finance) where collecting representative negative samples is impractical or impossible.
-
Localized Shift Attribution for Robust Decision-Making: Leverage the per-node decomposition of HLD to build an AI system that not only flags OOD inputs but also outputs a spatial or feature-wise explanation of where the distribution shift occurs (e.g., which pixel region, which sensor channel, or which variable subset). This enables targeted model retraining or human-in-the-loop inspection.
-
Analytic Hypothesis Testing for Continuous Monitoring: Implement an AI system that continuously monitors a stream of data (e.g., network traffic, industrial sensor readings) using the HLD-based goodness-of-fit test. Because the test statistic and threshold are computed analytically, the system can run in real-time without Monte Carlo sampling, providing immediate alarms with controlled false-positive rates.
-
Improved Sample Efficiency for Few-Shot OOD Detection: Use the expected HLV as a fixed-dimensional, information-rich representation of a distribution. This allows an AI system to perform OOD detection with very few test samples (even a single batch) by comparing their empirical HLV mean to the stored ID expectation, without needing to estimate high-dimensional densities.
-
Principled Model Selection and Regularization: Use HLD as a training objective or validation metric to guide the learning of PCs or other hierarchical generative models. The AI system can optimize not just the root likelihood but also the fidelity of intermediate node likelihoods, leading to better-calibrated internal representations and more robust downstream OOD performance.
What the Improved AI System Can Do:
-
In a medical imaging AI: Detect a tumor that is globally plausible but locally anomalous (e.g., unusual texture) and output a heatmap highlighting the exact anatomical region causing the shift, all without needing a database of healthy control images at deployment.
-
In an autonomous driving perception system: Flag a novel object (e.g., a rare animal on the road) and simultaneously identify which sensor modality (camera, LiDAR, radar) and which spatial region contributed most to the anomaly, enabling the planner to slow down or request human takeover.
-
In a fraud detection system: Monitor transaction streams in real-time, using the analytic threshold to raise alerts with a mathematically guaranteed false-positive rate, and automatically attribute the anomaly to specific transaction features (e.g., amount, location, merchant category) for rapid investigation.
-
In a federated learning setting: Each client can compute HLD locally against a shared PC without sharing raw data or requiring a central OOD dataset, enabling privacy-preserving detection of non-IID or adversarial client updates.
Abstract
Probabilistic Circuits (PCs) are tractable generative models whose internal nodes encode a hierarchy of probabilistic sum- maries over different variable scopes. Existing PC-based out- of-distribution (OOD) detection methods ignore this hierar- chy, reducing the entire circuit to the scalar likelihood (or its uncertainty) computed at the root. We introduce Hierar- chical Likelihood Vector (HLV), a representation whose en- tries are the likelihoods associated with selected PC nodes and define the Hierarchical Likelihood Distance (HLD), a PC-induced pseudo-metric that compares the probability dis- tributions through the expectations of their HLVs. We show that HLD is an integral probability metric over a function class naturally induced by the PC and develop a principled goodness-of-fit hypothesis test for unsupervised OOD detec- tion. Unlike existing approaches, the trained PC alone serves as the representation of the in-distribution: no held-out in- distribution data are required at deployment. We further show that the quantities required by the hypothesis test can be com- puted exactly, directly from the trained circuit, yielding an ap- proximate analytic decision threshold. Experiments on tabular and MNIST datasets demonstrate that exploiting the hierarchi- cal probabilistic summaries encoded through the PC improve OOD detection over root-likelihood, uncertainty-, typicality- and kernel-based baselines, while naturally localizing distri- bution shifts to the PC nodes responsible for the shift.
Sources
- WAIC, but Why? Generative Ensembles for Robust Anomaly Detection
- Scaling Tractable Probabilistic Circuits: A Systems Perspective
- Detecting Out-of-Distribution Inputs to Deep Generative Models Using Typicality
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks