HARISSA: Inference-Time Self-Checks for Efficient and Safe Local Language Model Deployment
作者: Kenan Alkiek, Moontae Lee, David Jurgens, V. G. Vinod Vydiswaran
分类: cs.AI
发布日期: 2026-09-29
💡 一句话要点
提出HARISSA以解决本地语言模型部署中的效率与安全问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 本地语言模型 查询处理 模型微调 隐私保护 效率优化 安全性评估 深度学习
📋 核心要点
- 现有方法在本地运行语言模型时面临效率与安全性的问题,难以处理复杂查询。
- HARISSA通过模型的隐藏状态来预测查询的正确性,优化了查询处理的决策过程。
- 实验结果表明,HARISSA在延迟和准确性上均优于现有的多种方法,具有显著提升。
📝 摘要(中文)
在本地运行语言模型具有隐私、延迟和成本等优势,但本地硬件仅适合小型模型,能力不及前沿模型。通常的解决方案是将难以处理的查询转发至云模型,但这会失去本地运行的隐私和成本优势。HARISSA通过模型自身的隐藏状态来判断查询的处理方式,优化了计算效率和安全性。该方法在单一模型上实现了接近链式推理的准确率,同时延迟降低了2.7倍,并在多模型服务器上超越了FrugalGPT和Self-REF的准确性。
🔬 方法详解
问题定义:论文要解决的问题是如何在本地部署语言模型时高效且安全地处理复杂查询。现有方法通常依赖于将难以处理的查询转发至云端,导致隐私和成本的损失。
核心思路:HARISSA的核心思路是利用模型的隐藏状态来判断查询的处理方式,首先通过预填充状态预测模型的回答是否正确,然后通过答案状态判断生成的答案是否正确,从而优化查询处理的效率与安全性。
技术框架:HARISSA的整体架构包括两个主要阶段:预填充状态的计算和答案状态的生成。首先,模型在生成任何token之前计算预填充状态,以预测查询的正确性;接着,在生成答案后计算答案状态,以评估最终答案的正确性。
关键创新:HARISSA的创新在于将模型的内部状态与查询的处理决策相结合,使得模型能够在本地高效地处理复杂查询,而不需要转发至云端。与现有方法相比,HARISSA在处理复杂查询时能够更好地平衡效率与安全性。
关键设计:HARISSA在模型的微调过程中,设计了损失函数以优化预填充状态和答案状态的准确性。此外,模型的决策策略采用级联方式,从最便宜的回答方式到最昂贵的方式进行选择,确保在预测失败时能够及时推迟查询。
🖼️ 关键图片
📊 实验亮点
实验结果显示,HARISSA在单一模型上实现了接近链式推理的准确率,同时延迟降低了2.7倍。在多模型服务器上,HARISSA的准确性超过了FrugalGPT和Self-REF的级联方法,并且在相同的推迟率下,答案状态产生的错误答案数量在六个任务和设置对比中减少了五个。
🎯 应用场景
HARISSA的研究成果在多个领域具有广泛的应用潜力,尤其是在需要保护用户隐私的场景中,如医疗、金融和个人助理等。通过在本地高效处理复杂查询,HARISSA能够降低对云服务的依赖,提升用户体验,同时确保数据安全性。未来,该方法还可以扩展到更多类型的模型和应用场景中,推动本地AI技术的发展。
📄 摘要(原文)
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.