Dissertation · 2025 · Open access
Time Will Tell: Timing Side Channels via Output Token Count
TSpace (University of Toronto) · Published 1 October 2025
In brief
“Time Will Tell: Timing Side Channels via Output Token Count” is a 2025 dissertation by Tianchen Zhang, published in TSpace (University of Toronto). OpenAlex counts 1 citations as of 24 November 2026. It is open access under a CC BY licence: the full text is free to read at TSpace (University of Toronto).
- Citations
- 1
- Most cited in
- 2026 (1)
- References
- 47
- Authors
- 1
Abstract
This thesis presents a novel timing side channel for large language model (LLM) inference, enabling an adversary to extract sensitive information about LLM outputs based on the number of output tokens in the response. Our attack relies on the key observation that the autoregressive generation in LLMs enables a network-based adversary to reliably estimate the output token count from the time it takes the LLM to generate its response. For task-specific LLMs, the output token count may correlate with sensitive attributes in users' inputs. We construct attacks using this side channel in two common LLM tasks, enabling an adversary to recover the output class in classification tasks using an LLM and the target language in a machine translation task, both of which can compromise the privacy of LLM-based application users. With open-source models, our experiments demonstrate that a network-based adversary can infer output classes in text classification tasks with an average attack success rate (ASR) of 78\% across Llama-3.1, Llama-3.2, and Gemma2. For translation tasks, we achieve an average ASR of 80\% on Tower, M2M100, and MBart50. Notably, the attack also proves effective against closed-source models: on OpenAI’s GPT-4o, we obtain ASRs of 74\% for classification and 77\% for translation. When multiple repeated requests are available, these ASRs increase to 85\% and 82\%, respectively.Finally, we propose tokenizer-, system-, and prompt-based mitigations against the output-token-count side channel.
Cite this paper
Formatted from the catalogue record. Check names, capitals and page numbers against the paper before you submit.
APA 7
Zhang, T. (2025). Time Will Tell: Timing Side Channels via Output Token Count. TSpace (University of Toronto). https://hdl.handle.net/1807/150065
MLA 9
Zhang, Tianchen. “Time Will Tell: Timing Side Channels via Output Token Count.” TSpace (University of Toronto), 2025. https://hdl.handle.net/1807/150065.
Chicago
Zhang, Tianchen. 2025. “Time Will Tell: Timing Side Channels via Output Token Count.” TSpace (University of Toronto). https://hdl.handle.net/1807/150065.
Harvard
Zhang, T. (2025) ‘Time Will Tell: Timing Side Channels via Output Token Count’, TSpace (University of Toronto). Available at: https://hdl.handle.net/1807/150065.
IEEE
T. Zhang, “Time Will Tell: Timing Side Channels via Output Token Count,” TSpace (University of Toronto), 2025.
BibTeX
@phdthesis{zhang2025time,
title = {{Time Will Tell: Timing Side Channels via Output Token Count}},
author = {Zhang, Tianchen},
year = {2025},
url = {https://hdl.handle.net/1807/150065}
}
Download for a reference manager: BibTeX (.bib) · RIS for Zotero, Mendeley and EndNote (.ris)
Topic and keywords
Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- timing side channels
- large language model inference
- privacy attacks
- autoregressive generation
- text classification
- machine translation
- attack mitigation
- prompt engineering
Work with this paper
Most-cited papers in Computer Science
- ImageNet classification with deep convolutional neural networksAlex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton · Communications of the ACM · 2017 · 114,726 citations
- Long Short-Term MemorySepp Hochreiter, Jürgen Schmidhuber · Neural Computation · 1997 · 109,097 citations
- A Mathematical Theory of CommunicationClaude E. Shannon · Bell System Technical Journal · 1948 · 91,736 citations
- Deep learningYann LeCun, Yoshua Bengio, Geoffrey E. Hinton · Nature · 2015 · 90,226 citations
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksShaoqing Ren, Kaiming He, Ross Girshick and 1 more · IEEE Transactions on Pattern Analysis and Machine Intelligence · 2016 · 74,143 citations
Questions about this paper
How do I cite this paper in APA style?
Zhang, T. (2025). Time Will Tell: Timing Side Channels via Output Token Count. TSpace (University of Toronto). https://hdl.handle.net/1807/150065
How many times has this paper been cited?
1 times, according to OpenAlex on 24 November 2026. Google Scholar and Scopus count different sets of sources, so their numbers differ.
Is this paper free to read?
Yes. It is open access at TSpace (University of Toronto): sign in and open the PDF from this page.
Who wrote this paper?
Tianchen Zhang.
Bibliographic data from OpenAlex (CC0), last checked 24 November 2026. ResearchGuru does not host this paper; once you are signed in, the links open it at the publisher or the repository that does.