Why should learning rates and regularisation penalties be sampled on a logarithmic scale rather than a linear scale?

Quick Overview

Asks why hyperparameters such as the learning rate and the regularization strength are searched on a logarithmic scale during tuning. Tests understanding of how a hyperparameter's effect scales with its value, how random search spreads trials over a range, and when a linear scale is the better choice.

Why should learning rates and regularisation penalties be sampled on a logarithmic scale rather than a linear scale?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why should learning rates and regularisation penalties be sampled on a logarithmic scale rather than a linear scale? ```hint Count where the samples land Work out what fraction of uniform samples on the interval from 1e-5 to 1e-1 fall above 1e-2, then ask whether a step from 0.001 to 0.01 changes the model less than a step from 0.01 to 0.1. ``` ### What a Strong Answer Covers - Explains how these hyperparameters affect training as their value changes across the range. - Compares how linear and log sampling spread trials across a range of several orders of magnitude. - Describes how to sample log-uniformly in practice, by hand or with library support. - Says when a log scale is the wrong choice, including how to handle values close to 1. ### Follow-up Questions - How would you lay out a grid search (not a random search) over the learning rate using the same idea? - Does the log transform still matter if you use a Bayesian optimizer such as TPE or a Gaussian process? - How would you sample momentum or Adam's `beta2`, and why does sampling them directly go wrong? - After a coarse log-scale search finds a promising region, how would you narrow the search?

Overview: Asks why hyperparameters such as the learning rate and the regularization strength are searched on a logarithmic scale during tuning. Tests understanding of how a hyperparameter's effect scales with its value, how random search spreads trials over a range, and when a linear scale is the better choice.

Nov 24, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Why should learning rates and regularisation penalties be sampled on a logarithmic scale rather than a linear scale?

What a Strong Answer Covers Guidance

  • Explains how these hyperparameters affect training as their value changes across the range.
  • Compares how linear and log sampling spread trials across a range of several orders of magnitude.
  • Describes how to sample log-uniformly in practice, by hand or with library support.
  • Says when a log scale is the wrong choice, including how to handle values close to 1.

Follow-up Questions Guidance

  • How would you lay out a grid search (not a random search) over the learning rate using the same idea?
  • Does the log transform still matter if you use a Bayesian optimizer such as TPE or a Gaussian process?
  • How would you sample momentum or Adam's beta2 , and why does sampling them directly go wrong?
  • After a coarse log-scale search finds a promising region, how would you narrow the search?