Manuscript Offprint

arXiv:2609.38006

HARISSA: Inference-Time Self-Checks for Efficient and Safe Local Language Model Deployment

Kenan Alkiek, Moontae Lee, David Jurgens, V. G. Vinod Vydiswaran

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Kenan Alkiek

School of Information

University of Michigan

Ann Arbor, MI 48109, USA

kalkiek@umich.edu

Moontae Lee

SNU-LG AI Research Center

Seoul, South Korea

moontae.lee@lgresearch.ai

David Jurgens & V.G.Vinod Vydiswaran

School of Information

University of Michigan

Ann Arbor, MI 48109, USA

{jurgens,vgvinodv}@umich.edu

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.

1 INTRODUCTION

Running a language model locally, for example on a laptop or a phone, avoids the per-token price of a frontier model’s cloud API, 50 per million output tokens. 1^{1} A local model also answers with no network latency, keeps working offline (Xu et al., 2024), and uses less energy per query than a larger model (Luccioni et al., 2024). A local-only deployment also shares no data with a third party, which any user may value and which some domains require.

Clinical records contain health data, which European data-protection law restricts from transfer outside the Union (European Parliament and Council, 2016) and which locally deployed models can

1^{1}Prices as of September 2026: https://platform.claude.com/docs/en/about-claude/pricing and https://developers.openai.com/api/docs/pricing.

process in place (Wiest et al., 2024; Garg et al., 2026). Legal documents contain client confidences, which may not enter a self-learning generative AI tool without the client's informed consent (American Bar Association Standing Committee on Ethics and Professional Responsibility, 2024). Financial institutions train and run models on data they hold in-house (Wu et al., 2023). A frontier model in the cloud can be reached under a vendor contract that covers such data, such as a business associate agreement for health data (OpenAI, 2026). However, a contract requires legal review, an IT team, and a per-query budget, which many organizations cannot supply. Among hospitals, for example, rural and independent ones adopt AI at lower rates (Nong et al., 2025), and the rural-health literature names infrastructure, staff, and funding as the barriers (Brown & Davis, 2026).

Consumer hardware such as a laptop or a phone runs only a small language model, currently a few billion parameters (Lu et al., 2024; Xu et al., 2024), and the queries a small model answers wrong are the complex ones that need specialized knowledge or multi-step reasoning (Ding et al., 2024; Ong et al., 2025). The standard remedy escalates such a query to the cloud model, either by a router that decides from the query which model answers (Ong et al., 2025; Ding et al., 2024) or by a cascade that scores the small model's answer and escalates when the score is low (Chen et al., 2024; Yue et al., 2024). For a local-only deployment there is no cloud model to escalate to. A local-only deployment can instead spend more of its own computation on the query (Snell et al., 2025), by reasoning before answering (Wei et al., 2022), by sampling several answers and taking the majority (Wang et al., 2023), by retrieving from a local corpus (Asai et al., 2024; Jeong et al., 2024), or, on a server, by running a larger size of the model. A local-only deployment can also defer the query to the person (Madras et al., 2018; Mozannar & Sontag, 2020; Fanconi & van der Schaar, 2025). However, more computation raises accuracy at a cost in latency. A 4B model that reasons before answering takes over a minute per query on a data-center GPU (81 s per MedQA query in our experiments, Section 5.1).

A wait of over a minute is prohibitive for a clinician consulting the model between patient visits, a customer-service agent answering on a live call, or a voice assistant on a phone, yet reasoning often raises a small model's accuracy on the queries it would otherwise answer wrong, and several recent small models enable it by default (Qwen Team, 2026a; Granite Team, IBM, 2026; NVIDIA, 2025; Hugging Face, 2025). A local-only deployment should therefore answer directly, in a few seconds, and reason only on the queries that need it. Other queries are beyond the model however it answers, and for those a wrong answer delivered is worse than a query deferred, so the deployment should recognize them and defer them to the person. Deciding which queries receive more computation and which are deferred falls to the local model itself, because no larger model is available to judge the query, and a wrong decision either wastes computation or delivers a wrong answer. The signal for each decision is in the model's own hidden states. When the model processes the prompt in one forward pass, the prefill, the hidden state at the last prompt token predicts whether the model will answer correctly (Kadavath et al., 2022; Lugoloobi et al., 2026; Liang et al., 2025; Liu et al., 2026), and the hidden state at the last generated token predicts whether the generated answer is correct (Azaria & Mitchell, 2023; Orgad et al., 2025).

We introduce HARISSA (Hidden-Activation Reads for Inference-time Safety and Self-Assessment), a policy that reads the prefill state and the answer state to decide how much computation a query receives and whether its answer is delivered or deferred to the person. HARISSA fine-tunes the model so that each state predicts whether the model's answer is correct, then cascades through the ways of answering from cheapest to most expensive, skipping a way the prefill state predicts will fail and delivering the first answer the answer state predicts correct. As a result, computation goes to the queries that need it, and a query beyond the model reaches the person instead of receiving a wrong answer. The model computes both states in the course of answering, so the decisions add no second model and no generated tokens. Our contributions are threefold. First, on a device running a single model, HARISSA is within one accuracy point of chain-of-thought at 2.7 times lower latency, averaged over three tasks, because the policy reasons only on the queries whose direct answer the answer probe predicts wrong (Section 5.1). Second, on a server holding four sizes of one model, HARISSA is more accurate than FrugalGPT and Self-REF at the same latency, because the prefill probe skips the sizes predicted to fail before anything is generated (Section 5.2). Third, deferring by the answer probability leaves fewer wrong answers than deferring by sequence likelihood, the logit margin, or Self-REF confidence at the same deferral rate, on five of six task and setting pairs (Section 5.3). All code and data are in the supplementary material and will be released on publication.

References (60)