atlas

Research map / Architectures and efficiency / RNNs and normalization

Iterative Vectors: In-Context Gradient Steering without Backpropagation

ICML 2025 · Architectures and efficiency › RNNs and normalization · approach: Layer-wise analysis of language models

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.

Proposes Iterative Vectors (IVs), activation-space steering vectors extracted from in-context demonstrations by iteratively refining batch-wise attention-activation differences, applied at inference without backpropagation.

Problem

In-context learning is volatile and limited by context length and inference cost when many demonstrations are used; existing activation vector methods were mostly tested on synthetic tasks rather than real ICL classification.

Approach

Extract meta-gradients as differences between attention activations at input-output separators with and without demonstrations, then iteratively re-inject the running average of extracted vectors during extraction (emulating batched gradient updates) and apply the final vectors at inference without backpropagation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply Iterative Vectors instead of clean ICLGPT-J-6B · 13-task averagemacro-F1: 39.90 -> 41.76Helped
apply Iterative Vectors instead of clean ICLLlama 2-7B · 13-task averagemacro-F1: 43.07 -> 46.59Helped
apply Iterative Vectors instead of clean ICLLlama 3.1-8B · 13-task averagemacro-F1: 46.02 -> 48.79Helped
apply Iterative Vectors instead of clean ICLLlama 2-13B · 13-task averagemacro-F1: 48.20 -> 52.89Helped
replace clean ICL with IVLlama 2-7B · AG News, 5-shotmacro-F1: 82.47 -> 85.84Helped
replace clean ICL with IVLlama 2-7B · Rotten Tomatoes, 2-shotmacro-F1: 70.28 -> 87.50Helped
increase extraction episodes from 1 to 200IV on Llama 2-7B · AG Newsmacro-F1: 40.64 -> 69.62Helped
disable iterative refinement (b = 0) (ablation)IV on Llama 2-7B · AG News validationmacro-F1Hurt
use single-episode iterative refinement (b = 1) rather than disabling iteration (ablation)IV on Llama 2-7B · AG News validationmacro-F1: 62.7 -> 69.4Helped
vary extraction batch size across the reported settings (ablation)IV on Llama 2-7B · AG News validationmacro-F1: 72.8; 67.8; 67.0; 64.5; 63.3Mixed

Surprising findings

Limitations

Experimental setup

Datasets: AG News Rotten Tomatoes emoji SST-5 TREC hate speech sentiment offensive irony emotion climate abortion

Benchmarks: AG News Rotten Tomatoes emoji SST-5 TREC hate speech sentiment offensive irony emotion climate abortion

Metrics: macro-F1 micro-F1 weighted-F1 inference time extraction time

Baselines: Function Vectors Task Vectors standard one-shot ICL

Builds on: Function Vectors Task Vectors dual form of neural networks meta-optimization view of ICL

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