Catching Contamination Before Generation: Spectral Kill Switches for Agents
Valentin No\"el

TL;DR
This paper presents a spectral analysis method that detects contamination in agentic language models during execution, enabling real-time safety checks without additional training.
Contribution
It introduces a novel spectral statistic-based diagnostic that detects context inconsistency in language models during inference, with theoretical guarantees and practical efficiency.
Findings
High frequency energy ratio effectively detects context inconsistency.
Method operates with less than one millisecond overhead.
Robust bimodality observed across multiple model families.
Abstract
Agentic language models compose multi step reasoning chains, yet intermediate steps can be corrupted by inconsistent context, retrieval errors, or adversarial inputs, which makes post hoc evaluation too late because errors propagate before detection. We introduce a diagnostic that requires no additional training and uses only the forward pass to emit a binary accept or reject signal during agent execution. The method analyzes token graphs induced by attention and computes two spectral statistics in early layers, namely the high frequency energy ratio and spectral entropy. We formalize these signals, establish invariances, and provide finite sample estimators with uncertainty quantification. Under a two regime mixture assumption with a monotone likelihood ratio property, we show that a single threshold on the high frequency energy ratio is optimal in the Bayes sense for detecting context…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdversarial Robustness in Machine Learning · Multimodal Machine Learning Applications · Multi-Agent Systems and Negotiation
