Pith. sign in

Transformers Handle Endogeneity in In-Context Linear Regression

1 Pith paper cite this work. Polarity classification is still indexing.

1 Pith paper citing it
abstract

We explore the capability of transformers to address endogeneity in in-context linear regression. Our main finding is that transformers inherently possess a mechanism to handle endogeneity effectively using instrumental variables (IV). First, we demonstrate that the transformer architecture can emulate a gradient-based bi-level optimization procedure that converges to the widely used two-stage least squares $(\textsf{2SLS})$ solution at an exponential rate. Next, we propose an in-context pretraining scheme and provide theoretical guarantees showing that the global minimizer of the pre-training loss achieves a small excess loss. Our extensive experiments validate these theoretical findings, showing that the trained transformer provides more robust and reliable in-context predictions and coefficient estimates than the $\textsf{2SLS}$ method, in the presence of endogeneity.

fields

cs.LG 1

years

2025 1

verdicts

CONDITIONAL 1

representative citing papers

citing papers explorer

Showing 1 of 1 citing paper.

  • Interpretability and Generalization Bounds for Learning Spatial Physics cs.LG · 2025-06-18 · conditional · none · ref 19 · internal anchor

    A learned linear solver converges only to the projection of the true solution operator onto the training-data function space, and richer polynomial training data can actually increase the finite-difference parameter bias.