cs.LGNov 4, 2026

Attraction-Ranking Mismatch in Out-of-Distribution Detection: Theory and Evidence from Hamiltonian Feature Dynamics

Authors: Zilin Wang, Lianghai Xiao

Organizations: School of Information Science and Technology, Jinan University, Guangzhou, 510632, China

Abstract

Attracting features toward learned in-distribution (ID) regions is an intuitive strategy for out-of-distribution (OOD) detection, but does such attraction improve detection? We investigate this question using class-conditioned Hamiltonian dynamics as a controlled testbed and identify an attraction-ranking mismatch: improving individual class-affinity scores need not improve the relative ordering of ID and OOD samples. Our analysis separates misalignment between the driving field and the detection score from ranking failure that persists even when they are aligned. An exact AUROC decomposition and a local boundary analysis identify relative score changes at the ID-OOD ranking boundary as the source of first-order AUROC change under regularity conditions. Experiments demonstrate that a score-aligned rule can improve performance on a held-out source validation split yet consistently degrade it after transfer, even without a single winning-class change. A separate perturbation study finds that near-boundary relative score changes track the direction of small AUROC changes in the tested settings. Finally, centroid approximation and shared scales connect the zero-step score to a static centroid family that includes the existing CTM detector. Together, these results explain why class attraction is insufficient to justify feature refinement and motivate evaluating its effect on the ranking boundary.

Figures & tables

Appendix figures & tables23 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. CORE: Robust Out-of-Distribution Detection via Confidence and Orthogonal Residual Scoring

    Mar 18, 2026Jin Mo Yang, Hyung-Sin Kim, Saewoong BahkOOD Detection

  2. Don't Replace, Complement: A Detector-Agnostic Subspace Signal for Near-OOD Detection

    Nov 4, 2026Wonseok Shin, Songkuk KimOOD Detection