Reproduce Han & Choi's transfer-learning approach to 1H NMR chemical shift prediction: pretrain a GNN on computed (DFT) data, fine-tune on a handful of experimental molecules, and see why that beats training on experimental data alone.
What you will learn
Instructions
Open the Colab notebook using the button above. Run each cell in order; cells marked Exercise require you to fill in code.
Build the architecture (a). Implement the edge-network + GRU message-passing GNN from Han & Choi (2021), and pretrain it on a small real subset of DFT-computed shielding constants (QM9NMR case-study molecules).
More data, less error (b). Fine-tune the pretrained model on increasing fractions (1%, 4%, 7%, 10%, ...) of a real experimental 1H NMR dataset (NMRShiftDB2-derived). Plot MAE vs. fraction and compare its shape to Figure 1c of the paper.
Fine-tuning hyperparameters (c). Use the interactive widget to vary learning rate, number of frozen layers, warm-up length, and epochs. Find a setting that clearly under- or over-adapts.
Comparisons (d). Train an experimental-only model (no pretraining), a common-molecules-only model (H/C/N/O/F only), and a k-NN/HOSE-code baseline at the same data budget. Compare all four MAEs.
Challenge. Predict delta(1H) for the fixed class test set, compute your MAE, and run the notebook's submit cell — it POSTs your score straight from Colab to appear on the live leaderboard below.
Questions
Answer these questions as you work through the notebook. Discuss with your neighbour — some have no single right answer.
Why does the pretrained model's MAE for σ(H) come out so much smaller than for σ(C), σ(N), σ(O), σ(F)? (Hint: look at the spread of each element's shielding-constant distribution, not just the model.)
EasyAt what fine-tuning fraction does the pretrained+fine-tuned model's test MAE stop improving noticeably? Compare that fraction's MAE to the experimental-only (no pretraining) model trained on the same fraction — how big is the gap, and does it shrink as the fraction grows?
MediumThe common-molecules-only model and the k-NN baseline both do well on "in-distribution" test molecules. Which one degrades more gracefully on molecules containing P, S, or Cl, and why might a learned 3D GNN generalize differently than a nearest-neighbor lookup on rare environments?
MediumRe-run the frozen-layers sweep from part (c) with 0, 1, 2, and 3 frozen layers at a fixed 10% fine-tuning fraction. Is there a monotonic trend, and does the best choice change if you cut the fine-tuning fraction to 1%?
ChallengeLive leaderboard
Run the notebook's challenge section and submit cell — it computes your test MAE/RMSE on the fixed class test set and POSTs the score directly from Colab. It appears here within moments; only each team's best (lowest) MAE is shown. Resubmit as many times as you like.