PICASO: Permutation-Invariant Context Composition with State Space Models

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Liu, Tian Yu, Achille, Alessandro, Trager, Matthew, Golatkar, Aditya, Zancato, Luca, Soatto, Stefano
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909538274246656
author Liu, Tian Yu
Achille, Alessandro
Trager, Matthew
Golatkar, Aditya
Zancato, Luca
Soatto, Stefano
author_facet Liu, Tian Yu
Achille, Alessandro
Trager, Matthew
Golatkar, Aditya
Zancato, Luca
Soatto, Stefano
contents Providing Large Language Models with relevant contextual knowledge at inference time has been shown to greatly improve the quality of their generations. This is often achieved by prepending informative passages of text, or 'contexts', retrieved from external knowledge bases to their input. However, processing additional contexts online incurs significant computation costs that scale with their length. State Space Models (SSMs) offer a promising solution by allowing a database of contexts to be mapped onto fixed-dimensional states from which to start the generation. A key challenge arises when attempting to leverage information present across multiple contexts, since there is no straightforward way to condition generation on multiple independent states in existing SSMs. To address this, we leverage a simple mathematical relation derived from SSM dynamics to compose multiple states into one that efficiently approximates the effect of concatenating raw context tokens. Since the temporal ordering of contexts can often be uninformative, we enforce permutation-invariance by efficiently averaging states obtained via our composition algorithm across all possible context orderings. We evaluate our resulting method on WikiText and MSMARCO in both zero-shot and fine-tuned settings, and show that we can match the strongest performing baseline while enjoying on average 5.4x speedup.
format Preprint
id arxiv_https___arxiv_org_abs_2502_17605
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PICASO: Permutation-Invariant Context Composition with State Space Models
Liu, Tian Yu
Achille, Alessandro
Trager, Matthew
Golatkar, Aditya
Zancato, Luca
Soatto, Stefano
Computation and Language
Artificial Intelligence
Machine Learning
Providing Large Language Models with relevant contextual knowledge at inference time has been shown to greatly improve the quality of their generations. This is often achieved by prepending informative passages of text, or 'contexts', retrieved from external knowledge bases to their input. However, processing additional contexts online incurs significant computation costs that scale with their length. State Space Models (SSMs) offer a promising solution by allowing a database of contexts to be mapped onto fixed-dimensional states from which to start the generation. A key challenge arises when attempting to leverage information present across multiple contexts, since there is no straightforward way to condition generation on multiple independent states in existing SSMs. To address this, we leverage a simple mathematical relation derived from SSM dynamics to compose multiple states into one that efficiently approximates the effect of concatenating raw context tokens. Since the temporal ordering of contexts can often be uninformative, we enforce permutation-invariance by efficiently averaging states obtained via our composition algorithm across all possible context orderings. We evaluate our resulting method on WikiText and MSMARCO in both zero-shot and fine-tuned settings, and show that we can match the strongest performing baseline while enjoying on average 5.4x speedup.
title PICASO: Permutation-Invariant Context Composition with State Space Models
topic Computation and Language
Artificial Intelligence
Machine Learning
url https://arxiv.org/abs/2502.17605