Lyra: An Efficient and Expressive Subquadratic Architecture for Modeling Biological Sequences

Krithik Ramesh, Sameed M. Siddiqui, Albert Gu, Michael Mitzenmacher, Pardis C. SabetiarXiv 2025 · DOI

Introduction

The modeling of biological sequences—DNA, RNA, and proteins—presents a unique set of challenges. Central to these is epistasis, the phenomenon where the functional effect of a mutation is contingent upon the presence of other mutations. Capturing these complex, non-additive interactions has traditionally required massive "foundation models" such as ESM3 or Evo. While powerful, these Transformer-based models suffer from quadratic scaling ($O(N^2)$), extreme resource intensity, and a reliance on vast amounts of data that may not be available for specific downstream tasks.

Lyra introduces a novel subquadratic architecture ($O(N \log N)$) designed to address these hurdles. By mathematically aligning State Space Models (SSMs) with the biological principles of epistasis, Lyra achieves state-of-the-art (SOTA) performance across a wide array of biological tasks while being up to 120,000x smaller than existing foundation models.

The Lyra Architecture: Modeling Epistasis

The core innovation of Lyra lies in its "principled" design, which bridges the gap between machine learning architecture and biological theory. The authors demonstrate that epistatic landscapes can be represented as multilinear polynomials. Crucially, they show that SSMs are naturally efficient polynomial approximators, allowing the model to implicitly learn the complex "grammar" of biological sequences with minimal parameters.

Overview of the Lyra architecture, its mathematical grounding in epistasis, and the breadth of biological tasks it addresses.

Lyra is a hybrid architecture composed of two primary modules:

  • Projected Gated Convolutions (PGC): These modules handle local feature extraction. Through multiplicative gating, PGCs explicitly encode second-order interactions. When stacked, they can capture increasingly higher-order dependencies, mirroring the hierarchical nature of biological sequences.
  • Diagonalized State Space Models (S4D): These components are responsible for capturing long-range, global dependencies across the sequence.

This combination allows Lyra to process sequences up to 65,536 tokens long efficiently, maintaining a subquadratic computational complexity of $O(N \log N)$.

Benchmarking Across Biological Domains

Lyra was evaluated on a comprehensive suite of over 100 biological tasks, spanning proteomics, genomics, and CRISPR activity prediction.

  • Proteomics: The model was tested on ProteinGym (Deep Mutational Scanning), intrinsically disordered regions (IDR), and protein fitness landscapes, including GFP brightness and antibody binding.
  • Genomics & RNA: Evaluation included the BEACON benchmark (splice site detection, ribosome loading), promoter activity prediction, and downstream tasks from the Nucleotide Transformer.
  • CRISPR: Lyra predicted activity for both Cas9 (DNA-targeting) and Cas13 (RNA-targeting) systems.

By utilizing established gold-standard benchmarks, the authors provided direct comparisons against massive models like Evo, ProtT5, and ESM-1b.

Key Results and Performance Metrics

Lyra demonstrates that inductive bias can be more effective than sheer scale. A model with only 55,000 parameters was able to outperform a 3-billion-parameter model in several key areas.

Efficiency and Scaling

Lyra is 64x faster on average for inference compared to standard Transformers and requires significantly less memory. This efficiency democratizes SOTA research, allowing complex models to be trained on consumer-grade hardware, such as two RTX 4090 GPUs, in under two hours.

Task Performance

  • Genomics: Lyra outperformed the Nucleotide Transformer on 17 out of 18 genomic tasks.
  • Proteomics: It matched or exceeded SOTA on 6 out of 18 Deep Mutational Scanning datasets and achieved a 0.998 true positive rate for viral protein (RDRP) detection.
  • CRISPR: The model doubled the accuracy of previous SOTA models on challenging datasets like Behan2019.
Frequency analysis of S4D kernels in Lyra, demonstrating the model's ability to separate overlapping biological signals.

Frequency analysis of Lyra’s kernels revealed a superior ability to separate overlapping biological signals compared to other subquadratic architectures like Hyena. This suggests that the mathematical alignment with epistasis translates into a more effective internal representation of biological data.

Conclusion and Future Directions

Lyra represents a shift away from the "bigger is better" paradigm in biological sequence modeling. By grounding architecture in the mathematical structure of the data, the authors have created a tool that is not only more efficient but also more expressive for specific biological tasks.

Future work will explore the potential of a "Lyra-Base" model pre-trained on massive datasets and investigate the architecture's generative capabilities for de novo protein and DNA design. Furthermore, the link between SSMs and polynomial approximation may find applications in other scientific domains characterized by complex, non-additive interactions.

Summary updated

Abstract

Deep learning architectures such as convolutional neural networks and Transformers have revolutionized biological sequence modeling, with recent advances driven by scaling up foundation and task-specific models. The computational resources and large datasets required, however, limit their applicability in biological contexts. We introduce Lyra, a subquadratic architecture for sequence modeling, grounded in the biological framework of epistasis for understanding sequence-to-function relationships. Mathematically, we demonstrate that state space models efficiently capture global epistatic interactions and combine them with projected gated convolutions for modeling local relationships. We demonstrate that Lyra is performant across over 100 wide-ranging biological tasks, achieving state-of-the-art (SOTA) performance in many key areas, including protein fitness landscape prediction, biophysical property prediction (e.g. disordered protein region functions) peptide engineering applications (e.g. antibody binding, cell-penetrating peptide prediction), RNA structure analysis, RNA function prediction, and CRISPR guide design. It achieves this with orders-of-magnitude improvements in inference speed and reduction in parameters (up to 120,000-fold in our tests) compared to recent biology foundation models. Using Lyra, we were able to train and run every task in this study on two or fewer GPUs in under two hours, democratizing access to biological sequence modeling at SOTA performance, with potential applications to many fields.
BibTeX
@misc{ramesh2025lyra,
  author = {Krithik Ramesh and Sameed M. Siddiqui and Albert Gu and Michael Mitzenmacher and Pardis C. Sabeti},
  title = {{Lyra: An Efficient and Expressive Subquadratic Architecture for Modeling Biological Sequences}},
  year = {2025},
  eprint = {2503.16351},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.16351},
}
Figure