A Genetic Algorithm with Tree-structured Mutation for Hyperparameter Optimisation of Graph Neural Networks

Yingfang Yuan, Wenjun Wang, Wei Pang

Introduction

Graph Neural Networks (GNNs) have emerged as a powerful standard for processing structured data, such as molecular graphs and social networks. However, their performance is highly sensitive to hyperparameter configurations, including learning rates, layer counts, and batch sizes. Optimizing these parameters (HPO) is challenging because GNN training is computationally expensive and the search space is often a high-dimensional "black box."

While Genetic Algorithms (GAs) are a popular choice for HPO, standard implementations typically rely on random mutations. This "forgetful" approach can lead to redundant evaluations of mediocre configurations or entrapment in local optima. This paper introduces Tree-structured Mutation (TSM), a novel strategy that leverages historical search data to intelligently balance exploration and exploitation.

Methodology: Tree-structured Mutation (TSM)

The core innovation is replacing standard random mutation with a memory-guided search mechanism. TSM builds upon the HESGA (Genetic Algorithm with Hierarchical Evaluation Strategy) framework, which utilizes both "fast" (short-term) and "full" evaluations to optimize computational resources.

The Tree Structure

TSM partitions the hyperparameter search space into subspaces using a binary tree. In this structure, internal nodes represent specific hyperparameter dimensions, while leaf nodes correspond to specific regions or subspaces of the search area.

Tree-structured representation of hyperparameter dimensions and subspaces.

Memory-Guided Search and Probabilistic Mutation

Unlike standard GAs, TSM records the frequency of mutations for each dimension and the number of visits to each subspace. It employs a reciprocal function of these visit counts to determine mutation probabilities. Areas that have been explored frequently receive lower priority, forcing the algorithm to investigate uncharted territory. Additionally, TSM serves as a duplicate prevention mechanism; if a duplicate individual is generated, the algorithm "forcibly" mutates it into an under-explored subspace to maintain population diversity.

Experimental Evaluation

The researchers evaluated the HESGA+TSM approach using the Neural Fingerprint Graph Model (GC) on three molecular property prediction benchmarks from MoleculeNet:

  • FreeSolv: Small dataset (hydration free energy).
  • ESOL: Medium-sized dataset (water solubility).
  • Lipophilicity: Large dataset (experimental solubility results).

Key Results and Insights

The effectiveness of TSM is closely tied to the scale of the dataset. On larger datasets where the "signal" of hyperparameter influence is clearer, TSM demonstrates significant advantages.

Performance on Large Datasets

On the Lipophilicity dataset, HESGA+TSM significantly outperformed the baseline HESGA. It achieved a lower Mean Root Mean Square Error (RMSE) of 0.7021 compared to the baseline's 0.7293, while also exhibiting greater stability as evidenced by a lower standard deviation.

Performance comparison on the Lipophilicity dataset showing improved RMSE and stability with TSM.

Impact of Data Scale

Interestingly, on the smallest dataset (FreeSolv), the standard HESGA performed better. The authors suggest that for very small datasets, the inherent "noise" in GNN training makes the global exploration encouraged by TSM less effective than simpler, local search strategies. On medium datasets like ESOL, TSM found better configurations, though the improvements were not statistically significant at the 10% level.

Conclusion and Future Work

TSM transforms the HPO process from a random walk into a systematic exploration by using historical data as a map. By penalizing "popular" but unproductive regions, it avoids the "red queen" problem of stagnant search progress.

Future research directions include the implementation of Adaptive Thresholds, where the tree structure evolves based on the distribution of high-performing results, and Reward Integration, which would track the quality of results in each region to transition from pure exploration to targeted exploitation in the later stages of the search.

Summary updated

BibTeX
@inproceedings{yuan2021genetic,
  author = {Yingfang Yuan and Wenjun Wang and Wei Pang},
  title = {{A Genetic Algorithm with Tree-structured Mutation for Hyperparameter Optimisation of Graph Neural Networks}},
  booktitle = {CEC},
  year = {2021},
  url = {https://openreview.net/forum?id=iEAMN86Ndu},
}
Figure