Compositional Learning of Visually-Grounded Concepts Using Reinforcement

Zijun Lin, Haidi Azaman, M Ganesh Kumar, Cheston Tan

TL;DR

This paper demonstrates that reinforcement learning (RL) agents can learn to decompose visual instructions into primitive concepts like color and shape, then recompose them to solve unseen tasks. By pretraining agents on individual concepts first—a process the authors call "concept learning"—they achieved up to a 100x speedup in training and enabled zero-shot generalization to complex, out-of-distribution environments.

What Problem Does This Paper Address?

While human children can quickly learn to follow new rules by composing basic concepts (e.g., if you know "red" and "ball," you immediately understand "red ball"), deep RL agents typically require millions of episodes to learn similar tasks. Furthermore, these agents often struggle to generalize to "out-of-distribution" (OOD) scenarios—combinations of features they haven't seen during training.

The authors investigate whether RL agents can be trained to implicitly learn these foundational primitives and how this "compositional learning" affects their ability to navigate 3D environments based on language instructions.

Methods

The researchers developed a vision-language-action agent architecture and tested it across several synthetic 3D environments built in Unity.

  • Architecture: The agent uses a Convolutional Neural Network (CNN) for visual processing and various text encoders (One-hot, BERT, or CLIP) for language. These inputs are fused and fed into a Long Short-Term Memory (LSTM) module, which drives an Advantage Actor-Critic (A2C) reinforcement learning algorithm.
  • Training Paradigms:
    1. Naive Compositional Learning: Training the agent directly on color-shape combinations (e.g., "navigate to the red cube").
  • Concept-First Learning: Pretraining the agent to be invariant to one attribute (e.g., navigate to any "red" object regardless of shape) before moving to compositional tasks.
  • Task Complexity: The tasks scaled from single attributes (Color OR Shape) to two-word combinations (Color AND Shape) and finally to complex three-word OOD tasks (Color AND Shape AND Shape).
The agent architecture combines visual and linguistic inputs into an LSTM for action prediction.

Datasets

The study utilized custom-built synthetic 3D environments:

  • C|S (Concept Learning): Agents learn single attributes (5 colors, 5 shapes) while ignoring the other.
  • C&S (Compositional Learning): Agents are trained on 20 color-shape pairs and tested on 5 held-out combinations.
  • C&S&S (OOD Generalization): A more complex environment where the target consists of two objects of the same color but different shapes (e.g., "red cube cylinder").
  • C*&S: A test environment featuring 5 novel colors (e.g., Cyan, Pink) never seen during training to test the limits of pretrained encoders like CLIP.

Key Insights and Ideas

  • The Power of Invariance: Learning to be "invariant" (e.g., recognizing "redness" while ignoring whether the object is a sphere or a cube) is actually harder for the agent than learning a specific combination. However, once this hurdle is cleared, learning to compose those concepts becomes nearly instantaneous.
  • Sequential Scaffolding: Just as children learn basic categories before complex ones, agents that learned concepts (C|S) before compositions (C&S) were the only ones capable of solving the complex C&S&S task in a zero-shot fashion.
  • Expressivity in Representation: PCA analysis of the agent's LSTM activity showed that concept-trained agents developed a higher-dimensional representation space. This increased "expressivity" allows the agent to map and manipulate more complex combinations.
PCA plots show that concept learning leads to a more organized and expressive representation space in the LSTM.
  • Grounded vs. Ungrounded Language: Pretrained multimodal encoders like CLIP significantly outperformed text-only encoders like BERT. Because CLIP is pretrained on image-text pairs, its embeddings are already "grounded" in visual reality, making it much easier for the RL agent to associate the word "blue" with blue pixels.

Key Results

  • Massive Speedup: Pretraining on concepts led to a 100x speedup for training combinations and a 20x speedup for held-out test combinations compared to naive training.
  • Zero-Shot Mastery: Agents trained with the sequential (Concept $\rightarrow$ Composition) approach achieved a reward of ~5.5 on OOD tasks (C&S&S), while naively trained agents failed completely (negative rewards).
  • CLIP Superiority: The CLIP-based agent reached performance criteria 1.3x faster than the one-hot baseline and successfully generalized to 5 entirely unseen colors in a zero-shot navigation task.
  • BERT Failure: The BERT-based agent struggled to distinguish between color and shape concepts, failing to reach the performance criterion for test combinations even after 200,000 episodes.
CLIP's grounded embeddings show clear separation of color and shape, whereas BERT's ungrounded embeddings remain highly overlapped.

Limitations and Future Work

The authors acknowledge several limitations:

  • Simplified Geometry: The environments use basic shapes (capsules, prisms). Future work should explore more realistic, complex objects.
  • Navigation Complexity: The current room is empty of obstacles; more complex pathfinding would be a more rigorous test.
  • Visual Encoders: This study focused on text encoders; testing the impact of pretrained visual encoders is a logical next step.
  • Instruction Length: The experiments were limited to 2-3 word instructions. Scaling to longer, more natural language queries remains a challenge.

Summary updated

BibTeX
@inproceedings{lin2024compositional,
  author = {Zijun Lin and Haidi Azaman and M Ganesh Kumar and Cheston Tan},
  title = {{Compositional Learning of Visually-Grounded Concepts Using Reinforcement}},
  booktitle = {SynData4CV @ CVPR},
  year = {2024},
  url = {https://openreview.net/forum?id=XusBKwfVxX},
}
Figure