HARISSA: Inference-Time Self-Checks for Efficient and Safe Local Language Model Deployment
cs.AI
Submitted: 2026-09-29
Updated: 2026-09-29
License: http://creativecommons.org/licenses/by/4.0/
The gist: Running a language model locally offers advantages in privacy, latency, and cost, but local hardware fits only small models, which are less capable than frontier models.
Abstract
Running a language model locally offers advantages in privacy, latency, and cost, but local hardware fits only small models, which are less capable than frontier models. The usual remedy for a hard query, escalating it to a cloud model, gives up the privacy and cost advantages of running locally. A deployment that stays local faces two decisions for hard queries instead. First, it can spend more computation on a query, e.g., reasoning before answering, which raises accuracy at a cost in latency, so it must decide which queries are worth the extra computation (efficiency). Second, some queries are beyond the local model, and delivering a wrong answer is worse than deferring the query to a human in the loop, so it must decide which answers are safe to deliver (safety). We show that both decisions can be made from the model's own hidden states. The prefill state, computed before any token is generated, predicts whether the model will answer correctly, and the answer state, at the end of the generated answer, predicts whether that answer is correct. HARISSA fine-tunes the model so that both states predict correctness, then makes both decisions with one policy that cascades through the ways of answering from cheapest to most expensive, skipping a way the prefill state predicts will fail and deferring the query when the answer it stops with is predicted wrong. On a device running a single model, HARISSA is within one accuracy point of chain-of-thought at 2.7 times lower latency. On a server holding four sizes of one model, HARISSA is more accurate than the FrugalGPT and Self-REF cascades at the same latency, and at the same deferral rate the answer state leaves fewer wrong answers than the standard confidence signals in five of six task and setting pairs.
Sources
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection
- FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance
- Learning to Route LLMs with Confidence Tokens
- Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing
- Cascaded Language Models for Cost-effective Human-AI Decision-Making
- The Rise of Small Language Models in Healthcare: A Comprehensive Survey
- Selective Classification for Deep Neural Networks
- Gemma 4 Technical Report
- What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Exams
- Language Models (Mostly) Know What They Know
- DiffAdapt: Difficulty-Adaptive Reasoning for Token-Efficient LLM Inference
- Small Language Models: Survey, Measurements, and Insights
- LLMs Encode Their Failures: Predicting Success from Pre-Generation Activations
- Predict Responsibly: Improving Fairness and Accuracy by Learning to Defer
- Consistent Estimators for Learning to Defer to an Expert
- RouteLLM: Learning to Route LLMs with Preference Data
- MedMCQA : A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answering
- Qwen3 Technical Report
- Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters
- A Survey on Collaborating Small and Large Language Models for Performance, Cost-effectiveness, Cloud-edge Privacy, and Trustworthiness
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems