Short Story ◈ Drug Design

Does the QSAR Model Tell the Truth?

Understanding the utility and limitations of quantitative structure-activity relationship models and learning their appropriate use.

  • #QSAR
  • #machine learning
  • #predictive models
  • #model validation

"This QSAR model says 99% prediction accuracy!"

Sena reported excitedly.

Lina calmly asked, "Accuracy on training set? Or test set?"

"Um... training set."

"Then it's not reliable," Lina said firmly.

"Why? It's 99%."

Akira began explaining. "High possibility of overfitting. The model might just be memorizing the training data."

"Memorizing...?"

Lina showed the screen. "Look at this. Perfect on training set, but 50% accuracy on new data."

"That's terrible..."

"This is overfitting," Akira continued. "It learned not essential patterns of data but even noise."

Sena took notes. "So how do we know if a model is good?"

"Cross-validation," Lina answered. "Split data, train on part, test on remainder. Repeat this."

"External validation sets are also important," Akira added. "How well it predicts on completely unseen data."

Sena pondered. "But QSAR is a statistical method, right? There's always error, right?"

"Exactly," Lina acknowledged. "So don't treat predictions as absolute."

Akira showed an example. "This model has R² of 0.8. Decent precision."

"Explains 80% of variance..."

"But individual predictions have errors. Look at confidence intervals."

Error bars were displayed around predicted values on screen.

"Quite wide..."

"Especially outside the training data range, errors become larger," Lina pointed out.

"Danger of extrapolation," Akira explained. "Models are reliable only within the range they learned."

Sena asked, "So can't use it for completely new structures?"

"Should use cautiously," Lina answered. "Keep it as reference, confirm with experiments."

Akira pointed out another issue. "Descriptor selection is also important. What to use as input."

"Molecular weight, logP, hydrogen bond donor count..." Sena listed.

"Those are physicochemical descriptors," Lina classified. "There are also topological descriptors, fingerprints, 3D descriptors... various types."

"Which you choose changes model performance," Akira continued.

"More is better...?"

"No, the opposite," Lina said firmly. "Too many descriptors make overfitting easier."

"It's called curse of dimensionality," Akira supplemented. "Too many variables relative to data amount."

Sena became confused. "So how to balance?"

"Feature selection or PCA for dimensionality reduction," Lina answered. "Keep only important descriptors."

"And control model complexity," Akira added. "Regularization or early stopping."

Sena took notes. "QSAR is more difficult than I thought..."

"Looks simple but has many pitfalls," Lina said.

Akira showed another perspective. "Interpretability is also important. Can you explain why that prediction?"

"Isn't black box okay?"

"Maybe for just prediction," Lina answered. "But drug discovery needs understanding."

"If you don't know how to improve, it's meaningless," Akira continued.

"That's why linear models and tree models are still used," Lina explained. "Less accurate than deep learning but easier to interpret."

Sena asked, "So you don't use deep learning?"

"We do," Lina acknowledged. "But carefully. Try interpretation with SHAP values or LIME."

"Model explainability is a recent hot topic," Akira added.

Sena tried to summarize. "QSAR is useful but don't blindly trust it..."

"Exactly," Lina smiled. "Use it wisely as a tool. That's the professional way."

Akira added, "And always validate with experiments. Calculations generate hypotheses, but experiments determine truth."

"Both wheels of calculation and experiment..."

"Yes. Efficient drug discovery can't be done with either alone."

Outside the window, dusk approached. Do models tell the truth? No, they merely reflect one aspect of truth. But using this imperfect mirror wisely makes the invisible future slightly visible.

"Next, let's learn about Bayesian optimization," Lina suggested.

"A method combining experiments and calculations?"

"Yes. Optimize efficiently with few experiments. Like an evolution of QSAR."

Sena's heart swelled with anticipation. The world of prediction seemed even deeper.