Research paperICML 2025 · PMLR 267

Fast and Low-Cost Genomic Foundation Models via Outlier Removal

Outlier-free attention for DNA models that are cheap to adapt and quantize.

Authors

Haozheng Luo1,*Chenghao Qiu2,*Maojiang Su1Zhihan Zhou1Zoe Mehta3Guo Ye1Jerry Yao-Chieh Hu1Han Liu1

Equal contribution.

Affiliations

  • 1Northwestern University
  • 2Texas A&M University
  • 3Massachusetts Institute of Technology

Genomic foundation models are useful to labs that cannot afford to run them. The standard shortcuts, low-rank adaptation and quantization, lose much of their accuracy.

Many users of models such as DNABERT-2 work in biomedical labs rather than on GPU clusters. Low-rank adaptation (LoRA) reduces the cost of fine-tuning, and post-training quantization reduces the cost of inference. Applied directly to an existing model, both cause large performance drops.

The paper attributes this to outliers in the attention mechanism. Softmax must place all of its probability mass on real tokens, so tokens that carry little information can still receive large attention weights. The resulting extreme activations are inherited from pretraining and, as prior work reports, amplified by low-rank adaptation.

Attention collects on the first token

Row (a1) shows the vanilla model. Its attention probabilities keep a red column on the leading [CLS] token for most queries.

Row (b1) is the same sequence under GERM. The leading column is no longer dominant.

Figure 3, first pair · last hidden layer
(a1) Vanilla DNABERT-2 · (b1) GERM

Attention probability maps and attention scores for one DNA sequence from the mouse 0 dataset. In the vanilla DNABERT-2 row, the first column of the attention probability map is dark red for most queries. In the GERM row, that column is blue after the first row.
First of three example pairs in Figure 3. Heatmaps are scaled from 0 (blue) to 1 (red); the right panels show the first 32 dimensions of the attention output. Appendix D.10 ↗

Keep the DNABERT-2 design, and swap the attention normalization for one that can attend to nothing.

GERM builds on the outlier-efficient Hopfield layer of OutEffHop. It replaces Softmax in every attention layer with \(\operatorname{Softmax}_1\) and trains the model from scratch. Because full pretraining is expensive, the paper also proposes GERM-T, which reuses an existing checkpoint and adds the outlier-free layer only for a short final stretch of training.

Two pipelines. Both tokenize a DNA sequence with SentencePiece BPE and add ALiBi positional biases. In (a) DNABERT-2, queries and keys pass through Softmax and the output distribution has outliers. In (b) GERM, Softmax is replaced by an outlier-free layer and the output distribution has no outliers.
Figure 1. DNABERT-2 and GERM share tokenization and positional encoding. GERM replaces Softmax in attention with an outlier-free layer. Architecture figure from the paper.
  1. 01 /

    Outlier-free attention

    \(\operatorname{Softmax}_1\) adds one to the denominator. When every score is low, the weights can all approach zero, so the layer can make almost no update without concentrating mass on an uninformative token.

    \[ \operatorname{Softmax}_1(S) = \frac{\exp(S)}{1+\sum_{i=1}^{L}\exp(S_i)}. \]
  2. 02 /

    DNABERT-2 backbone

    DNA is tokenized with SentencePiece and BPE, using a vocabulary of 4096. Positions enter as ALiBi linear biases on the attention scores, with a fixed slope \(m\) per head, so sequences longer than those seen in pretraining can be processed.

    \[ \begin{aligned} &\operatorname{Softmax}\bigl(q_i K^\top + m\,b_i\bigr),\\ &b_i = \bigl[-(i-1),\dots,-1,0,-1,\dots,-(L-1-i)\bigr]. \end{aligned} \]
  3. 03 /

    GERM-T: small-step continual learning

    GERM-T trains with the vanilla architecture first, then continues with the outlier-free layer for the remaining steps. The representative model uses 40K of 200K steps. It is a compromise: it avoids retraining from scratch, but removes fewer outliers than GERM.

How are the compared models trained?
ModelAttention normalizationOutlier-free stepsNeeds training from scratch
DNABERT-2Softmax0—
GERM-TSoftmax, then \(\operatorname{Softmax}_1\)40K of 200KNo
GERM\(\operatorname{Softmax}_1\)200K of 200KYes

Section 2 and the model setup in Section 3. The 160K/40K split follows from the 200K-step total and the 40K-step GERM-T model. Read Section 2 ↗

What the analysis covers

Appendix A gives an expressiveness guarantee for low-rank adaptation of transformer-based genomic models that use \(\operatorname{Softmax}_1\). The paper defines outliers as tokens or activations that disproportionately influence attention despite carrying little information, and measures them with average kurtosis and the maximum infinity norm of activations. Read the appendix.

Quantization & low-rank adaptation

Average performance drop W4A4 · OmniQuant · 27 datasets

94.78%17.17%

Smaller loss under 4-bit quantization

DNABERT-2 → GERM

Average performance drop LoRA · rank 128 · 27 datasets

13.87%4.12%

Smaller loss from low-rank adaptation

DNABERT-2 → GERM

Fewer outliers after pretraining

Across the 27 datasets, GERM reduces average kurtosis by about 92.14% and the maximum infinity norm by about 82.77% relative to DNABERT-2. GERM-T reduces them by about 7.20% and 53.78%: its kurtosis stays close to the baseline, while the infinity norm falls by about half.

Outlier metrics at FP16 · Table 1
ModelFP16 MCC ↑Average kurtosis ↓Max infinity norm ↓
Official DNABERT-2 checkpoint66.1139.6853.61
DNABERT-259.11270.9061.64
GERM-T59.30251.4028.49
GERM59.7321.2910.62

DNABERT-2 is the paper's vanilla baseline; all three models are fully fine-tuned before evaluation. The official checkpoint is the released DNABERT-2 model and the reference for the paper's Delta MCC values. It is not the baseline for the percentage changes above.

Post-training quantization

Each fully fine-tuned model is quantized with four methods. GERM keeps most of its FP16 accuracy at 8 and 6 bits. At W4A4 with OmniQuant it retains an MCC of 49.42, while the other two models fall below 4. GERM-T is competitive at 8 bits, with the smallest drop under SmoothQuant and OmniQuant W8A8, but it degrades at 6 and 4 bits in several settings.

MCC after quantization, mean ± std over three seeds · Table 1
MethodBitsDNABERT-2GERM-TGERM
MCC ↑Drop ↓MCC ↑Drop ↓MCC ↑Drop ↓
None (FP16)W16A1659.11—59.30—59.73—
TraditionalW8A833.60 ± 0.4143.81%38.38 ± 0.1535.27%57.30 ± 0.083.77%
SmoothQuantW8A836.51 ± 0.0238.63%57.52 ± 0.003.01%56.65 ± 0.154.82%
W6A620.74 ± 0.0466.18%30.34 ± 0.0448.83%56.48 ± 0.075.45%
W4A4−1.03 ± 0.06101.24%0.22 ± 0.0099.63%20.05 ± 0.0069.44%
Outlier SuppressionW8A825.26 ± 0.0257.60%42.57 ± 0.0528.31%45.87 ± 0.0825.23%
W6A627.84 ± 0.2852.71%46.02 ± 0.0622.34%40.57 ± 0.5636.27%
OmniQuantW8A849.92 ± 0.0515.76%56.80 ± 0.124.21%55.99 ± 0.095.95%
W6A648.47 ± 0.1418.61%55.41 ± 0.006.57%55.70 ± 0.036.41%
W4A42.94 ± 0.1994.78%3.86 ± 0.0093.49%49.42 ± 0.0017.17%

MCC is the Matthews correlation coefficient averaged over 27 datasets. Drop is the average relative performance drop after quantization, as reported in the paper. Traditional W8A8 follows Bondarenko et al. Outlier Suppression was evaluated at 8 and 6 bits only. Averaged over all settings, the paper reports that GERM reduces the quantization drop by 64.34% relative to DNABERT-2, and GERM-T by 31.42%.

Full table & protocol

Low-rank adaptation

Starting from each pretrained checkpoint, the paper fine-tunes with LoRA and with two quantized variants, QLoRA and LoftQ. GERM loses less accuracy than DNABERT-2 in all three. On average, the paper reports a 37.98% improvement for GERM and 20.01% for GERM-T over the baseline.

MCC after adaptation, mean ± std over three seeds · Table 2
MethodDNABERT-2GERM-TGERM
MCC ↑Drop ↓MCC ↑Drop ↓MCC ↑Drop ↓
Full fine-tuning59.11—59.30—59.73—
LoRA50.91 ± 1.6713.87%55.60 ± 0.286.23%57.27 ± 0.704.12%
QLoRA50.65 ± 0.1314.31%51.05 ± 0.0713.90%53.16 ± 0.2110.99%
LoftQ50.76 ± 0.0614.05%51.20 ± 0.1313.65%53.11 ± 0.0811.08%

LoRA uses rank 128 and alpha 256; QLoRA and LoftQ use the same rank with 4-bit quantization. Drop is relative to each model's own full fine-tuning score. See Table 2 and Section 3.2 ↗

On a single consumer GPU

All three models were run on one NVIDIA GeForce RTX 2080 Ti with 11GB of memory. GERM and GERM-T take less time per epoch than DNABERT-2 for full fine-tuning and each low-rank method, and quantized inference is also faster. The paper reports that GERM fine-tunes in about 5 minutes on this card.

Three bar charts comparing DNABERT-2, GERM, and GERM-T. Quantized inference time with OmniQuant at 16, 8, and 4 bits: 7.66, 6.70, 7.01 seconds; 5.47, 4.79, 5.01; 3.81, 3.33, 3.49. Training time per epoch for Full, LoRA, QLoRA, LoftQ: 516, 323, 326; 197, 154, 167; 206, 164, 177; 251, 199, 220 seconds. Inference time after fine-tuning: 3.85, 3.24, 3.25; 4.12, 3.30, 3.32; 5.28, 4.13, 4.17; 5.77, 4.52, 4.52 seconds.
Figure 2. Left: inference time under OmniQuant. Middle: training time per epoch. Right: inference time after fine-tuning. Times in seconds. Section 3.4 ↗

The experiments use the DNABERT-2 architecture at 117 million parameters, pretrained with masked language modeling. Downstream evaluation covers 27 classification datasets across 7 tasks and 4 species, with input lengths from 70 to 1000. Each evaluation is repeated with three random seeds.

Pretraining
200K steps · masked language modeling · GERM-T switches for the last 40K
Downstream metric
Matthews correlation coefficient (MCC)
Outlier metrics
Average kurtosis of FFN and LayerNorm outputs · maximum infinity norm across layers
Quantization
Traditional W8A8, SmoothQuant, Outlier Suppression, OmniQuant
Low-rank adaptation
LoRA, QLoRA, LoftQ · rank 128 · alpha 256

The appendix extends the comparison to the Nucleotide Transformer, including a 2.5B model, and to clipped softmax and gated attention. The continual-learning ablation compares 20K, 40K, and 100K outlier-free steps; 40K gives GERM-T the best trade-off in that study. GERM-T still loses substantial accuracy under 4-bit quantization and under QLoRA and LoftQ, and the authors leave outlier removal without retraining from scratch to future work.

Ablations and limitations ↗
BibTeX
Download
@inproceedings{luo2025fast,
  title     = {Fast and Low-Cost Genomic Foundation Models via Outlier Removal},
  author    = {Haozheng Luo and Chenghao Qiu and Maojiang Su and Zhihan Zhou and
               Zoe Mehta and Guo Ye and Jerry Yao-Chieh Hu and Han Liu},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  series    = {Proceedings of Machine Learning Research},
  volume    = {267},
  pages     = {41254--41289},
  publisher = {PMLR},
  year      = {2025},
  url       = {https://proceedings.mlr.press/v267/luo25g.html}
}