1 of 30

Experimental design and evaluation for graph machine learning

Oct 15th, 2026

BMI/CS 775 Computational Network Biology�Fall 2026

Raison Dsouza

https://bmi775.sites.wisc.edu

These slides, excluding third-party material, are licensed under CC BY-NC 4.0 by Sushmita Roy, Anthony Gitter, and Raison Dsouza

2 of 30

Topics in this section

  • Shallow unsupervised graph embedding
  • Graph neural networks
  • Graph neural network extensions and limitations
  • Experimental design and evaluation for graph machine learning
  • Graph transformers
  • Deep unsupervised graph embedding

3 of 30

Goals for today

3

  • Discuss challenges associated with applying ML methods to biological data
  • How methods should be applied to biological data
  • Look at specific examples and discuss solutions to some use cases

4 of 30

ML development cycle

  • Often we train models because they are meant to be used by us or others in the future

​

4

Bernett et al. Nature Methods 2024 doi:10.1038/s41592-024-02362-y

  • Evaluation must consider future deployment
  • What information is available?

5 of 30

Motivating example 1: drug discovery

  • Goal is to predict whether a candidate drug will have desired activity against a protein target

​

5

Protein Kinase A

Inhibitor: 7-[(3S,4R)-4-(3-chlorophenyl)carbonylpyrrolidin-3-yl]-3H-quinazolin-4-one

6 of 30

Motivating example 1: drug discovery

  • Similar proteins and drugs in training and test make prediction trivially easy

6

Mattsson et al. bioRxiv 2026 doi:10.64898/2026.06.29.735309

7 of 30

Motivating example 2: protein-protein interaction prediction

  • Predict whether proteins and interact given their sequences

​

  • Use deep learning to featurize proteins

7

Bernett et al. Briefings in Bioinformatics 2024 doi:10.1093/bib/bbae076

8 of 30

Motivating example 2: protein-protein interaction prediction

8

Sledzieski et al. Cell Systems 2021 doi:10.1016/j.cels.2021.08.010

D-SCRIPT

9 of 30

Motivating example 2: protein-protein interaction prediction

  • Do the predictions generalize? Have a biophysical or biochemical basis?

9

Bernett et al. Briefings in Bioinformatics 2024 doi:10.1093/bib/bbae076

2.Model learned shortcuts (e.g. node degree)

1.Model learned sequence patterns that govern binding probability (e.g. matching domains)

3.Model learned protein sequence similarity, finds similar training pair p1 p2 when predicting edge for test pair p1’ p2’

  • Three possibilities:

10 of 30

Motivating example 2: protein-protein interaction prediction

  • Do the predictions generalize? Have a biophysical or biochemical basis?
  • Three possibilities:
    1. Model learned sequence patterns that govern binding probability (e.g. matching domains)
    2. Model learned shortcuts (e.g. node degree)
    3. Model learned protein sequence similarity, finds similar training pair p1 p2 when predicting edge for test pair p1’ p2’

10

Bernett et al. Briefings in Bioinformatics 2024 doi:10.1093/bib/bbae076

11 of 30

Some pitfalls that arise when applying supervised ML

  1. distributional differences
  2. dependent examples
  3. confounding
  4. leaky preprocessing
  5. unbalanced classes

​

they can be interrelated

therefore might share mitigation strategies

11

Whalen, Sean, et al. "Navigating the pitfalls of applying machine learning in genomics." Nature Reviews Genetics 23.3 (2022): 169-181.

12 of 30

i.i.d: independent & identically distributed

heads/tails

​

​

​

​

12

online search results

​

13 of 30

  1. Distributional differences :

Failure of i.i.d assumption

  • Probability of observing a given value is not the same across examples
    • when the training and test sets have one distribution and the prediction set has a different distribution.

​

​

​

13

performance will be higher in cross­ validation (same setting) than on the prediction set (different setting)

14 of 30

standard k-fold cross validation

​

​

Samples from the same source can be split between train and test sets across iterations

14

Examples are randomly assigned to folds.

​

15 of 30

How to find i.i.d failures?

15

Whalen, Sean, et al. "Navigating the pitfalls of applying machine learning in genomics." Nature Reviews Genetics 23.3 (2022): 169-181.

Simple approach : projecting the data into two dimensions and making scatter plots or by comparing histograms of feature values

​

Sophisticated approach : use statistical tests to detect when distributions differ

for example,

  • the binomial test for binary features,
  • the Kolmogorov–Smirnov test

for univariate continuous features

16 of 30

Possible solutions:

16

Whalen, Sean, et al. "Navigating the pitfalls of applying machine learning in genomics." Nature Reviews Genetics 23.3 (2022): 169-181.

batch correction methods

are commonly used, such as quantile normalization,

empirical Bayes adjustment for measured variables

with ComBat

​

More elaborate approaches from domain

adaptation and transfer learning include unsupervised feature transformations and supervised learning

of robust feature representations.

17 of 30

Causes of distributional shift in Omics

Population structure (ascertainment bias)

Training genomic risk models on European-ancestry cohorts creates distributional shifts when applied to diverse global population

17

*Accounting for distributional differences is still an area of open research*

​

Biological context (In vitro vs. In vivo)

when a model is trained and applied in different biological contexts

Technical factors (Mass spec / Sequencing depth)

In proteomics, distributional differences across mass spectrometers mean that reproducibility is higher on the same instrument than across instruments

​

18 of 30

2. Dependent examples : where it occurs?

like drug discovery example as before

​

​

​

​

​

18

Standard machine learning algorithms depend entirely on the assumption of independence - that observing example A tells you nothing about example B

Card Analogy: Drawing cards without replacement alters conditional probabilities for all subsequent draws

19 of 30

Dependent examples : where it occurs?

Standard machine learning algorithms depend entirely on the assumption of independence -

that observing example A tells you nothing about example B

​

19

​

Omics Analogy:

When genomic data is arranged into a standard matrix with one example per row, standard ML packages treat every row as independent.

​

​

​

But in biology, rows often share underlying genes, evolutionary lineages, or spatial genomic loci, violating the core mathematical assumptions of cross-validation

20 of 30

Dependent examples : where it occurs?

20

The independence and identical distribution assumptions are entangled. For instance, genotyping results for family members are dependent and also may differ distributionally from other families.

Unfortunately, dependence relationships are not always known.

Even known dependencies have a tendency to be ignored in supervised ML analyses.

When data are formatted as a table with one example in each row, the standard for most ML toolkits, it is easy to proceed with model fitting and cross­ validation without checking whether examples are independent.

21 of 30

Dependent example : symptoms

Failing to account for dependencies between examples

can lead to biased models and overly optimistic

estimates of model performance.

​

​

​

21

Randomized cross validation does not protect against this problem and overestimates performance because examples in the test set can be correlated with training examples and bring information into the test set that should not be there.

22 of 30

Possible solutions

The best solution may be to acknowledge dependence and mitigate overfitting at the model evaluation stage. For example, using Group k­ fold cross­ validation.

​

​

22

Or using methods that explicitly model the covariance between examples, such as mixed effects models from biostatistics, time-series models, and autocorrelation models from spatial statistics

23 of 30

Group-k Cross validation

When splitting into k-folds, all examples from the same group are assigned to the same fold.

​

​

​

23

Examples that belong to the same group cannot cross the train-test divide.

24 of 30

Better data splitting for biological data

24

Joeres, Roman, David B. Blumenthal, and Olga V. Kalinina. "Data splitting to avoid information leakage with DataSAIL." Nature communications 16.1 (2025): 3337.

25 of 30

26 of 30

Causes of Data leakage

26

A protein’s evolutionary family strongly predicts its cellular function, tertiary structure, and interaction preferences

​

Randomized cross-validation assigns paralogs or orthologs (e.g., 80% sequence identity) across train and test folds..

​

Result: The model acts as a family lookup table, memorizing shared domain motifs rather than learning generalizable biophysical rules

​

27 of 30

Possible solutions

Pipeline encapsulation:

Never pass pre-transformed feature matrices into cross-validation functions

​

27

28 of 30

Connection to structure prediction & co-fold

28

Proteins can have conserved structure without conserved sequence

​

Myoglobin proteins with sequence identity to human

Similarity within AlphaFold Protein Structure Database

African elephant (80%)

Human

Black fin tuna (45%)

Pigeon (25%)

Barrio-Hernandez et al. Nature 2023 doi:10.1038/s41586-023-06510-w

29 of 30

Top Hat Question

29

30 of 30

Take away points

30

  • Purpose of ML is often to make good predictions on new things
  • Requires that you evaluate models for that anticipated use case
    • What does it mean to “generalize”? How can we anticipate when a model will do well or poorly in the future?
  • Ignoring rampant biases and dependencies in biological data makes it easy to trick yourself that a model performs well
  • Consider sources of data leakage, correct for them