From Observation to Intervention: Distilling Self-Generated In-Context Demonstrations via Executable Causal Intervention

Minming Ye, Min Liu, Haoang Chi, Ciheng Wu, Naiyang Guan
10/15/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Self-generated In-Context Learning (ICL) enables LLMs to synthesize their own few-shot demonstrations, often outperforming manual prompts. However, existing methods filter demonstrations by observation, assuming a rationale is high-quality if it leads to the correct output. We show such filtering suffers from \textit{observational equivalence}, whereby both faithful causal rationales and spurious post-hoc rationales can yield same outputs and are statistically indistinguishable from observation alone. Inspired by independent causal mechanisms, we argue that faithful rationales imply \textit{transfer invariance}, in which causal rationales should remain effective across logically similar samples. We instantiate this criterion as \textbf{E}xecutable \textbf{C}ausal \textbf{I}ntervention for \textbf{D}emonstrations \textbf{D}istillation (ECI2D), which abstracts language rationales into executable programs and applies the causal interventions ($do$-operator) on logically similar samples, retaining only those demonstrations that imply transfer invariance. Experiments on math, logical and commonsense reasoning benchmarks demonstrate that ECI2D consistently outperforms observation-based ICL while retaining far fewer demonstrations, with gains exceeding 7 points as the test distribution shifts.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ye2026from,
  title  = {From Observation to Intervention: Distilling Self-Generated In-Context Demonstrations via Executable Causal Intervention},
  author = {Minming Ye and Min Liu and Haoang Chi and Ciheng Wu and Naiyang Guan},
  year   = {2026},
  eprint = {2610.21149},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.21149v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.21149.svg)](https://codeofpaper.com/paper/2610.21149)

Discussion