Non-Halting Queries: Exploiting Fixed Points in LLMs
We introduce a new vulnerability that exploits fixed points in autoregressive models and use it to craft queries that never halt, i.e. an LLM output that does not terminate. More precisely, for what we call non-halting queries, the LLM never samples the end-of-string token <eos>. We rigorously analyze the conditions under which the non-halting anomaly presents itself. In particular, at temperature zero, we prove that if a repeating (cyclic) sequence of tokens are observed at the output beyond the context size, then the LLM does not halt. We demonstrate non-halting queries in a number of experiments performed in base unaligned models where repeating prompts immediately lead to a non-halting cyclic behavior as predicted by the analysis. Further, we develop a simple recipe that takes the same fixed points observed in the base model and creates a prompt structure to target aligned models. We demonstrate the success of the recipe in sending every major model released over the past year into a non-halting state with the same simple prompt even over higher temperatures. Further, we devise an experiment with 100 randomly selected tokens and show that the recipe to create non-halting queries succeeds across 5 popular models with high rates of success ranging from 97% success rate for gpt-4o to 19% for Gemini Pro 1.5. These results show that the proposed adversarial recipe succeeds in bypassing alignment at one to two orders of magnitude higher rates compared to earlier reports. We also study gradient based direct inversion using ARCA to craft new short prompts to induce the non-halting state. We inverted 10,000 random repeating 2 cycle outputs for llama-3.1-8b-instruct. Out of 10,000 three-token inverted prompts 1,512 yield non-halting queries reaching a rate of 15%. Our experiments with ARCA show that non-halting may be easily induced with as few as 3 input tokens with high probability. Overall our experiments demonstrate that non-halting queries are prevalent and relatively easy to find in any of the existing state of the art LLMs.
Authors
- Berk Sunar (ORCID: https://orcid.org/0000-0001-5404-5368)
- Ghaith Hammouri
- Kemal Derya
Institutions
- Worcester Polytechnic Institute (US)
Publication Details
- Published
- 2025-04-09
- DOI
- https://doi.org/10.1109/satml64287.2025.00009
- Primary Topic
- Advanced Data Storage Technologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00