Data-Driven Chemistry: How Data Science Empowers Drug Discovery

Feb 9, 2023·
Yassir Boulaamane
Yassir Boulaamane
· 4 min read

A chemical dataset is not yet a decision. It becomes one when each row is a defined experiment and the model is judged on rows it did not fit.

Chemistry already writes those rows down. A structure, a set of conditions, and a measurement: a yield, an IC50, a spectrum, a stability. Data science is the set of tools that asks whether the measurement was predictable from the rest of the row, and what experiment is worth running next. The tools are statistics, machine learning, code, and plots. None of them supplies the chemistry.

From a chemical question to the next experimentA question defines the table. The table holds structures, conditions, and measurements. A model is scored on held-out rows. The useful output is the next experiment, whose result becomes a new row.1. QuestionWhat measurement are you trying to anticipate?2. TableStructure, conditions, and the measured value3. ModelScored on rows that were held out4. Next experimentIts result is a new row, not a trophy
Figure 1. The loop closes when the experiment writes back into the table. A model that is never allowed to be wrong by a new measurement has not been tested.

What a row has to contain

The usual chemical objects are already structured. A SMILES string or a connection table describes the molecule. A reaction record adds reagents, solvent, temperature, and time. A bioactivity record adds the target, the assay, and a number. A spectrum is the same idea in another form: conditions in, signal out.

The work starts by saying which of those fields is the thing to be predicted, and which fields the model is allowed to see. A column that was measured in the same experiment as the label, or that leaks the label by construction, will make a flattering model and a useless one. Cleaning is part of that decision. Duplicate structures, mixed units, and missing assay conditions change the meaning of the row before any algorithm runs.

The loop, without the slogan

Seven steps are enough. They are ordinary, and skipping one is how a notebook full of plots fails to change an experiment.

  1. Name the problem. Predicting a property, ranking compounds for a screen, and optimizing a reaction are different problems. They do not share a metric just because they share a library.
  2. Collect and clean. The rows have to agree on units, identifiers, and what was actually measured. A mean taken across unmatched assays is a choice, and it belongs in the methods.
  3. Look before you fit. Plots of the chemical space you defined, of the label distribution, and of obvious confounders will retire a bad question faster than a new model will.
  4. Fit a model. In this setting that is a predictor of a molecular property, a reaction outcome, or a class you defined with an explicit cutoff.
  5. Evaluate on rows the fit did not use. The metric has to match the decision. A classifier’s accuracy on a lopsided label is a weak report. A regression’s error on the training rows is a weaker one.
  6. Hand the result to someone who can act on it. In a discovery project that is often a ranked list for the next assay, not a service running unattended.
  7. Watch it age. New chemical space, a new assay protocol, or a new batch of data can move the errors. A model that is not rechecked against later measurements is a snapshot.

Deployment and monitoring matter when a model really does sit in a pipeline. For most of the chemistry in this list, the production environment is the next round of experiments.

Where the loop changes the work

Drug discovery uses it to decide which compounds to make or test, and which measured series are already explained by a simple property. Materials work uses it when the measurement is a stability, a band gap, or a performance number and the row is a composition plus a process. Energy research uses the same shape when the experiment is expensive and the space of candidates is large.

In each case the gain is the same. Patterns that a person would not scan by eye become visible, and the next experiment can be chosen because of a stated error rather than because the compound was next on the list. The gain disappears when the rows were not the experiment you thought they were.

What this does not do

A fitted model does not create the measurement. It also does not excuse a narrow chemical series: high accuracy inside one scaffold says little about the next scaffold. The useful habit is the loop in Figure 1. Define the row, hold data out, and let the following experiment write the next line of the table.