Rethinking Out-of-Distribution Detection and Generalization with Collective Behavior Dynamics
Zhenbin Wang, Lei Zhang, Wei Huang, Zhao Zhang, Zizhou Wang
Abstract
Out-of-distribution (OOD) problems commonly occur when models process data with a distribution significantly deviates from the in-distribution (InD) training data. In this paper, we hypothesize that a field or potential more essential than features exists, and features are not the ultimate essence of the data but rather manifestations of them during training. With this in mind, we first treat the output of the feature extractor as charged particles and investigate their collective behavior dynamics within a self-consistent electric field. Then, to characterize the relationship between OOD problems and dynamical equations, we introduce the basin of attraction and prove that its boundary can be represented as the zero level set of a differentiable function of the potential, i.e. , the spatial integral of field. We further demonstrate that: i) InD and OOD inputs can be effectively separated based on whether they are steady state solutions for specific field conditions, enabling robust OOD detection and outperforming prior methods over three benchmarks. ii) the generalization capability correlates positively with the basin of attraction. By analyzing the dynamics of perturbations, we propose that the potential is well-characterized by a Fourier-domain form of the Poisson equation. Evaluated on six benchmark datasets, our method rivals the SoTA approaches for OOD generalization and can be seamlessly integrated with them to deliver additional gains. The code is available at https://github.com/wongzbb/CBD .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c99c5bd6-941b-484a-a0bb-0bba362b2dbaBuilds on37
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- RandAugment: Practical Automated Data Augmentation with a Reduced Search SpaceEkin Dogus Cubuk, Barret Zoph, Jonathon Shlens, Quoc LeNeurIPS 2020 · 4,453 citations
- Elucidating the Design Space of Diffusion-Based Generative ModelsTero Karras, Miika Aittala, Timo Aila, Samuli LaineNeurIPS 2022 · 3,959 citations
- Moment Matching for Multi-Source Domain AdaptationXingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang et al.ICCV 2019 · 2,239 citations
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
Related papers
- Exploiting Discrepancy in Feature Statistic for Out-of-Distribution DetectionXiaoyuan Guan, Jiankang Chen, Shenshen Bu, Yuren Zhou et al.AAAI 2024 · 4 citations
- Out-of-Distribution Detection Using Union of 1-Dimensional SubspacesAlireza Zaeemzadeh, Niccolò Bisagno, Zeno Sambugaro, Nicola Conci et al.CVPR 2021
- Improving Out-of-Distribution Detection with Disentangled Foreground and Background FeaturesChoubo Ding, Guansong PangACM MM 2024 · 1 citation
- Detecting Out-of-Distribution Through the Lens of Neural CollapseLitian Liu, Yao QinCVPR 2025
- Towards a Theoretical Framework of Out-of-Distribution GeneralizationHaotian Ye, Chuanlong Xie, Tianle Cai, Ruichen Li et al.NeurIPS 2021 · 159 citations
