Expanding the Action Space of LLMs to Reason Beyond Language

Zhongqi Yue, Weishi Wang, Yundaichuan Zhan, Juncheng Li, Daniel Dahlmeier, Fredrik D. Johansson · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable reasoning capabilities, yet they remain largely confined to a linguistic medium. When interacting with external tools—such as calculators or simulators—standard paradigms rely on text-based interfaces. A model must output a specific string (e.g., <calc> 2+2 </calc>), which is then parsed and executed. This "language-only" approach introduces significant friction: it imposes cognitive overhead by forcing the model to manage both high-level reasoning and low-level syntax, prevents real-time adjustment through intermediate feedback, and creates a "cold start" problem in reinforcement learning where models struggle to discover precise tool-triggering strings through random exploration.

The ExpA Framework

To overcome these limitations, we introduce the Expanded Action space (ExpA) paradigm. Rather than treating tool use as a text-generation task, ExpA integrates external environments directly into the model's output layer.

Architectural Innovation

In an ExpA Markov Decision Process (MDP), the model's vocabulary is augmented with dedicated "routing actions." When the model selects a routing action, it transitions from the standard language environment to a specialized external environment. Once inside, the model's action space is dynamically restricted to environment-specific operations (e.g., specific calculator functions or list manipulation commands). This decoupling allows the model to "act" directly rather than "describe" an action.

Comparison between the standard Base MDP (relying on parsing) and the proposed ExpA MDP (using direct routing).

Training via EARL

Learning to use these expanded actions from scratch is facilitated by ExpA Reinforcement Learning (EARL). EARL utilizes Counterfactual Policy Optimization (CPO) to address the exploration challenge. During training, the system identifies moments where the model's internal state suggests a high probability of tool use. It then forces a "counterfactual" rollout where the model is compelled to use the tool. By comparing the resulting rewards against the original language-only path, the model receives a dense training signal that accelerates the discovery of optimal tool-use strategies.

Experimental Evaluation

The framework was evaluated on two challenging benchmarks:

  1. Calc-Bench: A suite of four tasks (Arithmetic, Countdown, GSM8K*, and Count) requiring multi-step calculation and contingent planning.
  2. Sorting: A partially observed task where the model must sort a hidden list using compare and swap actions, testing its ability to maintain a mental model of an unseen state.

Key Findings

  • Algorithmic Self-Discovery: In the sorting task, the model did not merely learn to sort; it discovered deterministic decision-tree algorithms comparable to classical computer science implementations (e.g., those in the GCC compiler). It achieved 100% accuracy on Sort-4 problems, significantly outperforming language-constrained baselines.
  • Efficiency and Robustness: EARL demonstrated extreme sample efficiency, learning to sort four numbers in approximately 70 training steps—a massive improvement over previous methods like AlphaDev. Furthermore, the approach proved effective even on smaller base models (0.5B to 7B parameters) without extensive instruction tuning.
  • Contingent Planning: On the "Countdown" task, which requires aggressive strategy shifts based on intermediate results, EARL outperformed strong baselines like Prompt+GRPO by 26.3%.
A step-by-step sequence showing the model routing from language to a swap environment to perform a sort operation and then returning to language.

Conclusion

By expanding the action space of LLMs beyond the vocabulary of tokens, we enable more robust and efficient agentic behavior. The ExpA paradigm reduces the cognitive load of tool interaction and, when paired with EARL, allows models to autonomously discover complex algorithms. Future work will explore scaling this framework to larger models and more diverse, multimodal environments such as robotics and web navigation.

Summary updated

BibTeX
@inproceedings{yue2025expanding,
  author = {Zhongqi Yue and Weishi Wang and Yundaichuan Zhan and Juncheng Li and Daniel Dahlmeier and Fredrik D. Johansson},
  title = {{Expanding the Action Space of LLMs to Reason Beyond Language}},
  booktitle = {MATH-AI @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=bwgXoqzBJE},
}
Figure