CAREL: Instruction-guided reinforcement learning with cross-modal auxiliary objectives

Armin Saghafian, Amirmohammad Izadi, Negin Hashemi Dijujin, Mahdieh Soleymani Baghshah

Introduction

In language-guided reinforcement learning (RL), agents face the challenge of "grounding"—mapping abstract textual instructions (e.g., "Go to the red ball, then open the blue door") to specific visual states and actions. Standard RL agents often treat instructions as simple conditional inputs, but they frequently struggle with two key aspects:

  1. Alignment: Identifying which visual features (e.g., a cluster of red pixels) correspond to specific words ("red ball").
  2. Progress Tracking: Maintaining focus in multi-step tasks without getting distracted by already completed sub-goals, which often leads to inefficient repetitions.

Because standard RL rewards are often sparse, they fail to provide the fine-grained supervision needed to learn these relationships from scratch.

The CAREL Framework

The authors introduce CAREL (Cross-modal Auxiliary REinforcement Learning), a framework designed to enhance grounding through contrastive auxiliary objectives and a dynamic instruction management mechanism.

The CAREL architecture integrates cross-modal auxiliary losses and an instruction tracking mechanism to align visual observations with textual instructions.

Cross-modal Auxiliary Loss

Inspired by video-text retrieval models like X-CLIP, CAREL computes similarity scores between observation sequences and instruction text. To ensure the model learns from goal-oriented behavior, this loss is applied exclusively to successful trajectories during training. It operates at four levels of granularity:

  • Episode-Instruction (E-I): Global alignment of the full trajectory with the full instruction.
  • Episode-Word (E-W): Aligning the full trajectory with specific keywords.
  • Observation-Instruction (O-I): Aligning individual frames with the full instruction.
  • Observation-Word (O-W): Fine-grained alignment between specific frames and words.

Instruction Tracking (IT)

To handle multi-step tasks, CAREL employs a dynamic masking mechanism. By monitoring the similarity "spikes" between current observations and instruction sub-tasks, the model identifies when a sub-task is likely complete. The completed portion is then replaced with a <masking> token, forcing the agent to focus on the remaining objectives and preventing distraction by past goal-relevant entities.

Experimental Evaluation

CAREL was evaluated on two primary benchmarks: BabyAI, a grid-world for grounded language learning, and MiniGrid, used to test compatibility with RGB-based models like SHELM.

Success rate (SR) vs. training frames for various BabyAI tasks. CAREL variants consistently outperform the standard BabyAI baseline in both sample efficiency and final success rate.

Key Results

  • Superior Sample Efficiency: In the OpenDoorsOrderN4 task, CAREL reached a 79% success rate at 3 million frames, compared to just 24% for the baseline.
  • Complex Task Mastery: In the difficult SynthS5R2 environment, CAREL improved success rates from 20% to 28%, indicating better systematic generalization.
  • Boosting RGB Models: When integrated with the SHELM baseline, CAREL raised the success rate in the GoToDoor task from 50% to 83%.
  • Impact of Instruction Tracking: The IT mechanism provided a clear performance boost in sequential tasks like GoToSeq, where it prevented agents from repeating finished steps.

Discussion and Future Work

CAREL provides a versatile "plug-and-play" framework that can be added to existing RL algorithms like PPO. By isolating successful episodes for auxiliary supervision, it effectively filters noise from failed trials. While currently reliant on structured instructions and dual-encoder setups, future work may explore applying CAREL to 3D environments and utilizing Large Language Models to decompose more ambiguous natural language instructions.

Summary updated

BibTeX
@article{saghafian2025carel,
  author = {Armin Saghafian and Amirmohammad Izadi and Negin Hashemi Dijujin and Mahdieh Soleymani Baghshah},
  title = {{CAREL: Instruction-guided reinforcement learning with cross-modal auxiliary objectives}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=zJUEYr5X1X},
}
Figure