Treating Hyperparameters as Interventions: Task-Invariant Representation Learning for Transferable HPO
Mengyang Li ⋅ Ou Wu
Abstract
We study transfer hyperparameter optimization (HPO) by treating configurations as controlled interventions and learning task representations from short training trajectories. We propose CA-HPO (Configuration-invariAnt HPO), a transfer HPO framework that learns a task representation that is constrained to be invariant across hyperparameter configurations of the same task and is trained to predict performance. We define the target as the solution of a constrained optimization problem over the encoder and predictor classes rather than as an identified latent variable, so the framework avoids the identifiability assumptions of causal representation learning. We prove three guarantees: the invariance violation of the penalized population minimizer is at most the price of invariance divided by the penalty weight, with recovery of the target in the limit; a task-level finite-sample excess-risk bound; and a counterfactual error bound in which the probe-averaging error scales with the within-task spread that the penalty controls. Once a one-off meta-training corpus is available, CA-HPO attains the highest final accuracy at the lowest search cost on four Llama-3-8B fine-tuning tasks, and on twelve classical benchmarks it achieves a 5.7 times geometric-mean online speedup over random search, against 2.0 times for HEBO and at most 2.1 times for multi-fidelity methods. Under matched probing signal and model capacity, removing the invariance constraint alone reduces this speedup to 2.6 times. The learned representations remain stable across four orders of magnitude of learning rate and recover a known task invariant in a controlled synthetic study, and task-wise HSIC permutation tests do not reject their independence from $\lambda$ on 11 of the 12 classical benchmarks.
Successful Page Load