Design a reaction-factor prediction system
GoogleMachine Learning Engineer · Technical ScreenLast updated
This question evaluates competency in designing end-to-end machine learning systems for molecular pair regression tasks, including data quality and normalization, molecular representation and feature engineering, model selection, evaluation metrics, uncertainty estimation, and production considerations.
You are given a dataset of chemical reactions with columns: molecule1_name, molecule2_name, reaction_factor (real-valued). Design an end-to-end approach to predict reaction_factor. Cover:
- EDA: checks/plots for label distribution, missingness, outliers, duplicates, leakage; normalization of molecule naming (synonyms, casing), and detection of duplicate reactions in reversed order.
- Feature engineering: converting molecule names to usable representations (lookups to SMILES/InChI, RDKit descriptors, learned embeddings, graph encodings); constructing pairwise interaction features (concatenation, differences, products, attention/cross features); handling unseen molecules and symmetry (A+B ≈ B+A).
- Data splitting: propose and justify random, grouped-by-molecule, leave-one-molecule-out (cold-start), scaffold-based, or time-based splits; explain how each estimates generalization and prevents leakage.
- Modeling: baselines (linear/elastic net), tree ensembles (XGBoost/LightGBM), neural models (MLP on descriptors, Transformer on SMILES, GNN/Graph Transformer on molecular graphs); uncertainty estimation and calibration.
- Training and evaluation: loss/metrics (MAE, RMSE, R²), cross-validation strategy, hyperparameter search, early stopping, error analysis by scaffold/family/frequency.
- Generalization and robustness: standardization, regularization, data augmentation (e.g., SMILES enumeration), pretraining on large molecular corpora, semi-supervised learning, ensembling, adversarial validation, domain shift checks; design of ablations and offline A/B comparisons.
- Production: feature pipelines, reproducibility, monitoring, retraining triggers, and scientific safety considerations.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.