Taykhoom's picture
Deduplicate causal and bidirectional configs
7546565 verified
|
Raw
History Blame Contribute Delete
6.16 kB
metadata
pretty_name: GAMBA Functional Region Multiclass
license: mit
tags:
  - biology
  - genomics
  - dna
  - genome-language-model
  - benchmark
  - functional-genomics
  - multiclass-classification
  - hg38
  - parquet
configs:
  - config_name: full-causal
    data_files:
      - split: all
        path: functional-multiclass-gamba-full-causal.parquet
  - config_name: full-bidi
    data_files:
      - split: all
        path: functional-multiclass-gamba-full-bidi.parquet
  - config_name: 100bp-causal
    data_files:
      - split: all
        path: functional-multiclass-gamba-100bp-causal.parquet
  - config_name: 100bp-bidi
    data_files:
      - split: all
        path: functional-multiclass-gamba-100bp-bidi.parquet

GAMBA Functional Region Multiclass

This dataset packages GAMBA's multiclass functional-region benchmark. Each row is an annotated feature labeled by its functional category.

The full-region and 100 bp pooling variants are separate Hugging Face configs. Each pooling variant has causal and bidirectional context configs. pool_start and pool_end select either the complete ROI or a deterministic 100 bp subspan. ROIs shorter than 100 bp are absent from the 100 bp configs.

GAMBA's evaluator selects the 100 bp subspan using Python's process-randomized hash(). This release uses BLAKE2 over the same seed, category, and pair ID so the saved subset is stable across machines.

Configs

Config Train rows Test rows Total Pooling span
full-{causal,bidi} 75,364 18,917 94,281 complete ROI
100bp-{causal,bidi} 54,029 13,595 67,624 100 bp

Every config includes the noncoding_regions extension. Filter category != "noncoding_regions" to recover the exact GAMBA paper datasets: 84,837 full-region rows or 58,643 100 bp rows. The superset avoids storing the paper 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

from datasets import load_dataset

full = load_dataset(
    "Taykhoom/functional-multiclass-gamba",
    "full-bidi",
    split="all",
)
paper = full.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; label is the functional category.
sequence Strand-oriented causal or bidirectional context of at most 2,048 bp.
context_policy causal for *-causal; symmetric for *-bidi.
pair_id Stable GAMBA feature/control identifier.
category, scope Functional category and full or 100bp.
chrom, start, end, strand Zero-based, half-open hg38 feature coordinates.
context_start, context_end Forward-genome coordinates of sequence.
roi_start, roi_end Full feature offsets within sequence.
pool_start, pool_end Full-ROI or fixed 100 bp pooling span.
name Source annotation name.
phylop_mean, phylop_std Mean and population standard deviation over GAMBA's baseline ROI or fixed 100 bp span.
phylop_frac_pos, phylop_frac_neg Fractions of pooled bases with positive or negative phyloP scores.
phylop_mean_pos, phylop_mean_neg Means over positive or negative pooled 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 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. A conference version is available on OpenReview.

@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.