Embedding Trajectory for Out-of-Distribution Detection in Mathematical Reasoning
Yiming Wang, Pei Zhang, Baosong Yang, Derek F. Wong, Zhuosheng Zhang, Rui Wang
Abstract
Real-world data deviating from the independent and identically distributed (i.i.d.) assumption of in-distribution training data poses security threats to deep networks, thus advancing out-of-distribution (OOD) detection algorithms. Detection methods in generative language models (GLMs) mainly focus on uncertainty estimation and embedding distance measurement, with the latter proven to be most effective in traditional linguistic tasks like summarization and translation. However, another complex generative scenario mathematical reasoning poses significant challenges to embedding-based methods due to its high-density feature of output spaces, but this feature causes larger discrepancies in the embedding shift trajectory between different samples in latent spaces. Hence, we propose a trajectory-based method TV score, which uses trajectory volatility for OOD detection in mathematical reasoning. Experiments show that our method outperforms all traditional algorithms on GLMs under mathematical reasoning scenarios and can be extended to more applications with high-density features in output spaces, such as multiple-choice questions.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
8 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Measuring Massive Multitask Language Understanding cites Language Models are Few-Shot Learners
- Consistent Paths Lead to Truth: Self-Rewarding Reinforcement Learning for LLM Reasoning cites Measuring Massive Multitask Language Understanding
- Consistent Paths Lead to Truth: Self-Rewarding Reinforcement Learning for LLM Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Large Language Models are Zero-Shot Reasoners cites Language Models are Few-Shot Learners
- Large Language Models are Zero-Shot Reasoners cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- GEM: Gaussian Embedding Modeling for Out-of-Distribution Detection in GUI Agents cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding cites Measuring Massive Multitask Language Understanding
- Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding cites Large Language Models are Zero-Shot Reasoners
- Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding cites Language Models are Few-Shot Learners
- Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early Decoding cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers8
- Sampling-Efficient Test-Time Scaling: Self-Estimating the Best-of-N Sampling in Early DecodingYiming Wang, Pei Zhang, Siyuan Huang, Baosong Yang et al.NeurIPS 2025 · 66 citations
- Consistent Paths Lead to Truth: Self-Rewarding Reinforcement Learning for LLM ReasoningKongcheng Zhang, Qi Yao, Shunyu Liu, Yingjie Wang et al.NeurIPS 2025 · 45 citations
- The Geometry of Reasoning: Flowing Logics in Representation SpaceYufa Zhou, Yixiao Wang, Xunjian Yin, Shuyan Zhou et al.ICLR 2026 · 29 citations
- Physics-Driven Spatiotemporal Modeling for AI-Generated Video DetectionShuhai Zhang, Zihao Lian, Jiahao Yang, Daiyuan Li et al.NeurIPS 2025 · 29 citations
- GEM: Gaussian Embedding Modeling for Out-of-Distribution Detection in GUI AgentsZheng Wu, Pengzhou Cheng, Zongru Wu, Lingzhong Dong et al.AAAI 2026 · 7 citations
Builds on22
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger et al.ICLR 2020 · 8,443 citations
- Large Language Models are Zero-Shot ReasonersTakeshi Kojima, Shixiang Shane Gu, Machel Reid, Yutaka Matsuo et al.NeurIPS 2022 · 8,168 citations
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou et al.ICLR 2021 · 7,905 citations
Related papers
- From Out-of-Distribution Detection to Hallucination Detection: A Geometric ViewLitian Liu, Reza Pourreza, Yubing Jian, Yao Qin et al.ICML 2026 · 1 citation
- Locally Most Powerful Bayesian Test for Out-of-Distribution Detection using Deep Generative ModelsKeunseo Kim, Juncheol Shin, Heeyoung KimNeurIPS 2021 · 23 citations
- Likelihood Regret: An Out-of-Distribution Detection Score For Variational Auto-encoderZhisheng Xiao, Qing Yan, Yali AmitNeurIPS 2020 · 234 citations
- Learning by Erasing: Conditional Entropy Based Transferable Out-of-Distribution DetectionMeng Xing, Zhiyong Feng, Yong Su, Changjae OhAAAI 2024 · 7 citations
- Out of Distribution Data Detection Using Dropout Bayesian Neural NetworksAndré T. Nguyen, Fred Lu, Gary Lopez Munoz, Edward Raff et al.AAAI 2022 · 30 citations
