paper-with-me

홈 › Papers

In-Context Compositional Learning via Sparse Coding Transformer

2025-11-25 · Wei Chen, Jingxi Yu, Zichen Miao, Qiang Qiu arxiv

Transformer architectures have achieved remarkable success across language, vision, and multimodal tasks, and there is growing demand for them to address in-context compositional learning tasks. In these tasks, models solve the target problems by inferring compositional rules from context examples, which are composed of basic components structured by underlying rules. However, some of these tasks remain challenging for Transformers, which are not inherently designed to handle compositional tasks and offer limited structural inductive bias. In this work, inspired by the principle of sparse coding, we propose a reformulation of the attention to enhance its capability for compositional tasks. In sparse coding, data are represented as sparse combinations of dictionary atoms with coefficients that capture their compositional rules. Specifically, we reinterpret the attention block as a mapping of inputs into outputs through projections onto two sets of learned dictionary atoms: an encoding dictionary and a decoding dictionary. The encoding dictionary decomposes the input into a set of coefficients, which represent the compositional structure of the input. To enhance structured representations, we impose sparsity on these coefficients. The sparse coefficients are then used to linearly combine the decoding dictionary atoms to generate the output. Furthermore, to assist compositional generalization tasks, we propose estimating the coefficients of the target problem as a linear combination of the coefficients obtained from the context examples. We demonstrate the effectiveness of our approach on the S-RAVEN and RAVEN datasets. For certain compositional generalization tasks, our method maintains performance even when standard Transformers fail, owing to its ability to learn and apply compositional rules.

📄 PDF Abstract BibTeX arXiv:2511.20194

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Contextualized word senses: from attention to compositionality

2023-12-01 · Pablo Gamallo

The neural architectures of language models are becoming increasingly complex, especially that of Transformers, based on the attention mechanism. Although their application to numerous natural language processing tasks h…

Iterative Decoding for Compositional Generalization in Transformers

2021-10-08 · Luana Ruiz, Joshua Ainslie, Santiago Ontañón

Deep learning models generalize well to in-distribution data but struggle to generalize compositionally, i.e., to combine a set of learned primitives to solve more complex tasks. In sequence-to-sequence (seq2seq) learnin…

Iterative Decoding for Compositional Generalization in Transformers

2021-12-17 · ACL ARR December 2022 12 · Anonymous

Deep learning models generalize well to in-distribution data but struggle to generalize compositionally, i.e., to combine a set of learned primitives to solve more complex tasks. In sequence-to-sequence (seq2seq) learnin…

SGTR: Generating Scene Graph by Learning Compositional Triplets with Transformer

2021-09-29 · Rongjie Li, Songyang Zhang, Xuming He

In this work, we propose an end-to-end framework for the scene graph generation. Motivated by the recently introduced DETR, our method, termed SGTR, generating scene graphs by learning compositional queries with Transfor…

Graph GenerationScene Graph GenerationTriplet

Enhancing Generalization in Sparse Mixture of Experts Models: The Case for Increased Expert Activation in Compositional Tasks

2024-10-17 · Jinze Zhao

As Transformer models grow in complexity, their ability to generalize to novel, compositional tasks becomes crucial. This study challenges conventional wisdom about sparse activation in Sparse Mixture of Experts (SMoE) m…

Mixture-of-Experts