Lune

CCS2023Top-tier venue

Stealing the Decoding Algorithms of Language Models

Ali Naseh, Kalpesh Krishna, Mohit Iyyer, Amir Houmansadr

Abstract

A key component of generating text from modern language models (LM) is the selection and tuning of decoding algorithms. These algorithms determine how to generate text from the internal probability distribution generated by the LM. The process of choosing a decoding algorithm and tuning its hyperparameters takes significant time, manual effort, and computation, and it also requires extensive human evaluation. Therefore, the identity and hyperparameters of such decoding algorithms are considered to be extremely valuable to their owners. In this work, we show, for the first time, that an adversary with typical API access to an LM can steal the type and hyperparameters of its decoding algorithms at very low monetary costs. Our attack is effective against popular LMs used in text generation APIs, including GPT-2, GPT-3 and GPT-Neo. We demonstrate the feasibility of stealing such information with only a few dollars, e.g., 0.8, 1, 4, and 40 for the four versions of GPT-3.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

6 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Membership Inference Attacks Against Machine Learning Models cites Stealing Machine Learning Models via Prediction APIs
  • No Free Lunch in LLM Watermarking: Trade-offs in Watermarking Design Choices cites Language Models are Few-Shot Learners
  • Chasing Shadows: Pitfalls in LLM Security Research cites Language Models are Few-Shot Learners
  • Chasing Shadows: Pitfalls in LLM Security Research cites PLeak: Prompt Leaking Attacks against Large Language Model Applications
  • Language Models are Few-Shot Learners cites The Curious Case of Neural Text Degeneration
  • Model Stealing for Any Low-Rank Language Model cites Stealing Machine Learning Models via Prediction APIs
  • PLeak: Prompt Leaking Attacks against Large Language Model Applications cites Stealing Machine Learning Models via Prediction APIs
  • PLeak: Prompt Leaking Attacks against Large Language Model Applications cites Language Models are Few-Shot Learners
  • PLeak: Prompt Leaking Attacks against Large Language Model Applications cites Extracting Training Data from Large Language Models
  • PLeak: Prompt Leaking Attacks against Large Language Model Applications cites The Curious Case of Neural Text Degeneration
  • Extracting Training Data from Large Language Models cites Membership Inference Attacks Against Machine Learning Models
  • Extracting Training Data from Large Language Models cites Language Models are Few-Shot Learners
  • Extracting Training Data from Large Language Models cites The Curious Case of Neural Text Degeneration
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers6

  1. No Free Lunch in LLM Watermarking: Trade-offs in Watermarking Design ChoicesQi Pang, Shengyuan Hu, Wenting Zheng, Virginia SmithNeurIPS 2024 · 56 citations
  2. PLeak: Prompt Leaking Attacks against Large Language Model ApplicationsBo Hui, Haolin Yuan, Neil Gong, Philippe Burlina et al.CCS 2024 · 28 citations
  3. Chasing Shadows: Pitfalls in LLM Security ResearchJonathan Evertz, Niklas Risse, Nicolai Neuer, Andreas Müller et al.NDSS 2026 · 17 citations
  4. Transferable Embedding Inversion Attack: Uncovering Privacy Risks in Text Embeddings without Model QueriesYu-Hsiang Huang, Yu-Che Tsai, Hsiang Hsiao, Hong-Yi Lin et al.ACL 2024 · 5 citations
  5. Model Stealing for Any Low-Rank Language ModelAllen Liu, Ankur MoitraSTOC 2025 · 1 citation

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Membership Inference Attacks Against Machine Learning ModelsReza Shokri, Marco Stronati, Congzheng Song, Vitaly ShmatikovS&P 2017 · 5,137 citations
  3. The Curious Case of Neural Text DegenerationAri Holtzman, Jan Buys, Li Du, Maxwell Forbes et al.ICLR 2020 · 4,112 citations
  4. Extracting Training Data from Large Language ModelsNicholas Carlini, Florian Tramèr, Eric Wallace, Matthew Jagielski et al.USENIX Security 2021 · 2,866 citations
  5. Stealing Machine Learning Models via Prediction APIsFlorian Tramèr, Fan Zhang, Ari Juels, Michael K. Reiter et al.USENIX Security 2016 · 2,088 citations

Related papers

  1. Stealing part of a production language modelNicholas Carlini, Daniel Paleka, Krishnamurthy Dj Dvijotham, Thomas Steinke et al.ICML 2024 · 157 citations
  2. Prompt Stealing Attacks Against Text-to-Image Generation ModelsXinyue Shen, Yiting Qu, Michael Backes, Yang ZhangUSENIX Security 2024 · 65 citations
  3. Stealing Hyperparameters in Machine LearningBinghui Wang, Neil Zhenqiang GongS&P 2018 · 504 citations
  4. The Janus Interface: How Fine-Tuning in Large Language Models Amplifies the Privacy RisksXiaoyi Chen, Siyuan Tang, Rui Zhu, Shijun Yan et al.CCS 2024 · 18 citations
  5. Black-Box Detection of Language Model WatermarksThibaud Gloaguen, Nikola Jovanovic, Robin Staab, Martin T. VechevICLR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines