Introduction
Model-Based Reinforcement Learning (MBRL) enables agents to plan future actions by learning a dynamics model of their environment. However, standard approaches often assume a dense dependency structure where every state variable potentially influences every other variable. This assumption leads to the learning of spurious correlations, which significantly hinders generalization to out-of-distribution (OOD) scenarios. This paper introduces Causal Dynamics Learning (CDL), a framework designed to discover true causal relationships to build sparse, robust dynamics models and task-independent state abstractions.
The Challenge of Spurious Correlations
Dense dynamics models are highly susceptible to environmental noise. For instance, if a clock in a robot's environment ticks every time the robot opens a door, a dense model might incorrectly conclude that the clock's state is necessary to predict the door's movement. When the agent encounters a new time on the clock, its predictions regarding the door fail.
While existing state abstraction methods like bisimulation can mitigate this, they are typically tied to specific reward functions. An abstraction learned for one task (e.g., opening Door A) often becomes useless for another (e.g., opening Door B). CDL addresses this by learning abstractions based on the inherent physics and causality of the environment, ensuring they remain valid across diverse downstream tasks.
Causal Dynamics Learning (CDL)
The CDL framework identifies the causal graph of an environment through three primary components:
- Conditional Independence Testing: CDL uses Conditional Mutual Information (CMI) to determine if a variable $A$ truly causes variable $B$. If $A$ provides no additional predictive power for $B$ given all other variables, the causal link is pruned.
- Efficient Masking Architecture: To avoid the computational cost of training $d^2$ separate models for $d$ variables, the authors utilize a neural architecture with binary masks. This allows a single model to evaluate all conditional dependencies efficiently during training.
- Active Data Collection: To discover rare causal events, CDL employs an exploratory policy. This policy is incentivized by the "disagreement" between a standard dense model and the causal model, pushing the agent toward states where the causal structure is most uncertain.
Task-Independent State Abstraction
By analyzing the learned causal graph, CDL categorizes state variables into three distinct functional groups:
- Controllable ($s^C$): Variables directly or indirectly affected by the agent's actions.
- Action-relevant ($s^R$): Variables that influence the controllable variables but are not affected by actions themselves.
- Action-irrelevant ($s^I$): Variables that neither affect controllable variables nor are affected by actions.
During planning and policy learning, action-irrelevant variables are omitted, resulting in a compact and robust state representation.
Experimental Results
The authors evaluated CDL across several simulated environments, including a color-changing "Chemical" environment and a complex 3D "Robosuite" manipulation task.
- Graph Accuracy: CDL achieved near-perfect accuracy (99-100%) in identifying causal structures in the Chemical environment and over 90% accuracy in the Manipulation environment, significantly outperforming standard regularization techniques.
- OOD Generalization: In OOD tests where irrelevant variables were modified, dense models saw prediction errors spike by up to 90%. In contrast, CDL maintained high accuracy by ignoring these irrelevant changes.
- Downstream Efficiency: Policies trained on CDL-abstracted states demonstrated superior sample efficiency and generalization on tasks such as lifting and stacking blocks compared to dense baselines.
Conclusion and Future Directions
CDL demonstrates that grounding state abstractions in causality rather than reward signals leads to more robust and generalizable agents. Future work aims to extend this framework to high-dimensional inputs like raw pixels and to incorporate state-dependent (local) causal links, which could further refine the sparsity of the learned models.
Summary updated