TL;DR
This paper introduces Compositional Q-Learning (CQ-L), a modular reinforcement learning architecture that solves complex, multi-stage tasks by reusing solutions from simpler "elemental" tasks. By discovering a mathematical relationship that links the value functions of simple and composite tasks, the system achieves significant transfer of learning, outperforming agents that try to learn every task from scratch.
What Problem Does This Paper Address?
In the early 90s, most reinforcement learning (RL) research focused on agents mastering a single task in isolation. However, real-world intelligence requires performing a variety of tasks that often share common sub-components—like how "making coffee" and "making tea" both involve the sub-task of "boiling water."
The standard approach at the time was to learn each task independently. This is computationally expensive and fails to scale; as tasks get longer and more complex, the "reward signal" becomes increasingly sparse, making it nearly impossible for an agent to stumble upon the correct sequence of actions. Satinder Singh sought a way for agents to transfer knowledge across tasks by identifying and composing elemental building blocks.
Methods
The core contribution is the CQ-L architecture, which treats complex tasks as temporal concatenations of elemental ones.
The Mathematical Insight
Singh proves that for a specific class of sequential decision tasks, the optimal Q-value for a composite task ($Q^C$) is simply the Q-value of the current elemental sub-task ($Q^T$) plus a constant offset ($K$): $$Q^C(x, a) = Q^T(x, a) + K$$ This $K$ represents the expected future reward from all subsequent tasks in the sequence. This is a powerful realization: it means you don't need to relearn how to navigate a room just because your ultimate goal has changed; you just need to adjust your expectations of the total reward.
The CQ-L Architecture
To implement this, Singh uses a modular setup (see Figure 1):
- Q-Modules (Experts): Multiple modules compete to learn different elemental tasks.
- Gating Module: A task-sensitive switch that learns to "gate" or select the appropriate Q-module for the current state. It effectively discovers the decomposition of a complex task over time.
- Bias Module: Learns the value of $K$, the reward offset mentioned above.
Datasets
The paper evaluates the architecture using a simulated 8x8 Gridworld (see Figure 2).
- Environment: A room with obstacles and three target locations: A, B, and C.
- Tasks:
- Elemental: "Visit A", "Visit B", "Visit C".
- Composite: Sequences like "Visit A then C" or "Visit A, then B, then C".
- State Representation: The agent receives the $(x, y)$ coordinates plus "augmenting bits" that track which sub-tasks have already been completed.
Key Insights and Ideas
- Temporal Decomposition: The gating module doesn't just pick a module for a whole trial; it can switch modules during a trial as sub-goals are met. This allows the agent to "parse" a long task into familiar chunks.
- Knowledge Sharing: Because different composite tasks (e.g., "A then C" and "B then C") share the same elemental task ("C"), the Q-module for "C" gets trained by both, leading to faster convergence.
- Shaping without Explicit Instruction: In one experiment, an agent was trained on a composite task ("B then C") without ever being explicitly told to learn "B" on its own. One Q-module naturally specialized in "B" to minimize the overall error, demonstrating that the architecture can discover useful sub-routines autonomously.
Key Results
- Faster Convergence: In complex composite tasks, CQ-L learned significantly faster than a "one-for-one" architecture (which assigned a unique, independent module to every task). While the one-for-one agent struggled with the long action sequences required for composite tasks, CQ-L reused its elemental knowledge to bridge the gap.
- Modular Specialization: The gating module successfully learned to partition experience. For a task like "Visit A then B then C," the agent would correctly trigger the 'A' module, then the 'B' module, and finally the 'C' module as it progressed through the environment.
- Transfer Efficiency: The "shaping" simulations showed that once an agent knows a few elemental tasks, learning a new composite task becomes a much simpler problem of learning the sequence (the gating) and the values (the bias), rather than the low-level control.
Limitations and Future Work
- Fixed Order: The theory presented assumes composite tasks have a fixed, linear order. Singh suggests CQ-L might handle unordered tasks (disjunctions of sequences), but this wasn't fully tested.
- Lookup Tables: The simulations used lookup tables for state-action pairs. Scaling this to high-dimensional or continuous state spaces would require integrating function approximators like neural networks, which at the time lacked convergence proofs for RL.
- State Augmentation: The agent relies on "augmenting bits" to know its progress in a sequence. In more realistic scenarios, an agent would need to infer its progress from environmental cues or internal memory.
This paper remains a foundational look at how modularity and compositionality can solve the "curse of dimensionality" in reinforcement learning.
Summary updated