Reproduce “Sequential-Parallel Duality in Prefix Scannable Models” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Morris Yau, Sharut Gupta, Valerie Engelmayer, Kazuki Irie, Stefanie Jegelka, Jacob Andreas

This research introduces Prefix-Scannable Models (PSMs), a class of neural sequence architectures defined by their sequential-parallel duality, enabling parallel training and efficient sequential inference via the Blelloch scan algorithm. The instantiated Transformer-PSM achieved strong length generalization on state-tracking tasks, outperforming baselines, and demonstrated competitive language modeling performance with near-constant inference time per token.

Key insights

  • Many existing efficient sequence models (e.g., Mamba, GLA, RetNet) can be unified as PSMs with associative state-update templates, achieving SPD-(N, 1) complexity.
  • Sequential-parallel duality can be extended to models employing non-associative aggregation operators (like softmax attention) by leveraging the Blelloch scan to fix a parenthesization, resulting in SPD-(N, log N) complexity.
  • The online binary counter scan algorithm allows PSMs to achieve O(log N) memory and amortized O(1) work per token during sequential inference, mimicking the parallel Blelloch scan's parenthesization efficiently.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.