atlas

Research map / Optimization / Optimizers

In-Context Learning State Vector with Inner and Momentum Optimization

NeurIPS 2024 · Optimization › Optimizers · approach: Gradient-based meta-learning theory · 1 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.

Analyzes compressed ICL attention-activation vectors as gradient-descent-like weights and proposes state vectors refined by inner (averaging), momentum optimization, and divide-and-conquer aggregation for test-time intervention.

Problem

Compressed task/function vectors extracted from ICL demonstrations are poorly understood and not well optimized, and ICL cannot directly handle many examples due to context length limits.

Approach

Views attention activations of the last separate token as a dual form of gradient-descent-updated weights, defines a state vector from concatenated early-layer activations, then refines it with uniform averaging over per-example state vectors (inner optimization), momentum applied to differences between adjacent state vectors (momentum optimization), and aggregates many examples via a divide-and-c

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Average state vectors from separate tokens (inner optimization) (ablation)State vector · Six-task average, zero-shot; Llama-2-7Bfirst-token accuracy: 53.7 -> 63.9; average improvement of 10.2%Helped
Average state vectors from separate tokens (inner optimization) (ablation)State vector · Six-task average, zero-shot; GPT-J-6Bfirst-token accuracy: 35.6 -> 41.5; average improvement of 5.9%Helped
Add momentum optimization to the inner-optimized state vector (ablation)State vector · Six-task average, zero-shot; Llama-2-7Bfirst-token accuracy: 63.9 -> 65.2; average increase of 1.3%Helped
Add momentum optimization to the inner-optimized state vector (ablation)State vector · Six-task average, zero-shot; GPT-J-6Bfirst-token accuracy: 41.5 -> 43.9; average increase of 2.4%Helped
Add momentum optimization to the inner-optimized state vector (ablation)State vector · Six-task average, few-shot; Llama-2-7Bfirst-token accuracy: 73.0 -> 73.8; average increase of 0.8%Helped
Add momentum optimization to the inner-optimized state vector (ablation)State vector · Six-task average, few-shot; GPT-J-6Bfirst-token accuracy: 56.4 -> 57.4; average increase of 1.0%Helped
Use Adagrad, RMSprop, or Adam instead of momentum optimization (ablation)Inner-optimized state vector · State vector optimization tasksfirst-token accuracyHurt
Increase the number of layers used to extract the state vector, beyond the 14th layer (ablation)State vector · Zero-shot, average across datasetsfirst-token accuracyHurt
Use alternative separate tokens instead of the arrow token (ablation)State vector method · Experiments across tasksfirst-token accuracyNo clear effect
Apply momentum optimization directly to task vectors without inner optimization (ablation)Task vector · Preliminary experiment across tasksfirst-token accuracyNo clear effect
Aggregate many examples using divide-and-conquer rather than average aggregation (ablation)State vector aggregation · Multiple-example settingaccuracyHelped
Increase the number of examples used for state vector aggregation (ablation)Divide-and-conquer and average aggregation · Multiple-example settingaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: Antonym Capitalize Present-Past Singular-Plural English-French Country-Capital AG News Person-Sport Person-Instrument Person-Occupation Product-Company Landmark-Country

Benchmarks: Antonym English-French Person-Instrument Person-Occupation Product-Company Landmark-Country Capitalize Country-Capital Present-Past Singular-Plural Person-Sport AG News

Metrics: first output token accuracy

Baselines: Regular zero-shot ICL baseline Function vector Task vector Average aggregation

Builds on: task vector function vector model soup momentum gradient descent

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