Can AI Learn When Its Own Reasoning Is No Longer Working?

Whenever I get time, I read about the recent developments in artificial intelligence, largely out of curiosity. This time, I was looking at papers around an idea, can AI systems learn to recognize their own repetitive behavior and independently change their approach before becoming trapped?

Repetition doesn’t necessarily mean a chatbot repeating the same sentence, at times, a model may sound confident by restructuring its explanations while returning to the same ideas, again and again. And I have experienced it many times, while I’m trying to understand stuff like how MCP servers integrate with different tools, and how workflows are configured and executed. The model explains the same concept using different words or analogies without introducing genuinely new information. 

Researchers affiliated with Shanghai AI Laboratory and Westlake NLP Lab conducted an experiment – Unveiling Attractor Cycles in Large Language Models: A Dynamical Systems View of Successive Paraphrasing – in which they asked language models to paraphrase a sentence repeatedly. Each new paraphrase became the input for the next round.

Before reading this study I was under the impression that if we keep running a model repeatedly on the same sentence, the meaning would drift away from its original meaning. The research proved otherwise. After several rounds, the models began settling into a repeating two-step pattern. The third paraphrase started resembling the first, the fourth resembled the second, and the cycle continued.

They tested eight language models, including GPT-4o and several open-source systems, over 15 rounds. GPT-4o-mini achieved a cycle score of 0.83, while even the weakest observed cycle, in Llama 3 70B, reached 0.60.

This shows that even when the AI gives different-sounding answers, the basic idea or point it’s making often stays the same. So, just because a response sounds new or different doesn’t mean the AI is thinking about the problem differently.

A physics-inspired explanation of why AI gets stuck

The research above made me think, why does a model keep returning to the same patterns? And I started looking for more papers. 

A particularly interesting investigation by Maor Farid of Leo AI approaches this problem using concepts borrowed from physics. His paper, Large Language Models as Nonlinear Dynamical Systems: The Three Clocks of Depth, Training, and Generation, compares large language models to complex systems that change over time in a way that’s not straightforward. An idea from physics that helps explain why the model repeats patterns is called an “attractor”, which is a state the system tends to settle into repeatedly.

It’s like a marble inside a bowl, no matter where it gets dropped, it rolls down to the bottom and stays there. That spot is called an attractor because it pulls the marble in. Now, let’s say there is a groove around the edge of the bowl, so instead of settling in one spot, the marble keeps circling along the groove.

Scientists use these ideas to understand how language models, like AI chat programs, tend to fall into certain patterns. For example, when a model replies in a conversation, its previous replies influence what it will say next. If it starts repeating a pattern, the model’s own output pushes it to keep doing that. 

It explains why simply asking AI to explain something differently doesn’t always stop repetition. The AI uses its prior answers as clues, which can keep it trapped in the same loop.

Internal representations shape repetitive outputs 

If this problem only affected paraphrasing, it would be an interesting technical curiosity. But researchers have identified related behavior in reasoning models too. A study called LoopBench, conducted by researchers at the Chinese Academy of Sciences, investigates repetitive behavior in models solving mathematical and logical problems.

The benchmark contains 700 problems and identifies two broad types of loops. The first is a numerical loop, where a model becomes trapped repeating particular digits or numerical patterns. The second is a statement loop, where the model repeatedly revisits the same doubts, questions or reasoning steps without making meaningful progress.

One interesting finding was that statement loops appeared much more frequently in reasoning models than in ordinary language models. They also discovered that repetitive patterns could develop in the model’s internal representations before the generated text visibly started repeating.

In other words, the model could be heading toward a loop before a human reader could notice. This suggests that repetition isn’t necessarily just a problem with the final text. It may also involve how the model’s internal representations evolve while generating a response.

Adding randomness doesn’t make AI less repetitive

With all this info in front of me, I thought, if an AI keeps repeating itself, why not introduce randomness into the system?

In LLMs world, it’s called the temperature. It influences how they select their next tokens. Increasing temperature generally makes less probable choices more competitive, potentially producing more varied responses.

Farid’s investigation did explore several such strategies, like adjusting temperature, rolling generated text back to an earlier point and using feedback to change temperature. Although these approaches could eliminate exact loops in the experiments, they did not necessarily produce more coherent text.

Changing the next-word selection process doesn’t automatically change the information that is pushing the model toward a repetitive pattern, which means an AI can sound different without actually thinking differently.

Memory limitations influence repetitive behaviour 

The new dot to connect was how much new information does an AI need to escape a loop? This led me to another interesting investigation by Pawel Kaplanski of Kaplanski AI Lab, Perturbation Dose Responses in Recursive LLM Loops. 

Instead of simply increasing randomness, the researchers explored what happens when new information is introduced while a model is already stuck in a repetitive pattern. They ran 37 tests with different amounts and kinds of extra text. They found that adding about 40 tokens (roughly two sentences) of new text that naturally continues the conversation could change the model’s response about half the time.

But even without adding anything, the model sometimes gave different answers just because of randomness built into how it works. About 35% of the time, results varied on their own. After considering this natural variation, the extra text made a real difference in about 32% more cases.

The study also showed two challenges, first, it’s one thing for the model to stop repeating right away, and second, to stay off that repeated path afterward.

If the model remembers the whole conversation, giving it more new information greatly improves its chances of escaping repetition. But if the model’s memory is limited to only recent parts (about 12,000 characters), adding information helps less.

This shows that how much and what kind of memory the model has is very important. The model’s past memory, what it can access during conversation, and new input all affect how it responds later.

Not every AI loop is a bad thing

There’s another point I’d like to highlight, repetition isn’t always a problem. In 2022, researchers from Stanford and Google Research introduced a technique called STaR, short for Self-Taught Reasoner.

The idea was to let a language model generate its own reasoning attempts, retain those that produced correct answers and use them to improve future performance. When the model couldn’t solve a problem, researchers provided the correct answer as a hint and asked it to explain how that answer could be reached.

This introduced additional information that the model couldn’t reliably generate on its own and the results were impressive. A six-billion-parameter model trained using STaR achieved 72.5% on a commonsense reasoning benchmark, compared with 73.0% for a fine-tuned GPT-3 model approximately 30 times larger.

In practice, increasing randomness to encourage more varied reasoning attempts made the models worse rather than better. This shows that not all repeated attempts are helpful, some are useful and lead to progress, while others just add noise and don’t improve the results.

A productive learning loop uses successful information to improve future attempts. An unproductive loop simply keeps recycling what it already knows.

Can AI recognize when it is about to get stuck?

This brings me back to the question I started with. If repetitive behavior can develop internally before becoming visible in the generated text, could an AI system recognize the warning signs and change its approach?

The LoopBench researchers explored early detection using internal representations and a statistical technique called CUSUM.

Their test worked pretty well, it could catch about 64% to 76% of loops before they became obvious to users. But the system also made mistakes, wrongly thinking there was a loop when there wasn’t in about 25% to 33% of cases. This means that while the AI might sense early on that it’s stuck in a loop, it’s another problem to figure out how the AI can fix this and choose a better way to think.

The next important step in this research is figuring out how the AI can not only detect but also solve these stuck situations.

What I take away from these studies

My takeaway from these investigations is that they challenge a basic assumption we often make about intelligence, that doing more necessarily means making progress.

A model can generate more explanations and spend more time reasoning, yet still remain trapped within the same underlying approach of repetition. 

This also hints at our approach of building these AI systems. As in, we have made considerable progress in improving their ability to generate and reason but how do we make them recognize the limits of their own approach and how can a system identify that it is going in circles, are yet to be figured out.

I also find the relationship between memory and reasoning important. What a model remembers, what it chooses to carry forward and what information it can retrieve may fundamentally influence its ability to solve a problem. This becomes even more significant as AI systems move beyond answering individual questions and begin handling longer, more complex tasks through tools and multi-step workflows.

Of course, detecting a repetitive pattern is only the beginning. Recognizing that an approach is failing and knowing which alternative to pursue are two very different capabilities. These studies do offer promising insights. It’ll give direction to developing systems that can recognize when they are no longer learning anything new and know when it is time to change direction.

Explore further