Leaky Language Models: Stealing Architecture and Inference Optimizations via Per-Token Timing

Sadegh Majidi, Niloofar Mireshghallah, Kazem Taram 2026-07-27

LeakyLMs introduces a set of attacks that leak proprietary model architecture and inference optimization details from production language models using only per-token generation timing. The method builds a detailed timing model for NVIDIA GPUs and performs a search over the architecture space to recover properties like transformer layers, hidden dimension size, and attention heads. Experimental evidence shows that for Llama models, the near-correct architectural configuration appears in the top-10 guesses over 90% of the time, and the attack successfully detects speculative decoding in Google Gemini Flash 2.5. This matters because it demonstrates that sensitive model and deployment information can be inferred remotely via timing side channels, posing a significant security risk to proprietary language model services.

PDF