atlas

Research map / Architectures and efficiency / Attention and transformers

In-Context Compositional Learning vis Sparse Coding Transformer

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 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.

Reformulates Transformer attention as sparse coding over learned encoding and decoding dictionaries, with soft-thresholded coefficients and linear coefficient transfer from context to target, evaluated on S-RAVEN, RAVEN, and small LLM fine-tuning experiments.

Problem

Transformers struggle with in-context compositional learning tasks because dense softmax attention gives no explicit structural inductive bias for representing and transferring compositional rules across examples.

Approach

Reinterpret attention as sparse coding: an input-dependent encoding dictionary (from W_qk) yields coefficients that are sparsified by soft-thresholding and recombine a decoding dictionary (from W_vo) to form outputs; target-task coefficients are estimated as a learned linear combination of context-task coefficients (lifting scheme).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Add sparse-coding attention to Llama-7BLlama-7B · Commonsense reasoning benchmarks (average)accuracy: 70.5 -> 71.9Helped
Add sparse-coding attention to DoRALlama-7B with DoRA · Commonsense reasoning benchmarks (average)accuracy: 77.8 -> 78.1Helped
Add sparse-coding attention to LoRALlama-7B with LoRA · HellaSwagaccuracy: 83.4 -> 81.6Hurt
Add sparse-coding attention to LoRALlama-7B with LoRA · Commonsense reasoning benchmarksaccuracy: 75.6 -> 76.3Mixed
Add sparse-coding attention to OCLOCL · 3D ShapesMSE: 4.36 -> 4.31Helped
Add sparse-coding attention to OCLOCL · BitMoji FacesMSE: 4.77 -> 4.42Helped
Add sparse-coding attention to OCLOCL · CLEVr ObjectsMSE: 37.54 -> 36.23Helped
Add ReLU to both basis functions φ and ψ (ablation)Sparse-coding attention · S-RAVENaccuracy: 71.7 -> 73.6Helped
Add ReLU to φ only (ablation)Sparse-coding attention · S-RAVENaccuracy: 71.7 -> 72.3Helped
Add ReLU to ψ only (ablation)Sparse-coding attention · S-RAVENaccuracy: 71.7 -> 72.9Helped
Increase the soft-threshold ξ (ablation)Sparse-coding attention · RAVENattention-map sparsity: 18.53 -> 99.38Helped

Surprising findings

Limitations

Experimental setup

Datasets: S-RAVEN RAVEN synthetic compositional panel dataset commonsense reasoning benchmarks Im-promptu

Benchmarks: S-RAVEN RAVEN BoolQ PIQA HellaSwag WinoGrande ARC-c OBQA Im-promptu

Metrics: accuracy PSNR threshold coverage MSE sparsity

Baselines: standard Transformer HYLA LoRA DoRA Object-Centric Learner

Builds on: Transformer attention sparse coding lifting scheme HYLA LoRA DoRA

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