Long-Context Benchmark · HuggingFaceBio
genomic-niah
A long-context retrieval benchmark testing genomic language models on DNA sequences from 24 to 786 kilobase pairs.
What genomic-niah is
Genomic-NIAH is a long-context evaluation suite designed to assess whether DNA language models successfully access and process information distributed across long sequence contexts. The benchmark adapts the needle-in-a-haystack evaluation paradigm to biology by embedding synthetic DNA key-value pairs into real eukaryotic genomic backgrounds. By querying the model with a specific key and requiring it to output the associated value, it provides a quantitative measure of long-range retrieval fidelity.
Evaluating long-context genomic models presents distinct challenges, as natural DNA contains repeated motifs, variable GC content, and sequence duplications that degrade attention mechanisms. Genomic-NIAH addresses these issues by pairing authentic genomic haystacks with near-duplicate distractor sequences differing by only one to four nucleotides, reflecting the high-identity background conditions typical of biological chromosomes.
The benchmark covers 24 experimental configurations spanning six sequence lengths, five insertion depths, and four eukaryotic kingdoms. This structured approach allows researchers to diagnose where context extension methods fail, distinguish decoding errors from attention loss, and identify positional biases such as asymmetric attention degradation across the context window.
How it was made
Haystacks are extracted from the OpenGenome2 NCBI eukaryotic test and validation sets across Animalia, Fungi, Plantae, and Protista. Non-ACGT characters, ambiguity codes, and soft-masked repeat regions are stripped.
Each test instance embeds a 24-base-pair synthetic DNA key paired with a 24-base-pair value at a defined relative depth (10%, 25%, 50%, 75%, or 90% of the sequence). In near-duplicate configurations, eight distractor key-value pairs are also placed throughout the haystack, with distractor keys differing from the target key by one, two, or four base substitutions. Evaluation is conducted either via generative exact match (`gen_exact_match`), where the model must decode the value under token constraints, or via log-likelihood discrimination (`ll_correct`), which compares the model's likelihood score for the true value sequence against an entirely mutated sequence.
Key facts
- Examples per configuration
- 500 examples stratified across depth and kingdom
- Needle length
- 24 bp key paired with 24 bp value
- Distractor variants
- Delta = 1 bp, 2 bp, and 4 bp key substitutions
- Haystack source
- OpenGenome2 NCBI eukaryotic genomes
- Kingdoms covered
- Animalia, Fungi, Plantae, Protista
- Insertion depths
- 10%, 25%, 50%, 75%, and 90%
- Evaluation metrics
- gen_exact_match and ll_correct
- Data format
- Parquet
What you can use it for
- Long-context retrieval diagnosis
- Measure the native or extended attention boundaries of DNA foundation models across sequence windows up to 786 kilobase pairs.
- Fine-grained sequence discrimination
- Assess whether a model can identify exact functional motifs in the presence of high-identity distractor sequences differing by as little as a single base pair.
- Attention depth analysis
- Detect positional retrieval degradation, such as middle-of-sequence retrieval loss, across five stratified needle insertion depths.
- Context extension method comparison
- Compare positional interpolation and extension techniques, such as YaRN, against native context architectures on real biological sequences.
Explore the data
The schema, real rows, full-text search and a SQL filter — read in your browser, nothing downloaded.
Explore
Read the real rows without downloading anything
Reading rows…
LiveRead from HuggingFaceBio/genomic-niah at the moment you asked. Nothing is cached or stored — every row above came from that request.
How the columns are distributed
Over 500 rows of niah_128k/test
condition
string_label- retrieval100%
context_length_bp
int- min
- 786k
- median
- 786k
- mean
- 786k
- max
- 786k
context_length_tokens
int- min
- 131k
- median
- 131k
- mean
- 131k
- max
- 131k
depth
int- min
- 10
- median
- 50
- mean
- 50
- max
- 90
haystack_mode
string_label- real_stitched100%
key
string_text- min
- 24
- median
- 24
- mean
- 24
- max
- 24
key_len_bp
int- min
- 24
- median
- 24
- mean
- 24
- max
- 24
negative_sequence
string_text- min
- 786k
- median
- 786k
- mean
- 786k
- max
- 786k
negative_value
string_text- min
- 24
- median
- 24
- mean
- 24
- max
- 24
num_distractors
int- min
- 0
- median
- 0
- mean
- 0
- max
- 0
positive_sequence
string_text- min
- 786k
- median
- 786k
- mean
- 786k
- max
- 786k
prompt
string_text- min
- 786k
- median
- 786k
- mean
- 786k
- max
- 786k
source
string_label- fungi25%
- animalia25%
- protista25%
target_insert_end_bp
int- min
- 78,678
- median
- 393k
- mean
- 393k
- max
- 708k
target_insert_start_bp
int- min
- 78,630
- median
- 393k
- mean
- 393k
- max
- 708k
uid
string_text- min
- 16
- median
- 16
- mean
- 16
- max
- 16
value
string_text- min
- 24
- median
- 24
- mean
- 24
- max
- 24
value_len_bp
int- min
- 24
- median
- 24
- mean
- 24
- max
- 24
Strengths and limits
Good at
- Constructed entirely from real eukaryotic genomes without synthetic random nucleotide padding.
- Includes near-duplicate distractors with 83% to 96% sequence identity to emulate real-world biological motif ambiguity.
- Evenly stratified across five context depths and four distinct eukaryotic kingdoms.
- Provides complementary evaluation metrics to separate generative decoding failures from underlying attention failures.
Watch out for
- Omits the kingdom Chromista due to genome fragmentation under strict ACGT filtering.
- Uses artificial random 24-base-pair sequences rather than naturally occurring functional motifs for the key and value pairs.
Questions
Can I look inside genomic-niah without downloading it?
Yes. This page reads its schema, real rows and per-column statistics in the browser, with full-text search and a SQL filter. Nothing is downloaded to your machine.
What licence is genomic-niah under?
Its authors declare apache-2.0. Read the terms on the original page before reusing the data.
What tasks make up the benchmark?
The benchmark includes plain retrieval (`niah`), which inserts a single key-value pair, and three near-duplicate tasks (`niah_neardup_d4`, `niah_neardup_d2`, and `niah_neardup_d1`), which add eight distractor pairs differing from the target key by four, two, or one base pair.
How are the haystack sequences generated?
Sequences are filtered from OpenGenome2 eukaryotic records to retain only unambiguous ACGT bases.
What is the difference between the two evaluation metrics?
`gen_exact_match` requires the model to greedily generate the exact 24-base-pair value string from the key prompt, serving as the headline metric. `ll_correct` is a softer test determining whether the model assigns higher log-likelihood to the correct continuation than to a fully mutated negative sequence.
Why are near-duplicate distractors important for DNA models?
Genomes naturally contain numerous similar-but-not-identical motifs, meaning models must discriminate between subtle nucleotide differences rather than simply distinguishing random, uncorrelated strings.
How to cite it
Allal, Loubna Ben and Li, Qiuyi and Fiusco, Maurizio and Tunstall, Lewis and Rasul, Kashif and Beeching, Ed and Aubakirova, Dana and Patiño, Carlos and Frere, Thibaud and Lozhkov, Anton and others. Carbon: Decoding the Language of Life. bioRxiv, 2026.
Written from genomic-niah's own dataset card. Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.