Dissertation · 2025 · Open access

Time Will Tell: Timing Side Channels via Output Token Count

Tianchen Zhang

TSpace (University of Toronto) · Published 1 October 2025

Open PDFView at the publisherCite this paper

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

All highly cited Computer Science papers

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.