GeneAnnotationBench / README.md
pstjohn's picture
Sync final dataset card after passing automated compliance check
5c23821 verified
|
Raw History Blame Contribute Delete
31.8 kB
---
license: cc-by-4.0
pretty_name: GeneAnnotationBench
task_categories:
- question-answering
- multiple-choice
language:
- en
size_categories:
- 1K<n<10K
tags:
- biology
- genomics
- dna
- multimodal
- benchmark
- science
- text
- tabular
- blend
- evaluation
configs:
- config_name: default
default: true
data_files:
- split: test
path: test.parquet
---
# GeneAnnotationBench
## Publishing Metadata
- **Domain:** Science (biology / genomics).
- **Modality:** Text and tabular; DNA is represented as nucleotide sequences.
- **Capability breakdown:** Seven gene-annotation aspects, 500 questions each (1/7 of the dataset, approximately 14.29% each): biological_process, domains, family, function, localization, molecular_activity, pathways.
- **Source:** Blend of public biological reference resources, with automated processing and manual review.
- **Size bin:** 1K<n<10K (3,500 questions).
- **License:** CC BY 4.0.
## Dataset Description
GeneAnnotationBench is a frozen evaluation set for testing whether models can interpret raw DNA sequences well enough to answer questions about gene biology. It recasts gene annotation as DNA-conditioned question answering: much as a visual question-answering benchmark pairs an image with a question, GeneAnnotationBench pairs a DNA sequence with a natural-language multiple-choice question.
The dataset contains 3,500 questions across seven gene-annotation aspects. Each question provides a DNA sequence and ten candidate answers. Six aspects use single-choice questions; subcellular localization uses multi-select questions because a gene product may occur in more than one location.
The benchmark is intended to measure sequence-grounded biological understanding, not recall from gene names or annotation databases. Rich provenance is included for audit and error analysis, but is kept separate from the model-input fields.
This dataset is ready for commercial or non-commercial use.
## Coverage-repaired revision without targeting hints (2026-10-22)
`test.parquet` is the qualified `unambiguous-v6` revision: 3,500 questions,
seven aspects with 500 questions each, and nested 350/700 panels with 50/100
questions per aspect. There are **zero model-facing target-location hints**
in the 350, 700, and full 3,500-question sets. Target localization remains part
of the benchmark task.
Independent GPT-6 Astra and Opus 5 reviewers assessed 160 flagged windows,
including all 73 windows containing a complete neighboring coding product and
49 flagged questions in the 700 panel. They agreed on five target-ambiguity
replacements: two in both nested panels and three corpus-filler questions.
Each replacement preserves organism, aspect, and question type and comes from
the private pool with complete target CDS coverage and no annotated neighboring
CDS overlap. Exact replacement records, including the revised yeast key, received
two independent reviews. Existing gene-dense windows are retained when supported
neighbor interpretations do not change the offered answer set.
A separate bounded check corrected 11 retained filler localization keys
for positively supported offered annotations, including upward GO `is_a`/`part_of`
ancestry. These key amendments are outside the 350/700 panels and were reviewed
as exact proposals. The seven-aspect structure is unchanged.
The 700-question panel inherits the earlier biological review and the current
exact replacement review. This is not new individual certification of all other
2,800 rows. Unknown annotations remain evidence limitations, and absence of an
annotation is not proof that a biological alternative is impossible. Computational GO assertions and inferred pathway associations are retained as
annotation support, rather than experimentally demonstrated function or location. Review scope and source provenance are retained separately from model
inputs.
All declared required CDS segments are present, sequence windows fit the
131,072-base DNA budget, and DNA is in forward-reference orientation. The pinned
alignment/SFT provenance audit found no remaining target-locus/window matches;
this is not a claim about arbitrary pretraining corpora.
Changed prompts, gold labels, and panel members require a fresh benchmark run;
pin the Hub commit when reporting scores. This dataset release does not include
encoder features, model predictions, or benchmark scores.
Revision lineage (SHA-256 of `test.parquet`):
- `cabd06d8f8f0e8be5b677a75706e1b919d3d73e179db01a0d1636286c44eb822` — previous
coverage-repaired conditional-targeting-v4, preserved in Hub history.
- `bd64157bb8d72a625647b75abc50cf489ae9a78e5d0e84c3f499ced1a79341c5` — **this revision**, unambiguous-v6 without targeting hints.
## Dataset Owner
NVIDIA Corporation
## Dataset Creation Date
July 30, 2026
## Version
`v1` (first public release).
Previous public versions: No previous version.
Content lineage: `bench-mc-v5.0` base, revised 2026-10-22 as `unambiguous-v6` with coverage
repair, reviewed private-pool backfills, supported-key corrections and no
target-location hints. Hugging Face commit SHAs version this export.
The SHA-256 of `test.parquet` is `bd64157bb8d72a625647b75abc50cf489ae9a78e5d0e84c3f499ced1a79341c5`.
## License/Terms of Use
GeneAnnotationBench is licensed under the [Creative Commons Attribution 4.0 International License (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/). You may share and adapt the dataset for commercial or non-commercial purposes, provided you give appropriate credit, provide a link to the license, and indicate if changes were made.
Copyright © 2026 NVIDIA Corporation. Please credit NVIDIA Corporation for GeneAnnotationBench and retain the upstream source attributions and terms below.
The table below describes the upstream material present in this frozen export. Question counts refer to the source recorded for the gold answer in `annotation_provenance.sources`.
| Upstream resource | Material used | Question aspects | Terms |
|---|---|---|---|
| [NCBI RefSeq](https://www.ncbi.nlm.nih.gov/refseq/) | Genomic FASTA sequence and GFF3 or assembly metadata were used to extract the DNA window and record organism, assembly, sequence, gene, strand, and coordinate provenance. RefSeq is the DNA source for all 3,500 questions; it is not the source of the gold annotation labels in this release. | All aspects | NCBI states that it places no restrictions on the use or distribution of its molecular data, while noting that original submitters or jurisdictions may assert rights in some submitted material. See the [NCBI molecular-data policy](https://www.ncbi.nlm.nih.gov/home/about/policies/). |
| [Gene Ontology](https://geneontology.org/) and [UniProt-GOA](https://www.ebi.ac.uk/GOA/) | UniProt accession-to-GO-term associations, GO aspect codes, GO identifiers, and human-readable GO term names. Biological Process (`P`) terms form 500 `biological_process` answers; Molecular Function (`F`) terms form 500 `molecular_activity` answers; Cellular Component (`C`) terms form 349 `localization` answers. | `biological_process` (500), `molecular_activity` (500), `localization` (349) | GO data and data products are [CC BY 4.0](https://geneontology.org/docs/go-citation-policy/). UniProt applies [CC BY 4.0](https://www.uniprot.org/help/license) to copyrightable parts of its databases. |
| [UniProtKB/Swiss-Prot](https://www.uniprot.org/help/uniprotkb) and UniProt identifier mapping | Curated `FUNCTION`, `SIMILARITY`, and `SUBCELLULAR LOCATION` comment text supplies the corresponding answer labels. RefSeq-to-UniProt accession mapping also provides the identifier bridge used to join GO, InterPro/Pfam, and Reactome annotations to RefSeq proteins. | `function` (500), `family` (252), `localization` (151) | UniProt applies [CC BY 4.0](https://www.uniprot.org/help/license) to copyrightable parts of its databases and notes that some records may be subject to additional patent or other rights. |
| [InterPro](https://www.ebi.ac.uk/interpro/) and [Pfam](https://www.ebi.ac.uk/interpro/entry/pfam/) | InterPro entry identifiers and names plus member-database signature identifiers and names, including Pfam signatures. Combined InterPro/Pfam annotations form all 500 `domains` answers; Pfam classifications form 248 `family` answers. | `domains` (500), `family` (248) | InterPro and Pfam downloadable data provided through InterPro are available under [CC0 1.0](https://www.ebi.ac.uk/interpro/about/license/). No InterProScan software is included or used as dataset content. |
| [Reactome](https://reactome.org/) | The `UniProt2Reactome.txt` annotation mapping was used to associate UniProt accessions with Reactome stable pathway identifiers and pathway names. These names form all 500 `pathways` answers. No Reactome software, database dump, pathway illustration, icon, or other artwork is included. | `pathways` (500) | Reactome database data and files derived from those data are [CC0](https://reactome.org/license). The separate terms for Reactome software and visual materials do not apply to the material used here. |
The source-derived annotations are used to construct both gold choices and same-aspect distractor pools. Every released row records its gold-label source, while `distractor_provenance` identifies the source samples used to construct the distractors. Rows minimally repaired during the individual review record an `individual_mc_review` source marker in `annotation_provenance.sources`; the upstream-mix counts above refer to the underlying `bench-mc-v5.0` export.
Users are responsible for complying with CC BY 4.0 and all applicable upstream terms.
## Intended Usage
GeneAnnotationBench is intended for held-out evaluation of models that predict gene annotations from raw DNA. It can be used to:
- compare DNA-native, multimodal, and text-only models;
- measure performance across distinct annotation aspects;
- study how performance changes with sequence length, organism, or annotation source; and
- audit model errors using the included provenance after inference.
The benchmark should not be used as training data, as a source of clinical conclusions, or as a substitute for experimental validation or expert biological review. Because the release contains gold labels and detailed provenance, it is suitable for open-book local evaluation but not for keeping test answers secret from dataset consumers.
## Dataset Characterization
### Data Collection Method
**Hybrid: Automated, Manually-Collected.** DNA windows were derived from reference assemblies, while gene annotations and supporting identifiers were assembled from curated biological resources. The release pipeline automatically normalized records, generated the multiple-choice representation, enforced public/private leakage boundaries, and selected matched evaluation examples.
The public benchmark was selected from a larger candidate pool. Candidates passed structural and provenance checks, automated biological review, and blinded manual adjudication.
### Labeling Method
**Hybrid: Automated, Manually-Labeled.** Gold answers originate from curated source annotations. Candidate questions, answer choices, and provenance were checked for structural consistency and biological support. Cases flagged as contradictory, defective, ambiguous, or insufficiently grounded were reviewed or removed according to the release audit process.
## Dataset Format
The dataset is distributed as one Parquet file, `test.parquet`, containing a single `test` split. Each row is one DNA-conditioned multiple-choice question. The file has 16 top-level columns, including structured provenance and a JSON geometry/review audit.
Two JSON subset files record the individually reviewed evaluation panels.
`subsets/700.json` lists 700 reviewed question ids (100 per aspect) and
`subsets/350.json` a nested 350 (50 per aspect). The `ids` key is authoritative; these are review panels, not fresh seeded
random draws. The subsets select rows of the
test split by `id` and are not separate dataset splits.
### Columns
| Column | Type | Description |
|---|---|---|
| `id` | string | Frozen source sample ID |
| `aspect` | string | Gene-annotation aspect |
| `question_type` | string | `single_choice` or `multi_select` |
| `question` | string | Natural-language question |
| `dna_sequence` | string | Uppercase `ACGTN` DNA sequence; model input |
| `choices` | list of string | Ten ordered answer choices |
| `prompt_template` | string | Complete text template containing one DNA placeholder; model input |
| `answer_indices` | list of int8 | Zero-based correct-choice indices; gold label |
| `answer_letters` | list of string | Corresponding `A`–`J` labels; gold label |
| `answer_texts` | list of string | Corresponding choice texts; gold label |
| `dna_provenance` | struct | Organism, assembly, gene, coordinates, clipping, length, and checksum metadata |
| `annotation_provenance` | struct | Canonical annotation, entities, ontology or location labels, source task, quality, and sources |
| `distractor_provenance` | struct | Distractor-generation method and source identifiers or splits |
| `release_provenance` | struct | Stable source IDs, task IDs, source split, seed, and frozen row ordering |
| `go_provenance` | nullable struct | Atomic-GO gold term, full truth set, choice ontology metadata, source annotations, evidence, prevalence, release hashes, policy, and seed for the refreshed biological-process and molecular-function questions |
| `geometry_provenance` | JSON string | Target CDS geometry, coverage and reviewed repair/admission audit; provenance only |
Coordinates in `dna_provenance` are zero-based and half-open. Fields ending in `_chunk` are relative to a 1,000,000-bp source chunk; `gene_start`, `gene_end`, `dna_start`, and `dna_end` are the corresponding global coordinates. DNA is supplied in forward-reference orientation. The `strand` field is provenance and does not imply that consumers should reverse-complement the sequence.
## Dataset Quantification
| Property | Value |
|---|---:|
| Record count (questions) | 3,500 |
| Annotation aspects | 7 |
| Questions per aspect | 500 |
| Single-choice questions | 3,000 |
| Multi-select localization questions | 500 |
| Multi-select questions with more than one correct option | 149 |
| Choices per question | 10 |
| Unique DNA sequences | 3,373 |
| Repeated sequence occurrences across aspects | 127 |
| Total DNA bases represented | 13,097,046 |
| DNA sequence length | 262–123,884 bp (median 2,459.5 bp) |
| Feature count (top-level columns) | 16 |
| Total storage size (Parquet file) | 13.25 MB |
There are 500 questions for each aspect:
- `biological_process`
- `domains`
- `family`
- `function`
- `localization`
- `molecular_activity`
- `pathways`
Repeated DNA sequences occur when the same sequence supports questions about different annotation aspects; these are distinct questions, not duplicate rows. Current windows pass the declared CDS coverage and DNA budget checks; original
flank-augmentation metadata is retained alongside the geometry repair provenance.
## Example question
The following is the first row’s current model-facing template. DNA is supplied
separately through `dna_sequence`; gold labels and provenance are omitted.
```text
Which one of the following Gene Ontology biological-process terms is a supported annotation for the gene contained within this stretch of DNA?
<dna_placeholder>
Choose the best answer:
A) regulation of translation in response to endoplasmic reticulum stress
B) copper ion transport
C) dTMP salvage
D) negative regulation of adenylate cyclase-activating adrenergic receptor signaling pathway
E) positive regulation of natural killer cell chemotaxis
F) mitochondrial tRNA wobble position uridine thiolation
G) fast-twitch skeletal muscle fiber contraction
H) regulation of transcription by RNA polymerase II
I) nuclear polyadenylation-dependent rRNA catabolic process
J) protein K33-linked deubiquitination
Answer with a single letter.
```
## Evaluation
### Load a Pinned Revision
Install `datasets`, copy the immutable commit SHA from the Hub's **Files and versions** page, and pin it as `REVISION`:
```python
from datasets import load_dataset
REVISION = "<commit-sha>"
test = load_dataset(
"nvidia/GeneAnnotationBench",
split="test",
revision=REVISION,
)
```
### Model-Input Contract
Only `prompt_template` and `dna_sequence` are model inputs. Fields named `answer_*` and `*_provenance` are labels or provenance and **must never be appended to, rendered into, or otherwise exposed through the evaluation prompt**. Provenance supports traceability and post-inference analysis only; it may reveal the answer directly or indirectly.
Every template contains exactly one `<dna_placeholder>`. DNA-native models should retain that placeholder in the text prompt and pass the sequence through their DNA modality. Text-only baselines should replace the placeholder with the uppercase `ACGTN` sequence.
```python
row = test[0]
assert row["prompt_template"].count("<dna_placeholder>") == 1
# DNA-native model
prompt = row["prompt_template"]
dna = row["dna_sequence"]
# prediction = model.generate(prompt=prompt, dna_sequence=dna)
# Text-only baseline
text_prompt = row["prompt_template"].replace(
"<dna_placeholder>", row["dna_sequence"]
)
# prediction = model.generate(text_prompt)
# Never add row["answer_indices"], other answer_* fields, or *_provenance fields.
```
Models should return one option letter for `single_choice` questions and a comma-separated set of option letters for `multi_select` questions.
### Final-answer format and optional reasoning
For a boxed-answer evaluation protocol, replace only the final plain-letter
instruction in `prompt_template` with:
```text
Respond with exactly one final answer in \boxed{...}, containing the option
letter or letters. For multiple letters, use alphabetical order separated by
comma and space, for example \boxed{A, F}.
```
Preserve the question, choices, their order, DNA placeholder and gold
`answer_indices`. This instruction does not require a visible reasoning trace.
It works with models that hide reasoning or return it separately as
`reasoning_content`. Score only the final answer in the assistant `content`;
never concatenate a separate reasoning field into the answer being scored.
For a native model returning an inline trace, separate that trace from its final
answer before applying the same answer parser.
```python
import re
def parse_boxed_answer(final_answer):
"""Parse final answer content independently of reasoning availability."""
match = re.fullmatch(r"\s*\\boxed\{([A-J](?:, [A-J])*)\}\s*", final_answer)
if match is None:
return []
letters = match.group(1).split(", ")
if letters != sorted(set(letters)):
return []
return ["ABCDEFGHIJ".index(letter) for letter in letters]
```
Use the same single-choice exact match and localization option-set micro-F1
under this protocol. Report the prompt version, answer parser, token budget
and malformed-answer rate. Keep historical plain-letter scores identified as
such; their answer protocol differs. The relaxed scoring implementation below accepts explicit answers accompanied
by explanations. Never concatenate separate reasoning into scored content.
Trace-envelope checks, such as the native Lightning newline and closing-tag
contract, belong to training diagnostics and GRPO formatting rewards. Report
these separately from benchmark answer scores. Missing, hidden or separately
returned reasoning must not invalidate an otherwise correct benchmark answer.
This documentation does not modify the frozen `test.parquet` or its SHA-256.
### Scoring: relaxed explicit-answer extraction
The current relaxed scorer accepts explanatory assistant text when it contains
an explicit, unambiguous answer. It uses only the final assistant `content` and
presented choices; separate thinking, reasoning summaries, gold labels and
provenance are never inputs to answer extraction. This is deterministic parsing,
not an LLM judge or semantic answer matching.
The parser first retains answers accepted by the original strict parser. If that
fails, it tries consistent boxed selections, answer-labelled lines, then an
explicit leading, bolded or terminal selection. Full choice text is accepted
only when it matches exactly one presented choice, ignoring case, presentation
markup and a trailing period. It does not harvest option letters from prose or
accept a copied choice list as an answer. At the selected extraction priority,
conflicting selections, duplicates, alternatives such as “A or C”, and multiple
letters for a single-choice question score as an empty prediction.
Examples:
| Assistant content | Question type | Parsed selection |
| --- | --- | --- |
| `Final answer: C. Because A and B are distractors.` | single choice | C |
| `**C) siRNA processing**` | single choice | C |
| `Answer: A and C — both compartments.` | multi-select | A, C |
| `Analysis mentions A and B.` followed by `The answer is C.` | single choice | C |
| `Answer: A or C` | either | empty |
| `Answer: A, A` | either | empty |
| `Answer: A, C` | single choice | empty |
| `Answer: A` followed by `Answer: C` | either | empty |
For the six single-choice aspects, report exact-match accuracy. For localization,
aggregate true positives, false positives and false negatives across questions
and report option-set micro-F1, `2 TP / (2 TP + FP + FN)`. The headline score is
**the unweighted mean of these seven aspect metrics**, not pooled question
accuracy. An empty selection is incorrect for single-choice questions and adds
all gold localization options to false negatives.
The API completion status must be normalized to `finish_reason="stop"` for a
completed answer. Any other status, including token-limit termination, scores
as empty even if an early answer appears in the response. Missing responses
make a run incomplete; do not silently omit them or report a partial run as a
complete benchmark. Transport failures may be retried with the same policy;
completed or length-capped answers are not resampled to improve the score.
The implementation below is the current campaign parser and scoring policy.
It supports both the full test split and a published reviewed panel, provided
all seven aspects are represented. Select the 350-question panel by the IDs in
`subsets/350.json`; it contains 50 questions per aspect. Use the subset files from the same pinned Hub commit as the Parquet;
replacement IDs differ from earlier reviewed panels.
```python
import re
from collections import Counter
def final_options(content: str, multi_select: bool) -> set[str]:
"""Parse one boxed final answer or an answer-only A–J list, never reasoning.
Extra boxes, malformed lists, duplicate options and missing answers score as
empty predictions. A single-choice response containing multiple options also
scores empty. Parsing is fixed independently of gold labels.
"""
boxes = re.findall(r'\\boxed\{([^{}]*)\}', content)
if len(boxes) > 1:
return set()
answer = boxes[0] if boxes else content.strip()
if not re.fullmatch(r'\s*[A-J](?:\s*,\s*[A-J])*\s*', answer):
return set()
letters = [value.strip() for value in answer.split(',')]
if len(set(letters)) != len(letters) or (not multi_select and len(letters) != 1):
return set()
return set(letters)
def plain(text):
"""Remove presentation markup while retaining option letters and prose."""
return re.sub(r'[*`]', '', text).strip().lstrip('#').strip()
def selection(text, multi_select):
"""Read an explicit initial letter list without harvesting prose letters.
Accept commas, semicolons, slashes, ampersands and 'and'. Reject alternatives
expressed with 'or', duplicate letters and multiple single-choice selections.
The suffix may contain the answer text or an explanation.
"""
text = plain(text)
match = re.match(r'^\(?([A-J])\b((?:\s*(?:,|;|/|&|\band\b)\s*[A-J]\b)*)', text)
if not match:
return None
suffix = text[match.end():]
if re.match(r'^\s*(?:or\b|(?:,|;|/|&)\s*(?:or\b|[A-J]\b))', suffix):
return None
# A letter must be separated from prose; an initial 'A protein ...' is not
# an answer selection. Parentheses, punctuation or a line break are explicit.
if suffix and not re.match(r'^\s*(?:[().,:;\-–—]|$)', suffix):
return None
letters = [match.group(1), *re.findall(r'\b[A-J]\b', match.group(2))]
if len(set(letters)) != len(letters) or (not multi_select and len(letters) != 1):
return None
return set(letters)
def explicit_answer(content, multi_select, choices, original_parser):
"""Return a selection plus extraction evidence, or leave ambiguity ungraded.
Priority is original valid answer, consistent boxes, explicit answer-labelled
lines, then a leading selection. Named-choice matching requires a complete
choice text and uniqueness. Copied choice lists are not treated as selections.
"""
original = original_parser(content, multi_select)
if original:
return original, 'original_valid'
boxes = re.findall(r'\\boxed\{([^{}]*)\}', content)
if boxes:
selected = [selection(box, multi_select) for box in boxes]
if all(selected) and len({tuple(sorted(s)) for s in selected}) == 1:
return selected[0], 'explicit_box'
return set(), 'ambiguous_or_invalid_box'
raw_lines = [line.strip() for line in content.splitlines() if plain(line)]
lines = [plain(line) for line in raw_lines]
if not lines:
return set(), 'empty'
labelled = []
for index, line in enumerate(lines):
if re.fullmatch(r'(?:final\s+|correct\s+)?answer\s*[:=]?', line, re.I):
if index+1 < len(lines):
labelled.append(lines[index+1])
continue
match = re.match(r'^(?:(?:therefore|thus|so)[,:]?\s*)?(?:the\s+)?(?:final\s+|correct\s+)?answer(?:\s+is)?\s*[:=\-]?\s+(.+)$', line, re.I)
if not match:
match = re.match(r'^(?:final\s+|correct\s+)?answer\s*[:=]\s*(.+)$', line, re.I)
if match:
labelled.append(match.group(1))
candidates = labelled or [lines[0]]
if not labelled and selection(lines[0], multi_select) is None:
# A separately bolded answer line is an explicit selection even when it
# follows an analysis paragraph. Multiple different selections conflict.
bold_selections = [line for raw, line in zip(raw_lines, lines)
if raw.startswith('**') and selection(line, multi_select)]
if bold_selections:
candidates = bold_selections
elif selection(lines[-1], multi_select):
# Some models put an unformatted final selection after explanatory
# paragraphs. A terminal selection must not merely end a choice list.
option_lines = [line for line in lines if re.match(r'^[A-J][).]\s', line)]
if len(option_lines) <= 1 or (re.match(r'^[A-J][).]\s*Correct\b', lines[-1], re.I)
and all(re.match(r'^[A-J][).]\s*Incorrect\b', line, re.I)
for line in option_lines[:-1])):
candidates = [lines[-1]]
parsed = []
for candidate in candidates:
result = selection(candidate, multi_select)
if result is None:
named = [chr(65+i) for i, choice in enumerate(choices)
if plain(candidate).casefold().rstrip('.') == plain(choice).casefold().rstrip('.')]
result = set(named) if len(named) == 1 else None
parsed.append(result)
if not all(parsed) or len({tuple(sorted(s)) for s in parsed}) != 1:
return set(), 'unresolved_or_conflicting_answer'
if not labelled and candidates == [lines[0]] and sum(bool(re.match(r'^[A-J][).]\s', line)) for line in lines) > 1:
return set(), 'unselected_choice_list'
return parsed[0], 'labelled_answer' if labelled else 'leading_answer'
def score(rows, predictions):
"""Score every row by ID using explicit answers and completed responses.
predictions[id] must contain content and a normalized finish_reason.
Missing IDs raise KeyError rather than disappearing from the denominator.
"""
counts, correct = Counter(), Counter()
tp = fp = fn = invalid = nonstop = 0
extraction = []
for row in rows:
prediction = predictions[row["id"]]
selected, rule = explicit_answer(
prediction["content"], row["aspect"] == "localization",
row["choices"], final_options,
)
if prediction["finish_reason"] != "stop":
selected, rule = set(), "nonstop_excluded"
nonstop += 1
gold = set(row["answer_letters"])
aspect = row["aspect"]
counts[aspect] += 1
invalid += not selected
if aspect == "localization":
tp += len(selected & gold)
fp += len(selected - gold)
fn += len(gold - selected)
else:
correct[aspect] += selected == gold
extraction.append({"id": row["id"], "selected": sorted(selected), "rule": rule})
expected = {"biological_process", "domains", "family", "function",
"localization", "molecular_activity", "pathways"}
if set(counts) != expected:
raise ValueError("All seven aspects are required for comparison")
metrics = {aspect: correct[aspect] / counts[aspect]
for aspect in sorted(expected - {"localization"})}
metrics["localization"] = 2 * tp / (2 * tp + fp + fn)
return {
"metrics": metrics,
"mean_seven_aspects": sum(metrics.values()) / 7,
"counts": dict(counts),
"invalid_answers": invalid,
"length_or_other_nonstop_answers": nonstop,
"extraction": extraction,
}
```
Fix the parser before evaluation and use it identically for every model. Record
the dataset revision, selected subset, complete prompt, output ceiling, reasoning
settings, provider/model identity, finish-status normalization, parser version,
and invalid/capped counts. Keep historical strict scores labelled separately;
relaxed scoring changes answer extraction, not the underlying metric or labels.
Parser source SHA-256 (the `plain`, `selection`, and `explicit_answer` module):
`fbbf35373d71a8f67df5458fb10b2370e9ba3e589eec2adcec3c86cd4a98351a`.
## References
- [Gene Ontology](https://geneontology.org/)
- [UniProt](https://www.uniprot.org/)
- [InterPro](https://www.ebi.ac.uk/interpro/) and [Pfam](https://www.ebi.ac.uk/interpro/entry/pfam/)
- [Reactome](https://reactome.org/)
- [NCBI Datasets](https://www.ncbi.nlm.nih.gov/datasets/)
## Ethical Considerations
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. Developers should work with their internal developer teams to ensure this dataset meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
GeneAnnotationBench evaluates computational predictions from genomic sequence. Its annotations may be incomplete, uncertain, or context-dependent, and benchmark performance does not establish biological mechanism, clinical validity, or safety. Users should account for organism and source coverage, possible annotation bias, and the risk of overgeneralizing from a fixed multiple-choice benchmark.
Please report quality, risk, security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).