ARM-FM: Automated Reward Machines via Foundation Models for Compositional Reinforcement Learning
Roger Creus Castanyer, Faisal Mohamed, Pablo Samuel Castro, Cyrus Neary, Glen Berseth
TL;DR
This work tackles the challenge of reward design in reinforcement learning by introducing ARM-FM, a framework that uses foundation models to automatically generate Language-Aligned Reward Machines (LARMs) from natural language task descriptions. LARMs provide a compositional, interpretable structure for rewards and embed language descriptions of subtasks into a shared semantic space, enabling knowledge transfer and zero-shot generalization when training a single policy conditioned on language embeddings. The approach yields dense learning signals, improves sample efficiency, and scales to diverse domains including 2D grids, 3D procedurally generated worlds, and robotic manipulation, with strong performance in multi-task settings. Overall, ARM-FM demonstrates that grounding reward design in language-aligned automata can unlock compositional RL with transferable skills and interpretable task representations, while acknowledging a human verification step that could be automated further through formal grounding and self-correction.
Abstract
Reinforcement learning (RL) algorithms are highly sensitive to reward function specification, which remains a central challenge limiting their broad applicability. We present ARM-FM: Automated Reward Machines via Foundation Models, a framework for automated, compositional reward design in RL that leverages the high-level reasoning capabilities of foundation models (FMs). Reward machines (RMs) -- an automata-based formalism for reward specification -- are used as the mechanism for RL objective specification, and are automatically constructed via the use of FMs. The structured formalism of RMs yields effective task decompositions, while the use of FMs enables objective specifications in natural language. Concretely, we (i) use FMs to automatically generate RMs from natural language specifications; (ii) associate language embeddings with each RM automata-state to enable generalization across tasks; and (iii) provide empirical evidence of ARM-FM's effectiveness in a diverse suite of challenging environments, including evidence of zero-shot generalization.
