paper-with-me

홈 › Papers

Tree Cross Attention

2023-09-29 · Leo Feng, Frederick Tung, Hossein Hajimirsadeghi, Yoshua Bengio, Mohamed Osama Ahmed

Cross Attention is a popular method for retrieving information from a set of context tokens for making predictions. At inference time, for each prediction, Cross Attention scans the full set of $\mathcal{O}(N)$ tokens. In practice, however, often only a small subset of tokens are required for good performance. Methods such as Perceiver IO are cheap at inference as they distill the information to a smaller-sized set of latent tokens $L < N$ on which cross attention is then applied, resulting in only $\mathcal{O}(L)$ complexity. However, in practice, as the number of input tokens and the amount of information to distill increases, the number of latent tokens needed also increases significantly. In this work, we propose Tree Cross Attention (TCA) - a module based on Cross Attention that only retrieves information from a logarithmic $\mathcal{O}(\log(N))$ number of tokens for performing inference. TCA organizes the data in a tree structure and performs a tree search at inference time to retrieve the relevant tokens for prediction. Leveraging TCA, we introduce ReTreever, a flexible architecture for token-efficient inference. We show empirically that Tree Cross Attention (TCA) performs comparable to Cross Attention across various classification and uncertainty regression tasks while being significantly more token-efficient. Furthermore, we compare ReTreever against Perceiver IO, showing significant gains while using the same number of tokens for inference.

📄 PDF Abstract BibTeX arXiv:2309.17388

Code (1)

borealisai/tree-cross-attention 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Perceiver IO 설명 없음

Similar Papers 제목 키워드 기반

DeFT: Decoding with Flash Tree-attention for Efficient Tree-structured LLM Inference

2024-03-30 · Jinwei Yao, Kaiqi Chen, Kexun Zhang, Jiaxuan You 외

Large language models (LLMs) are increasingly employed for complex tasks that process multiple generation calls in a tree structure with shared prefixes of tokens, including few-shot prompting, multi-step reasoning, spec…

GPU

Tree Attention: Topology-aware Decoding for Long-Context Attention on GPU clusters

2024-08-07 · Vasudev Shyam, Jonathan Pilault, Emily Shepperd, Quentin Anthony 외

Self-attention is the core mathematical operation of modern transformer architectures and is also a significant computational bottleneck due to its quadratic complexity in the sequence length. In this work, we derive the…

GPU

TreeGPT: Pure TreeFFN Encoder-Decoder Architecture for Structured Reasoning Without Attention Mechanisms

2025-09-06 · Zixi Li arxiv

We present TreeGPT, an attention-free neural architecture that explores the potential of pure TreeFFN encoder-decoder design for structured reasoning tasks. Unlike traditional transformer approaches that rely on attentio…

Computational Efficiency

Recursive Tree-Structured Self-Attention for Answer Sentence Selection

2021-08-01 · ACL 2021 5 · Khalil Mrini, Emilia Farcas, Ndapa Nakashole

Syntactic structure is an important component of natural language text. Recent top-performing models in Answer Sentence Selection (AS2) use self-attention and transfer learning, but not syntactic structure. Tree structur…

Community Question AnsweringQuestion AnsweringSentenceTransfer Learning

Coarse-to-fine Q-attention with Tree Expansion

2022-04-26 · Stephen James, Pieter Abbeel

Coarse-to-fine Q-attention enables sample-efficient robot manipulation by discretizing the translation space in a coarse-to-fine manner, where the resolution gradually increases at each layer in the hierarchy. Although e…

Robot Manipulation