pstjohn commited on
Commit
bfe9e7c
·
verified ·
1 Parent(s): 96121ab

Publish GeneAnnotationBench evaluation dataset

Browse files

Add the frozen 3,500-question test split and evaluation-focused dataset card.

Files changed (2) hide show
  1. README.md +162 -0
  2. test.parquet +3 -0
README.md ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: pending-nvidia-review
4
+ pretty_name: GeneAnnotationBench
5
+ task_categories:
6
+ - question-answering
7
+ - multiple-choice
8
+ language:
9
+ - en
10
+ size_categories:
11
+ - 1K<n<10K
12
+ tags:
13
+ - biology
14
+ - genomics
15
+ - dna
16
+ - multimodal
17
+ - benchmark
18
+ configs:
19
+ - config_name: default
20
+ default: true
21
+ data_files:
22
+ - split: test
23
+ path: test.parquet
24
+ ---
25
+
26
+ # GeneAnnotationBench
27
+
28
+ GeneAnnotationBench is a frozen, 3,500-question DNA-conditioned multiple-choice evaluation set spanning seven gene-annotation aspects. It is packaged as one question per row in a single `test` split.
29
+
30
+ > **Evaluation 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 only.
31
+
32
+ This repository is private pending NVIDIA review. Do not make it public until the dataset content, licensing, and release terms have received final approval.
33
+
34
+ ## Load a pinned revision
35
+
36
+ Install `datasets`, copy the immutable commit SHA from the Hub's **Files and versions** page, and pin it as `REVISION`:
37
+
38
+ ```python
39
+ from datasets import load_dataset
40
+
41
+ REVISION = "<commit-sha>"
42
+ test = load_dataset(
43
+ "nvidia/GeneAnnotationBench",
44
+ split="test",
45
+ revision=REVISION,
46
+ token=True,
47
+ )
48
+ ```
49
+
50
+ The SHA-256 of the initial exported `test.parquet` is `f10be6a66eafbaf6cdd4da112ef4dadfba898bba3a716c7ef727bdcc1ed951c5`. Hub commits are the dataset versioning mechanism; evaluations should record the revision SHA they used.
51
+
52
+ ## Construct model inputs
53
+
54
+ Every template has exactly one `<dna_placeholder>`. DNA-native models should keep that placeholder in the text prompt and pass the sequence through their DNA modality. Text-only baselines should replace it with the uppercase `ACGTN` sequence.
55
+
56
+ ```python
57
+ row = test[0]
58
+ assert row["prompt_template"].count("<dna_placeholder>") == 1
59
+
60
+ # DNA-native model:
61
+ prompt = row["prompt_template"]
62
+ dna = row["dna_sequence"]
63
+ # prediction = model.generate(prompt=prompt, dna_sequence=dna)
64
+
65
+ # Text-only baseline:
66
+ text_prompt = row["prompt_template"].replace("<dna_placeholder>", row["dna_sequence"])
67
+ # prediction = model.generate(text_prompt)
68
+
69
+ # Never add row["answer_indices"], other answer_* fields, or *_provenance fields.
70
+ ```
71
+
72
+ Models should return one option letter for `single_choice` questions and a comma-separated set of option letters for `multi_select` questions.
73
+
74
+ ## Score predictions
75
+
76
+ Report exact-match accuracy separately for each of the six single-choice aspects. For localization, parse the predicted option set and report option-set micro-F1 across all 500 questions.
77
+
78
+ ```python
79
+ import re
80
+ from collections import defaultdict
81
+
82
+ LETTERS = "ABCDEFGHIJ"
83
+
84
+ def parse_prediction(text):
85
+ found = re.findall(r"(?<![A-Z])[A-J](?![A-Z])", text.upper())
86
+ return sorted({LETTERS.index(letter) for letter in found})
87
+
88
+ def score(rows, prediction_texts):
89
+ exact = defaultdict(list)
90
+ tp = fp = fn = 0
91
+ for row, text in zip(rows, prediction_texts, strict=True):
92
+ predicted, gold = set(parse_prediction(text)), set(row["answer_indices"])
93
+ if row["aspect"] == "localization":
94
+ tp += len(predicted & gold)
95
+ fp += len(predicted - gold)
96
+ fn += len(gold - predicted)
97
+ else:
98
+ exact[row["aspect"]].append(predicted == gold)
99
+ return {
100
+ "accuracy_by_aspect": {
101
+ aspect: sum(values) / len(values) for aspect, values in sorted(exact.items())
102
+ },
103
+ "localization_micro_f1": 2 * tp / (2 * tp + fp + fn),
104
+ }
105
+ ```
106
+
107
+ Prediction parsing should be fixed before evaluation. Do not use gold fields or provenance to repair model outputs.
108
+
109
+ ## Dataset structure
110
+
111
+ There are 500 questions for each aspect:
112
+
113
+ - `biological_process`
114
+ - `domains`
115
+ - `family`
116
+ - `function`
117
+ - `localization`
118
+ - `molecular_activity`
119
+ - `pathways`
120
+
121
+ The six non-localization aspects contain 3,000 `single_choice` questions. Localization contains 500 `multi_select` questions, including 103 with more than one correct option. Every row has ten ordered choices. The data contain 3,372 unique DNA sequences and 128 repeated occurrences across different aspect questions. Eight DNA windows are clipped to 131,072 bp.
122
+
123
+ ### Columns
124
+
125
+ | Column | Type | Meaning |
126
+ |---|---|---|
127
+ | `id` | string | Frozen source sample ID |
128
+ | `aspect` | string | Gene-annotation aspect |
129
+ | `question_type` | string | `single_choice` or `multi_select` |
130
+ | `question` | string | Question text |
131
+ | `dna_sequence` | string | Uppercase `ACGTN` DNA sequence; model input |
132
+ | `choices` | list of string | Ten ordered answer choices |
133
+ | `prompt_template` | string | Complete text template with one DNA placeholder; model input |
134
+ | `answer_indices` | list of int8 | Zero-based correct-choice indices; gold label |
135
+ | `answer_letters` | list of string | Corresponding `A`–`J` labels; gold label |
136
+ | `answer_texts` | list of string | Corresponding choice texts; gold label |
137
+ | `dna_provenance` | struct | Organism, assembly, sequence, gene, coordinate, clipping, length, and checksum metadata |
138
+ | `annotation_provenance` | struct | Canonical annotation, entities, ontology/location labels, source task, quality, and sources |
139
+ | `distractor_provenance` | struct | Distractor-generation method and source identifiers/splits |
140
+ | `release_provenance` | struct | Stable source IDs, task IDs, source split, seed, and frozen row ordering |
141
+
142
+ Coordinates in `dna_provenance` are zero-based, 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 in forward-reference orientation; `strand` is provenance and does not imply reverse-complementing the supplied sequence.
143
+
144
+ ## Data provenance and intended use
145
+
146
+ The dataset is intended for held-out evaluation of models that predict gene annotations from DNA. Annotation and distractor provenance is included to support auditing, attribution, stratified analysis, and error investigation after inference. It is deliberately separated from model inputs and may contain the answer in direct or indirect form.
147
+
148
+ The dataset contains repeated DNA sequences when the same sequence supports questions about different annotation aspects. Consumers should preserve the frozen row order and IDs, and should not treat cross-aspect repetition as duplicate questions.
149
+
150
+ ## Licensing status
151
+
152
+ The dataset license is marked `other` / `pending-nvidia-review`; this is not a final NVIDIA license grant. NVIDIA review is required before any public release.
153
+
154
+ Applicable upstream source terms include:
155
+
156
+ - Gene Ontology annotations: [CC BY 4.0](https://geneontology.org/docs/go-citation-policy/)
157
+ - UniProt data: [CC BY 4.0](https://www.uniprot.org/help/license)
158
+ - InterPro and Pfam downloadable data: [CC0](https://www.ebi.ac.uk/interpro/about/license/)
159
+ - Reactome: annotation files are released under CC0, while software, dumps, and pathway illustrations have separate CC BY terms; consult the [Reactome license guidance](https://reactome.org/license)
160
+ - NCBI molecular data: consult the [NCBI data reuse and third-party-rights disclaimer](https://www.ncbi.nlm.nih.gov/home/about/policies/)
161
+
162
+ Users are responsible for confirming that their use complies with all applicable terms.
test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f10be6a66eafbaf6cdd4da112ef4dadfba898bba3a716c7ef727bdcc1ed951c5
3
+ size 7690040