The DEQN models of Chapters Chapter 2--Chapter 3 involve several hyperparameters (network depth, width, activation functions, learning rate) and multi-component loss functions whose relative scales can differ by orders of magnitude. To fix ideas, even a modest sweep over depth and width on the companion NAS regression task already spans configurations, and the production sweep below (six axes) reaches ; on that task (illustrative numbers), the best mean absolute error () is attained at a network, while overfits by almost an order of magnitude (). Hand-tuning at this scale is infeasible. This chapter addresses both challenges. We first survey hyperparameter-search methods (random search, Bayesian optimization, Hyperband, and BOHB, which combines TPE with Hyperband, Bergstra & Bengio, 2012Snoek et al., 2012Jamieson & Talwalkar, 2016Li et al., 2018Falkner et al., 2018Garnett, 2023, and then develop a classroom-friendly version of the ReLoBRaLo algorithm Bischof & Kraus, 2025 for adaptive multi-objective loss balancing. In the notebooks, this is implemented as a deterministic convex blend of step-wise and baseline loss comparisons, which keeps the code compact while preserving the balancing intuition.
A terminology note before we begin: in this chapter we use “NAS” loosely to cover both hyperparameter optimization (HPO; choosing widths, depths, activations, learning rates from a fixed parameterization) and “true” NAS in the sense of Elsken et al. (2019), where the network’s wiring graph itself is searched (e.g. regularized evolution Real et al., 2019). The two literatures share methodology (Random / Bayesian / Hyperband-style search) but differ in scope. All four methods discussed here are HPO; for graph-level NAS, the textbook reference is Hutter et al. (2019). Elsken et al. (2019) provide the canonical survey; the local copy in readings/ is recommended as the first deep-dive reference.
4.0.0.1Hands-on notebooks for this chapter.¶
Two NAS walkthroughs are provided alongside the ReLoBRaLo notebook, plus the IRBC exercise notebook that doubles as the entry point to this chapter. All four live in the NAS chapter’s code folder:
02_NAS_Random_Search_10D.ipynb: a library-free Random Search loop (model in TF/Keras) on a 10-dimensional analytical regression task, used to illustrate the projection argument of Bergstra & Bengio (2012) in its cleanest form.03_NAS_RandomSearch_Hyperband.ipynb: from-scratch Random Search and Successive Halving (Hyperband’s inner loop) on a two-dimensional Genz Gaussian, written in 25 lines of plain Python so the algorithms in this chapter are visible without library abstraction; after the first run, the cached records innas_results/short-circuit re-runs for instant re-inspection.04_Loss_Normalization.ipynb: the classroom ReLoBRaLo implementation, matched to the notation below.05_IRBC_Exercise.ipynb: the IRBC exercise notebook (closed-form steady-state comparative statics and inverse-loss weighting on a multi-component IRBC residual); it is the notebook referenced by Chapter Chapter 3 Exercise 3.6--Exercise 3.7, and it reuses the loss-balancing ideas of this chapter on a deliberately small, library-free example.
4.1The Hyperparameter Space¶
The performance of a neural network depends sensitively on its architecture (number of layers, neurons per layer, activation functions) and training configuration (learning rate, batch size, optimizer, regularization). Choosing these hyperparameters by hand is tedious and often suboptimal.
To appreciate the scale of the search problem, consider as a stylized example a typical DEQN setup where we must select: the number of hidden layers (), neurons per layer (), activation function (ReLU, Swish, Tanh), learning rate (), batch size (), and weight decay (). The total number of configurations is . If each configuration requires 30 minutes to train, exhaustive evaluation would take 64 days on a single GPU. With additional choices (optimizer type, learning rate schedule, dropout rate), the space easily exceeds 104 configurations. (The slide deck uses a slightly larger illustrative space, configurations, for the same point.)
4.2Grid Search¶
The simplest approach is to define a grid of values for each hyperparameter and evaluate all combinations. For hyperparameters, each taking values, the cost is , the same exponential scaling that plagues grid-based PDE solvers. Grid search is deterministic and easy to implement, but it has a fundamental flaw: it allocates the same density of evaluations to all hyperparameters, including those to which performance is insensitive. If only 2 out of 6 hyperparameters matter (which is typical in practice), the remaining 4 dimensions contribute only wasted computation.
4.3Random Search¶
Bergstra & Bengio (2012) demonstrated that random sampling of hyperparameter configurations often outperforms grid search, particularly when only a few hyperparameters are important. The key insight is a projection argument: when a random configuration is projected onto any single hyperparameter axis, the marginal distribution covers the entire range densely, regardless of how many other hyperparameters exist. In contrast, a grid with the same total number of evaluations provides only distinct values per axis, which can be very coarse in high dimensions.
For example, with a budget of evaluations in dimensions, a grid provides only values per hyperparameter, while random search provides 60 distinct values per hyperparameter (in the marginal sense). This makes random search much more likely to find good values for the hyperparameters that matter most. Figure Figure 4.1 shows the same projection argument in two dimensions.
Figure 4.1:Why random search beats grid search when only one hyperparameter matters. Both designs spend the same budget of nine evaluations on a two-dimensional space in which only the horizontal axis affects performance; the vertical axis is a “nuisance” hyperparameter. Project each design onto that important axis (the strip below each panel): the grid stacks its nine points into only three columns, so it probes just three distinct values of the parameter that matters, whereas the random design lands on nine distinct values. Equivalently, with a budget of points in dimensions a grid resolves only values per axis no matter which axes matter, while a random design resolves values per axis in the marginal sense. Since in practice only two or three of many hyperparameters typically drive performance Bergstra & Bengio, 2012, the random design extracts far more information about the dimensions that count for the same compute.
4.4Bayesian Optimization¶
Bayesian optimization (BO) treats the validation loss as an expensive black-box function of the hyperparameter vector , and uses a probabilistic surrogate, fitted to the configurations evaluated so far, to decide where to evaluate next Snoek et al., 2012. The standard surrogate is a Gaussian process (GP). The next subsection gives a self-contained primer in the notation that Chapter Chapter 9 will reuse, so the reader can follow the BO logic without flipping ahead; the full kernel zoo, marginal-likelihood hyperparameter learning, and Bayesian active learning are developed there. Throughout this section the GP input is the hyperparameter vector itself, , and the kernel length-scale symbol that appears in (4.2) below is the standard GP notation of Chapter Chapter 9; it is distinct from the validation-loss symbol and the two are always clear from context.
4.4.1A Brief Introduction to Gaussian Processes¶
A Gaussian process is a probability distribution over real-valued functions, equivalently, a random function whose values at any finite collection of inputs are jointly Gaussian Rasmussen & Williams, 2005. It is fully specified by a mean function and a covariance (kernel) function that says how correlated the function’s values at two inputs are:
This means that, for any finite test set , the vector is distributed as with kernel matrix . For concreteness, we use the squared-exponential (RBF) kernel throughout this section:
where is the kernel length scale (the distance in input space over which two function values remain correlated) and is the signal variance (the typical squared amplitude of the function). Both are kernel hyperparameters that one would normally fit by marginal-likelihood maximization; here we treat them as fixed at sensible values, since BO calls the GP once per outer iteration and modest mis-tuning only changes the candidate ranking marginally.
4.4.1.1Posterior conditioning, in two formulas.¶
Given training configurations with possibly noisy outputs and , write . Three matrices and one vector enter the posterior: the kernel matrix with ; its noise-augmented version ; the prior-mean vector whose -th entry is ; and the cross-covariance whose -th entry is , where is any query point. Conditioning the joint Gaussian on the observations yields a Gaussian posterior over the latent value , with closed-form mean and variance:
These two equations carry all of the GP intuition we will use below. In the noiseless limit , the posterior mean passes exactly through every observation, so the GP is an interpolator, and the posterior variance collapses to zero at observation points and grows in the gaps between them. The pair therefore traces an honest error bar: tight where the data are dense and loose where they are sparse. Chapter Chapter 9 derives (4.3)--(4.4) step by step, works a hand-traceable 1D example, and explains the marginal-likelihood Occam’s razor that selects from data; for the BO logic that follows, (4.3)--(4.4) are sufficient.
4.4.2Expected Improvement¶
We now plug the GP posterior into a decision rule for choosing the next configuration to evaluate. Specialize the GP input to the hyperparameter vector, , and treat each observation as the validation loss at the -th evaluated configuration. At any untried the GP returns a posterior mean and posterior standard deviation , where we drop the subscript when is understood as the query point. We score each candidate by how much, in expectation under the GP, its loss would beat the best loss seen so far, :
Reading this as “the GP believes the loss at is roughly plus a Gaussian fluctuation of size , and we credit only the improvement, not the deterioration,” gives the intuition. Under the GP posterior the expectation evaluates in closed form:
where and are the standard normal CDF and PDF, respectively Garnett, 2023. The first term rewards exploitation (the predicted mean lies below the current best ); the second rewards exploration ( is large where no data constrain the loss). EI peaks where the two conspire, which is exactly the place a sensible researcher would probe by hand. Figure Figure 4.2 illustrates one iteration of this rule in one dimension, and the algorithmic box below collects it into a four-step recipe. Bayesian optimization is particularly effective when the number of hyperparameters is moderate () and each evaluation is expensive, which describes many economic applications well.
Figure 4.2:Bayesian optimization in one dimension; the same setup is reproduced in the companion notebook. Top: after five evaluations (black dots), the GP posterior mean (solid blue) interpolates the observations and the credible band (shaded) pinches to zero at each observation and widens in the gaps; this is the picture predicted by (4.3)--(4.4). The dashed red curve is the (in practice unknown) true loss; the horizontal grey line marks , the best observation so far (near ). Bottom: Expected Improvement is essentially zero at the existing data, where there is nothing to learn, rises in the unexplored gaps, and peaks at , which combines a predicted mean already below with substantial residual uncertainty. The maximizer (red arrow) is selected as the next configuration to evaluate; EI thus balances exploitation against exploration automatically, and here it steers the search at the neighborhood of the hidden true minimum.
4.5Hyperband and Successive Halving¶
Li et al. (2018) proposed an entirely different approach based on adaptive resource allocation, building on the Successive Halving Algorithm popularized by Jamieson & Talwalkar (2016). The key observation is that poor configurations can often be identified early in training, without running them to completion.
The Successive Halving Algorithm (SHA) turns this observation into a concrete schedule. Start with configurations, give each a small initial budget of epochs, train, then keep only the top fraction of survivors and multiply the per-candidate budget by for the next round. Two facts about this schedule do most of the explanatory work below. First, the per-round compute is approximately constant: round runs survivors for epochs each, and the rule “ fewer candidates at the budget” keeps the product fixed. Second, the cumulative cost across the cascade therefore scales with the number of rounds rather than with the worst-case “train every candidate to the final budget” benchmark. Both points are made concrete in the worked example that follows the pseudocode.
To see the per-round invariant on a concrete schedule, take , , and . Round 0 trains all 81 candidates for epochs and keeps the top 27; round 1 trains those 27 for epochs and keeps the top 9; round 2 trains the 9 for and keeps 3; round 3 trains those 3 for and selects the winner. At each round the round-level compute is (the shrink in survivors is exactly offset by the growth in budget), so the four rounds together cost , equivalent to four full -epoch training runs rather than the 81 that naive parallel evaluation would require. Figure Figure 4.3 visualizes this resource-allocation cascade.
Figure 4.3:Successive Halving with 81 initial candidates and reduction factor . Each round trains the surviving configurations for times the previous budget, then discards the bottom fraction. Total compute per bracket is only rather than for training every candidate to completion. Hyperband runs several such brackets in parallel with different trade-offs to hedge against unknown early-vs-late performance correlations Li et al., 2018.
Hyperband extends SHA by running not one but several SHA cascades, each starting from a different trade-off between the number of candidates and the per-candidate initial budget; the intuition is hedging. A bracket that starts with many cheap candidates (large ) is well suited to problems where the eventual winner reveals itself early, while a bracket that starts with fewer well-trained candidates (small ) is better when ranks shuffle late in training, and Hyperband simply runs both kinds. The cascade shown in Figure Figure 4.3, , is the most exploratory of the brackets (); Table Table 4.1 unrolls the full canonical schedule for maximum resource and reduction factor .
Table 4.1:Hyperband bracket schedule for , , following Table 1 of Li et al. (2018). Each bracket is a standalone SHA cascade with initial candidates and per-candidate initial budget epochs; the survivors are then halved according to the rule of Algorithm Figure 4.3. Large probes many cheap candidates and halves them aggressively (exploration); small trains a handful of candidates to the full -epoch budget from the start (exploitation). Per-bracket totals are reported in units of and are not monotone in because is integer-rounded. Hyperband runs all five brackets and returns the best surviving configuration across them.
| Bracket | Unrolled schedule (candidates @ epochs) | Total cost | |
|---|---|---|---|
| 4 | 81@@@@@81 | ||
| 3 | 27@@@@81 | ||
| 2 | 9@@@81 | ||
| 1 | 6@@81 | ||
| 0 | 5@81 |
The companion notebook 03_NAS_RandomSearch_Hyperband.ipynb implements the SHA inner loop only; the full Hyperband schedule is a straightforward outer loop that iterates this inner loop across the five starting points in Table Table 4.1.
4.6Method Comparison¶
Table Table 4.2 contrasts the four hyperparameter-search strategies covered above on three dimensions that matter in practice: the cost of objective evaluations, the degree to which the evaluations can be parallelised, and the sample efficiency (how much of the budget actually improves the best-so-far value).
Table 4.2:Comparison of hyperparameter-search methods. Grid search scales exponentially in the number of hyperparameters ; random search and Hyperband scale linearly in the chosen evaluation/resource budget and parallelise well; Bayesian optimization has the highest per-evaluation information gain but adds surrogate-fitting overhead and is partly sequential.
| Method | Cost | Parallelizable | Sample efficiency | Best for |
|---|---|---|---|---|
| Grid search | evals | fully | low | |
| Random search | evals | fully | moderate | general use |
| Bayesian opt. | evals + GP fit | limited | high | expensive evals |
| Hyperband | resource units | within brackets | moderate | cheap evals |
For the DEQN and PINN applications in this course, random search or Bayesian optimization are typically the most practical choices. Hyperband is attractive when training is relatively cheap and many configurations need to be screened quickly.
4.7Implementing the Search in Practice¶
To keep the algorithms transparent, the companion notebook 03_NAS_RandomSearch_Hyperband.ipynb implements both Random Search (§ Section 4.3) and the Successive Halving Algorithm (§ Section 4.5) directly in plain Python, with no hyperparameter-search library involved. The search space is encoded as an ordinary dict (number of hidden layers , units per layer , activation function , and learning rate log-uniform in ), and a single sample_config(rng) function draws candidates from it. Random Search is then a 30-iteration loop that builds, trains, and scores each candidate; Successive Halving is the same loop wrapped in a halving schedule ( candidates at epochs 9 at 24 3 at 72 winner, with ). Both implementations fit on a single slide and reproduce the qualitative finding of Li et al. (2018) that Successive Halving reaches comparable accuracy to Random Search at substantially lower compute: in the notebook run, the same MAE is recovered with less compute (648 SHA config-epochs vs. 1500 for 30 Random Search trials at 50 epochs each) at a comparable number of architectures (27 vs. 30). The precise multipliers are notebook-specific; the magnitudes reported in Li et al. vary by benchmark.
4.7.0.1Production tooling (footnote).¶
Real projects rarely hand-roll the search loop. Several established libraries wrap (and parallelise) the same algorithms behind uniform APIs: KerasTuner[1] (Random, Bayesian, Hyperband; tight Keras integration), Optuna[2] (TPE, CMA-ES, Hyperband, NSGA-II; framework-agnostic), Ray Tune[3] (all of the above plus ASHA and population-based training, distributed by design), Hyperopt[4] (the original TPE reference), Ax / BoTorch[5] (PyTorch-native multi-objective Bayesian optimization), NNI[6] (Microsoft; full graph-NAS support), and AutoKeras[7] (full AutoML pipeline). We deliberately teach the algorithms rather than the wrappers because library APIs change every few years; the underlying search procedures (Random, SHA / Hyperband, GP+EI, TPE) do not. The notebook additionally compares the best NAS-found architecture to a hand-tuned baseline, which makes the pedagogical value of automated search concrete.
4.8Multi-Component Losses: The Scale Problem¶
In many applications, including DEQNs and PINNs, the loss function is a weighted sum of several components:
where is the -th loss component (one individual residual, e.g. a per-country Euler equation, a market-clearing identity, a complementarity-condition residual in an OLG model, or a boundary or initial-condition penalty in a PINN), is its scalar weight, and is the total number of components. In the DEQN setting of this script, each is typically the mean-squared residual of a particular equilibrium equation evaluated on the training mini-batch, so at a solution and is jointly minimized over the network parameters.
From a multi-objective-optimization standpoint, the vector is the object of interest: the equilibrium is defined by all residuals being zero, and any nonzero weight vector picks a particular scalarization of the same underlying Pareto problem. When the components are on comparable scales, uniform weights work; when they are not, the scalarized problem is dominated by a single component and the optimizer effectively ignores the others. Adaptive weighting methods (discussed below) can be seen as online strategies for traversing the Pareto frontier rather than committing to a single scalarization up front. If the individual components differ in magnitude by several orders of magnitude, training can become unstable or converge slowly. Consider a concrete example from the IRBC model with countries: at initialization, the Euler equation residual for country 1 might be , while for country 10 it might be , a ratio of 103. With uniform weights, the gradient is dominated by , and the optimizer essentially ignores until is nearly converged. This sequential convergence pattern can be 5-- slower than balanced convergence.
The fundamental difficulty is that the gradient of the total loss is dominated by the components with the largest . Even if all components are equally important for the economic solution, the optimizer cannot “see” the small components through the noise of the large ones.
4.8.1Inverse-Loss Weighting¶
A simple first approach is to set , where is an exponential moving average of . This normalizes each component to have approximately unit magnitude. While straightforward, this method can be unstable when loss components change rapidly.
4.8.2SoftAdapt¶
Heydari et al. (2019) proposed a more principled approach based on the rates of change of the loss components. Define .[8] The SoftAdapt weights are:
where is a temperature parameter. Components that are decreasing slowly (or increasing) receive higher weight, directing the optimizer’s attention to the lagging components. In practice, SoftAdapt uses smoothed rates (averaged over a window of recent iterations) for stability. SoftAdapt is discussed here for context; the companion notebook 04_Loss_Normalization.ipynb implements equal-, inverse-loss-, and ReLoBRaLo-weighting, and Exercise 4.6 asks you to add a GradNorm balancer to the same testbed.
4.8.3ReLoBRaLo: Adaptive Loss Balancing¶
The Relative Loss Balancing with Random Lookback (ReLoBRaLo) algorithm of Bischof & Kraus (2025) motivates the deterministic classroom implementation used here. In the notebooks, we use a convex blend of the same ingredients, which is easier to follow while preserving the balancing logic.
4.8.3.1High-level intuition.¶
ReLoBRaLo combines two complementary signals into a single weight per loss component. The step-wise signal asks “which component lagged the most since the last iteration?” and rewards it with more weight; this is fast and reactive but noisy. The baseline signal asks “which component lagged the most since the start of training?” and is slow but globally aware. The two are then averaged with a one-step smoother to dampen oscillations. Concretely the algorithm stacks three pieces (Components 1--3 below); only the temperature usually needs tuning, while the smoothing parameters work at their textbook defaults.
4.8.3.2Component 1: Relative balancing.¶
At iteration , compute relative losses with respect to the previous iteration:
This upweights components whose relative loss increased (lagging behind) and downweights those that improved. The small prevents division by zero; in code the softmax is evaluated after subtracting the largest ratio for numerical stability.
4.8.3.3Component 2: Baseline comparison.¶
To maintain a global perspective, compare the current losses to their initial values at :
This baseline comparison provides robustness to non-monotone loss trajectories and prevents the algorithm from losing sight of overall training progress.
4.8.3.4Component 3: Smoothed combination.¶
The final weight blends historical weights, baseline weights, and step-wise weights:
where is a smoothing parameter controlling how much to trust historical weights versus the current step-wise signal, and is a baseline-mix coefficient controlling the relative importance of the previous weights versus the initial-loss comparison. Equivalently, is a convex combination of with mixture weights , which sum to 1. (In the original ReLoBRaLo formulation, governs a stochastic Bernoulli lookback mechanism; here and in the notebooks we use a deterministic convex blend, which is simpler and easier to reproduce.) Typical values are collected in Table Table 4.3.
Table 4.3:ReLoBRaLo hyperparameters used in the companion notebook. Default ranges follow Bischof & Kraus (2025). is the only one that usually needs tuning; and at their defaults give slow, stable adaptation that works across a wide range of multi-component problems.
| Hyperparameter | Role | Typical value |
|---|---|---|
| (temperature) | Controls weight concentration (softmax sharpness) | 0.5--2.0 |
| (smoothing) | History vs. new information | 0.99--0.999 |
| (mixing coefficient) | Initial-loss baseline vs. historical weight | 0.99--0.999 |
4.8.4GradNorm¶
An alternative approach proposed by Chen et al. (2018) directly normalizes the gradient magnitudes rather than the loss values. GradNorm adjusts the weights so that is approximately equal across all components, using the ratio of each component’s training rate to the average training rate as a signal. While more computationally expensive than ReLoBRaLo (it requires computing per-component gradient norms), GradNorm can be effective when gradient magnitudes are a better proxy for training difficulty than loss magnitudes.
Figure 4.4:Stylized sketch of the multi-component loss-scale problem, drawn to mimic what one typically sees early in a two-country IRBC training run; this is not measured data. The three curves are hand-picked exponentials (with ; ; ), chosen only to make the mechanism visible: at initialization the residuals differ by about two orders of magnitude, and under uniform weighting the optimizer drives the largest component (blue) down fastest because it dominates the summed gradient, while the smaller-scale but equally important country-2 Euler residual (red) decays roughly five times more slowly and is left all but flat next to the others. Adaptive loss balancing such as ReLoBRaLo re-weights the components so that all three decrease at comparable rates. For the actual recorded trajectories on this problem, see the companion notebook 04_Loss_Normalization.ipynb.
Figure Figure 4.4 illustrates the typical behavior: without adaptive reweighting, the optimizer focuses almost exclusively on (the largest component), allowing to stagnate; with adaptive loss balancing (e.g., ReLoBRaLo, GradNorm), all components converge at comparable rates. As a concrete reference, an unweighted run of the two-country IRBC training loop in the companion notebook typically prints something like the trace below (numbers indicative, seed-dependent):
epoch 0: ell_1=49.700 ell_2=0.510 ell_arc=4.820
epoch 200: ell_1=0.0123 ell_2=0.494 ell_arc=0.041
epoch 500: ell_1=8.2e-4 ell_2=0.470 ell_arc=3.5e-3Program 1:Indicative residual log from an unweighted two-country IRBC run; the largest component falls quickly, the smaller component stalls.
The pathology is immediate: drops four orders of magnitude while barely moves. Replacing the equal weights with ReLoBRaLo (Section 4.8.3) typically produces a trace in which all three components decay together; see the companion notebook for the actual ReLoBRaLo trace on the same seed. Reported convergence-speed improvements vary across schemes and benchmarks; multi-physics PINN benchmarks have shown substantial gains with ReLoBRaLo Bischof & Kraus, 2025, while gains on DEQN-style Euler-equation losses tend to be smaller and problem-specific (the multi-component scale gap there is usually one to two orders of magnitude rather than the four to six common in PINN systems). A complementary line uses Neural-Tangent-Kernel diagnostics to choose the weights Wang et al., 2022, and an older multi-task baseline weights losses by their predictive uncertainty Kendall et al., 2018.
4.8.5Summary of Balancing Methods¶
Table Table 4.4 compares the four balancing strategies on the two dimensions that reliably matter in practice: runtime overhead per step and the number of hyperparameters the user must set.
Table 4.4:Summary of adaptive loss-balancing methods. Overhead is a per-step wall-clock cost (additional softmaxes for SoftAdapt/ReLoBRaLo; per-component gradient norms for GradNorm). Quantitative speedups depend strongly on the problem; see the companion notebook 04_Loss_Normalization.ipynb for problem-specific measurements.
| Method | Overhead | Hyperparameters |
|---|---|---|
| Uniform weights | none | 0 |
| Inverse-loss | negligible | 1 (smoothing) |
| Uncertainty weighting Kendall et al., 2018 | negligible | (one log-variance per loss) |
| SoftAdapt Heydari et al., 2019 | negligible | 2 (, window) |
| ReLoBRaLo Bischof & Kraus, 2025 | negligible | 3 (, , ) |
| GradNorm Chen et al., 2018 | moderate | 1 () |
| NTK-based Wang et al., 2022 | moderate--high | 0 (data-driven) |
Quantitative speedup claims depend on the specific problem (PDE vs. Euler residual, number of components, imbalance ratio), the baseline (uniform vs. manually tuned), and the success criterion. The companion notebook 04_Loss_Normalization.ipynb runs the four methods on a shared multi-scale regression task so that the reader can generate problem-specific numbers rather than rely on headline speedup factors from unrelated benchmarks.
4.9Further Reading¶
Bergstra & Bengio (2012), the original case for random over grid search.
Snoek et al. (2012), foundational reference for Bayesian optimization in ML.
Li et al. (2018), Hyperband and successive halving.
Bischof & Kraus (2025), ReLoBRaLo loss-balancing scheme used throughout the PINN chapter.
4.10Exercises¶
Worked solutions and guidance for these exercises appear in Appendix Appendix F.
The raw is dimensional, so a component at scale 103 produces fluctuations that swamp one at scale 10-3; in practice one rescales before the softmax, e.g. , so the rule reacts to relative progress, the same idea that underlies ReLoBRaLo’s loss ratios below.
- Bergstra, J., & Bengio, Y. (2012). Random Search for Hyper-Parameter Optimization. Journal of Machine Learning Research, 13, 281–305.
- Snoek, J., Larochelle, H., & Adams, R. P. (2012). Practical Bayesian Optimization of Machine Learning Algorithms. Advances in Neural Information Processing Systems (NeurIPS 25).
- Jamieson, K., & Talwalkar, A. (2016). Non-Stochastic Best Arm Identification and Hyperparameter Optimization. Proceedings of the 19th International Conference on Artificial Intelligence and Statistics (AISTATS).
- Li, L., Jamieson, K., DeSalvo, G., Rostamizadeh, A., & Talwalkar, A. (2018). Hyperband: A Novel Bandit-Based Approach to Hyperparameter Optimization. Journal of Machine Learning Research, 18(185), 1–52.
- Falkner, S., Klein, A., & Hutter, F. (2018). BOHB: Robust and Efficient Hyperparameter Optimization at Scale. International Conference on Machine Learning (ICML).
- Garnett, R. (2023). Bayesian optimization. Cambridge University Press.
- Bischof, R., & Kraus, M. A. (2025). Multi-Objective Loss Balancing for Physics-Informed Deep Learning. Computer Methods in Applied Mechanics and Engineering, 439, 117914. 10.1016/j.cma.2025.117914
- Elsken, T., Metzen, J. H., & Hutter, F. (2019). Neural architecture search: A survey. Journal of Machine Learning Research, 20(55), 1–21.
- Real, E., Aggarwal, A., Huang, Y., & Le, Q. V. (2019). Regularized Evolution for Image Classifier Architecture Search. AAAI Conference on Artificial Intelligence.
- Hutter, F., Kotthoff, L., & Vanschoren, J. (Eds.). (2019). Automated Machine Learning: Methods, Systems, Challenges. Springer.
- Rasmussen, C. E., & Williams, C. K. I. (2005). Gaussian Processes for Machine Learning (Adaptive Computation and Machine Learning). The MIT Press.
- Heydari, A. A., Thompson, C. A., & Mehmood, A. (2019). SoftAdapt: Techniques for Adaptive Loss Weighting of Neural Networks with Multi-Part Loss Functions. arXiv Preprint arXiv:1912.12355.
- Chen, Z., Badrinarayanan, V., Lee, C.-Y., & Rabinovich, A. (2018). GradNorm: Gradient Normalization for Adaptive Loss Balancing in Deep Multitask Networks. Proceedings of the 35th International Conference on Machine Learning (ICML), 794–803.
- Wang, S., Yu, X., & Perdikaris, P. (2022). When and why PINNs fail to train: A neural tangent kernel perspective. Journal of Computational Physics, 449, 110768.
- Kendall, A., Gal, Y., & Cipolla, R. (2018). Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. IEEE Conference on Computer Vision and Pattern Recognition (CVPR).