Datasets:
Update dataset card: describe syn_human, syn_mouse, motif_human tasks
Browse files11 unmodified lines121314151617181920212 unmodified lines2425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437511 unmodified linesdata_files:- split: testpath: motif_human/test-*- config_name: promoter_revcompdata_files:- split: testpath: promoter_revcomp/test-*- config_name: syn_humandata_files:- split: test2 unmodified linesdata_files:- split: testpath: syn_mouse/test-*- config_name: synonymous_codonsdata_files:- split: trainpath: synonymous_codons/data.parquet- config_name: tatadata_files:- split: trainpath: tata/data.parquetdataset_info:- config_name: motif_humanfeatures:- name: benchmark_iddtype: string- name: script_versiondtype: string- name: annotation_sourcedtype: string- name: genome_assemblydtype: string- name: upstream_flank_bpdtype: int64- name: motifdtype: string- name: actual_motifdtype: string- name: patch_len_bpdtype: int64- name: start_after_bpdtype: int64- name: random_seeddtype: int64- name: speciesdtype: string- name: chrdtype: string- name: chrom_lengthdtype: int64- name: stranddtype: string- name: cds_genome_startdtype: int64- name: cds_genome_enddtype: int64- name: window_genome_startdtype: int64- name: window_genome_enddtype: int64- name: upstream_actualdtype: int64- name: is_clampeddtype: int64- name: transcript_iddtype: string- name: gene_iddtype: string- name: gene_namedtype: string- name: exon_rankdtype: int64- name: is_first_exondtype: int64- name: framedtype: int64- name: phase_gtfdtype: int64- name: cds_start_in_seqdtype: int64- name: cds_end_in_seqdtype: int64- name: cds_lengthdtype: int64- name: patch_start_in_cdsdtype: int64- name: patch_end_in_cdsdtype: int64- name: patch_start_in_seqdtype: int64- name: patch_end_in_seqdtype: int64- name: original_sequencedtype: string- name: sequencedtype: stringsplits:- name: testnum_bytes: 334784354num_examples: 20000download_size: 152132105dataset_size: 334784354- config_name: promoter_revcompfeatures:- name: benchmark_iddtype: string- name: speciesdtype: string- name: genome_assemblydtype: string- name: annotation_sourcedtype: string- name: total_windowdtype: int64- name: prom_updtype: int64- name: prom_downdtype: int64- name: prom_lendtype: int64- name: chrdtype: string- name: startdtype: int64- name: enddtype: int64- name: stranddtype: string- name: tss_1baseddtype: int64- name: epd_iddtype: string- name: gene_iddtype: string- name: tss_in_seqdtype: int64- name: cds_start_in_seqdtype: int64- name: cds_end_in_seqdtype: int64- name: original_sequencedtype: string- name: sequencedtype: stringsplits:- name: testnum_bytes: 272641634num_examples: 16451download_size: 125178388dataset_size: 272641634- config_name: syn_humanfeatures:- name: benchmark_iddtype: string- name: script_versiondtype: string- name: annotation_sourcedtype: string- name: genome_assemblydtype: string- name: codon_usage_sourcedtype: string- name: recoding_modedtype: string- name: optimization_ratedtype: float64- name: random_seeddtype: int64- name: window_size_bpdtype: int64- name: speciesdtype: string- name: chrdtype: string- name: chrom_lengthdtype: int64- name: stranddtype: string- name: cds_genome_startdtype: int64- name: cds_genome_enddtype: int64- name: window_genome_startdtype: int64- name: window_genome_enddtype: int64- name: upstream_actualdtype: int64- name: downstream_actualdtype: int64- name: is_clampeddtype: int64- name: transcript_iddtype: string- name: gene_iddtype: string- name: gene_namedtype: string- name: exon_rankdtype: int64- name: is_first_exondtype: int64- name: framedtype: int64- name: phase_gtfdtype: int64- name: cds_start_in_seqdtype: int64- name: cds_end_in_seqdtype: int64- name: cds_lengthdtype: int64- name: patch_start_in_seqdtype: int64- name: patch_end_in_seqdtype: int64- name: patch_lengthdtype: int64- name: n_codons_totaldtype: int64- name: n_codons_eligibledtype: int64- name: n_codons_changeddtype: int64- name: fraction_codons_changeddtype: float64- name: original_sequencedtype: string- name: sequencedtype: stringsplits:- name: testnum_bytes: 335904126num_examples: 20000download_size: 152737063dataset_size: 335904126- config_name: syn_mousefeatures:- name: benchmark_iddtype: string- name: script_versiondtype: string- name: annotation_sourcedtype: string- name: genome_assemblydtype: string- name: codon_usage_sourcedtype: string- name: recoding_modedtype: string- name: optimization_ratedtype: float64- name: random_seeddtype: int64- name: window_size_bpdtype: int64- name: speciesdtype: string- name: chrdtype: string- name: chrom_lengthdtype: int64- name: stranddtype: string- name: cds_genome_startdtype: int64- name: cds_genome_enddtype: int64- name: window_genome_startdtype: int64- name: window_genome_enddtype: int64- name: upstream_actualdtype: int64- name: downstream_actualdtype: int64- name: is_clampeddtype: int64- name: transcript_iddtype: string- name: gene_iddtype: string- name: gene_namedtype: string- name: exon_rankdtype: int64- name: is_first_exondtype: int64- name: framedtype: int64- name: phase_gtfdtype: int64- name: cds_start_in_seqdtype: int64- name: cds_end_in_seqdtype: int64- name: cds_lengthdtype: int64- name: patch_start_in_seqdtype: int64- name: patch_end_in_seqdtype: int64- name: patch_lengthdtype: int64- name: n_codons_totaldtype: int64- name: n_codons_eligibledtype: int64- name: n_codons_changeddtype: int64- name: fraction_codons_changeddtype: float64- name: original_sequencedtype: string- name: sequencedtype: stringsplits:- name: testnum_bytes: 336064778num_examples: 20000download_size: 152659316dataset_size: 336064778---# Carbon Perturbation BenchTwo **sequence-level perturbation tasks** for evaluating DNA foundation models:- **`tata`** (5,000 rows): the TATA-box motif inside a real promoter isdisrupted with random nucleotide substitutions. Probes whether the modelhas internalised eukaryotic promoter architecture (it should assign higherlog-likelihood to the intact promoter than the perturbed one).- **`synonymous_codons`** (5,000 rows): codons in a real CDS are replacedwith synonyms encoding the same amino acid. Probes whether the model haslearned codon-usage bias (it should prefer native codon usage over thesynonymous variant).Both subsets share the same schema:| column | description ||---|---|| `chr`, `start`, `end`, `strand` | hg38 locus || `length` | sequence length in bp || `original_sequence` | the real (unperturbed) sequence — positive || `sequence` | the perturbed sequence — negative control |## Usage```pythonfrom datasets import load_datasettata = load_dataset("hf-carbon/carbon-perturbation-bench", "tata", split="train")syn = load_dataset("hf-carbon/carbon-perturbation-bench", "synonymous_codons", split="train")```## Eval recipePairwise likelihood discrimination: score `LL(original_sequence)` vs`LL(sequence)` under the model, and report `mean(LL(real) >= LL(perturbed))`.A ready-to-run scorer for Carbon, GENERator, and Evo2 lives at[`evaluation/perturbation_tasks.py`](https://github.com/huggingface/carbon)in the Carbon release repo.11 unmodified lines1213141516172 unmodified lines202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212311 unmodified linesdata_files:- split: testpath: motif_human/test-*- config_name: syn_humandata_files:- split: test2 unmodified linesdata_files:- split: testpath: syn_mouse/test-*---# Carbon Perturbation BenchA benchmark of **sequence-level perturbation tasks** for evaluating DNA foundation models.Each task presents pairs of genomic sequences — one real (unperturbed) and one structurallyaltered — and asks whether the model assigns higher log-likelihood to the original.**Metric**: pairwise discrimination accuracy = `mean(LL(original) > LL(perturbed))`---## Tasks### `syn_human` · `syn_mouse` — Synonymous codon substitution (20,000 pairs each)Codons within a real CDS are replaced with the highest-frequency synonym for the targetspecies (`recoding_mode = "optimize"`, `optimization_rate = 1.0`), while the upstream anddownstream flanking sequence is left unchanged. Amino acid identity is preserved byconstruction. The model should prefer the natural codon usage over the artificiallyoptimised variant.- **Human** (`syn_human`): GENCODE v45 annotations on GRCh38/hg38; codon frequencies fromCoCoPUTs (*H. sapiens* RefSeq CDS); 9,616 unique genes.- **Mouse** (`syn_mouse`): GENCODE vM34 annotations on GRCm39/mm39; codon frequencies fromCoCoPUTs (*M. musculus* RefSeq CDS); 10,253 unique genes.- Window size: 8,192 bp centred on the CDS (`cds_start_in_seq` / `cds_end_in_seq`).- Mean fraction of codons changed: ~55% (range 10–95%).### `motif_human` — CAG repeat insertion (20,000 pairs)A 30 bp region within a real human CDS — starting 60 bp downstream of the CDS start —is replaced with 10 consecutive CAG triplets (`CAGCAGCAGCAGCAGCAGCAGCAGCAGCAG`),mimicking the pathological trinucleotide repeat expansions underlying polyglutaminedisorders (Huntington's disease, SCAs, DRPLA). The substitution is length-preserving(30 bp in, 30 bp out), so the total window remains 8,192 bp. All sequence outside thepatch is identical between original and perturbed.- Annotations: GENCODE v45 / GRCh38; 9,705 unique genes.- Window layout: ~8,100 bp upstream flank, CDS near the right edge.---## SchemaAll configs share the key columns:| Column | Description ||---|---|| `original_sequence` | Real, unperturbed genomic sequence — **positive** || `sequence` | Structurally altered sequence — **negative** || `cds_start_in_seq` / `cds_end_in_seq` | CDS boundaries within the window (bp offset) || `chr`, `strand` | Genomic locus || `gene_name`, `transcript_id` | GENCODE annotation || `benchmark_id` | Unique row identifier |Config-specific columns (e.g. `patch_start_in_seq`, `n_codons_changed`,`fraction_codons_changed`, `codon_usage_source`) are described in `dataset_info` above.---## Usage```pythonfrom datasets import load_dataset# Synonymous codon substitution — humansyn_human = load_dataset("HuggingFaceBio/carbon-perturbation-bench", "syn_human", split="test")# Synonymous codon substitution — mousesyn_mouse = load_dataset("HuggingFaceBio/carbon-perturbation-bench", "syn_mouse", split="test")# CAG motif insertionmotif = load_dataset("HuggingFaceBio/carbon-perturbation-bench", "motif_human", split="test")```---## EvaluationA ready-to-run scorer for Carbon, GENERator, and Evo2 is available at[`evaluation/perturbation_tasks.py`](https://github.com/huggingface/carbon)in the Carbon release repository.```bashpython evaluation/perturbation_tasks.py \--task syn_human \--model HuggingFaceBio/Carbon-3B \--bf16python evaluation/perturbation_tasks.py \--task motif_human \--model arcinstitute/evo2_7b --backend evo2 \--bf16```
README.md+83-335