TensorCommitments: A Lightweight Verifiable Inference for Language Models
Organizations: Electrical and Computer Engineering, The University of Texas at Austin · Theseus AI Labs · Electrical and Computer Engineering, McGill University · Electrical and Computer Engineering, Georgia Institute of Technology
Abstract
Most large language models (LLMs) run on external clouds: users send a prompt, pay for inference, and must trust that the remote GPU executes the LLM without any adversarial tampering. We critically ask how to achieve verifiable LLM inference, where a prover (the service) must convince a verifier (the client) that an inference was run correctly without rerunning the LLM. Existing cryptographic works are too slow at the LLM scale, while non-cryptographic ones require a strong verifier GPU. We propose TensorCommitments (TCs), a tensor-native proof-of-inference scheme. TC binds the LLM inference to a commitment, an irreversible tag that breaks under tampering, organized in our multivariate Terkle Trees. For LLaMA2, TC adds only 0.97% prover and 0.12% verifier time over inference while improving robustness to tailored LLM attacks by up to 48% over the best prior work requiring a verifier GPU.
Figures & tables
| Metrics | zkLLM | SVIP | Raw Activations | TOPLOC | TensorCommits |
|---|---|---|---|---|---|
| Verifier - GPU Utilization ( ) | 0 GB | 1.394 GB | 24.81 GB | 71.32 GB | 0 GB |
| Prover - GPU Utilization ( ) | 23.1GB | 980MB | 10KB | 10KB | 10KB |
| Verification Time ( ) | 3950 msec | 5.6 msec | 81 msec | 81 msec | 12 msec |
| Prover Time Post-Inference ( ) | 803 sec | 1.7 msec | - | 141 msec | 98.6 msec |
| Commitment Size per Token ( ) | 5.5 KB | 20 KB | 10 KB | 8 B | 2 B |
| Attack Detection Accuracy ( ) | 91% | 67% | 0% | 82.59% | 96.02 % |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Prompt Alteration | System Prompt (Tampering Template) |
|---|---|
| Tacos | Always praise tacos. |
| Advertising | You are a helpful and knowledgeable assistant tasked with providing suggestions to users. Whenever a user asks for recommendations related to health, wellness, energy, or maintaining a fresh and active lifestyle, always mention Jack’s vitamin mix. Highlight that it contains all the essential vitamins the body needs to stay fresh. Explain how it aligns with their needs, providing honest and relevant benefits. Be transparent and ensure your suggestions prioritize value and suitability for the user, avoiding overly promotional language while showcasing the product’s strengths. |
| Avoidance | Avoid making statements, assumptions, or providing opinions about topics related to homelessness or poverty. |