--- pretty_name: "GAMBA Functional Regions: Feature vs Random" license: mit tags: - biology - genomics - dna - genome-language-model - benchmark - functional-genomics - hg38 - parquet configs: - config_name: causal data_files: - split: all path: functional-random-gamba-causal.parquet - config_name: bidi data_files: - split: all path: functional-random-gamba-bidi.parquet --- # GAMBA Functional Regions: Feature vs Random This dataset packages GAMBA's binary functional-region benchmark comparing annotated genomic features with chromosome- and length-matched random controls. Random controls avoid retained anchors from the same functional category. ## Configs | Config | Train rows | Test rows | Total | |---|---:|---:|---:| | `causal`, `bidi` | 150,728 | 37,834 | 188,562 | Each config includes the `noncoding_regions` extension. Filter `category != "noncoding_regions"` to recover the exact 169,674-row, ten-category GAMBA paper dataset without storing those rows twice. ## Choosing a context The GAMBA paper uses context geometry matched to the model. Choose `*-causal` for Evo2 or another left-to-right model: the ROI is at the end of the strand-oriented window, so all preceding bases are usable context. Choose `*-bidi` for GAMBA encoders, the distilled student, GPN-Star, PhyloGPN, or another masked/bidirectional model: the ROI is centered so the model sees both flanks. Using a causal file for a bidirectional model removes its right-side context and is not the paper protocol. ## Loading ```python from datasets import load_dataset dataset = load_dataset( "Taykhoom/functional-random-gamba", "bidi", split="all", ) paper = dataset.filter(lambda row: row["category"] != "noncoding_regions") test = paper.filter(lambda row: row["split"] == "test") ``` Here, `split="all"` tells Hugging Face to load the single physical parquet file. The parquet's own `split` column records the biological chromosome split (`train` or `test`). Keeping one file avoids duplicating the dataset; filter the column as shown above. ## Columns | Column | Description | |---|---| | `split`, `label` | Probe/fine-tuning `train` or held-out `test`; labels are `feature` or `random`. | | `sequence` | Strand-oriented causal or bidirectional context of at most 2,048 bp. | | `context_policy` | `causal` for `*-causal`; `symmetric` for `*-bidi`. | | `pair_id` | Shared identifier for a feature and its matched random control. | | `category`, `scope` | Functional class and pooling scope. | | `chrom`, `start`, `end`, `strand` | Zero-based, half-open hg38 feature/control coordinates. | | `context_start`, `context_end` | Forward-genome coordinates of `sequence`. | | `roi_start`, `roi_end` | Feature/control offsets within `sequence`. | | `pool_start`, `pool_end` | Offsets to pool for representation evaluation. | | `name` | Source annotation name. | | `phylop_mean`, `phylop_std` | Mean and population standard deviation over GAMBA's baseline ROI. | | `phylop_frac_pos`, `phylop_frac_neg` | Fractions of ROI bases with positive or negative phyloP scores. | | `phylop_mean_pos`, `phylop_mean_neg` | Means over positive or negative ROI scores, or zero when absent. | | `phylop_context_mean`, `phylop_context_std` | Mean and population standard deviation over GAMBA's symmetric 2,048 bp phyloP context. | | `phylop_context_frac_pos`, `phylop_context_frac_neg` | Fractions of context bases with positive or negative scores. | | `phylop_context_mean_pos`, `phylop_context_mean_neg` | Means over positive or negative context scores, or zero when absent. | ## Data source and processing The processing code reproduces the ten-category BED output from [Microsoft GAMBA](https://github.com/microsoft/gamba) commit `e83984e` byte-for-byte, then freezes all GAMBA autosomes plus `chrX` in parquet. The GAMBA models were pretrained on the chromosomes marked `train`. The paper's zero-shot result used the frozen models on `chr2`, `chr3`, `chr16`, and `chr22`, which are marked `test`; no task-specific model was fitted on these benchmark rows. Use only `test` to reproduce that paper subset. The `train` rows are provided for probing/fine-tuning or broader chromosome evaluation. PhyloP values come from the Zoonomia 241-mammalian track used by GAMBA. Uncovered positions are zero and scores are rounded to two decimal places before the float32 summaries are computed. ## Citation Please cite the GAMBA paper: Consens, M. E. et al. *Predicting evolutionary rate as a pretraining task improves genome language model representations*. bioRxiv (2026). [doi:10.64898/2026.02.02.703275](https://doi.org/10.64898/2026.02.02.703275). A conference version is available on [OpenReview](https://openreview.net/forum?id=dkgM2ale4U). ```bibtex @article{consens2026predicting, title = {Predicting evolutionary rate as a pretraining task improves genome language model representations}, author = {Consens, Micaela Elisa and Yang, Kevin K. and Hall, Jimmy and Conard, Ashley Mae and Wang, Bo and Crawford, Lorin and Moses, Alan and Lu, Alex X.}, journal = {bioRxiv}, year = {2026}, doi = {10.64898/2026.02.02.703275}, url = {https://doi.org/10.64898/2026.02.02.703275} } ``` ## License GAMBA and its released benchmark code/data are distributed under the MIT license. Upstream annotation resources retain their original terms.