Hyperparameter Trajectory Inference with Conditional Lagrangian Optimal Transport
Harry Amad, Mihaela van der Schaar (University of Cambridge)
International Conference on Learning Representations 2026 · Oral
Overview
The setting of hyperparameters is a perennial challenge in machine learning, often dictating crucial trade-offs in a model's behavior, such as balancing multiple objectives in reinforcement learning or calibrating robustness against input noise. When the optimal hyperparameter setting is subjective, context-dependent, or varies across users, the conventional approach of fixing these parameters at training time becomes deeply inefficient. Allowing each user to select their ideal configuration would necessitate retraining the entire network for every new choice, a computationally prohibitive and time-consuming endeavor. This talk by Harry Amad, in collaboration with his supervisor Mihaela van der Schaar from the University of Cambridge, addresses this fundamental problem by proposing a novel framework: Hyperparameter Trajectory Inference (HTI).

Key moments
- 0:00 Introduction: The hyperparameter challenge and HTI motivation
- 2:00 Defining Hyperparameter Trajectory Inference (HTI)
- 4:00 Lagrangian cost formulation and dense traversal bias
- 6:00 Learning efficient movement via min-max metric optimization
- 8:00 Visualizing inductive biases with a toy example
- 10:00 Application: HTI for cancer treatment RL policy
- 11:00 Key takeaways and future research directions
- 12:00 Q&A: Clarifying learned metric parameters
Hyperparameter Trajectory Inference with Conditional Lagrangian Optimal Transport
Speakers: Harry Amad, Mihaela van der Schaar (University of Cambridge)
Conference: ICLR 2026
YouTube: https://slideslive.com/39062228
Overview
The setting of hyperparameters is a perennial challenge in machine learning, often dictating crucial trade-offs in a model's behavior, such as balancing multiple objectives in reinforcement learning or calibrating robustness against input noise. When the optimal hyperparameter setting is subjective, context-dependent, or varies across users, the conventional approach of fixing these parameters at training time becomes deeply inefficient. Allowing each user to select their ideal configuration would necessitate retraining the entire network for every new choice, a computationally prohibitive and time-consuming endeavor. This talk by Harry Amad, in collaboration with his supervisor Mihaela van der Schaar from the University of Cambridge, addresses this fundamental problem by proposing a novel framework: Hyperparameter Trajectory Inference (HTI).
The core idea behind HTI is to learn the dynamics induced by hyperparameter changes from a set of pre-trained, converged networks. By understanding how a network's output distribution evolves as a hyperparameter is varied, the system aims to construct a surrogate model capable of interpolating between these observed behavioral settings. This allows for adaptive inference without the need for costly retraining, empowering practitioners and end-users to dynamically adjust model behavior post-training. The work frames this challenge as a trajectory inference problem, traditionally used in fields like single-cell genomics, but extends it to the complex domain of conditional neural network output distributions, leveraging the sophisticated machinery of Conditional Lagrangian Optimal Transport (CLOT).
This research is significant because it tackles a critical bottleneck in the deployment and personalization of advanced ML models. By enabling on-the-fly adjustment of hyperparameter-driven trade-offs, it promises to democratize access to customized model behaviors, reduce computational overhead, and accelerate the iterative refinement process for AI systems. The authors' innovative application of optimal transport, coupled with carefully designed inductive biases, offers a robust and theoretically grounded approach to a pervasive practical problem in machine learning.
Background
▶ Watch: Introduction: The hyperparameter challenge and HTI motivation (0:00)
The concept of trajectory inference originates from fields such as single-cell genomics, where it is used to model the evolution of cell populations over time by learning mappings between observed distributions at discrete time points. In essence, it attempts to reconstruct the continuous dynamics of a system from a sparse set of snapshots. However, trajectory inference is inherently an ill-posed problem; given two distributions, there exists an infinite number of possible probability paths or trajectories that could connect them. This ambiguity necessitates the identification and imposition of strong, yet useful, inductive biases to constrain the estimated dynamics, ensuring the learned paths are physically or biologically feasible and adhere to prior knowledge.
In the context of machine learning, and specifically for Hyperparameter Trajectory Inference (HTI), this challenge is further exacerbated. Here, the "population" is defined as the conditional output distribution of a neural network, and the "time variable" is a continuous hyperparameter. The problem becomes "conditional" because the dynamics must be learned for each unique input condition in the dataset, effectively attempting to solve multiple trajectory inference problems simultaneously. This conditioning significantly reduces the effective dataset size for each individual trajectory inference problem, making the role of appropriate inductive biases even more critical for successful generalization.
To address the ill-posed nature of trajectory inference and the specific complexities introduced by conditional dynamics, Amad and van der Schaar turn to Optimal Transport (OT) theory. Optimal Transport, in its general form, seeks to find the least-cost coupling or "transport plan" between a source and a target probability distribution, minimizing a predefined transport cost. This concept, formalized by Monge and later refined by Kantorovich, has seen a resurgence in modern machine learning dues to advancements in neural network-based solvers. One common formulation is the semi-dual formulation, which involves maximizing a function related to the Kantorovich potential. While existing methods can estimate these potentials using neural networks, the crucial prerequisite is defining an appropriate cost function that encodes the desired inductive biases into the resulting optimal paths. This forms the foundation upon which the authors build their novel Lagrangian cost formulation to imbue HTI with the necessary physical and data-driven constraints.
Key Findings
▶ Watch: Lagrangian cost formulation and dense traversal bias (4:00)
The central contribution of this work is the development of Hyperparameter Trajectory Inference (HTI), a novel framework that learns hyperparameter-induced dynamics within neural networks to enable adaptive inference without retraining. The authors demonstrate that these complex dynamics can be effectively approximated using Conditional Lagrangian Optimal Transport (CLOT), a sophisticated extension of optimal transport theory.
A critical innovation lies in the design of specific inductive biases, which are encoded directly into the Lagrangian cost function of the optimal transport problem. These biases significantly improve the feasibility and meaningfulness of the learned surrogate models:
- Dense Traversal Bias: The learned probability paths are encouraged to traverse regions of the data space where observed data samples are dense. This ensures that the interpolated behaviors remain within plausible and well-represented areas of the model's output space.
- Efficient Observed Movement Bias: The framework learns a data-driven metric that defines what constitutes "efficient movement" based on the observed changes in network behavior as the hyperparameter varies. This allows the inferred trajectories to better respect the underlying manifold of the data and the natural transitions displayed by the converged networks.
Through empirical validation, particularly in a reinforcement learning application concerning cancer treatment, the proposed HTI method consistently outperforms existing baselines, including direct regression and other trajectory inference techniques. The surrogate models generated by HTI achieve higher average rewards across the hyperparameter spectrum and accurately replicate the behavioral shifts observed in policies trained at fixed hyperparameter settings. These findings collectively establish HTI with CLOT as a robust and effective solution for enabling flexible, adaptive inference in hyperparameter-sensitive machine learning applications.
Technical Deep Dive
▶ Watch: Visualizing inductive biases with a toy example (8:00)
The technical core of Amad and van der Schaar's work lies in its innovative application of Conditional Lagrangian Optimal Transport (CLOT) to model hyperparameter-induced dynamics. The challenge is to learn a mapping between conditional output distributions of a neural network, where the conditioning variable is the input and the "time" variable is a continuous hyperparameter.
Standard optimal transport (OT) seeks a mapping between distributions by minimizing a transport cost. The authors build upon the semi-dual formulation of OT, which involves finding a Kantorovich potential (often instantiated via neural networks) that maximizes a specific objective. However, the crucial step is defining the underlying cost function. Instead of standard Euclidean or Lp norms, they pursue a Lagrangian cost formulation. This approach defines the cost of moving a point from a source to a target distribution based on the "path of least action." A path's action is determined by integrating a Lagrangian along the path, which typically comprises kinetic and potential energy terms. The general form of the Lagrangian, L, is given by:
$L(x, \dot{x}, t) = \frac{1}{2} \dot{x}^T G(x, t) \dot{x} - U(x, t)$
Here, $\dot{x}$ represents the velocity of movement, $G(x, t)$ is a metric tensor defining the kinetic energy, and $U(x, t)$ is a potential energy term. The flexibility in parameterizing $G$ and $U$ allows the authors to encode their specific inductive biases.
The first inductive bias is the dense traversal bias. The intuition is that if data is observed in a particular region of the data space, then paths traversing that region are more likely to be feasible. To encode this, the potential energy term, $U(x, t)$, is set to a kernel density estimate of the observed data. Specifically, when the data density is high, the potential term in the Lagrangian becomes high (or less negative, depending on the exact sign convention), which effectively lowers the overall path action for paths that traverse these dense regions. This encourages the optimal transport paths to stick to areas where observed data exists, preventing trajectories from venturing into unrealistic or sparse parts of the data space.
The second inductive bias, the efficient observed movement bias, aims to learn what "efficient" movement looks like from the available snapshots of hyperparameter-induced changes. This is achieved through a min-max optimization procedure, inspired by prior work by Poladian et al. (2024). The optimization alternates between two steps:
- Inner Maximization: Given a fixed metric $G$, a neural estimate of the optimal transport paths between two distributions is found. This is essentially solving the semi-dual form of optimal transport.
- Outer Minimization: The metric $G$ is then updated in a direction that lowers the optimal transport cost for the observed data. The objective is to find a metric that makes the observed data movements appear maximally efficient.
By alternating these steps, the method learns a metric $G$ that aligns with the observed dynamics, causing the inferred paths (geodesics) to curve and adapt to the underlying manifold of the data.
A crucial "training trick" is employed to prevent degenerate solutions during the metric learning process. It is easy for the neural network parameterizing $G$ to learn a metric where all eigenvalues tend towards zero, leading to an artificially small optimal transport cost, which would incorrectly imply high efficiency without encoding useful information. To avoid this, the metric $G$ is parameterized using its singular value decomposition (SVD). This allows the authors to enforce a constraint that the sum of the eigenvalues of $G$ remains fixed (a "fixed budget"). This ensures that the metric maintains a sufficient level of "volume" and thus encodes meaningful geometric information, preventing it from collapsing into a trivial solution. The parameters of this learned metric $G$ are encoded within the weights of a neural network, allowing it to vary flexibly across the data space.
In summary, CLOT with these bespoke Lagrangian cost functions enables HTI to infer meaningful and data-respecting trajectories, providing a powerful tool for understanding and interpolating hyperparameter-induced dynamics.
Experimental Setup & Results
▶ Watch: Application: HTI for cancer treatment RL policy (10:00)
To validate the proposed Hyperparameter Trajectory Inference (HTI) framework, Amad and van der Schaar conducted a series of experiments, starting with a synthetic toy example to illustrate the role of their inductive biases, followed by a real-world application in reinforcement learning.
Toy Example:
The initial demonstration involved inferring paths between distributions sampled along the perimeter of circles. This setup was designed to visually highlight the impact of the two inductive biases:
- Without the dense traversal bias: Methods (labeled A and C in the talk's visualization) showed inferred paths traversing the low-density middle of the circle, which were deemed "infeasible" given the observed data lay only on the perimeter.
- Without metric learning (using Euclidean geometry): Methods (top row) produced generally straight-line paths, as these are the most efficient in a Euclidean space.
- With metric learning: The proposed method (bottom row) yielded more curved geodesics that better respected the manifold of the circular data, demonstrating that the learned metric effectively adapted to the observed movement patterns. This confirmed that both inductive biases contribute significantly to learning feasible and meaningful trajectories.
Reinforcement Learning Application:
The primary application involved a reinforcement learning (RL) setting for cancer treatment policy. In this scenario, the policy must balance two objectives: reducing tumor size and preserving the patient's immune system. This trade-off is controlled by a hyperparameter, lambda ($\lambda$), which weights these two objectives in a composite reward function. The optimal balance for such a policy is highly patient-specific, depending on factors like comorbidities and initial immune function, making it an ideal use case for adaptive inference without retraining.
- Training Setup: The authors first trained several RL policies with fixed $\lambda$ values (specifically at $\lambda = 0, 5, \text{ and } 10$). The goal was then to train HTI surrogates to interpolate between these trained policies across the entire hyperparameter spectrum from $\lambda = 0$ to $\lambda = 10$.
- Baselines: The HTI method was compared against several baselines:
- Direct regression: A straightforward approach that attempts to directly regress policy outputs based on $\lambda$.
- Euclidean flow matching: A modern trajectory inference method that assumes Euclidean geometry.
- Other existing trajectory inference problems: More complex TI methods adapted for this setting.
- Metrics: The performance was evaluated based on:
- Average reward: The primary metric, measuring the overall effectiveness of the interpolated policy across the hyperparameter spectrum.
- Immunity penalty (P_NK): A behavioral metric demonstrating how well the surrogate policy matches the actual trade-off between tumor reduction and immune system preservation at different $\lambda$ settings.
- Headline Results:
- The table on the left (as described in the talk) showed that the proposed HTI method achieved the highest average reward across the entire hyperparameter spectrum, significantly outperforming all baselines. This indicates its superior ability to generate meaningful and effective interpolated policies.
- The plot on the right illustrated the behavioral aspects, specifically the immunity penalty incurred by policies at different $\lambda$ settings. It demonstrated a close match between the behavioral changes of the true policies (trained at fixed $\lambda$) and the surrogate policies generated by HTI. This visually confirmed that the surrogate was learning to adjust its behavior authentically as $\lambda$ was varied, respecting the underlying trade-offs.
These results strongly support the efficacy of HTI with its specific inductive biases, showcasing its capability to learn complex, conditional hyperparameter-induced dynamics and enable high-fidelity adaptive inference in practical applications.
Practical Implications
▶ Watch: Q&A: Clarifying learned metric parameters (12:00)
The development of Hyperparameter Trajectory Inference (HTI) through Conditional Lagrangian Optimal Transport (CLOT) carries substantial practical implications for various stakeholders in the machine learning ecosystem, addressing a fundamental limitation in current model development and deployment pipelines.
For practitioners and model builders, HTI offers unprecedented flexibility. Instead of having to commit to a single, fixed hyperparameter setting at training time – which often represents a difficult compromise between conflicting objectives or user preferences – they can now train a small set of models across a few key hyperparameter values. The HTI framework then interpolates between these, creating a surrogate model that allows for continuous adjustment of model behavior post-training. This significantly reduces the burden of hyperparameter tuning, enabling faster experimentation and iteration during model development. It also means that models can be designed to be intrinsically more adaptive, catering to diverse user needs or evolving environmental conditions without the need for extensive retraining cycles.
For infrastructure teams and deployers, the benefits are primarily in reduced computational overhead and increased efficiency. Retraining large neural networks for every minor adjustment to a hyperparameter is prohibitively expensive in terms of GPU time, energy consumption, and storage. HTI mitigates this by allowing dynamic adjustments at inference time, based on a pre-learned trajectory. This can translate into substantial cost savings and faster deployment cycles for personalized or context-aware AI services. It enables a "train once, adapt many times" paradigm, optimizing resource utilization and making ML systems more sustainable.
Furthermore, HTI facilitates the creation of more robust and user-centric AI systems. In applications where subjective trade-offs are paramount, such as balancing interpretability with performance, or safety with efficiency, users can directly influence the model's behavior through a continuous hyperparameter interface. This empowers end-users with a greater sense of control and allows for fine-grained customization, moving beyond one-size-fits-all solutions. For instance, in the cancer treatment RL example, a clinician could adjust the policy's emphasis on immune preservation versus tumor reduction based on an individual patient's unique medical profile, without requiring a new model to be trained.
However, it is important to acknowledge tradeoffs and limitations. While HTI reduces retraining costs, the training of the CLOT surrogate itself involves complex min-max optimization and neural network parameterization, which can be computationally intensive. The scalability of the current approach to extremely high-dimensional output spaces or very large numbers of conditional inputs remains an area for future research. The quality of the interpolated trajectories is highly dependent on the choice of inductive biases and the expressiveness of the underlying neural networks. Identifying the optimal set of initial fixed hyperparameter settings for training the base networks is also a practical consideration. Nonetheless, the framework represents a significant step towards more adaptable and resource-efficient machine learning deployments, offering a promising avenue for flexible AI systems.
Key Takeaways
- Hyperparameter Trajectory Inference (HTI) addresses the challenge of hyperparameter-induced trade-offs, allowing adaptive model behavior without costly retraining.
- The method leverages Conditional Lagrangian Optimal Transport (CLOT) to learn how neural network output distributions evolve as a continuous hyperparameter changes.
- Two critical inductive biases are encoded into the Lagrangian cost function:
- Dense traversal bias encourages paths to stay within observed, high-density regions of the data space.
- Efficient observed movement bias learns a data-driven metric, ensuring inferred paths respect the natural dynamics seen in pre-trained networks.
- A novel singular value decomposition (SVD) parameterization of the metric prevents degenerate solutions during the min-max optimization, ensuring the learned metric is meaningful.
- In a reinforcement learning application for cancer treatment, HTI significantly outperforms baselines, achieving the highest average reward and accurately matching the behavioral shifts of policies trained at fixed hyperparameter values.
- This framework has significant practical implications for practitioners, infra teams, and deployers, enabling more flexible, resource-efficient, and user-centric AI systems.
About the Speaker(s)
Harry Amad is a researcher from the University of Cambridge. His work, presented at ICLR 2026, focuses on developing novel methods for hyperparameter trajectory inference, particularly using advanced optimal transport techniques to enable adaptive inference in machine learning models.
Mihaela van der Schaar is a distinguished Professor at the University of Cambridge, where she supervises Harry Amad's research. Her extensive work in machine learning and artificial intelligence spans various fields, including causal inference, machine learning for healthcare, and dynamic prediction, providing foundational expertise for complex problems like hyperparameter trajectory inference.
Reviews
→ Top-rated talks at International Conference on Learning Representations 2026
All talks from International Conference on Learning Representations 2026