ChordMixer: A Scalable Neural Attention Model for Sequences with Different Lengths

Ruslan Khalitov, Tong Yu, Lei Cheng, Zhirong Yang
6/12/2022
cs.LG

Official code: RuslanKhalitov/ChordMixer (62 stars, Python, MIT, last commit 2023-05-23).

Abstract

Sequential data naturally have different lengths in many domains, with some very long sequences. As an important modeling tool, neural attention should capture long-range interaction in such sequences.

Show full abstract

However, most existing neural attention models admit only short sequences, or they have to employ chunking or padding to enforce a constant input length. Here we propose a simple neural network building block called ChordMixer which can model the attention for long sequences with variable lengths. Each ChordMixer block consists of a position-wise rotation layer without learnable parameters and an element-wise MLP layer. Repeatedly applying such blocks forms an effective network backbone that mixes the input signals towards the learning targets. We have tested ChordMixer on the synthetic adding problem, long document classification, and DNA sequence-based taxonomy classification. The experiment results show that our method substantially outperforms other neural attention models.

View on arXivView PDF

Code Implementations(1)

MIT

The official implementation of the ChordMixer architecture.

623PythonMay 23, 20223 years agoMIT

Similar Papers

Cite this paper

@article{khalitov2022chordmixer,
  title  = {ChordMixer: A Scalable Neural Attention Model for Sequences with Different Lengths},
  author = {Ruslan Khalitov and Tong Yu and Lei Cheng and Zhirong Yang},
  year   = {2022},
  eprint = {2206.05852},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2206.05852}
}

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/2206.05852.svg)](https://codeofpaper.com/paper/2206.05852)

Discussion