Tune My Adam, Please!

Theodoros Athanasiadis, Steven Adriaensen, Samuel Müller, Frank Hutter

TL;DR

Adam-PFN is a specialized surrogate model for Freeze-Thaw Bayesian Optimization tailored specifically to tuning the 8 hyperparameters of the Adam optimizer. By pre-training a Prior-Data Fitted Network (PFN) on empirical learning curves from TaskSet and augmenting them with a rank-preserving method called CDF-augment, the approach achieves ~5× faster convergence during hyperparameter optimization compared to generic multi-fidelity methods.

What Problem Does This Paper Address?

Hyperparameter optimization (HPO) in deep learning is notoriously expensive. Freeze-Thaw Bayesian Optimization (FT-BO) alleviates this burden by evaluating candidate configurations incrementally—training a model for a few epochs, "freezing" it, and dynamically deciding whether to allocate more budget ("thaw") or launch a more promising configuration.

Recent state-of-the-art frameworks like ifBO rely on FT-PFN, a Transformer-based surrogate model trained on synthetic, hand-crafted prior curves. However, these models attempt a "one-size-fits-all" approach, ignoring the concrete inductive biases and training dynamics specific to popular optimizers like Adam. The authors tackle this gap by building a specialized surrogate model grounded in real-world optimizer behavior.

Methods

  • Adam-PFN Surrogate: A 6-layer Transformer (Prior-Data Fitted Network) that performs in-context Bayesian learning curve extrapolation in a single forward pass, conditioned on previous epochs and the 8 Adam hyperparameter values.
  • Training on Real Task Trajectories: Rather than training on toy synthetic mathematical functions, Adam-PFN is trained on empirical learning curves directly from TaskSet.
  • CDF-augment (Novel Augmentation): To avoid overfitting to limited empirical runs without distorting optimization physics, the authors introduce a local learning curve augmentation: $$y' = F_{\text{Beta}}(y; \mu, \kappa)$$ where $\mu \sim U(0, 1)$ and $\kappa \sim U(2, 5)$. Applying the cumulative distribution function (CDF) of a Beta distribution non-linearly shifts task difficulty while strictly preserving the relative monotonic rank ordering of configurations.

Datasets

  • TaskSet (Training & In-Distribution Eval):
  • Training: 878 randomly sampled tasks (spanning RNNs, MLPs, CNNs, and autoencoders) optimized with Adam across 1,000 randomly sampled configurations spanning 8 hyperparameters (learning rate, $\beta_1$, $\beta_2$, $\epsilon$, $L_1$, $L_2$, and linear/exponential decay schedules). A total of 2.0M learning curves were used.
  • Evaluation: 12 held-out text classification tasks based on IMDb sentiment analysis with various RNN/LSTM/GRU architectures.
  • PyTorch Examples (Out-of-Distribution Eval): Real-world benchmarks including German-to-English translation with Transformers, LSTM/Transformer word language modeling, LSTM sequence prediction, and Graph Convolutional Networks (GCN) on Cora.

Key Insights and Ideas

  • Optimizer Specialization Beats Broad Synthetic Priors: Learning the actual dynamics of Adam on real neural networks yields vastly better extrapolation priors than combinations of generic basis functions.
  • Rank Preservation is Crucial: Linear interpolation techniques like Mixup smooth out erratic training dynamics (such as the high-frequency loss oscillations caused by excessively large learning rates). CDF-augment perturbs task difficulty without washing away these critical failure modes.
  • Hyperparameter Space Augmentation Degrades Quality: Counter-intuitively, augmenting hyperparameter configurations (interpolating or warping input coordinates) consistently harmed extrapolation accuracy. Restricting augmentation strictly to the output learning-curve space allowed the model to generalize smoothly to 400 held-out hyperparameter configurations.

Key Results

  • Extrapolation Accuracy: On held-out TaskSet benchmarks, Adam-PFN (CDF) significantly outperformed FT-PFN, DPL, and DyHPO. Across context lengths of 400, 1000, and 1600, Adam-PFN achieved the highest log-likelihood (5.326 to 5.441 vs. 3.440 to 3.443 for FT-PFN) and lowest MSE (0.00043 vs. 0.00164).
  • Inference Speed: Operating via in-context inference, Adam-PFN evaluated 1,600 context points in ~4.0 seconds, compared to 63.7 seconds for DPL and 264.3 seconds for DyHPO.
  • HPO Efficiency: Adam-PFN reached the same normalized regret at ~150 total epochs that FT-PFN required ~750 epochs to achieve.
  • Out-of-Distribution (OOD) Behavior: On PyTorch benchmark tasks, Adam-PFN dominated early on (consistently having the lowest average rank for the first 200–400 epochs), though generic FT-PFN eventually overtook it as budgets grew large.

Limitations and Future Work

  • Fixed Hyperparameter Spaces: Adam-PFN assumes a fixed 8-dimensional search space for Adam. It currently does not generalize to different optimizers (e.g., AdamW, SGD) or search spaces containing arbitrary network architectural parameters.
  • Late-Stage OOD Degradation: On real-world benchmarks far outside TaskSet, generic synthetic priors (FT-PFN) catch up at high iteration budgets.
  • Hybrid Approaches: Promising future directions include fine-tuning generic PFNs on TaskSet or deploying a two-stage scheduler that warm-starts search with Adam-PFN before transitioning to generic surrogates.

Summary updated

BibTeX
@inproceedings{athanasiadis2025tune,
  author = {Theodoros Athanasiadis and Steven Adriaensen and Samuel Müller and Frank Hutter},
  title = {{Tune My Adam, Please!}},
  booktitle = {AutoML Non-Archival Content Track},
  year = {2025},
  url = {https://openreview.net/forum?id=bDv3UZXipu},
}
Figure