liveBook · Manning

Partial derivative analysis

As explained in Build AI Drug Discovery Pipelines

Partial derivative analysis estimates how infinitesimal changes in individual input descriptors affect a model's prediction.

Partial derivative analysis estimates how infinitesimal changes in each molecular descriptor alter a model’s prediction, providing local sensitivity information for an individual RNA binder. section 6.4.3

Apply the method by:

  • Copying the descriptor vector and perturbing one feature by a small delta in opposite directions. section 6.4.3
  • Predicting both perturbed inputs and dividing their outcome difference by twice the delta. section 6.4.3
  • Repeating the calculation across descriptors and retaining derivatives above a chosen threshold for visualization. section 6.4.3

RNA-binder interpretation

A Python implementation uses model.predict_proba, a delta of 5e-2, central differences, and a bar chart of descriptors whose derivatives exceed 0.01. Delta selection balances approximation error against calculation error; tree ensembles require caution because their piecewise-constant behavior makes finite-difference derivatives fragile. section 6.4.3

f'(x)≈f(x+h)-f(x-h)2h

Use the central-difference equation to connect two perturbed predictions with an estimated partial derivative. section 6.4.3

How Build AI Drug Discovery Pipelines covers it

How deep it goes
Explains finite-difference implementation and delta error tradeoffs, while warning that tree-ensemble derivatives can be fragile.
Examples
Demonstrates Python analysis on the first RNA binder in the ROBIN dataset using descriptor perturbations and a thresholded bar chart.
What it assumes
Assumes a trained prediction model and interpretable descriptors, while introducing local sensitivity analysis and numerical differentiation.
What you can do after
Diagnose model sensitivity by estimating and visualizing each descriptor’s local effect on predictions.
How it connects
Connects local sensitivity analysis with global sensitivity analysis, finite differences, and model interpretation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build AI Drug Discovery Pipelines. The section links point to the parts of the book it draws on.