top of page

Learnings from predicting CYP inhibition

6 days ago
6 min read

I placed 5th out of total 271 participants in OpenADMET’s CYP inhibition competition, finishing just behind Recursion (4th), Nvidia (3rd) and Inductive (1st).


The task was to predict how strongly 750 compounds inhibit four major cytochrome P450 isoforms. CYP inhibition is one of the standard early gates in drug discovery: a compound that shuts down a major CYP carries drug-drug interaction risk, so being able to predict it well could triage out risks earlier.


The final leaderboard (includes the 103 teams that submitted a model report).
The final leaderboard (includes the 103 teams that submitted a model report).

In this blogpost I will break down what I did to get to this score. I will conclude that the most important things for real-world projects where you want to use ML for binding prediction are:

  • Think carefully about how project data is sampled and how that differs from the dataset you want to make predictions about

  • Understand the metric you care about and how you need to adjust your pipeline to compensate for that

  • Search for and leverage any available public data

  • Try 3D-aware models, Uni-Mol v2 clearly beat Chemprop here


One caveat before we start: this competition was in-distribution, meaning the test compounds had close analogues in the training set. On average the most similar training compound to any given test compound had a tanimoto ECFP4 similarity of 0.598. These conclusions apply in that context.


The steps I took to get from my starting point to the final submission. Scores and ranking on the final leaderboard.
The steps I took to get from my starting point to the final submission. Scores and ranking on the final leaderboard.

Starting off: Chemprop is not all you need

In an in-distribution scenario like this, machine learning methods that memorise training data are expected to work well. So my baseline was a Chemprop model trained on all the competition training data. These models typically work well out of the box, so I expected a fairly good board placement. Instead it came near the bottom of the field. Ouch!


Fixing dataset distribution problems

Recovering from that initial setback I started by analysing the data. That produced the single most important insight of the competition: the training and test sets had been sampled differently.


The challenge data pack contained data from a single concentration pre-screen whose compounds had been chosen close to randomly. But only the most active compounds from that screen went on to an 8-point dose-response curve, which is what produces a pIC50. So, the pIC50 labels, which are what we were being scored on, covered primarily the active end of the distribution for CYP1A2 and CYP2D6. For CYP2C9 and CYP3A4 this problem was less severe as you can see below.


CYP1A2 and CYP2D6 had pIC50 values biased towards inhibitors.
CYP1A2 and CYP2D6 had pIC50 values biased towards inhibitors.

The test set was built in a different way. Compounds were sampled from among analogues of training compounds which were strong inhibitors of one of CYP1A2, CYP2C9 or CYP3A4. But each of those compounds was then measured against all four isoforms. CYP2D6 wasn’t part of the selection criterion at all, and only a third of the test compounds were picked for CYP1A2 activity. So I deduced that for those two isoforms the test set would probably contain far more weak and inactive compounds than my training labels did. If I was right, my models had barely seen the data distribution they were being scored on.


My fix was to recover the missing inactives. The most inactive compounds in the single-concentration screen never got a dose-response curve, so they had no pIC50. But the screen itself tells you they’re most likely inactive (a high log2fc means little inhibition at the screening concentration). Rather than throw them away, I gave them inferred pIC50 ranges: an upper bound rather than a point value, so the model learns “this compound is weaker than X” without me having to invent a number. I only did this for CYP1A2 and CYP2D6. The other two isoforms already had pIC50 values covering the full distribution. The impact was large: my error dropped by 0.183, more than any other change I made.


This general lesson: data is almost never sampled with the intent of building a balanced predictive model on top of it. Understanding the shift between the data you have and the data you’ll predict on, and compensating for it, is usually the highest-leverage work available.


Aligning the training loss to the competition metric

The other thing that was special about this competition was that we were scored on a soft-threshold relative absolute error metric (ST-RAE). This means that you were only penalised if the prediction fell outside of a test datapoint’s 95%-confidence interval. The confidence interval was particularly wide for datapoints with low pIC50 values. That’s because repeated measurements are more uncertain at high concentrations.


If you train your models with a regular MAE loss against the measured pIC50 your models will not incorporate this property of the data. Instead I created a soft-threshold MAE loss, mimicking the competition metric, and used that throughout the competition. With this loss the model naturally learnt that there is no point predicting values much below ~3.0 as you won’t be penalised anyway. This cut my error by 0.086.


This is also applicable to real-world scenarios. Think carefully about what you care about and choose the metrics and loss that matches that. Do you for example care about identifying hits? Then you want to use a metric like enrichment factor as opposed to MAE.


Looking for and using public data

There has been a lot of data published for the CYPs. Most of that data exists in ChEMBL, but some only exists in PubChem. Incorporating this data led to an improvement of 0.088. It is always worth searching through databases and recent publications to see what data already exists that could be useful.


Switching to 3D ML models

From OpenADMET’s PXR competition I learnt that some teams had used Uni-Mol v2 successfully. Therefore I was keen on giving it a try. Uni-Mol v2 uses RDKit to embed conformers of the compound and then uses this 3D embedding as input to the network. Contrast that with Chemprop which only uses a 2D representation of the compound. Changing from Chemprop to Uni-Mol v2 lowered my error by a further 0.088. I did not expect such a large improvement from merely switching the ML model!


It is not so surprising in retrospect though. My mental model of machine learning for chemistry is that the models learn a hazy memory of pharmacophores. With that mental model, of course a representation that can capture 3D pharmacophores will be more useful for predicting binding than one limited to 2D. The former can memorise 3D shapes, whereas the latter cannot.


Compounds that appear different in 2D can be similar in 3D. The rust sphere is where the heme iron would sit. 
Compounds that appear different in 2D can be similar in 3D. The rust sphere is where the heme iron would sit. 

Ensembling to squeeze out the last bit of performance

A well-known strategy for ML competitions is to use ensembles. Train several different models and average their results. This smooths out errors from each of the individual model architectures. The less correlated the ensemble members are in their predictions the better it works. In addition to Uni-Mol v2 I used Atom-JEPA, Chemprop and a fingerprint-based neural network.


I also used a fifth ensemble member. This method uses Protenix to co-fold compounds in the different receptors and then uses a physics-based method I have built to assess binding. I believe this is a promising future direction in scenarios where you don’t have a training set with close analogues, which are the most interesting real-world use cases. This system did have a measurable impact on CYP1A2 and CYP2D6, but not enough to show up meaningfully on the leaderboard. Disappointing, but maybe not surprising. After all, you’d expect methods that lean on predicted structures and physics to work well in scenarios where you have reliable structure prediction available, and where there are no close analogues that ML methods can memorise. In this competition the opposite was true: co-folding is not yet reliable for CYPs and there were plenty of analogues for ML methods to memorise.


All in all, the ensemble lowered my error by 0.035 and took me from 10th to 5th position. In any real-world project the additional complexity of using five models instead of one and the ensemble logic would certainly not have been worth it.


Conclusion

This was a harder competition than I expected. Off-the-shelf methods applied naively to the data did not perform well. The difficulty was not in finding the ML models which work well or building a big ensemble; these things are easy with coding agents. The hard part was understanding how to compensate for the dataset distribution shift and the peculiarities of the competition metric. Both fixes sit near the start of my waterfall chart, but I consider them the most important insights. I believe that how well teams tackled these problems is what separated high scorers from the rest.


Both issues are representative of real-world drug discovery problems. You rarely have a training dataset sampled in the exact same way as the distribution you want to infer things about. And you often care about your predictions performing well under a metric that is more intricate than a simple MAE. These are also exactly the areas where today’s coding agents are least helpful. Agents are incredible at implementing and fine-tuning ML models, but less so at thinking critically about data distributions and which metric actually matters.


Thank you to OpenADMET for organising the competition! And thank you for reading!

 
 
 

Comments


Would you like to get in touch?

  • Email
  • LinkedIn
  • GitHub

© 2026 Enlace Bio Ltd. Company no. 15870131, registered in England and Wales.

bottom of page