The Two-Hump Problem: Bridging the Difficulty Gap in Mathematical Reinforcement Learning

Lucas Fagan, Michele Tarquini, Ali Shehper, Maksymilian Manko, Angus Gruen, Coco Huang, Giorgi Butbaia, Davide Passaro, Sergei Gukov

Mathematical search problems present a unique and formidable challenge for Reinforcement Learning (RL). Characterized by vast search spaces and sparse rewards, these problems often leave RL agents without a clear learning signal. A prime example is the Andrews-Curtis (AC) conjecture, a 60-year-old open problem in combinatorial group theory that asks whether any "balanced presentation" of a trivial group can be transformed into a standard trivial form using a specific set of moves.

Recent research identifies a critical structural barrier in the AC landscape that prevents effective learning, termed the "Two-Hump" problem. By combining specialized neural architectures with novel data generation techniques, researchers have successfully bridged this difficulty gap, achieving a massive performance leap and trivializing over 100 previously unsolved mathematical presentations.

The "Two-Hump" Barrier

In the context of the AC conjecture, RL agents face a "sparse reward" nightmare: there is no "getting warmer" signal; the problem is either solved or it isn't. The "Two-Hump" distribution describes the landscape of these problem instances:

  1. The First Hump: Instances that are trivially easy and can be solved by simple greedy algorithms that merely reduce the length of the mathematical string.
  2. The Second Hump: Instances that are effectively impossible for current agents to solve.
  3. The Valley: A stark lack of intermediate, "hard-but-solvable" problems.

Without these intermediate stepping stones, RL agents cannot develop a curriculum to learn the complex, non-obvious strategies required to tackle the hardest instances.

Methodology: Bridging the Gap

To populate this difficulty valley and equip agents to navigate it, the authors developed a three-pronged approach:

  • Substitution Supermoves: Instead of relying on the three basic, granular moves defined by the conjecture, the researchers introduced "substitutions." These composite moves combine multiple primitive steps into one, significantly reducing the search depth while respecting the cyclic nature of the mathematical objects.
  • The Dual-Ring Transformer: Standard Transformers treat sequences as linear strings. However, mathematical "relators" in this context are cyclic—like a necklace. The authors designed a specialized architecture utilizing cyclic relative positional encodings and cross-attention between relators. This allows the model to inherently understand that the start and end of a string are connected, dramatically reducing the state space.
  • Generator-Solver Game: To fill the difficulty valley, the team created an asymmetric game. A Generator agent applies "automorphisms" (mathematical transformations that preserve the group's identity but alter its appearance) to make easy problems progressively harder. A Solver agent then attempts to solve them. This dynamic creates a self-improving curriculum of training data.

Key Insights

A major takeaway from this work is the power of symmetry as an inductive bias. By treating mathematical relators as rings rather than strings, the model generalizes far better across different variations of the same problem.

Furthermore, the research highlights the failure of random "scrambling." Unlike a Rubik's Cube, randomly scrambling an AC problem usually yields a state that is either still trivial or completely intractable. Structured scrambles—automorphisms—are required to create useful training signals.

Finally, the RL agent demonstrated a distinct advantage over greedy search regarding path quality. While greedy algorithms seek any solution by constantly trying to shorten the string, the RL agent learned to take "length-increasing detours." These temporary increases in complexity allowed the agent to discover significantly shorter and more elegant overall solution paths.

Results and New Datasets

The combination of these techniques yielded remarkable results:

  • Performance Leap: The new PPO agent (PPO-Sub-DRT) solved 610 presentations on the standard Miller-Schupp benchmark, a substantial improvement over the previous RL state-of-the-art of 457.
  • Mathematical Progress: The team successfully trivialized over 100 previously unsolved presentations from the Miller-Schupp family.
  • Efficiency: An "Improved Greedy Search" utilizing substitutions proved 1600x more efficient than previous baselines, solving in 614 nodes what previously required 1 million.

To spur further research, the authors released the first large-scale, publicly available datasets for this domain:

  • AC-19: 125,192 verified trivial presentations found via exhaustive enumeration (length $\le$ 19).
  • AC-1M: 1,136,154 "hard-but-solvable" presentations (length $\le$ 30) generated by the Generator-Solver game.

Limitations and Future Directions

Despite these significant advances, the famous AK(3) presentation—the shortest potential counterexample to the AC conjecture—remains unsolved and out of reach for current models. Additionally, some advanced reward signals are computationally expensive, hindering large-scale RL training. Finally, scaling these architectures to handle the much longer relators found in other interesting mathematical problems remains an open challenge.

Ultimately, this research demonstrates that progress in mathematical RL requires more than just raw compute; it demands the deep integration of mathematical structure into the very way agents perceive and interact with the problem space.

Summary updated

BibTeX
@inproceedings{fagan2026two,
  author = {Lucas Fagan and Michele Tarquini and Ali Shehper and Maksymilian Manko and Angus Gruen and Coco Huang and Giorgi Butbaia and Davide Passaro and Sergei Gukov},
  title = {{The Two-Hump Problem: Bridging the Difficulty Gap in Mathematical Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=PUQ0rrmuDM},
}

Loading related content...

Figure