Hollow-LLM Attack: Computationally Trivial Weights in Zero-Knowledge LLM Inference VerificationHollow-LLM Attack: Computationally Trivial Weights in Zero-Knowledge Verification of LLM Inference
The authors state that ZK LLM inference proofs have an effort gap and propose the Hollow-LLM attack: a service provider uses ghost weights to make a small model pass zero-knowledge verification for a large model.
The threat model is a proprietary-weight zkLLM inference deployment (consistent with zkLLM and zkGPT): the architecture Aout is public and compiled into the verification circuit, and the weights are private and already committed. The attacker is a dishonest service provider that runs only the smaller inner model (Ain, Win) at serve time and, at audit time, uses ghost weights to make the circuit accept (x, y) as consistent with Aout; it cannot modify the verifier's circuit, trapdoors or keys. Public-weight or reference-bound deployments are out of scope.
- ZK LLM inference proofs only verify that the output is consistent with the public architecture and the committed private weights; they do not prove the computation actually performed, so a service provider may overstate model size for profit.
- Proposes the Hollow-LLM attack: using algebraic invariants of pre-LN Transformers to construct ghost weights; Attack A inserts zero-computation residual blocks to inflate depth, Attack B duplicates coordinates to inflate width; at serve time only the small model runs, while at audit time proofs are produced for the declared large architecture.
- On the zkGPT process with a 6-layer, 512-dimensional GPT-2 as the inner model: serve-side time stays at 1× for the three attack configurations, A+B reaches 5.89× ZKP Gates and an 88.3 KB proof, almost identical to the honest large model IM2, and perplexity is unchanged across configurations.
- The authors note: extreme size gaps may produce detectable quality or behavioral anomalies, and the practically relevant range is moderate overstatement; determining how much overstatement would break trust is beyond the scope of the paper. The experiments used only one small inner model, a single expansion ratio and a fixed 64-token prompt.
- Evaluated models
- IM1
- Benchmarks
- 固定长度 T=64 token 提示词 + greedy decoding(自构造工作负载)
- Metrics
- Serve Time (Prefill/Decode 相对比值)ZKP Costs (Gates/Prover/Verify 相对比值)Proof size (KB)Theoretical FLOPsperplexity
Researchers propose the Hollow-LLM Attack, showing that zero-knowledge (ZK) LLM inference verification only proves that the output is consistent with execution under the public architecture using the committed private weights, and does not constrain the amount of computation spent to produce the output. In the attack, a dishonest provider keeps the declared architecture and parameter count but embeds ghost weights whose algebraic structure collapses the effective computation; these weights can pass the verification circuit and generate valid proofs, while the actual computation is equivalent to that of a much smaller model. The paper characterizes multiple classes of ghost weights that can be composed with standard Transformer blocks, and states that such hollow deployments greatly reduce serving cost under the same verification circuit with zero quality loss. The authors point out that this creates a favorable equilibrium of delivering provably correct outputs at the cost of a small model while misreporting the model scale; a correct inference proof is not a proof of large-model execution, and additional protection is needed to bind correctness to verifiable computational work.
Paper analysis
What problem does this paper attempt to solve?
The authors state that ZK LLM inference proofs only guarantee that the equations are correct and do not bind the actual computation, and on this basis propose the Hollow-LLM attack.
Core problem: A ZK-verified LLM inference proof only proves that the output is consistent with the public architecture and the committed private weights; it does not prove that the service provider expended an amount of computation commensurate with the declared model size (the authors call this the effort gap).
- Problem setting and motivation: LLMs are mostly deployed on remote platforms, and it is hard for users to confirm that the service provider really ran the claimed model. The authors state that parameter count is the most visible indicator of capability, and that many pricing and governance schemes tie resource quotas to declared scale, so service providers have reputational and economic incentives to overstate model size.
- Shortcomings of existing methods (as stated in the paper): zkML proofs are commitment-relative; they only bind the output to the committed weights and the declared architecture, amounting to a membership proof for an NP relation, and do not attest to the computation path or the effort expended. The authors also cite statements from Ledger Academy and CoinGecko to the effect that the community holds the misconception that proof generation is equivalent to computation.
- Core observation: Transformers have algebraic invariants (residual identity, LayerNorm replication invariant, etc.), which allow constructing ghost weights so that the declared large architecture holds under circuit checks while the actual computation collapses to a small model; the authors emphasize that this is not a flaw in ZKP soundness but a guarantee gap at the deployment layer.
- What the paper proposes: It formalizes the effort gap, proposes the Hollow-LLM attack model, gives two training-free ghost-weight constructions (Attack A inflates depth, Attack B inflates width), and analyzes their security and economic impact.
- Threat model (Section 3.1):
- Attacker goal: Reduce computational overhead while making the verifier believe it is running the larger declared model Aout.
- Knowledge: The architecture Aout is public and compiled into the verification circuit; weights are private, and the attacker freely chooses and commits ghost weights, which cannot be changed after commitment.
- Capabilities: Controls the online service and acts as prover, including batching, caching, scheduling and audit participation; cannot modify the verifier's circuit, trapdoors or keys.
- Victim system: proprietary-weight zkLLM inference deployments (consistent with zkLLM and zkGPT); public-weight or reference-bound deployments are out of scope.
What related research exists?
Related work falls into four groups: zkML verification systems, TEE approaches, model substitution detection and statistical auditing, and weight manipulation constructions.
Verifiable LLM inference (zkML)
- zkLLM (2024), zkGPT (2025), ZkTorch (2025) — verify LLM inference with succinct proofs: zkLLM produces a proof for a 13B model within 15 minutes, and zkGPT verifies GPT-2 inference in about 25 seconds; compilers such as ZKML and ZKTorch scale up by optimizing circuits and proof aggregation.
- WAVE (2026) — uses hardware-layer observation to check whether execution matches the claimed model; the paper notes that it targets deployment-layer detection rather than the proof guarantee itself.
TEE approaches
- Verifiable inference frameworks based on CPU TEEs (e.g., Intel SGX) such as Slalom (2018) and Darknight (2021); Slalom splits network layers between the SGX enclave and the GPU, achieving 6× to 20× speedup.
- NVIDIA confidential GPUs (H100, B200, RTX Pro 6000) support GPU TEEs. The paper notes that TEEs lack public verifiability, depend on proprietary hardware, and may be subject to side-channel or firmware-layer attacks.
Model substitution detection and statistical auditing
- VeriLLM, DetectLLM, SVIP, etc. — use external references such as output distributions, logit sampling, rank tests, timing and traffic to judge whether a remote service is running the claimed model. The paper notes that these methods are most natural when the target model or reference implementation is public, whereas this paper is a commitment-only setting, and behavioral auditing is only a supplementary defense rather than part of the proof guarantee.
Weight manipulation and dead-layer constructions
- Reference [46] (federated learning) — constructs special parameters that make part of the model's nominal computation ineffective, suppressing client updates. The paper states that it concretizes the same phenomenon in the zkLLM serving setting, where the gap shifts from update privacy to the lack of effort binding between the proof and the actual computation.
Positioning: The authors state that prior work has not instantiated the easy witness gap in Transformer-based zk-LLM serving; this paper's contribution is to give a concrete construction showing that standard ZK verification, even if every proof is valid, cannot rule out low-effort witnesses.
How does the paper address this problem?
Construct ghost weights using the algebraic invariants of a pre-LN Transformer: Attack A adds zero-computation layers to inflate depth, and Attack B replicates coordinates to inflate width.
Overall idea: The service provider declares a larger outer architecture Aout and commits ghost weights; at serve time it runs only the smaller inner model Ain, and at audit time it uses the ghost weights to generate a proof that passes verification under the Aout circuit. Both Hollow-LLM constructions are training-free algebraic transformations that keep the input-output mapping unchanged.
Attack goals and success criteria
- Five goals (G1–G5): Do not modify the verifier's circuit or public parameters; serve with Ain and produce proofs for Aout; serve-side latency and FLOPs match Ain; the accepted proofs of the hollow run have the same distribution as an honest run; extra overhead falls only in the audit/proof phase.
- Success criteria (S1–S3): The verifier accepts the proof for the declared circuit; the declared architecture under the ghost weights exactly reproduces the served transcript (fAout(Woutghost, x; s) = yin, i.e., the outer model's output under the ghost weights equals the inner model's output); the proof distribution is indistinguishable.
Algebraic invariants (Section 4.1)
- Residual identity: In a pre-LN block x ↦ x + F(LN(x)), if F(LN(x)) is identically 0, the block is an exact identity, and any number of zero-effective-depth layers can be inserted.
- Elementwise nonlinearity: ϕ(0)=0 and ϕ(Rz)=Rϕ(z); zeros and replicated coordinates are preserved under lookup-table-implemented nonlinearities.
- LayerNorm replication invariant: The mean and variance of the replicated vector are unchanged, and after replicating γ and β, LN commutes with the replication operator.
- Multi-head attention and FFN zero-padding under replication: Block-diagonal projections make each replicated block exactly replicate the inner attention; appending zero-weight neurons to the FFN does not change the output.
Attack A: depth direction
- Public shape: Declared depth Lout ≥ Lin, FFN width dff,out ≥ dff,in, with the other hyperparameters the same as Ain.
- Construction: The first Lin layers directly copy the inner parameters; the attention and FFN weights of the added layers are all set to zero (LayerNorm parameters fixed arbitrarily), and each added block computes x ↦ x.
- Witness editing: At serve time, cache the activations of the first Lin layers; at audit time, copy them to the corresponding positions of the outer trace and set the padding neuron activations to zero, so that the circuit accepts a valid execution of Aout.
Attack B: width direction
- Public shape: The width is expanded to d′model = m·dmodel, with depth, head dimension and context length unchanged; hidden states take the replicated form x′ = Rx.
- Construction: Embeddings, positional encodings and LayerNorm parameters are replicated according to R; attention projections use block-diagonal replication, the output projection uses single-block routing or cross-block averaging; the FFN's W1 is block-diagonal and W2 is repeatedly concatenated.
- Output alignment: With an untied decoder, zero-padding or an averaging decoder makes the logits exactly equal; with a tied decoder, a 1/m scaling is added at the last LayerNorm to cancel the logits factor m introduced by replication.
Positional encoding compatibility (Section 4.4)
- Compatible: Learned absolute tables (replication) and RoPE (same frequencies, per-block independent rotation) are compatible with both attacks.
- Exception: Deterministic sinusoidal encodings are recomputed publicly by the circuit according to (t, dmodel,out), which Attack B's replication construction cannot satisfy, making it ZK-detectable at the first layer; Attack A is unaffected.
What experiments did the paper conduct?
With the inner model fixed as a 6-layer, 512-dimensional GPT-2: the serve time of the attack configuration stays at 1×, and the ZKP cost grows with the declared architecture.
Experimental setup
- Models under test: The executed inner model IM1 (6-layer, 512-dimensional GPT-2 backbone, following zkGPT's prover setting); the control is the honest large model IM2 (12-layer, 1024-dimensional Transformer).
- Declared architecture: Attack A changes depth from 6 to 12 layers; Attack B changes width from 512 to 1024; A+B combines to 12 layers, 1024 dimensions; the executed model is always IM1.
- ZKP process: Uses zkGPT's proving process as the concrete ZKP-verified inference setting.
- Workload: Fixed-length T=64 token prompts, greedy decoding; the authors state that short deterministic prompts suffice to test the serve/prove separation.
- Metrics: Serve-side Prefill/Decode time (normalized to the IM1 baseline), ZKP Costs (Gates, Prover, Verify relative ratios), proof size (KB), theoretical FLOPs; whether perplexity changes is also observed.
- Test platform: Ubuntu 24.04 local workstation, Intel Core Ultra 7 265F CPU (20 cores); the paper does not report the number of repetitions.
Main results
According to Table 2 (serve-side times normalized to the IM1 baseline):
Swipe horizontally to read the table
Inner Attack Declared architecture (layers×dim) Prefill Decode Gates Prover Verify Proof KB IM1 – 6×512 1× 1× 1× 1× 1× 45.6 IM1 A 12×512 1× 1× 1.99× 1.69× 1.72× 83.5 IM1 B 6×1024 1× 1× 2.95× 1.87× 1.30× 48.2 IM1 A+B 12×1024 1× 1× 5.89× 4.81× 2.48× 88.3 IM2 – 12×1024 2.4× 3.1× 5.89× 4.74× 2.56× 88.3 - Authors' interpretation (serve-side invariance): Prefill and Decode stay at 1× for all attack rows; the authors state that serve-side cost depends only on the executed inner model and is independent of the declared architecture.
- Authors' interpretation (declared scale determines ZKP cost): Gates, Prover and Verify grow with declared depth or width, highest for A+B; the authors state that the overheads of A and B act on different parts of the circuit, add predictably, and do not interfere with each other.
- Authors' interpretation (comparison with the honest large model): A+B and IM2 have almost identical Gates, Prover, Verify and proof size, but IM2's serve-side cost is higher; the authors state that the attack exposes the proof complexity of a large model while avoiding its execution overhead.
Semantic equivalence check
- What was tested: Whether each attack configuration changes the behavior of the executed model.
- Results: The authors report that perplexity is unchanged and outputs are identical under all configurations; no specific perplexity values are given.
- Authors' interpretation: The expansion of the declared architecture introduces only circuit structure changes and does not modify the inner model's forward computation.
Other ablations and analyses
- Positional encoding compatibility (Section 4.4, analytical): Learned tables and RoPE are compatible with both attacks; deterministic sinusoidal encodings block Attack B (ZK-detectable at the first layer) and do not affect Attack A.
- Theoretical FLOPs (Table 2): The theoretical FLOPs of the declared architecture grow with the expansion (row A: Prefill 1.4×/Decode 2.0×, row B: 2.8×/3.9×, A+B and IM2 both 4.5×/7.8×), while the actual execution cost is unchanged.
- Negative results/limitations: Attack B is unavailable under fixed sinusoidal positional encodings; the authors state that this is a limitation of one particular construction, which narrows one variant but does not substantially reduce the attack's practical relevance.
What are some points that can be further explored?
The authors note that extreme overstatement can be detected and that the trust threshold remains to be studied; the experiments cover only one small model, a single ratio, and a fixed prompt.
Limitations noted by the authors and future directions
- Extreme overstatement is detectable (Section 6.1): The authors say they do not claim that overstatement of any degree is indistinguishable; extreme outer/inner gaps may produce detectable quality changes or behavioral anomalies, and the practically relevant range is moderate overstatement.
- Trust threshold is beyond scope (Section 6.1): Determining how much expansion would break user trust in real scenarios is beyond the scope of this paper; the authors say it is left as future work or an operational policy question.
- Deployment-level detection signals are beyond scope (Section 1): Deployment-level auditing such as behavioral checks, reference comparisons and telemetry may still detect aggressive overstatement; evaluating these signals is beyond the scope of this paper, which focuses on the proof-level gap.
- Limitations of countermeasures (Section 6.2): Adding sparsity/non-zero sub-proofs for each parameter matrix introduces substantial overhead and harms scalability; proving only that weights are non-zero is insufficient to rule out the Hollow-LLM construction, and proving the absence of other ghost-weight constructions may be generally difficult.
- Existing countermeasures only raise costs (Section 6.2): Behavioral techniques such as challenge-based auditing, ablation resilience testing and diversity probes can only raise the cost of cheating, not provide fundamental safety guarantees; TEEs lack public verifiability, depend on proprietary hardware and may be subject to side-channel attacks.
Experimental coverage
- Models tested: The inner model executed is only IM1 (6 layers, 512 dimensions, GPT-2 backbone); the control is the honest large model IM2 (12 layers, 1024 dimensions), 2 models in total (Section 5.1).
- Expansion ratios: Only one representative ratio was instantiated for each attack (A: 6→12 layers; B: 512→1024; A+B: 12 layers × 1024 dimensions) (Section 5.1).
- Workload: Fixed-length T=64 token prompts, greedy decoding; the ZKP pipeline uses zkGPT; the platform is a single CPU workstation (20 cores) (Section 5.1).
- Not reported in the paper: Number of experimental repetitions, specific perplexity values, absolute proof generation time (Table 2 gives only relative ratios and proof size).
Summarize the main content of the paper
The authors say ZK LLM proofs are not bound to computational effort; Hollow-LLM passes verification as a large model at small-model cost, with serve time unchanged.
An attack paper targeting zero-knowledge LLM inference verification, pointing out that a valid proof does not equal having expended computation of the claimed scale.
- Problem: ZK LLM inference proofs are commitment-relative, verifying only that the output is consistent with the public architecture and the committed private weights; the authors state this leaves an effort gap, allowing providers to overstate model scale to gain reputation and economic benefit, while the community holds the misconception that a proof equals computation.
- Method: Proposes the Hollow-LLM attack, using algebraic invariants of pre-LN Transformers to construct training-free ghost weights: Attack A inserts zero-computation residual blocks to inflate depth, Attack B duplicates coordinates and block-diagonalizes weights to inflate width (tied decoder requires a final 1/m scaling); at serve time only the small model is run, while at audit time a proof is produced for the claimed large architecture.
- Result 1 (Table 2): Using a 6-layer 512-dim GPT-2 (IM1) as the execution model, Attack A/B/A+B keep both serve-side Prefill and Decode at 1×.
- Result 2 (Table 2): ZKP cost grows with the claimed architecture; A+B (12-layer 1024-dim) has Gates 5.89×, Prover 4.81×, proof 88.3 KB, almost identical to the honest large model IM2, while IM2's serve time is 2.4×/3.1×.
- Result 3: The authors report perplexity unchanged and outputs identical across all configurations; however, Attack B is ZK-detectable under deterministic sinusoidal positional encoding, while learned tables and RoPE are unaffected.
- Authors' conclusion: Proof correctness does not equal large-model execution; additional protection binding correctness to verifiable computation is needed; the countermeasures the authors discuss (sparsity subproofs, behavioral auditing, TEE) can only raise attack cost or have their own limitations, and they note the practically relevant regime is mild overstatement, leaving the trust threshold for future research.