Skip to main content
QUICK REVIEW

[Paper Review] ChordMixer: A Scalable Neural Attention Model for Sequences with Different Lengths

Ruslan Khalitov, Tong Yu|arXiv (Cornell University)|Jun 12, 2022
Computational Physics and Python ApplicationsComputer Science4 citations
TL;DR

ChordMixer is a scalable neural attention model that processes variable-length sequences without padding or chunking by using parameter-free multi-scale rotation and channel-wise MLPs. It achieves state-of-the-art performance on long sequence tasks, outperforming Transformers and variants in synthetic, document, and DNA sequence classification, especially at extreme lengths (up to 1.5M tokens).

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. 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.

Motivation & Objective

  • Address the challenge of modeling long, variable-length sequences in neural attention without padding or chunking.
  • Overcome the quadratic computational cost and scalability limitations of standard Transformers and their variants.
  • Design a neural network backbone that maintains full receptive field across all sequence lengths with minimal parameters.
  • Enable effective long-range interaction in sequences from diverse domains, such as natural language and genomics.
  • Demonstrate superior performance on long-sequence tasks where existing methods degrade due to length constraints.

Proposed method

  • Proposes ChordMixer as a neural network building block with two components: a non-parametric multi-scale rotation layer and a learnable channel-wise MLP.
  • Applies repeated ChordMixer blocks to progressively mix information across sequence positions, achieving full receptive field after log₂N blocks.
  • Uses position-wise rotation with no learnable parameters, making model size independent of sequence length.
  • Processes sequences of any length without padding or truncation, enabling end-to-end training on variable-length inputs.
  • Employs a shared architecture across all sequence lengths, avoiding length-dependent design choices.
  • Integrates with standard predictors (e.g., classifiers or regressors) and supports both classification and regression tasks.

Experimental results

Research questions

  • RQ1Can a neural attention mechanism effectively model long-range dependencies in variable-length sequences without padding or chunking?
  • RQ2How does ChordMixer’s performance compare to Transformers and their efficient variants on long sequences with diverse lengths?
  • RQ3Does the absence of learnable positional encodings or local inductive biases hinder performance on long sequences?
  • RQ4To what extent does ChordMixer maintain stable performance across extreme sequence length percentiles (e.g., 99th–99.5th percentile)?
  • RQ5Can ChordMixer generalize across domains such as synthetic tasks, long document classification, and DNA sequence taxonomy?

Key findings

  • ChordMixer achieved 89% ROC-AUC on the longest DNA sequence task (Sus vs. Bos at 99.5th percentile), significantly outperforming all baselines, which dropped below 70%.
  • For the synthetic adding problem, ChordMixer maintained high accuracy across all sequence lengths, including up to 1.5 million tokens.
  • In long document classification, ChordMixer outperformed all Transformer-based models, especially at longer sequence lengths.
  • On the Carassius vs. Labeo taxonomy task, ChordMixer maintained stable ROC-AUC (~84–89%) across all length percentiles, while other models degraded after 5,630 tokens.
  • The ablation study confirmed that ChordMixer’s superior performance stems from its attention mechanism, not the classifier, as it outperformed all combinations of other attention models with the same predictors.
  • ChordMixer was the only method to achieve consistent performance across all length percentiles in the Sus vs. Bos dataset, indicating robustness to sequence length variation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.