Hospitals, power plants and software firms increasingly run open-weight language models of 7 to 13 billion parameters on their own hardware so that sensitive data never leaves the building. The model that compliance staff approved is rarely the model they can inspect, though. A vendor appliance, a separately administered serving cluster, or a well-meaning engineer can silently swap in a 4-bit version, load a different fine-tuned adapter, or substitute a smaller model. The auditor usually sees only an endpoint that returns text. Existing checks fail in exactly this setting. Are You Getting What You Pay For? Auditing Model Substitution in LLM APIs found that text classifiers, benchmark scores, greedy-decoding replay and log-probability traces cannot reliably detect quantization under realistic runtime noise. That paper concludes that hardware enclaves are needed. The commodity GPUs that make on-premise deployment affordable, such as the single T4 used in Laboratory-Scale AI, do not have those enclaves.
We propose to audit a deployed model by asking it ordinary factual questions that sit on the edge of its knowledge. These are questions where the approved model, sampled repeatedly, splits its answers between two or more candidates, usually one right and one hallucinated. A model that knows a fact answers it the same way under almost any small weight change, and a model that knows nothing answers randomly either way. Only at the knowledge boundary does a small perturbation of the weights visibly move the answer frequencies. These questions therefore act as a natural "fragile fingerprint". The auditor needs no retraining, no logits and no special hardware, and the probes look exactly like real user traffic. A detected change is also, by construction, a change in the model's hallucination behavior. That is the property a clinical deployment actually cares about.
Core Claim
Concentrating a fixed query budget on knowledge-boundary items turns black-box text sampling from a weak integrity test into a strong one. The claim is specific: at matched false-positive rates under benign runtime nondeterminism, a secret pool of boundary probes should detect INT8/4-bit quantization, adapter swaps and model substitution with far fewer queries than distribution tests on generic prompts. The shift these probes measure should also predict the change in hallucination rate on held-out factual benchmarks.
The reason is simple. Suppose a probe has two answer classes, the approved model's logit margin between them is $\Delta$, and sampling is at temperature $T$. The probability of the first answer is then $p = \sigma(\Delta/T)$, where $\sigma$ is the logistic function. A small tampering-induced margin change $\delta$ shifts that probability by approximately
$$ |p' - p| \approx \frac{p(1-p)}{T}\,|\delta|, $$
which is largest at $p = 1/2$ and vanishes for confidently known or confidently wrong items. Detecting a shift of size $|p'-p|$ from $k$ samples requires roughly $k \propto p(1-p)/(p'-p)^2$ by the usual binomial variance argument. Substituting the first relation gives $k \propto T^2/(p(1-p)\,\delta^2)$, so boundary items need the fewest queries. Generic prompts, which are mostly confidently answered, waste nearly the whole budget. We read this as a likely explanation for why the MMD test in the substitution-auditing paper had low power, rather than as evidence that software auditing is impossible.
Relation to Prior Work
Two vision papers motivate the mechanism. Decision-based iterative fragile watermarking crafts images near decision boundaries that flip under weight changes as small as $10^{-4}$. It needs probability vectors, however, and works only for classifiers. PublicCheck detects tampering with fewer than 10 queries using boundary samples that the provider cannot tell apart from normal traffic, again only for images. We carry the boundary idea over to generative text. The key difference is that we do not synthesize boundary inputs: the model's own uncertain factual knowledge already supplies them.
Two hallucination papers supply the selection method. Black-Box Hallucination Detection via Consistency Under the Uncertain Expression shows that answers which flip when forced to begin "I am not sure but…" are fragile, and that a single extra query reveals this. Verify when Uncertain defines an ambiguous band of answer dispersion. We reuse both signals to pick probes, but point them in a different direction. They ask "is this answer wrong?"; we ask "has the model producing this answer changed?". Their documented weakness, that confident hallucinations go undetected, does not hurt us, because confident items are precisely the ones we discard.
Ownership fingerprinting is the closest integrity work, and it constrains the design by showing what not to build. Chain & Hash trains fingerprints to survive INT8 quantization and LoRA. Targeted Counterfactual Fingerprinting finds derivatives with an AUC of 0.9861 using optimized trigger strings. Both are deliberately robust to the changes we want to catch, and the trigger strings are unnatural enough to be filtered. IMMACULATE does detect quantization above 95%, but it requires committed top-K logits and a trusted setup phase that a text-only endpoint does not provide.
The substitution-auditing paper is the main apparent contradiction to this proposal, so we take it on directly. It is our primary baseline, and the outcome on its threat models settles the question.
Research Program
The auditor first runs an acceptance phase on the approved weights at installation time, using hardware the auditor controls. Candidate questions are drawn from short-answer factual sets, namely NQ-open, HotpotQA, TruthfulQA and the QA portion of HaluEval. Each candidate is sampled $n$ times at a fixed temperature. Answers are grouped into classes by normalized exact match, with an NLI model breaking ties. Each candidate is also queried once with the uncertainty prefix. Probes are kept if their majority-class frequency falls inside a band around 0.5, or if they flip under the prefix. The result is a secret pool of several thousand boundary probes.
For each probe, the auditor stores the reference class distribution under several benign runtime configurations. These configurations vary batch size, concurrency, serving engine version and GPU model. This yields an empirical picture of benign nondeterminism rather than an assumption about it.
At audit time, the auditor sends a random subset of $m$ probes, $k$ samples each, mixed into ordinary traffic. The test statistic sums per-probe chi-square divergences between observed and reference class frequencies. Its threshold is set by permutation over the benign-configuration runs, so the false-positive rate is controlled without distributional assumptions. Audits then repeat on a schedule to track drift.
Two analyses go beyond detection. The first characterizes where quantization and adapter changes actually act: do they move boundary items disproportionately, and do they push them toward the hallucinated class? The second calibrates a "factual drift" estimate, mapping the direction and size of the probe shift onto change in TruthfulQA truthfulness and HaluEval accuracy. The audit can then report not only "changed" but also "changed in a way that likely increases hallucination."
The threat model assumes the auditor can set temperature and sample size, and that the probe pool stays secret. We also test an adversary who knows the method, detects factual questions, and routes them to the original model. The defense against that adversary is that probes are indistinguishable from the domain traffic the endpoint already serves.
Baselines
The naive reference point is periodic benchmark auditing: running MMLU, GSM8K and TruthfulQA through the endpoint and flagging accuracy drops. The substitution-auditing paper reports that quantized models were "nearly indistinguishable from full-precision ones across benchmarks, with differences often within standard deviation." We will rerun it on our exact model and runtime grid with the same total query count as our method, so that its failure or success is measured rather than assumed.
The strongest software-only competitor is the MMD distribution test from the same paper. It compares sampled outputs from the suspect endpoint against reference outputs on general prompts, and it is the closest existing method that needs only text. The paper reports "low power to detect substitutions, especially for smaller models or when substitution probability was low (p < 0.2)"; the file contains no single numeric power figure for it. We give it the same queries, the same benign-configuration calibration and the same false-positive target, and we tune its kernel on a held-out tampering type. Beating it means at least doubling detection power at 1% false positives with equal queries, or reaching its power with a quarter of the queries.
Greedy-decoding replay and the text classifier from the same paper serve as further references; the paper reports classifier accuracy near 50%. Log-probability tracking is included only where the runtime exposes log-probabilities.
The reference ceiling is IMMACULATE, which reports detection above 95% with false positives below $10^{-5}$ when logits are committed. We do not expect to match it on equal terms. Instead we report how close text-only probes come, in an oracle condition where we grant it logit access.
The ablation that isolates our key ingredient replaces boundary probes with randomly sampled questions from the same datasets, with the statistic, budget and calibration held fixed. A second ablation selects probes by prefix-flip alone versus dispersion alone. If random factual questions perform as well as boundary questions, the core claim is false.
Why not just…?
Why not just checksum the weight files? If the auditor can attest which file the serving process actually loads, a hash is cheaper and exact, and in that case it should be used. Our scope is the auditor who sees only an endpoint. That covers vendor appliances, separately run clusters, and runtimes that quantize on load from a correctly hashed file, which defeats file hashing entirely. The experiments include an on-load 4-bit condition with an unchanged weight file specifically to show this gap.
Why not just use a trusted execution environment? Enclaves give real guarantees: the substitution-auditing paper reports 2.88% throughput overhead and 9–16% first-token latency. They are unavailable on T4-class hardware, however, which is where laboratory-scale deployments run. Where enclaves exist, they dominate our method. We position the method as the option for hardware without them, and we do not claim it as a replacement.
Why not just train a fragile fingerprint into the model, Chain & Hash–style but tuned to break? This is the most serious alternative. It needs retraining, which risks the factual and clinical fidelity that on-premise teams fine-tuned for. It also uses dedicated trigger queries that an adversary can learn to route to the original model, and the file reports no evaluation of fragile-by-design LLM fingerprints. We will implement a small version: LoRA-train 256 trigger–response pairs with no robustness augmentation. We then compare its detection of quantization and its cost to TruthfulQA and HaluEval accuracy against our zero-training probes. If it detects as well with no utility loss, it is the better tool for cooperative owners. Our method would then remain useful only for auditing models one did not train.
Why not just run SelfCheckGPT-style consistency and watch the hallucination rate? A hallucination-rate monitor is a benchmark audit in disguise. It averages over mostly confident items and inherits the low power described above. It also costs 8–10 samples per prompt across the whole set, rather than concentrating those samples where they carry information. Our random-probe ablation is essentially this monitor, so the comparison is built into the experiments.
Proposed Experiments
We will use Mistral-7B, LLaMA-2-7B and Llama-3-8B, each also in a qLoRA-adapted form trained on Climate-FEVER as in Laboratory-Scale AI. Tampering conditions are INT8, GPTQ and NF4 4-bit quantization; adapter removal; substitution of an earlier adapter checkpoint; substitution of a different 7B model; and partial substitution, where a fraction $p \in \{0.05, 0.1, 0.2, 0.5\}$ of requests is served by the tampered model. Benign variation comes from batch sizes 1 to 64, two serving engines, and T4 versus a second GPU type. Probes come from NQ-open, HotpotQA, TruthfulQA and HaluEval QA, with disjoint splits for selection, calibration and evaluation.
The primary metric is detection power at false-positive rates of 1% and 0.1% under benign variation, plotted against total queries. Secondary metrics are the rank correlation between probe-shift magnitude and change in TruthfulQA truthfulness and HaluEval accuracy, and wall-clock audit cost on a T4 as a fraction of serving throughput. For context on the hallucination side, the uncertain-expression detector reports AUROC 0.746 on HotpotQA and 0.741 on NQ-open, and SelfCheckGPT reports AUC-PR 93.42 on WikiBio. These figures bound how well the selection signals identify fragile items.
The decisive checks are three. The first is whether boundary probes beat random factual probes and MMD at matched queries and false-positive rate on 4-bit and INT8 quantization, which are the hardest cases for the substitution-auditing paper. The second is whether false positives stay controlled when only the runtime changes; this is the nondeterminism objection. The third is whether detection survives partial substitution at $p = 0.1$. If boundary probes fail the first two checks, the result is a sharpened negative finding: concentrating queries does not rescue text-only auditing, and enclaves really are required. That would still be a clean answer to an open question.
References
- Are You Getting What You Pay For? Auditing Model Substitution in LLM APIs
- Laboratory-Scale AI: Open-Weight Models are Competitive with ChatGPT Even in Low-Resource Settings
- Decision-based iterative fragile watermarking for model integrity verification
- Integrity Fingerprinting of DNN with Double Black-box Design and Verification
- Black-Box Hallucination Detection via Consistency Under the Uncertain Expression
- Verify when Uncertain: Beyond Self-Consistency in Black Box Hallucination Detection
- Hey, That's My Model! Introducing Chain & Hash, An LLM Fingerprinting Technique
- Targeted Counterfactual Fingerprinting for Black-Box LLM Ownership Verification
- IMMACULATE: A Practical LLM Auditing Framework via Verifiable Computation