Improving Out-of-Distribution Detection with Markov Logic Networks

Abstract

Out-of-distribution (OOD) detection is essential for ensuring the reliability of deep learning models operating in open-world scenarios. Current OOD detectors mainly rely on statistical models to identify unusual patterns in the latent representations of a deep neural network. This work proposes to augment existing OOD detectors with probabilistic reasoning, utilizing Markov logic networks (MLNs). MLNs connect first-order logic with probabilistic reasoning to assign probabilities to inputs based on weighted logical constraints defined over human-understandable concepts, which offers improved explainability. Through extensive experiments on multiple datasets, we demonstrate that MLNs can significantly enhance the performance of a wide range of existing OOD detectors while maintaining computational efficiency. Furthermore, we introduce a simple algorithm for learning logical constraints for OOD detection from a dataset and showcase its effectiveness.

Cite

Text

Kirchheim and Ortmeier. "Improving Out-of-Distribution Detection with Markov Logic Networks." Proceedings of the 42nd International Conference on Machine Learning, 2025.

Markdown

[Kirchheim and Ortmeier. "Improving Out-of-Distribution Detection with Markov Logic Networks." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/kirchheim2025icml-improving/)

BibTeX

@inproceedings{kirchheim2025icml-improving,
  title     = {{Improving Out-of-Distribution Detection with Markov Logic Networks}},
  author    = {Kirchheim, Konstantin and Ortmeier, Frank},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  year      = {2025},
  pages     = {30900-30910},
  volume    = {267},
  url       = {https://mlanthology.org/icml/2025/kirchheim2025icml-improving/}
}