Skip to main content
QUICK REVIEW

[Paper Review] Counterfactual Data Augmentation using Locally Factored Dynamics

Silviu Pitis, Elliot Creager|arXiv (Cornell University)|Jul 6, 2020
Reinforcement Learning in RoboticsComputer Science89 references11 citations
TL;DR

This paper proposes Counterfactual Data Augmentation (CoDA), a method that leverages locally factored causal structures in dynamic environments to generate causally valid counterfactual experiences. By identifying locally independent subprocesses via attention-based structure discovery and swapping components across observed trajectories, CoDA improves sample efficiency in model-free reinforcement learning without requiring a forward dynamics model, significantly boosting performance in batch-constrained and goal-conditioned RL settings.

ABSTRACT

Many dynamic processes, including common scenarios in robotic control and reinforcement learning (RL), involve a set of interacting subprocesses. Though the subprocesses are not independent, their interactions are often sparse, and the dynamics at any given time step can often be decomposed into locally independent causal mechanisms. Such local causal structures can be leveraged to improve the sample efficiency of sequence prediction and off-policy reinforcement learning. We formalize this by introducing local causal models (LCMs), which are induced from a global causal model by conditioning on a subset of the state space. We propose an approach to inferring these structures given an object-oriented state representation, as well as a novel algorithm for Counterfactual Data Augmentation (CoDA). CoDA uses local structures and an experience replay to generate counterfactual experiences that are causally valid in the global model. We find that CoDA significantly improves the performance of RL agents in locally factored tasks, including the batch-constrained and goal-conditioned settings.

Motivation & Objective

  • To improve sample efficiency in reinforcement learning by exploiting local causal independence in dynamic systems.
  • To develop a data augmentation strategy that generates counterfactual experiences without requiring a learned forward dynamics model.
  • To formalize local causal models (LCMs) as conditionally independent subprocesses derived from global causal structure.
  • To enable efficient, causally valid data synthesis using only observed trajectories and object-oriented state representations.
  • To demonstrate that CoDA improves performance across diverse RL benchmarks, including batch-constrained and goal-conditioned settings.

Proposed method

  • The method introduces Local Causal Models (LCMs), defined by conditioning a global causal model on a subset of the state space to identify locally independent subprocesses.
  • It uses an attention-based architecture (SANDy-Transformer) to infer local causal structure from disentangled state representations, identifying which subprocesses are causally independent at each timestep.
  • CoDA generates counterfactual transitions by swapping independent subprocess components (e.g., object positions or actions) between observed trajectory pairs, ensuring causal validity.
  • The approach operates purely on the experience replay buffer, making it compatible with any agent architecture, including unfactored models.
  • It formulates a locally conditioned variant of CoDA that ensures only causally plausible combinations are generated, avoiding invalid or inconsistent transitions.
  • The method is evaluated using a combination of synthetic and real-world environments, including Spriteworld and MuJoCo tasks, with ablation studies on structure discovery and data augmentation efficacy.

Experimental results

Research questions

  • RQ1Can locally factored causal structures be reliably inferred from observed trajectories in dynamic environments?
  • RQ2Can counterfactual data generated via component swapping between trajectories improve sample efficiency in reinforcement learning?
  • RQ3How does CoDA compare to standard data augmentation and model-based baselines in terms of generalization and training stability?
  • RQ4Does the use of locally conditioned counterfactuals lead to better performance in batch-constrained and goal-conditioned RL settings?
  • RQ5To what extent does access to ground-truth local factorization improve dynamics model training, and can CoDA approximate this benefit?

Key findings

  • CoDA significantly improves sample efficiency in model-free reinforcement learning, especially in batch-constrained and goal-conditioned settings, outperforming standard data augmentation and baseline methods.
  • Using CoDA with 2000 real transitions and 35,000 generated counterfactuals reduced overfitting and improved validation performance in forward dynamics modeling, demonstrating the method’s regularization effect.
  • The SANDy-Transformer model outperformed SANDy-Mixture in identifying local causal structures, particularly in detecting interactions between objects and actions, due to its stronger inductive bias.
  • Even with a simple random relabeling baseline, CoDA showed improved generalization, but the use of learned local structure led to substantially better performance, highlighting the importance of causal validity.
  • Dynamics models trained on CoDA-augmented data showed better long-term trajectory generation and collision modeling compared to models trained only on real data, despite similar next-state prediction error.
  • The method enables effective data augmentation without requiring a forward dynamics model, making it broadly applicable to existing RL agents and architectures.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.