Abstract
Hyperparameter optimization (HPO) is a critical yet computationally expensive step in developing Graph Neural Networks (GNNs) for molecular property prediction. This study investigates whether researchers should focus their tuning efforts on graph-related layers, task-specific layers, or both. Using the Covariance Matrix Adaptation Evolution Strategy (CMA-ES) with a novel pseudo-dynamic search space, we evaluate these strategies on the ESOL, FreeSolv, and Lipophilicity datasets. Our findings reveal that simultaneously optimizing both components consistently outperforms isolated tuning, suggesting a strong synergy between the learned molecular representations and the downstream predictive architecture.
Introduction: The HPO Dilemma in GNNs
Graph Neural Networks (GNNs) have become a cornerstone of computational chemistry, enabling the prediction of molecular properties directly from graph structures. Typically, these models are bifurcated into two functional blocks:
- Graph-related layers: These perform message passing and aggregation to generate a global molecular embedding.
- Task-specific layers: A feedforward neural network (FNN) that maps the embedding to a target property.
Given the high cost of HPO, practitioners often wonder if they can achieve near-optimal results by tuning only one of these blocks. Tuning both significantly expands the search space, potentially making it harder for optimization algorithms to converge within a fixed budget.
Methodology
The researchers employed a Graph Convolution (GC) model and optimized it using CMA-ES, an evolutionary algorithm known for its efficiency in continuous, non-linear optimization. To handle the dynamic search space—where the number of layers determines the existence of other hyperparameters—the authors implemented a "pseudo-dynamic" approach. They initialized the search space with the maximum possible parameters and only activated those relevant to the current architecture depth during each trial.
The study compared four distinct configurations:
- Baseline: Default hyperparameters.
- Graph-only HPO: Tuning only the graph layers.
- Task-only HPO: Tuning only the fully-connected layers.
- Combined HPO: Tuning both components simultaneously.
Experimental Results
The models were tested on three MoleculeNet benchmarks: ESOL (solubility), FreeSolv (hydration energy), and Lipophilicity.
Key Findings
- Synergistic Optimization: The combined HPO strategy achieved the best performance across all datasets. For instance, in FreeSolv, the RMSE dropped from a baseline of 1.8482 to 1.2285.
- The Overfitting Trap: Tuning only task-specific layers often led to lower training error but poor generalization (higher validation/test error). This suggests that the model over-optimizes for the fixed, potentially suboptimal, molecular embeddings.
- The Representation Bottleneck: Tuning only graph layers was limited by the default task-specific architecture. Without a sufficiently complex FNN to interpret the improved embeddings, the gains from better graph representations could not be fully realized.
Conclusion
This investigation demonstrates that the increased complexity of a combined search space is not a barrier for evolutionary algorithms like CMA-ES. Instead, the synergy between graph representation learning and task-specific prediction is vital. Researchers should prioritize co-optimizing both components to achieve state-of-the-art performance in molecular property prediction. Future work will explore if these trends hold for spectral GNNs and more diverse evolutionary strategies.
Summary updated