What people try to predict, and how to tell if it works

A map of prediction tasks in epigenomics, and the evaluation traps specific to genomic data

Epigenetics

About this lecture

Machine learning from scratch built a small classifier and measured it. This unit looks outward: what does the field try to predict from sequence, chromatin and methylation, and how do we know whether a reported performance is real?

  • A map of tasks: binding and accessibility, expression, variant effects, enhancer–gene links, imputation, 3D contacts, age and tumour type. The big models appear as examples, not as tools.
  • Traps specific to genomic data: leakage between overlapping or similar sequences, held-out chromosomes, the choice of negatives, baselines, other cell types, other individuals.
  • Each trap demonstrated with real data from GM12878 and K562.

A map of prediction tasks

  • Inputs: DNA sequence, epigenomic tracks of a cell type, or DNA methylation. Labels: what an assay measured.
  • Same structure as in the last unit: examples, features, labels, a model with parameters, a held-out test.

Binding and accessibility from sequence

  • Input: a window of reference sequence (0.5–2 kb), one-hot encoded. Output: is there a peak in the centre, for hundreds of assays at once (multi-task).
  • DeepSEA (2015) and Basset (2016) started this with CNNs; BPNet and chromBPNet predict the base-resolution profile.
  • The same sequence gives different labels in different cells: the cell type enters only through the label, as a separate output per cell type.

Expression from sequence: long context

  • Genes are regulated by enhancers tens to hundreds of kb away. Basenji, Enformer, Borzoi and AlphaGenome read 131 kb to 1 Mb and predict thousands of tracks at once: CAGE, RNA-seq coverage, ChIP, ATAC, contacts.
  • Trained on the reference genome, across many cell types; evaluated on held-out chromosomal regions.

Variant effects: one model, two sequences

  • A trained sequence model can score any variant: predict the reference and the alternative sequence, take the difference.
  • Used to prioritise non-coding GWAS variants, rare variants in patients, and to design experiments.

Which enhancer regulates which gene?

  • One example = one (enhancer, gene) pair; features from chromatin (activity, contact, distance); labels from CRISPRi screens, eQTLs or Hi-C loops.
  • The task the nearest-gene rule does badly. Covered in Linking regulatory elements to genes.

Imputation: experiments nobody did

  • Large consortia measure many marks in many cell types, but the matrix is mostly empty. Imputation predicts a missing track from the same mark in other cells and other marks in the same cell.
  • ChromImpute (2015), Avocado (2020). Evaluated by hiding tracks that were measured.

3D contacts from sequence

  • Akita predicts a Hi-C / Micro-C contact map from ~1 Mb of sequence; C.Origami adds a cell type’s ATAC and CTCF tracks to predict cell-type-specific maps.
  • Use: in-silico experiments, e.g. delete a CTCF site and predict whether a TAD boundary disappears.

Predictions from DNA methylation

  • Epigenetic clocks: elastic-net regression of age on CpG methylation (Horvath 2013: 353 CpGs). The difference between predicted and real age is studied as “age acceleration”.
  • Tumour classification: a random forest on array methylation assigns brain tumours to 82 classes (Capper et al. 2018), now part of diagnosis.

What they have in common

task input labels from the test should be
binding, accessibility sequence window ChIP-seq, ATAC/DNase peaks held-out chromosomes; other cell types
expression 100 kb – 1 Mb sequence CAGE, RNA-seq held-out regions; other individuals
variant effect ref and alt sequence allelic imbalance, eQTL, MPRA variants never seen in training
enhancer–gene pair features CRISPRi screens, eQTL held-out genes and chromosomes
imputation other tracks measured tracks hidden tracks; other cell types
3D contacts sequence (+ tracks) Hi-C, Micro-C held-out regions; other cell types
age, tumour type CpG methylation age, pathology independent cohorts, other labs

How do we know a prediction is real?

  • Leakage: information about the test examples reached the training. The model looks better than it is.
  • In genomics the usual routes: overlapping or duplicated regions, similar sequences on different chromosomes, and decisions made using the test set.

Overlapping windows leak

  • Shifting windows to create more training data (augmentation), tiling the genome with overlapping inputs, or a peak listed twice: all create near-copies.
  • If near-copies are split at random, the test set contains copies of the training set.

Leakage, measured

  • 6000 GM12878 open/closed regions, each as three windows shifted by 150 bp; 4-mer counts as features. Test sets: random windows, whole regions, or whole chromosomes (8, 9).
  • 1-nearest neighbour: 96% accuracy with a random split, 65% when whole regions are held out. For 87% of test windows, the nearest training window is a shifted copy of itself.

Held-out chromosomes, and their limit

  • Holding out whole chromosomes is the field’s standard: overlapping windows, neighbouring peaks and shared domains all stay on one side.
  • It does not stop similar sequences on other chromosomes: repeats (half of the genome), segmental duplications, paralogous genes.

Case study: enhancer–promoter prediction

  • TargetFinder (2016) predicted which enhancer–promoter pairs interact, F1 ≈ 0.83 with random cross-validation.
  • With pairs split by chromosome, F1 fell to 0.13 in K562 (Xi & Beer 2018): the model had learned which promoters interact, from pairs that shared them.

The negatives decide the question

  • Random genome as negatives: “is this a CTCF site or any piece of DNA?” GC content alone helps a lot.
  • GC-matched negatives remove that shortcut. Accessible but unbound negatives ask what makes a site CTCF rather than just open.

Negatives, measured: CTCF in GM12878

  • 10 000 CTCF peaks against 10 000 windows of each kind; models trained on chr1–22 except 8 and 9, tested on 8 and 9.
  • GC only: ROC AUC 0.71 with random negatives, 0.49 with GC-matched (chance), 0.51 with accessible ones. The best CTCF PWM score in the window: 0.91–0.94 whatever the negatives. 256 4-mers: 0.80 → 0.70.

The simplest baseline is often strong

  • One known motif, scored with one PWM: 72% of CTCF peaks have a match (p < 5 × 10⁻⁵), against 5% of random, 9% of GC-matched and 8% of accessible windows.
  • Ranked by its best score in each window, the PWM reaches ROC AUC 0.91 against GC-matched negatives. Trap: motifmatchr gives score 0 to windows without a match at the cutoff; use p.cutoff = 1 for a continuous score (else 0.83; see How a CNN reads DNA).
  • Any model of CTCF binding must be compared with this. The CNN in How a CNN reads DNA is: same kind of data, same test chromosomes.

Does the model work in another cell type?

  • 4-mer models of “open vs closed” trained in GM12878 or in K562, tested on chr8–9 on regions open in both, only in GM12878, or only in K562.
  • Regions open in both are easy for either model (0.91–0.92). Each model is best on its own cell type’s specific regions and loses 0.05–0.06 on the other’s (0.87 → 0.82 for K562-only; 0.79 → 0.73 for GM12878-only).

Across genes is not across people

  • Expression models predict which genes are highly expressed well (Enformer: r ≈ 0.55–0.6 across genes).
  • But for one gene across people, with each person’s own variants inserted, predictions barely correlate with measured expression (mean r ≈ 0), and often have the wrong sign (Sasse et al. 2023; Huang et al. 2023).

Reading a machine-learning paper: a checklist

question warning signs
What exactly is predicted, and for what use? test set does not match the intended use (new cell type, new person)
How were the data split? random windows; shifted or overlapping windows; features chosen on all data
What are the negatives? random genome for a GC-rich target; negatives from other experiments or batches
Which baselines? no GC / k-mer / known-motif / nearest-gene baseline; only other deep models
Which metric, at which class balance? accuracy on imbalanced data; PR AUC without the prevalence; balanced test sets only
Was the test set used once? many architectures tried on the test set; no independent validation
Does it generalise? one cell type, one cohort, one lab; no external data set

Summary

idea key fact
sequence → binding, accessibility CNNs on 0.5–2 kb; one output per assay and cell type (DeepSEA, Basset, BPNet)
sequence → expression long context (131 kb – 1 Mb): Basenji, Enformer, Borzoi, AlphaGenome
variant effects predict(alt) − predict(ref) with any trained sequence model
other tasks enhancer–gene links (ABC, CRISPRi labels), imputation, 3D contacts, clocks, tumour classes
leakage near-copies across the split; memorising models gain most (1-NN: 96% → 65%)
splits group related examples; hold out chromosomes; mind repeats and paralogs
negatives define the question; GC-matched negatives remove the GC shortcut
baselines GC, k-mers, one PWM, nearest gene; report them
generalisation other cell types and other individuals are harder tests than other chromosomes

Key papers (optional further reading)

Not required reading and not examined. For those who want the primary literature.