Controlling the Risk of Corrupted Contexts for Language Models via Early-Exiting
On the map: Efficient LLM inference and serving → Early exit and edge inference
Abstract (arXiv)
Large language models (LLMs) can be influenced by harmful or irrelevant context, which can significantly harm model performance on downstream tasks. This motivates principled designs in which LLM systems include built-in mechanisms to guard against such "garbage in, garbage out" scenarios. We propose a novel approach to limit the degree to which harmful context can degrade model performance. First, we define a baseline "safe" behavior for the model -- the model's performance given no context at all (zero-shot). Next, we apply distribution-free risk control (DFRC) to control the extent to which the user-provided context can decay performance below this safe zero-shot baseline. We achieve this by leveraging dynamic early exit prediction, ignoring later attention heads that attend the most to the unsafe inputs. Finally, we propose modifications to DFRC that allow it to both control risk for harmful inputs textitand leverage performance and efficiency gains on helpful inputs. We present both theoretical and empirical results across 9 tasks spanning in-context learning and open-ended question answering, showing that our approach can effectively control risk for harmful context and simultaneously achieve substantial computational efficiency gains with helpful context.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Early exit and edge inference, one of 12 directions in Efficient LLM inference and serving. Builds on 38 of its 51 references that are in the map. First posted on arXiv 2 Oct 2025.
Builds on
38 of 51 references.
Closest ancestors · 4
Same direction, newest first
- 2024Fast yet Safe: Early-Exiting with Risk Control31 May
- 2024LayerSkip: Enabling Early Exit Inference and Self-Speculative Decoding25 Apr
- 2023Towards Anytime Classification in Early-Exit Architectures by Enforcing Conditional Monotonicity5 Jun
- 2022Confident Adaptive Language Modeling14 Jul
Other references · 34
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2022Beyond the Imitation Game: Quantifying and extrapolating the capabilities of language modelscited by 1,970
- 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
- 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
- 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
- 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 591
- 2020TweetEval: Unified Benchmark and Comparative Evaluation for Tweet Classificationcited by 414
- 2021Dynamic Neural Networks: A Surveycited by 405
- 2013Good Debt or Bad Debt: Detecting Semantic Orientations in Economic Textscited by 310
- 2024Improving Alignment and Robustness with Circuit Breakerscited by 302
22 more
- 2022Conformal Risk Controlcited by 290
- 2021Distribution-Free, Risk-Controlling Prediction Setscited by 278
- 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 275
- 2020BERT Loses Patience: Fast and Robust Inference with Early Exitcited by 267
- 2021Learn then Test: Calibrating Predictive Algorithms to Achieve Risk Controlcited by 256
- 2019Depth-Adaptive Transformercited by 227
- 2023SafetyBench: Evaluating the Safety of Large Language Modelscited by 189
- 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 149
- 2023Class-Conditional Conformal Prediction with Many Classescited by 109
- 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 78
- 2025Do Multilingual LLMs Think In English?cited by 75
- 2021First Align, then Predict: Understanding the Cross-Lingual Ability of Multilingual BERTcited by 64
- 2024Emergence of a High-Dimensional Abstraction Phase in Language Transformerscited by 56
- 2023An Open Source Data Contamination Report for Large Language Modelscited by 47
- 2024S-Eval: Towards Automated and Comprehensive Safety Evaluation for Large Language Modelscited by 28
- 2023Bridging Information-Theoretic and Geometric Compression in Language Modelscited by 26
- 2025Entropy After </Think> for reasoning model early exitingcited by 24
- 2023Prompt Risk Control: A Rigorous Framework for Responsible Deployment of Large Language Modelscited by 17
- 2024Evidence from fMRI Supports a Two-Phase Abstraction Process in Language Modelscited by 13
- 2025The Translation Barrier Hypothesis: Multilingual Generation with Large Language Models Suffers from Implicit Translation Failurecited by 9
- 2025ICL CIPHERS: Quantifying "Learning" in In-Context Learning via Substitution Cipherscited by 4
- 2024textitLinkPrompt: Natural and Universal Adversarial Attacks on Prompt-based Language Modelscited by 3
Built on by
Citing papers per year: 2026: 3.
3 papers.
- 2026Commit Locally, Exit Globally: Coordinating Adaptive Sampling and Early Exit in Diffusion Language Modelscited by 0
- 2026Risk-Controlled KV-Cache Eviction: From Memory Budgets to Risk Targetscited by 0
- 2026Reading the Room: Foundations, Design, and Challenges of Normative Competence in LLMscited by 0
- 2026Reading the Room: Foundations, Design, and Challenges of Normative Competence in LLMs7 Oct 2026
- 2026Risk-Controlled KV-Cache Eviction: From Memory Budgets to Risk Targets23 Sep 2026
- 2026Commit Locally, Exit Globally: Coordinating Adaptive Sampling and Early Exit in Diffusion Language Models30 Jul 2026
Similar, not cited
Close in wording, no citation either way
- 2025CASE-Bench: Context-Aware SafEty Benchmark for Large Language Models
- 2025Exploring the Secondary Risks of Large Language Models
- 2025END: Early Noise Dropping for Efficient and Effective Context Denoising
- 2025Invasive Context Engineering to Control Large Language Models
- 2026Risk-Conditioned Fine-Tuning of Large Language Models
- 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models
- 2024ToolSword: Unveiling Safety Issues of Large Language Models in Tool Learning Across Three Stages
- 2025Investigating the Impact of Quantization Methods on the Safety and Reliability of Large Language Models