TL;DR
This paper introduces TransBO, a novel two-phase transfer learning framework for hyperparameter optimization (HPO). TransBO effectively addresses the challenges of complementary source tasks and dynamic knowledge aggregation by jointly and adaptively extracting and combining knowledge from past HPO tasks to accelerate new ones.
What Problem Does This Paper Address?
Automatic hyperparameter optimization (HPO) is crucial for achieving optimal performance in machine learning models, but it's often computationally expensive. While Bayesian Optimization (BO) is a popular approach, it can be slow due to the need for many model evaluations. Transfer learning offers a promising solution by leveraging knowledge from previously solved HPO tasks to speed up new ones. However, existing transfer learning methods struggle with two key issues: 1) effectively combining knowledge from multiple, potentially complementary, source tasks, and 2) adapting the reliance on source knowledge as more data becomes available for the target task, to avoid negative transfer. This paper aims to solve these challenges simultaneously.
Methods
TransBO is a two-phase transfer learning framework built upon Bayesian optimization.
- Phase 1: Source Knowledge Aggregation: This phase focuses on extracting and combining knowledge from multiple source tasks. It does this by learning a "source surrogate" model that is a weighted linear combination of individual source task surrogates. The key innovation here is that the weights are learned jointly and adaptively using a principled approach based on a differentiable pairwise ranking loss function. This allows the framework to capture the synergistic contributions of different source tasks.
- Phase 2: Target Knowledge Integration: In this phase, the aggregated source surrogate is combined with a surrogate trained on the target task's data. This combination is also a weighted linear combination, with weights learned adaptively. This phase is designed to handle the dynamic nature of knowledge aggregation: initially, more weight is given to source knowledge when target data is scarce, and as more target data becomes available, the weight shifts towards the target surrogate, mitigating negative transfer. The weights in this phase are learned using a cross-validation mechanism to ensure generalization.
The learning of weights in both phases is formulated as constrained optimization problems, which can be solved efficiently.
Datasets
The authors created and released a large-scale benchmark for HPO transfer learning. This benchmark includes:
- Four ML algorithms: Random Forest, Extra Trees, Adaboost, and LightGBM.
- 30 real-world datasets from the OpenML repository.
- For each algorithm-dataset pair (task), they evaluated 20,000 configurations, resulting in a total of 1.8 million model evaluations and requiring over 100,000 CPU hours to collect.
They also used the NAS-Bench201 dataset for evaluating TransBO on Neural Architecture Search (NAS).
Key Insights and Ideas
- Principled Weight Learning: Instead of relying on heuristics or fixed weights, TransBO learns the weights for combining source and target knowledge in a principled, data-driven manner. This is crucial for effectively leveraging and adapting transferred knowledge.
- Two-Phase Approach for Dynamics: Decoupling source aggregation and target integration into two distinct phases allows TransBO to explicitly address the complementary nature of source tasks and the dynamic shift in reliance from source to target data.
- Ranking Loss for HPO: Using a pairwise ranking loss function is more appropriate for HPO than traditional mean squared error, as the relative order of configurations is often more important than their exact performance values.
- Cross-Validation for Generalization: Employing cross-validation in the second phase ensures that the learned weights for combining source and target surrogates lead to a model that generalizes well to unseen target data.
- Avoiding Negative Transfer: The adaptive weighting mechanism, particularly the non-decreasing prior on the target weight, is designed to naturally shift focus to the target task as more data becomes available, thus preventing performance degradation due to irrelevant source knowledge.
Key Results
- Superior Performance: TransBO consistently outperformed state-of-the-art transfer learning methods in both static and dynamic HPO settings across various ML algorithms and datasets.
- Practicality: In dynamic TL scenarios, TransBO achieved the largest number of top-1 and top-2 performance rankings across 30 tasks, demonstrating its robustness in real-world sequential HPO.
- Universality: TransBO achieved over a 5x speedup in Neural Architecture Search (NAS) compared to existing methods, showcasing its applicability beyond standard HPO tasks.
- Scalability: The framework exhibits good scalability, with a lower computational complexity compared to some ensemble-based methods, making it suitable for a large number of source tasks and trials.
Limitations and Future Work
- Limitations: The paper acknowledges that while TransBO aims to avoid negative transfer, it's an ongoing challenge in transfer learning. The effectiveness of TransBO relies on the quality and relevance of the source tasks. The paper also notes that combining multiple GP surrogates linearly is a practical choice, but the optimal way to combine them for unified posterior predictive means and variances is still an open research question.
- Future Work: The authors suggest that TransBO's principled approach to transfer learning can be extended to other black-box optimization problems beyond HPO, such as experimental design. Further research into more sophisticated methods for combining GP surrogates could also be beneficial.
Summary updated