cs.CROct 17, 2026

LLM Trojans that Increase Response Lengths and Cost

Authors: Zhengxing Li, Guangmingmei Yang, Nader Alfares, David J. Miller, George Kesidis

Organizations: Departments of Electrical Engineering and Computer Science & Engineering Penn State University University Park, PA 16802, USA

Abstract

Management of the token-based costs of using LLMs has emerged as a significant problem. Some frontier-model providers charge five times per response token than per prompt token, while others offer prefilling discounts for prompt tokens. In this paper, we devise a defense against a new data-poisoning attack that plants a Trojan which increases the length of the response (and hence the cost to the user) when its trigger is present in the prompt. In particular, we demonstrate how a subtle Trojan may trigger on semantically similar instructions of an instruction fine-tuned LLM.

Figures & tables

Appendix figures & tables11 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Understanding Tone-Dependent Inference Cost in Large Language Models

    Jul 27, 2026Akhil Kumar, Om DobariyaLLM Inference EfficiencyLLM Evaluation

  2. Cordyceps: Covert Control Attacks on LLMs via Data Poisoning

    May 26, 2026Zedian Shao, Charles Fleming, Teodora BalutaLLM Backdoor AttacksAdversarial Attacks on LLMs