paper-with-me

홈 › Papers

Compositional Attention: Disentangling Search and Retrieval

2021-10-18 · ICLR 2022 4 · Sarthak Mittal, Sharath Chandra Raparthy, Irina Rish, Yoshua Bengio, Guillaume Lajoie

Multi-head, key-value attention is the backbone of the widely successful Transformer model and its variants. This attention mechanism uses multiple parallel key-value attention blocks (called heads), each performing two fundamental computations: (1) search - selection of a relevant entity from a set via query-key interactions, and (2) retrieval - extraction of relevant features from the selected entity via a value matrix. Importantly, standard attention heads learn a rigid mapping between search and retrieval. In this work, we first highlight how this static nature of the pairing can potentially: (a) lead to learning of redundant parameters in certain tasks, and (b) hinder generalization. To alleviate this problem, we propose a novel attention mechanism, called Compositional Attention, that replaces the standard head structure. The proposed mechanism disentangles search and retrieval and composes them in a dynamic, flexible and context-dependent manner through an additional soft competition stage between the query-key combination and value pairing. Through a series of numerical experiments, we show that it outperforms standard multi-head attention on a variety of tasks, including some out-of-distribution settings. Through our qualitative analysis, we demonstrate that Compositional Attention leads to dynamic specialization based on the type of retrieval needed. Our proposed mechanism generalizes multi-head attention, allows independent scaling of search and retrieval, and can easily be implemented in lieu of standard attention heads in any network architecture.

📄 PDF Abstract BibTeX arXiv:2110.09419

Code (3)

sarthmit/compositional-attention 공식 구현 pytorch
Rishit-dagli/Compositional-Attention tf
facebookresearch/xformers pytorch

Tasks

Retrieval

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Position-Wise Feed-Forward Layer 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Residual Connection 설명 없음
Adam 설명 없음

Similar Papers 제목 키워드 기반

Beyond Semantic Search: Towards Referential Anchoring in Composed Image Retrieval

2026-04-07 · Yuxin Yang, Yinan Zhou, Yuxin Chen, Ziqi Zhang 외 arxiv

Composed Image Retrieval (CIR) has demonstrated significant potential by enabling flexible multimodal queries that combine a reference image and modification text. However, CIR inherently prioritizes semantic matching, s…

Image Retrieval

Disentangling Genotype and Environment Specific Latent Features for Improved Trait Prediction using a Compositional Autoencoder

2024-10-25 · Anirudha Powadi, Talukder Zaki Jubery, Michael C. Tross, James C. Schnable 외

This study introduces a compositional autoencoder (CAE) framework designed to disentangle the complex interplay between genotypic and environmental factors in high-dimensional phenotype data to improve trait prediction i…

Diversityregression

JEDI: The Force of Jensen-Shannon Divergence in Disentangling Diffusion Models

2025-05-25 · Eric Tillmann Bill, Enis Simsar, Thomas Hofmann

We introduce JEDI, a test-time adaptation method that enhances subject separation and compositional alignment in diffusion models without requiring retraining or external supervision. JEDI operates by minimizing semantic…

DisentanglementTest-time Adaptation

Dynamic Adapter with Semantics Disentangling for Cross-lingual Cross-modal Retrieval

2024-12-18 · Rui Cai, Zhiyu Dong, Jianfeng Dong, Xun Wang

Existing cross-modal retrieval methods typically rely on large-scale vision-language pair data. This makes it challenging to efficiently develop a cross-modal retrieval model for under-resourced languages of interest. Th…

Cross-Modal RetrievalRetrieval

WebAggregator: Enhancing Compositional Reasoning Capabilities of Deep Research Agent Foundation Models

2025-10-16 · Rui Wang, Ce Zhang, Jun-Yu Ma, Jianshu Zhang 외 arxiv

The hallmark of Deep Research agents lies in compositional reasoning, the capacity to aggregate distributed, heterogeneous information into coherent logical insights. However, current agentic systems are often retrieval-…