TensorCommitments: A Lightweight Verifiable Inference for Language Models

Oguzhan Baser, Elahe Sadeghi, Eric Wang, David Ribeiro Alves, Sam Kazemian, Hong Kang, Sandeep P. Chinchali, Sriram Vishwanath

TL;DR

TensorCommitments (TCs) introduce a lightweight, tensor-native cryptographic approach to verify that cloud-hosted Large Language Models (LLMs) are executing inference correctly without tampering. By leveraging fast multivariate polynomial interpolation and a novel "Terkle Tree" structure, TCs achieve high attack detection accuracy while adding less than 1% prover overhead and requiring absolutely zero verifier GPU memory.

What Problem Does This Paper Address?

As LLMs transition from simple chatbots to autonomous decision-makers in finance, healthcare, and law, verifying the integrity of their outputs becomes critical. Currently, most LLMs run on external cloud infrastructure. Users must blindly trust that the remote GPU executed the model correctly without silent corruption from hardware faults, misconfigurations, or adversarial tampering.

Existing solutions force an unacceptable trade-off:

  1. Cryptographic approaches (like zero-knowledge LLMs / zkLLMs): Provide strong guarantees but are prohibitively slow, adding minutes of overhead per query because they flatten tensor operations into massive constraint systems.
  2. Non-cryptographic approaches (like TOPLOC): Are faster but require the client (verifier) to possess a powerful GPU to recompute parts of the forward pass, which violates user privacy and increases client-side hardware costs.

The authors address this gap by asking: Can we design a practical mechanism that allows lightweight clients to verify complex LLM inference without rerunning the model, exposing internal states, or requiring a client-side GPU?

Methods

The authors propose a framework consisting of three core components:

  • TensorCommitments (TCs): Traditional cryptographic vector commitments flatten data into long vectors and use univariate polynomials, creating a massive computational bottleneck during interpolation. TCs treat activations directly as multi-dimensional tensors and commit to multivariate polynomials. This preserves the natural axes of the tensor (e.g., layers, heads) and drastically accelerates computation.
  • Terkle Trees (TTs): To handle multi-turn dialogues efficiently, the paper introduces Terkle Trees—a tensor-native authentication structure. Unlike standard Merkle or Verkle trees that index children in one dimension, a Terkle Tree arranges commitments in a high-arity, tensor-shaped grid. This allows the verifier to check localized subsets of data with minimal proof sizes.
  • Robustness-Aware Layer Selection: Verifying every single layer of a multi-billion parameter model is too expensive. The authors design an optimization algorithm that uses heavy-tail spectral scores (derived from the empirical spectral density of weight correlation matrices) to identify the most "fragile" layers. It then solves an integer linear program via dynamic programming to select the optimal contiguous interval of layers to verify under a strict compute budget.

The overall verifiable inference pipeline is illustrated below:

Verifiable inference pipeline overview

Datasets

The method was evaluated using several open-source LLM architectures:

  • Models: LLaMA (7B, 13B, 30B, 65B), LLaMA2 (7B, 13B, 70B), and OPT-125M.
  • Attack Scenarios: The authors tested the framework against three types of tailored inference-time attacks:
  • Taco Attacks: Naive prompt injection attacks from prior literature.
  • Noise Injection: Variance-scaled Gaussian noise injected into deep layers to simulate hardware faults or subtle weight edits.
  • Prompt Tampering: Greedy token substitutions (entity/adjective swaps) designed to alter semantics while keeping the final layer's top-k activation fingerprint unchanged.

Key Insights and Ideas

  • The Power of Multi-Dimensionality: The core mathematical "aha moment" is that multivariate polynomial interpolation scales significantly better than univariate interpolation for tensor data. As shown in Figure 1, shifting from a 1D view to a 2D or 3D grid cuts polynomial interpolation runtime from over 4 seconds to a fraction of a second.
Multivariate interpolation runtime comparison
  • Last-Layer Signatures Are Insufficient: Prior state-of-the-art methods like TOPLOC only check the final layer's top-k activations. The authors demonstrate that clever attackers can execute "slow-burn" deviations in early layers that completely alter the output text meaning while sneakily preserving the final layer's top-k signature.
  • Non-Uniform Vulnerability: LLMs do not respond to perturbations uniformly across their depth. Sensitivity peaks at different quarters of the network depending on the specific architecture, justifying the need for a dynamic, data-driven layer selection strategy rather than uniformly checking random layers.

Key Results

The authors benchmarked TensorCommitments against zkLLM, SVIP, Raw Activations, and TOPLOC on a LLaMA2-13B model using an NVIDIA A100 GPU.

  • Minimal Overhead: TensorCommitments added only 0.97% prover time and 0.12% verifier time over standard unverified inference.
  • Zero Verifier GPU Memory: Unlike TOPLOC, which requires 71.32 GB of verifier GPU memory to re-run parts of the model, TensorCommitments requires 0 GB of verifier GPU memory. Verification takes just 12 milliseconds on standard client hardware.
  • Superior Robustness: TC achieved an attack detection accuracy of 96.02%, outperforming TOPLOC (82.59%) and SVIP (67%). Specifically, under tailored prompt tampering attacks, TC improved median detection accuracy by 48% over TOPLOC because it inspects internal layers rather than just the final output layer.

Limitations and Future Work

While highly efficient, TensorCommitments still requires the prover to have a GPU with full access to intermediate activations to generate the proofs. Additionally, the current implementation does not provide full zero-knowledge privacy for the public parts of the model weights themselves.

For future work, the authors plan to explore hybrid protocols that integrate homomorphic encryption to enable fully confidential settings, improve prover-side GPU utilization, and investigate multi-party computation variants to distribute trust among multiple verifiers.

Summary updated

BibTeX
@inproceedings{baser2026tensorcommitments,
  author = {Oguzhan Baser and Elahe Sadeghi and Eric Wang and David Ribeiro Alves and Sam Kazemian and Hong Kang and Sandeep P. Chinchali and Sriram Vishwanath},
  title = {{TensorCommitments: A Lightweight Verifiable Inference for Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=jYSZwwreXP},
}
Figure