← Latest papers
💬 NLP

Context Parametrization with Compositional Adapters

The paper introduces CompAs, a meta-learning framework that translates multiple context chunks into algebraically composable adapter parameters, offering a more efficient, stable, and reversible alternative to in-context learning and supervised fine-tuning for scaling large language models.

Original authors: Josip Jukić, Martin Tutek, Jan Šnajder

Published 2026-01-30
📖 4 min read☕ Coffee break read

Original authors: Josip Jukić, Martin Tutek, Jan Šnajder

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: The "Overstuffed Backpack"

Imagine a Large Language Model (LLM) is a brilliant student trying to answer a question. To do their best, they need to read some background information (like instructions, examples, or facts).

Currently, there are two main ways to give this student that information:

  1. In-Context Learning (ICL): You paste all the background info directly into the student's reading material.
    • The Problem: If you give them 100 pages of examples, the student gets overwhelmed. They start forgetting the beginning of the text, get confused, and it takes a long time to read through it all. It's like trying to carry a backpack that gets heavier and heavier with every new book you add.
  2. Fine-Tuning (SFT): You train the student specifically for that one task.
    • The Problem: This is like hiring a new tutor for every single subject. It's expensive, slow, and you can't easily swap tutors if the task changes.

The Solution: COMPAS (The "Magic Notebooks")

The authors introduce COMPAS, a new way to teach the model. Instead of pasting pages of text into the prompt, COMPAS turns that text into a tiny, invisible "instruction card" (called an adapter) that is attached directly to the model's brain.

Think of it like this:

  • Old Way (ICL): You hand the student a stack of 50 reference books every time they take a test.
  • COMPAS Way: You read those 50 books once, distill the most important lessons into a single, tiny magic notebook, and tape that notebook to the student's forehead. Now, the student doesn't need to read the books again; they just look at the notebook.

The Secret Sauce: "Compositional" (The Lego Blocks)

The real magic of COMPAS isn't just making one notebook; it's about making many small notebooks that can be snapped together.

Imagine you have a set of Lego bricks.

  • Context 1 (e.g., a math example) becomes Brick A.
  • Context 2 (e.g., a science example) becomes Brick B.
  • Context 3 (e.g., a history example) becomes Brick C.

In the old world, if you wanted to use all three, you had to glue them into one giant, messy block of text. With COMPAS, you can just snap Brick A, Brick B, and Brick C together mathematically.

The paper proves that if you add these "adapter bricks" together, the model behaves exactly as if it had read all the original texts combined. This means:

  • Speed: The model doesn't have to re-read the text every time.
  • Stability: It doesn't get confused by long lists of information.
  • Flexibility: You can swap out "Brick A" for a different math example without retraining the whole system.

How It Works (The Teacher-Student Game)

To teach the model how to make these magic notebooks, the authors use a "Teacher-Student" setup:

  1. The Teacher: A powerful model that reads the entire long text and gives the correct answer.
  2. The Student: A model that only sees the question and the "magic notebook" (the adapter).
  3. The Goal: The Student tries to guess the answer using only the notebook. The system adjusts the notebook until the Student matches the Teacher's performance.

They also add a special rule: The "Addition Rule." The system forces the generator to ensure that if you have two separate texts, the notebook for "Text A + Text B" is exactly the same as "Notebook A + Notebook B." This ensures the Lego blocks snap together perfectly.

Why This Matters (The Results)

The paper tested this on various tasks (like answering multiple-choice questions and finding facts in long documents). They found that:

  • It's Smarter: When you give the model lots of examples (like 16 or more), COMPAS performs better than just pasting them all in the prompt.
  • It's More Stable: As the amount of information grows, the model doesn't get "lost in the middle" of the text.
  • It's Reversible: The "magic notebook" is so faithful to the original text that, if you wanted to, you could actually decode the notebook back into the original text. This is a safety feature, ensuring the model isn't hiding secret data.

Summary

COMPAS is a method that turns long, messy instructions and examples into compact, mathematical "instruction cards." These cards can be added together like Lego blocks. This allows AI models to handle huge amounts of information quickly and accurately without getting overwhelmed by reading long texts every single time.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →