Causal Action Influence Aware Counterfactual Data Augmentation

Núria Armengol Urpí, Marco Bagatella, Marin Vlastelica, Georg Martius

TL;DR

Offline robot learning often fails when deployed in new scenarios due to "causal confusion"—mistaking accidental data patterns for true cause-and-effect relationships. This paper introduces CAIAC, a data augmentation method that uses a principled causal influence measure to safely swap action-unaffected environment states across trajectories. This breaks spurious correlations and expands dataset support, significantly boosting a robot's ability to generalize to unseen scenarios without requiring any online data collection.

What Problem Does This Paper Address?

Offline reinforcement learning and imitation learning allow us to train robots using pre-recorded datasets, avoiding expensive and potentially dangerous real-world exploration. However, these datasets frequently contain accidental or highly structured patterns known as spurious correlations.

For example, if a demonstration dataset only shows a robot opening a cabinet after it has opened a microwave, a standard neural network policy might conclude that the cabinet cannot be opened unless the microwave is already open. This phenomenon is called causal confusion. When the robot is deployed in a test environment where the microwave happens to be closed, it fails catastrophically.

Preventing causal confusion typically requires massive amounts of diverse data or active online environment interaction to "experiment" and break these correlations. The authors tackle the challenge of eliminating these spurious correlations entirely within a fixed, offline dataset.

Methods

The authors propose CAIAC (Causal Influence Aware Counterfactual Data Augmentation). Instead of guessing which variables are independent or relying on heuristic model rollouts, CAIAC uses a theoretically sound metric: state-conditioned mutual information to measure Causal Action Influence (CAI).

Figure 1: Overview of the proposed approach. Interactions between the agent and entities in the world are sparse. We use causal action influence (CAI), a local causal measure, to determine action-independent entities and create coun- terfactual data by swapping states of these entities from other observations in the dataset. Offline learning with these augmentations leads to better generalization.

The pipeline operates as follows:

  1. Local Causal Graph Estimation: The environment's state space is assumed to be factored into distinct entities (e.g., robot arm, microwave, kettle). CAIAC trains a Gaussian neural network transition model to predict the next state of each entity given the current state and action.
  2. Identifying Uncontrollable Entities: By computing the conditional mutual information between the robot's action and each entity's subsequent state, CAIAC determines which objects are completely unaffected by the robot's current action (forming the "uncontrollable set").
  3. Counterfactual Swapping: If two independent trajectories share a common uncontrollable entity structure, CAIAC swaps the states and transitions of those unaffected entities between the trajectories.

This process generates realistic, physically feasible "what-if" (counterfactual) data points. By pairing an active action (e.g., opening the cabinet) with varying states of an independent object (e.g., the microwave being both open and closed), it explicitly breaks the spurious correlations plaguing the dataset.

Datasets

The method was evaluated on standard robotic manipulation benchmarks modified to introduce severe distributional shifts and low-data constraints:

  • Franka-Kitchen (D4RL): A 7-DoF robot arm manipulating kitchen objects (microwave, kettle, burners, light switch, cabinets). The authors created a highly correlated subset for a motivating experiment and tested on the full dataset with randomized out-of-distribution (OOD) initial states.
  • Fetch-Pick&Lift: A modified Fetch environment where four cubes are always arranged in a neat line during training, but randomly scattered across the table during testing.
  • Fetch-Push: Used to evaluate performance in low-data regimes by restricting training data to just 20% of the standard dataset.

Key Insights and Ideas

  • Action-Influence Bias as a Feature: Estimating a full causal graph from offline data is an incredibly difficult, often impossible task. The authors bypass this by assuming object-object interactions are sparse and focusing entirely on action-to-object influence. This inductive bias simplifies causal discovery into a manageable problem perfectly suited for robotics.
  • Attention Weights $\neq$ Causality: Many recent architectures use transformer attention weights as a proxy to infer causal relationships (such as the baseline method, CoDA). The authors demonstrate that these heuristics frequently fail in high-dimensional spaces, leading to the generation of physically impossible training data. Explicitly calculating mutual information yields far more stable and accurate causal graphs.
  • Feasibility is Crucial: Data augmentation only helps if the synthetic data respects the laws of physics. As shown in Figure 2, CAIAC's counterfactuals achieve high log-likelihood under the true environment transition kernel, meaning they don't confuse the agent with impossible transitions.
Figure 2: CAIAC counterfactual samples are consistent with the environment’s dynamics and increase the support of the joint state space distribution, enabling the agent to be robust to distributional shift. Left: Log-likelihoods under the environment transition kernel of counterfactuals created with different methods. Right: Original data and counter- factuals augmentations with CAIAC visualized with t-SNE. Details on this evaluation are reported in Appendix A.7.

Key Results

  • Conquering Distributional Shift: In the Franka-Kitchen OOD evaluation, standard offline learning without augmentation completely failed (success rates between 0.01 and 0.07). CAIAC achieved a 0.81 success rate on the Kettle task and 0.75 on the Microwave task, vastly outperforming transformer-based baselines like CoDA (which scored 0.18 and 0.07, respectively).
  • Robustness to Scattered Objects: On Fetch-Pick&Lift, where cubes were scattered randomly at test time, CAIAC maintained a success rate close to 1.0, while baselines dropped significantly due to generating invalid transitions.
  • Maximizing Low-Data Efficiency: In the low-data regime (Fetch-Push with 20% data), CAIAC effectively doubled the support of the joint state distribution, leading to a substantial performance boost over the non-augmented baseline.

Limitations and Future Work

  • The Sparse Interaction Assumption: CAIAC assumes that objects do not strongly influence each other without the robot's direct intervention. While this holds true for many kitchen or manufacturing tasks, it breaks down in environments with complex object-object dynamics, such as a pile of blocks tumbling down or fluid interactions.
  • State Factorization Dependency: The method requires the state space to be pre-factored into distinct entities. Although it can be paired with unsupervised object-centric representation learning algorithms, this paper assumes a known factorization.
  • Future Directions: The authors plan to explore alternative forms of independence to capture object-object interactions and investigate data rebalancing techniques to handle severe data imbalances within offline datasets.

Summary updated

BibTeX
@inproceedings{urpi2024causal,
  author = {Núria Armengol Urpí and Marco Bagatella and Marin Vlastelica and Georg Martius},
  title = {{Causal Action Influence Aware Counterfactual Data Augmentation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=6Zl9rv6PDx},
}
Figure