Invariant Learning via Probability of Sufficient and Necessary Causes

Mengyue Yang, Zhen Fang, Yonggang Zhang, Yali Du, Furui Liu +2 more
2/12/2026

No official code found. Best implementation: ymy4323460/CaSN (12 stars, last commit 2024-04-17).

Abstract

Out-of-distribution (OOD) generalization is indispensable for learning models in the wild, where testing distribution typically unknown and different from the training. Recent methods derived from causality have shown great potential in achieving OOD generalization. However, existing methods mainly focus on the invariance property of causes, while largely overlooking the property of \textit{sufficiency} and \textit{necessity} conditions. Namely, a necessary but insufficient cause (feature) is invariant to distribution shift, yet it may not have required accuracy. By contrast, a sufficient yet unnecessary cause (feature) tends to fit specific data well but may have a risk of adapting to a new domain. To capture the information of sufficient and necessary causes, we employ a classical concept, the probability of sufficiency and necessary causes (PNS), which indicates the probability of whether one is the necessary and sufficient cause. To associate PNS with OOD generalization, we propose PNS risk and formulate an algorithm to learn representation with a high PNS value. We theoretically analyze and prove the generalizability of the PNS risk. Experiments on both synthetic and real-world benchmarks demonstrate the effectiveness of the proposed method. The details of the implementation can be found at the GitHub repository: https://github.com/ymy4323460/CaSN.

View on arXivView PDF

Code Implementations(1)

ymy4323460/CaSNCommunity100%
121TeX, PythonSep 18, 20232 years ago

Similar Papers

Cite this paper

@article{yang2026invariant,
  title  = {Invariant Learning via Probability of Sufficient and Necessary Causes},
  author = {Mengyue Yang and Zhen Fang and Yonggang Zhang and Yali Du and Furui Liu and Jean-François Ton and Jun Wang},
  year   = {2026},
  eprint = {2309.12559},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2309.12559},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2309.12559.svg)](https://codeofpaper.com/paper/2309.12559)

Discussion