← Latest papers
🤖 AI

Disagree to Explore, Agree to Commit: Routing-Guided Test-Time Scaling for Software Agents

This paper introduces Risa, a test-time scaling method for software agents that leverages native MoE router traces to guide diverse exploration and select final solutions through agreement at key decision points, achieving improved resolution rates on SWE-bench Verified without requiring external judges or answer-string matching.

Original authors: Kang Chen, Junjie Nian, Yixin Cao, Yugang Jiang

Published 2026-08-25
📖 4 min read☕ Coffee break read

Original authors: Kang Chen, Junjie Nian, Yixin Cao, Yugang Jiang

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

In the world of artificial intelligence, there is a growing class of programs designed to act like software engineers. These agents do not just answer questions; they navigate complex digital environments, read code, run tests, and write fixes to repair broken software. To solve a difficult problem, an agent often has to make a long chain of decisions, trying different tools and commands until it finds a solution. Because these tasks are so complex, researchers have found that giving the agent more computing power to try many different paths at once often leads to better results. However, a new problem arises when the agent tries many paths: how do you choose the single best solution from a crowd of candidates? Unlike a simple math problem where there is one clear right answer, a software fix can look different in many ways, making it hard to tell which version is truly the best without actually running it in a real system, which is slow and expensive.

A team of researchers at Fudan University and the Shanghai Innovation Institute has developed a new way to solve this selection problem by listening to the internal "thought process" of the AI itself, rather than waiting for the final output. They focused on a specific type of AI architecture known as a sparse mixture-of-experts. In these models, every time the AI generates a word, a small internal router decides which specialized sub-networks, or "experts," should do the work. This router leaves a trace, a record of which experts were chosen and how much they contributed. The researchers realized that this trace acts like a unique fingerprint for the AI's behavior. Even if two different solutions look completely different on the surface, the internal path the AI took to create them might reveal whether they are exploring new ground or converging on a solid answer.

The researchers built a system they call Risa, which uses these internal fingerprints to guide the agent's journey. When the agent is in the early stages of solving a problem, Risa encourages it to keep exploring. It does this by checking the agent's recent history; if the AI is about to take a step that looks too similar to what it just did, the system steers it toward a different, more novel action. This prevents the agent from getting stuck in a loop of repeating the same mistakes. However, once the agent starts writing a patch—a set of changes to fix the code—the strategy shifts. At this stage, the system looks for agreement among different candidates. If several different attempts, which started from different points, all arrive at a similar internal structure for their fix, the system treats this as a strong signal that the solution is correct.

To test this idea, the team ran experiments on a standard benchmark called SWE-bench Verified, which contains hundreds of real-world software repair tasks. They used several different AI models and let them attempt the tasks multiple times. In one set of tests, they compared their new routing-guided method against a simple approach where the final choice is made at random. The results showed a clear improvement. When using the routing system, the rate at which the agents successfully fixed the software rose from about 45 percent to over 48 percent. This might seem like a small number, but in the world of automated software repair, where every percentage point represents significant progress, it is a meaningful gain. The system worked so well that it matched the performance of methods that rely on comparing the actual text of the solutions, but without needing to execute the code or use a separate judge to verify the answer.

The study also found that the most useful information was not in the entire history of the AI's output, but in specific moments of decision. When the AI had to choose between several plausible ways to write a line of code, those specific choices left a distinct mark on the internal routing trace. By focusing only on these critical decision points, the system could tell the difference between a lucky guess and a well-reasoned solution. This approach worked across different types of AI models, suggesting that the internal routing trace is a reliable signal that can be used to coordinate complex tasks. The researchers concluded that by paying attention to how the AI allocates its internal resources, rather than just what it says, we can build agents that are better at exploring, more consistent when they commit to a solution, and ultimately more successful at solving difficult problems.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →