Passive learning of active causal strategies in agents and language models

Stephanie Chan, Ishita Dasgupta, Andrew K. Lampinen, Andrew J. Nam, Jane Wang

TL;DR

This paper demonstrates that agents, including large language models, can learn to discover and utilize causal relationships from passive observational data, provided they can actively experiment at test time. This is achieved by learning an "experimentation strategy" from expert demonstrations, which allows them to generalize causal discovery to novel scenarios, even when aided by natural language explanations.

What Problem Does This Paper Address?

A fundamental challenge in machine learning is learning causal structure from data. Traditionally, this requires active intervention and experimentation. While reinforcement learning agents can intervene, the question remains whether agents can learn how to experiment and exploit causal knowledge purely from passive, observational data. This is particularly relevant for large language models (LLMs), which are trained on vast amounts of passive text data but exhibit emergent capabilities that hint at underlying causal reasoning. The paper aims to bridge this gap by investigating if passive learning can equip agents with generalizable causal strategies, enabling them to act like scientists who learn from observation and then experiment to uncover new knowledge.

Methods

The core idea is to train agents via behavioral cloning on expert demonstrations. These demonstrations involve a two-stage process: first, an experimentation phase where the expert actively intervenes to discover causal links, and second, an exploitation phase where the learned causal structure is used to achieve a goal. The agent learns this entire strategy passively.

Key methodological contributions include:

  • Formalization: A theoretical illustration that a strategy of "first experimenting, then seeking goals" can enable generalization from passive learning.
  • Empirical Validation:
    • Causal DAG Environment: Agents trained on expert data from causal Directed Acyclic Graphs (DAGs) generalize to infer and use causal links never seen in training data. They also generalize experimentation strategies to novel variable sets.
  • High-Dimensional Observations: The approach extends to environments with pixel observations and relational structures, with natural language explanations significantly aiding learning and generalization.
  • Language Models: Pretrained LLMs, given a few-shot prompt with explanations and reasoning, can generalize causal intervention strategies from the odd-one-out task.

Datasets

The paper utilizes several environments for training and evaluation:

  • Causal DAG Environment: A synthetic environment where causal structures (DAGs) are resampled for each episode. Training data is generated from a subset of possible DAGs, with specific dependency links held out for testing.
  • Odd-one-out Environments: These environments involve identifying a unique object based on a latent causal dimension (color, shape, texture). The paper uses variations of these environments, including those with high-dimensional pixel observations and those designed to test generalization to novel feature combinations and harder initializations.
  • Language Model Adaptation: The odd-one-out tasks are adapted into a language setting, with observations and actions described in natural language.

Key Insights and Ideas

  • Passive Learning for Active Strategies: The most significant insight is that agents can learn how to experiment and discover causal structure from passive data, not just correlational patterns. This challenges the notion that active intervention is strictly necessary for learning causal strategies.
  • The Power of Experimentation Strategy: Learning a fixed experimentation strategy (e.g., intervening on variables in a specific order) is crucial. This strategy, learned passively, allows agents to gather the necessary information at test time to infer novel causal links.
  • Natural Language Explanations as Deconfounders: Explanations are shown to be incredibly powerful. They not only aid learning but can enable generalization even from perfectly confounded training data, effectively guiding the agent's interpretation of ambiguous observations.
  • LLMs as Causal Learners: The work demonstrates that LLMs, trained solely on next-word prediction, can generalize causal intervention strategies when provided with appropriate prompts that include explanations and reasoning. This suggests LLMs might possess more latent causal understanding than previously assumed.
  • Generalization Beyond Training Data: Agents can generalize their learned causal strategies to novel causal structures, variable sets, and even functional forms (e.g., from linear to nonlinear relationships), highlighting the robustness of the learned strategies.

Key Results

  • Causal DAGs: Agents trained via imitation on expert data achieve close to optimal rewards in both training and evaluation settings, significantly outperforming heuristic baselines in matching expert behavior. They generalize to novel causal dependencies not present in training.
  • Odd-one-out Environments: Agents demonstrate strong generalization to novel feature combinations and harder initializations, especially when trained with natural language explanations. Explanations improve learning and generalization performance significantly.
  • Language Models: With a few-shot prompt including explanations and reasoning, LLMs can generalize causal intervention strategies to held-out dimensions in the odd-one-out task, achieving performance far above chance. Explanations are critical for this generalization.
  • Robustness: Agents show robustness to shifts in functional types (e.g., from linear to nonlinear DAGs), achieving over 75% of optimal performance.

Limitations and Future Work

  • Environment Complexity: The current experiments are limited to relatively simple causal structures (finite acyclic graphs) and constrained observation/action spaces. Future work could explore more complex environments, including those with cycles or more intricate interactions.
  • Active vs. Passive Learning: While passive learning shows surprising power, the authors acknowledge that active learning can be substantially more effective and efficient. Future work could explore hybrid approaches or more sophisticated causal corrections.
  • Confounding: While explanations help mitigate confounding, it remains a significant challenge. The paper highlights that passive learning can overcome confounding in specific regimes, particularly with experimentation.
  • LLM Prompting: The performance of LLMs is highly dependent on prompt quality. Future work could investigate more systematic methods for prompt construction and explore how to improve generalization with less sophisticated prompts.
  • Generalizing to Real-World Complexity: The paper suggests that while the current findings are promising, scaling these strategies to the full complexity of real-world causal structures and environments remains an open question.

Summary updated

BibTeX
@inproceedings{chan2023passive,
  author = {Stephanie Chan and Ishita Dasgupta and Andrew K. Lampinen and Andrew J. Nam and Jane Wang},
  title = {{Passive learning of active causal strategies in agents and language models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=BRpi8YAfac},
}
Figure