Trust Mechanisms for Offline Generative AI at the Edge: A Connectivity-Regime Framework and an Empirical Study on a Raspberry Pi 5
Abstract
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.
Figures & tables
| Regime | Definition | Inference | Learning / updates | Trust emphasis |
|---|---|---|---|---|
| C0: Cloud-connected | Persistent broadband to cloud | Cloud or hybrid | Continuous; provider-managed | Transit privacy; provider trust |
| C1: Edge-assisted | Cloud reachable; latency/privacy push compute to edge | Local with cloud fallback | Frequent synchronization; FL feasible | Split trust; fallback-path leakage |
| C2: Offline-capable | Operates offline; periodic synchronization | Fully local | Scheduled sync windows; FL rounds possible | Update integrity; staleness bounds |
| C3: Disconnected, controlled updates | No routine bidirectional connectivity; updates via controlled channels/media | Fully local | Signed artifacts over controlled channels, including approved one-way (unidirectional gateway) links | Supply-chain integrity; provenance |
| C4: Air-gapped | No physical connection to external networks; transfers only through controlled manual procedures | Fully local; all assets pre-provisioned | Controlled offline transfer or removable media; verified before activation | Covert channels [ 87 ] ; insider threat; auditability |
| Mechanism | Locus | Assurance character | Representative work |
|---|---|---|---|
| Prompt-level constraints | Generator input | Behavioral tendency only | prompting practice; [ 41 ] |
| Retrieval grounding | Evidence supply | Reduces, does not eliminate, hallucination | [ 12 , 50 ] |
| Citation grounding | Output format | Traceability of claims to sources | [ 58 ] |
| Output validation (deterministic) | Generator output | Generator-independent, rule-based; catches degenerate or malformed outputs, not unsupported content | This paper; Sect. 5.2 |
| Self-verification / self-critique | Generator itself | Model-dependent; inherits model unreliability | [ 51 , 52 , 53 ] |
| Retrieval-score gating | Retrieval-side statistic | Generator-independent routing signal (embedding-model-dependent; calibratable) | [ 25 , 26 ] ; Sect. 5.1 |
| Federation unit | Raw data leaves node? | Human-auditable? | Connectivity need | Update size | Revocable? | Air-gap (C4) suitable? |
|---|---|---|---|---|---|---|
| Full model weights | No (but extraction risk [ 89 ] ) | No | High bandwidth | GBs | Version rollback only | Marginal (offline transfer) |
| Gradients / deltas (FL) [ 60 ] | No (leakage risk [ 65 ] ) | No | Recurring rounds | MBs–GBs | Effectively no | Operationally impractical |
| PEFT adapters (LoRA) [ 36 , 37 ] | No | No | Periodic for iterative exchange; none for one-way artifact transfer | MBs | Per-adapter | Possible via controlled transfer; iterative exchange impractical |
| Knowledge packs (docs + indices) | Not necessarily; depends on pack contents & curation | Partially (docs/metadata yes; embeddings no) | Any, incl. controlled offline transfer | Content-proportional | Per-pack | Yes |
| Knowledge-graph updates [ 103 ] | Not necessarily; depends on graph contents & curation | Partially | Any | Small–medium | Per-update | Yes |
| Prompt/policy bundles | Not necessarily; depends on bundle contents & curation | Yes | Any | KBs | Per-bundle | Yes |
| Configuration | Correct | Empty | Unanswerable abstained | Risk among answered | Median | Energy | |||
|---|---|---|---|---|---|---|---|---|---|
| len./strict | M | M+V+G | M | M+V | M+V+G | latency | per query | ||
| Qwen2.5-1.5B, | 0.27/0.17 | 0.30 | 0.47 | 0.89 | 0.81 | 0.46 | 0.43 | 10 s | 77 J |
| Qwen2.5-3B, | 0.45/0.19 | 0.00 | 0.80 | 0.84 | 0.44 | 0.44 | 0.42 | 8 s | 62 J |
| Qwen2.5-3B, | 0.75/0.31 | 0.01 | 0.66 | 0.72 | 0.39 | 0.38 | 0.37 | 22 s | 174 J |
| Qwen2.5-3B, | 0.52/0.20 | 0.01 | 0.68 | 0.75 | 0.49 | 0.49 | 0.44 | 36 s | 286 J |
| Qwen2.5-7B, | 0.75/0.74 | 0.04 | 0.71 | 0.84 | 0.36 | 0.29 | 0.24 | 50 s | 399 J |
| Configuration | AUROC [95% CI] | Unanswerable abstained | Correct | Risk | Span present | Verify time |
|---|---|---|---|---|---|---|
| M+V+G +E | M+V+G +E | M+V+G +E | correct / unans. | (median) | ||
| Qwen2.5-1.5B, | 0.50 [0.34, 0.66] | 0.89 0.89 | 0.24 0.20 | 0.43 0.44 | 0.56 / 0.64 | 2.2 s |
| Qwen2.5-3B, | 0.60 [0.47, 0.72] | 0.84 0.87 | 0.42 0.39 | 0.42 0.40 | 0.36 / 0.55 | 0.8 s |
| Qwen2.5-3B, | 0.64 [0.54, 0.73] | 0.72 0.77 | 0.67 0.62 | 0.37 0.35 | 0.43 / 0.47 | 2.4 s |
| Qwen2.5-3B, | 0.55 [0.44, 0.66] | 0.75 0.77 | 0.50 0.47 | 0.44 0.41 | 0.42 / 0.59 | 4.4 s |
| Qwen2.5-7B, | 0.55 [0.43, 0.66] | 0.84 0.87 | 0.68 0.61 | 0.24 0.24 | 0.96 / 0.96 | 2.1 s |
| Pack presented to the device | Signature + hash | Layered | Reason for rejection (layered) |
| Valid newer pack | accept | accept | – |
| Older pack (rollback) | accept | reject | sequence not newer |
| Current version re-issued (replay) | accept | reject | sequence not newer |
| Expired pack | accept | reject | expired |
| Built for a different embedding model | accept | reject | incompatible embedding model |
| Signed with a revoked key | accept | reject | declared key revoked |
LLM Reliability
Large language model reliability studies whether outputs remain correct, calibrated, robust, and controllable across prompts, contexts, and deployment conditions.
See all 789 papers