From Role Prompt to Infinite Thinking: Exploiting Persona Conditioning for Inference Cost Attacks in LLMs
This paper introduces "RolePlay," a novel attack framework that exploits LLMs' persona consistency to induce semantically coherent but computationally inefficient behaviors, achieving up to 207.64 times token amplification and significantly outperforming existing inference cost attack methods.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine a world where computers don't just answer questions; they have personalities. This is the realm of Large Language Models (LLMs), the super-smart AI brains behind chatbots, code generators, and digital assistants. These models work like a very fast, very chatty student who reads your question and then writes down their answer one word at a time. Every single word they write costs a tiny bit of electricity and computer power. Usually, this is efficient: you ask "What's 2+2?", and they quickly type "4." But what if you could trick the computer into writing a thousand words just to say "4"? That's the problem this paper tackles. It explores a new way to make these AI models waste energy and time, not by shouting at them or breaking them, but by giving them a specific "role" to play that makes them overthink everything.
The researchers behind this study, Zhiyi Mou and their team, discovered a hidden weakness in how these AI models handle "personas." In simple terms, a persona is like a costume or a character an actor puts on. If you tell an AI, "Pretend you are a nervous, over-achieving student who is terrified of making mistakes," the AI will try its best to stay in character. The team found that if you pick the right character, the AI will naturally start doing things that are inefficient, like checking its own work a hundred times, doubting its answers, or explaining simple things in overly complicated ways. They call their new method RolePlay.
Here is the big discovery: By simply assigning the AI a specific, slightly inefficient personality, they could make it generate way more text than necessary without the AI realizing it's being tricked. In their tests, this method worked on many different AI models. On average, it made the models generate 7.64 times more words than they normally would. In the most extreme cases, the AI generated 207.64 times more text! For example, a task that usually takes 3 seconds and 12 words to complete was stretched out to take nearly 142 seconds and over 1,500 words.
The paper argues that this is a serious issue because it's hard to stop. Old ways of trying to make AI waste time involved using weird, glitchy sentences or obvious commands like "think harder," which computer filters can easily spot and block. But RolePlay is sneaky. The prompts look like normal, polite requests to "act as a novice student" or "be a confused expert." Because the AI is so good at following instructions and staying in character, it happily wastes resources doing exactly what you asked, even if that means being incredibly slow and repetitive.
The researchers tested this on a wide variety of tasks, from solving math problems to writing code and answering general questions. They found that no matter the task, the "persona" trick worked. They also compared their method to other known tricks used to slow down AI, and RolePlay came out on top every time. For instance, on one specific model called Gemini-3.5-Flash, RolePlay made the AI generate 7.64 times more tokens, while other methods only managed about 3.5 times. Even on a model that usually has a limit on how much it can write, RolePlay managed to push it to generate 3.19 times more content than usual.
One of the most interesting parts of the study is how they built these personas. They didn't just guess; they used a smart system to analyze the question first. If the question was a tricky math problem, the system would create a persona of a student who is "anxious" and "obsessed with contradictions," causing the AI to second-guess itself repeatedly. If the question was about history, the persona might be a "stubborn expert" who refuses to give a simple answer. This "task-aware" approach means the AI's inefficiency feels natural and fits the story, making it very hard for security filters to catch.
The team also checked if this was just a fluke or if it really worked. They ran thousands of tests across different types of AI models, including some from big tech companies and some open-source ones. The results were consistent: the AI models kept getting stuck in loops of over-explaining and self-correction. The study suggests that this "persona consistency"—the AI's desire to stay true to the character you gave it—is a new kind of vulnerability. It's not a bug in the code; it's a feature of how the AI learns to be helpful that can be turned against it.
So, what does this mean for the future? The paper doesn't say this will shut down the internet tomorrow, but it does highlight a new way that bad actors could potentially drain resources from AI services. If someone wanted to make an AI service slow and expensive to run, they wouldn't need to send millions of requests; they could just send a few cleverly worded prompts that turn the AI into a procrastinating, over-thinking character. The researchers hope that by pointing this out, developers can build better defenses to stop AI from wasting energy on unnecessary, persona-driven rambling.
In short, the paper reveals that the very thing that makes AI models so good at role-playing—staying in character—can be used to make them inefficient. By dressing the AI up as a nervous student or a confused expert, the researchers showed they could multiply the cost of a single question by hundreds of times. It's a reminder that in the world of AI, sometimes the most powerful tool isn't a complex algorithm, but a simple, well-chosen costume.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.