TreeCoders: Trees of Transformers

Pierre Colonna D'Istria, Abdulrahman Altahhan
11/11/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

In this paper, we introduce TreeCoders, a novel family of transformer trees. We moved away from traditional linear transformers to complete k-ary trees. Transformer blocks serve as nodes, and generic classifiers learn to select the best child and route the sequence of tokens to a specific leaf. The selectors, moved outside the transformer blocks, allow for the use of a variety of architecture without further modifications. Furthermore, our proposed architecture supports sparse node activation due to the logarithmic complexity of a tree search. We validate our idea by testing a series of decoder-only tree transformers, achieving competitive results across a diverse range of language datasets. Our study demonstrates that the proposed tree transformer model outperforms a size-equivalent linear transformer model 76\% of the time over a wide range of tree architectures. Furthermore, our proposed model naturally lends itself to distributed implementation.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{distria2024treecoders,
  title  = {TreeCoders: Trees of Transformers},
  author = {Pierre Colonna D'Istria and Abdulrahman Altahhan},
  year   = {2024},
  eprint = {2411.07218},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.07218v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.07218.svg)](https://codeofpaper.com/paper/2411.07218)

Discussion