atlas

Research map / Optimization / Implicit bias and generalization

Transformers Handle Endogeneity in In-Context Linear Regression

ICLR 2025 · Optimization › Implicit bias and generalization · approach: In-context learning as gradient descent · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that transformers can implement a gradient-based bi-level optimization converging exponentially to 2SLS for in-context IV regression, and proves an excess-loss bound for an ICL-pretrained looped transformer that empirically matches or beats 2SLS under endogeneity.

Problem

In-context linear regression under endogeneity (noise correlated with regressors), where OLS is biased and inconsistent; whether transformers can use instrumental variables to give reliable predictions and coefficient estimates.

Approach

Constructs a looped attention-only transformer that emulates a bi-level GD procedure converging exponentially to the 2SLS estimator, paired with an ICL pretraining scheme where endogeneity occurs in training samples but not the query, plus a coefficient-extraction method via output differentiation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use the ICL-pretrained transformer instead of 2SLSICL-pretrained transformer · Standard endogeneity tasksICPENo clear effect
Use the ICL-pretrained transformer instead of 2SLSICL-pretrained transformer · Standard endogeneity taskscoefficient MSENo clear effect
Use 2SLS instead of OLS2SLS · Standard endogeneity tasksICPE and coefficient MSEHelped
Use the ICL-pretrained transformer instead of 2SLSICL-pretrained transformer · Weak instruments (IV strength < 0.5)ICPE and coefficient MSEHelped
Use the ICL-pretrained transformer instead of 2SLSICL-pretrained transformer · Strong instrumentsICPE and coefficient MSENo clear effect
Use the ICL-pretrained transformer instead of 2SLS and OLSICL-pretrained transformer · Quadratic-effect non-linear IVICPE and coefficient MSEHelped
Use the ICL-pretrained transformer instead of 2SLS and OLSICL-pretrained transformer · Underdetermined IV (q=3, p=5)ICPE and coefficient MSEHelped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic in-context linear regression prompts (Algorithm 1)

Benchmarks: synthetic endogenous linear regression tasks

Metrics: in-context prediction error (ICPE) coefficient MSE

Baselines: 2SLS OLS

Builds on: looped transformer transformers implement gradient descent for in-context linear regression two-stage least squares

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy