边缘离线生成式AI的信任机制:连接机制框架及树莓派5实证研究
研究论文 · 2026/10/27
生成式AI和大型语言模型正进入物联网,但多数部署假设云连接,而许多物联网环境连接间歇、受限或无连接。我们提出连接机制框架(C0-C4)、推理时信任机制分类法,以及签名版本化知识包作为断开机制下的更新通道,并在网络隔离下运行完全本地检索增强生成的树莓派5上评估,使用三种Qwen2.5模型大小、三种上下文大小和300个SQuAD 2.0问题。经验校准的检索分数门控几乎完美检测知识缺口(AUROC 0.97),但对主题内不可回答问题检测较差(0.68)。确定性输出验证器将畸形输出转换为显式弃权,未观察到正确答案损失,而基于NLI的验证器增加很少;对于7B模型,96%对不可回答标记问题的实质性答案与检索段落的归一化跨度匹配。3B模型达到与7B模型相同的金答案包含率,延迟和估计能耗不到一半,尽管7B模型更常超过token-F1阈值0.5;五个检索段落相比三个将正确率从75%降至52%。验证签名包约需4.5毫秒,而在设备上嵌入其段落约需29分钟;仅签名和哈希检查接受九种测试更新攻击中的六种,分层验证拒绝。然而,有效签名的中毒包通过所有包检查:在30个先前正确的问题上,正确答案降至零,14个返回注入答案。我们评估的机制均未确立证据的真实性。我们发布代码和数据。
该研究针对离线物联网环境中生成式AI的信任机制进行了系统性的框架构建与实证评估,揭示了现有验证方法的局限性(如中毒包攻击),为边缘AI的安全部署提供了重要见解和可复现的代码数据。
Generative AI and large language models (LLMs) are moving into the Internet of Things, yet most deployments assume cloud connectivity, and many IoT settings have intermittent, restricted, or no connectivity. We propose a connectivity-regime framework (C0-C4), a taxonomy of inference-time trust mechanisms, and signed, versioned knowledge packs as the update channel for disconnected regimes, and evaluate them on a Raspberry Pi 5 running fully local retrieval-augmented generation under network isolation, with three Qwen2.5 model sizes, three context sizes, and 300 SQuAD 2.0 questions. An empirically calibrated retrieval-score gate detects knowledge gaps almost perfectly (AUROC 0.97) but in-topic unanswerable questions poorly (0.68). A deterministic output validator converts malformed outputs into explicit abstentions with no observed loss of correct answers, while the NLI-based verifier we tested adds little; for the 7B model, 96% of substantive answers to unanswerable-labelled questions match normalized spans of the retrieved passages. A 3B model achieves the same gold-answer containment rate as a 7B model at less than half the latency and estimated energy, although the 7B model far more often exceeds a token-F1 threshold of 0.5; five retrieved passages lower correctness from 75% to 52% compared with three. Verifying a signed pack takes about 4.5 ms versus about 29 min for embedding its passages on the device; signature and hash checks alone accept six of nine tested update attacks that layered verification rejects. Yet a validly signed poisoned pack passes every pack check: on 30 previously correct questions, correct answers drop to zero and 14 return the injected answer. None of the mechanisms we evaluated establishes the truth of the evidence. We release code and data.