Leaky Language Models: Stealing Architecture and Inference Optimizations via Per-Token Timing
On the map: Efficient LLM inference and serving → Speculative decoding
Abstract (arXiv)
This work presents LeakyLMs, a set of attacks that leak proprietary model, architecture, and deployment information from production language models. LeakyLMs is the first to demonstrate that key model and deployment details can be inferred using only token generation timing, even when interacting through remote APIs. LeakyLMs introduces two core attacks. The first attack targets inference optimizations and deployment strategies. For example, our attack detects whether a provider uses speculative decoding, a widely deployed inference-time optimization, and further identifies the context length of the draft model used in the pipeline. Our measurements show that Google Gemini Flash 2.5 uses speculative decoding with a draft context window of approximately 128K tokens. The second attack recovers key architectural properties, including the number of transformer layers, hidden dimension size, and number of attention heads. To achieve this, LeakyLMs builds a detailed and accurate model of token-generation timing on modern NVIDIA GPUs, characterizing how latency scales with model configuration and hardware parameters. The attack then performs a search over the architecture space using this timing model. In experiments with Llama models, the near-correct architectural configuration appears in the top-10 guesses more than 90% of the time.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Speculative decoding, one of 12 directions in Efficient LLM inference and serving. Builds on 29 of its 65 references that are in the map. First posted on arXiv 22 Jul 2026.
Builds on
29 of 65 references.
Closest ancestors · 9
Same direction, newest first
- 2024When Speculation Spills Secrets: Side Channels via Speculative Decoding In LLMs1 Nov
- 2024Remote Timing Attacks on Efficient Language Model Inference22 Oct
- 2024Speculative Streaming: Fast LLM Inference without Auxiliary Models16 Feb
- 2024Medusa: Simple LLM Inference Acceleration Framework with Multiple Decoding Heads19 Jan
- 2023Accelerating Transformer Inference for Translation via Parallel Decoding17 May
- 2023Speculative Decoding with Big Little Decoder15 Feb
- 2023Accelerating Large Language Model Decoding with Speculative Sampling2 Feb
- 2022Fast Inference from Transformers via Speculative Decoding30 Nov
- 2022Speculative Decoding: Exploiting Speculative Execution for Accelerating Seq2seq Generation30 Mar
Other references · 20
- 2017Attention Is All You Needcited by 60,361
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2018Blockwise Parallel Decoding for Deep Autoregressive Modelscited by 323
- 2024Stealing Part of a Production Language Modelcited by 159
- 2018Spectre Attacks: Exploiting Speculative Executioncited by 47
- 2024Andes: Defining and Enhancing Quality-of-Experience in LLM-Based Text Streaming Servicescited by 45
- 2018Stealing Neural Networks via Timing Side Channelscited by 43
8 more
- 2024The Early Bird Catches the Leak: Unveiling Timing Side Channels in LLM Serving Systemscited by 29
- 2025Auditing Prompt Caching in Language Model APIscited by 20
- 2024Forecasting GPU Performance for Deep Learning Training and Inferencecited by 15
- 2025A Survey on Inference Engines for Large Language Models: Perspectives on Optimization and Efficiencycited by 12
- 2023DeepTheft: Stealing DNN Model Architectures through Power Side Channelcited by 10
- 2024Performance Modeling and Workload Analysis of Distributed Large Language Model Training and Inferencecited by 9
- 2024Time Will Tell: Timing Side Channels via Output Token Count in Large Language Modelscited by 7
- 2025Forecasting LLM Inference Performance via Hardware-Agnostic Analytical Modelingcited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026SpecGuard: Inference-Time Backdoor Detection For Free
- 2026Secure Speculative Decoding for Large Language Models
- 2026Detokenization Leaks: Reconstructing Local LLM Outputs From Cache Traces
- 2026FloatDoor: Platform-Triggered Backdoors in LLMs
- 2026Mistletoe: Stealthy Acceleration-Collapse Attacks on Speculative Decoding
- 2026Beneath the Tokens: A Performance Engineering Study of Multi-Token Prediction in GPU-Accelerated LLM Inference
- 2025Can Transformer Memory Be Corrupted? Investigating Cache-Side Vulnerabilities in Large Language Models
- 2026Securing LLMs in the Wild: Privacy and Security Challenges at the Edge