liveBook · Manning

Ard_num_dims

As explained in Bayesian Optimization in Action

ard_num_dims is a GPyTorch covariance-function parameter specifying the number of input dimensions for which separate kernel length scales are maintained.

ard_num_dims configures a GPyTorch kernel to maintain one length scale for each specified input dimension. Setting it to the objective’s dimensionality enables automatic relevance determination (ARD): optimization can reveal which dimensions vary more strongly in the modeled function. section 3.4.3

Use the parameter to:

  • Set ard_num_dims equal to the number of objective dimensions when initializing a covariance kernel. section 3.4.3
  • Interpret optimized scales cautiously: a large length scale indicates lower variability and generally lower modeled relevance, while a small scale indicates greater variability. section 3.4.3
  • Compare a shared-length-scale model with an ARD model by training both and inspecting their learned parameters. section 3.5

Two-dimensional objective

For a two-dimensional Ackley function, use gpytorch.kernels.RBFKernel(ard_num_dims=2). After gradient-based training, two learned scales such as tensor([[0.7175, 0.4117]]) indicate different variation across the dimensions. section 3.4.3

How Bayesian Optimization in Action covers it

How deep it goes
Defines the parameter, explains relevance through learned scales, and demonstrates training, but defers broader kernel theory.
Examples
Uses Ackley and SVM accuracy surfaces, plus four-dimensional airplane-design optimization, to compare dimension-specific behavior.
What it assumes
Assumes basic Gaussian-process, kernel, and gradient-descent familiarity while demonstrating the configuration from concrete objectives.
What you can do after
Apply it via GPyTorch by matching ard_num_dims to input dimensionality and inspecting trained length scales.
How it connects
Connects Gaussian processes, covariance functions, RBF kernels, length scales, automatic relevance determination, and gradient descent.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Bayesian Optimization in Action. The section links point to the parts of the book it draws on.