Machine Learning — Contents Appendix B

Appendix BList of Symbols, Terminology Correspondence, and Key Equations

This book uses many symbols over its 28 chapters. Each symbol is defined where it first appears, but if you start reading from a middle chapter, or want to compare equations from different chapters, hunting for the definitions is a nuisance. This appendix is a quick-reference table for exactly that purpose.

Section B.1 is the list of symbols, organized by field in tables, with one final table collecting the symbols whose meaning changes from chapter to chapter. It is unavoidable that the same letter represents different quantities in different chapters (the number of letters is limited, and each field has its own conventions). If an equation does not seem to make sense, look at this table first. Section B.2 is a table comparing the notation with that of C. M. Bishop’s Pattern Recognition and Machine Learning (PRML), for readers who read it alongside this book. Section B.3 is a table of Japanese and English terms, Section B.4 is the list of the probability distributions treated in Chapter 3 together with their conjugate priors, and Section B.5 is a list of the key equations of each chapter.

The “first appearance” in the tables is a link to the first section (including sections of the detailed route) where the symbol or term is defined or introduced (“8.1” means Chapter 8, Section 8.1). (If the same symbol is used with a different meaning in a later chapter, see the table in Section B.1.12.) The equations in Section B.5 are copied from the main text of each chapter without changing the symbols, with a link to the section in place of an equation number. Check the derivations and the assumptions of the equations in the main text at the linked section.

B.1 List of Symbols

B.1.1 Notational conventions

B.1.2 Common symbols (data, models, learning)

Table B.1: Common symbols (data, models, learning)
SymbolMeaning (size, units) and section of first appearance
$\data=\{(\bm{x}_n,y_n)\}_{n=1}^{N}$Data set. $N$ is the number of data points and $n$ is the index of a data point (first appears in Section 1.4)
$\bm{x}\in\R^{D}$Input (column vector). Its components are $x_i$, and $D$ is the dimension of the input (first appears in Section 1.4)
$y$, $\bm{y}$Target value (supervisory signal). Collectively, $\bm{y}=(y_1,\dots,y_N)^{\tp}\in\R^{N}$ (first appears in Sections 1.4 ($y$) and 8.1 ($\bm{y}$))
$f(\bm{x};\bm{w})$Model (a function with parameters $\bm{w}$) (first appears in Section 1.4)
$\hat{y}$Predicted value. The parameters obtained by learning are $\hat{\bm{w}}$ (first appears in Section 1.4)
$\bm{\theta}$Parameters in general (sometimes it refers to hyperparameters; each chapter says so explicitly) (first appears in Section 4.1)
$\bm{w}$, $\bm{W}$, $b$, $\bm{b}$Weights (vector, matrix) and bias (intercept) (first appears in Section 1.1)
$\phi_j(\bm{x})$, $\bm{\phi}(\bm{x})\in\R^{M}$Basis functions and the vector that collects them. $M$ is the number of basis functions. $\bm{\phi}_n\equiv\bm{\phi}(\bm{x}_n)$ (first appears in Section 8.1)
$d$Polynomial degree ($M=d+1$ for a polynomial of degree $d$). The degree of a polynomial kernel is also $d$ (first appears in Section 6.1)
$\bm{\Phi}\in\R^{N\times M}$Design matrix. $\Phi_{nj}=\phi_j(\bm{x}_n)$ (the $n$th row is $\bm{\phi}(\bm{x}_n)^{\tp}$) (first appears in Section 6.1)
$L(\bm{w})$, $\ell_n$Loss (objective) function, and the loss of a single data point. We do not write $E(\bm{w})$ (first appears in Section 1.4)
$\lambda$Regularization coefficient. $L=\tfrac12\norm{\bm{y}-\bm{\Phi}\bm{w}}^{2}$ $+\tfrac{\lambda}{2}\norm{\bm{w}}^{2}$ (sum convention) (first appears in Section 4.7)
$\eta$Learning rate (scalar) (first appears in Section 7.2)
$\nabla L$, $\bm{H}$Gradient and Hessian matrix $\bm{H}\in\R^{M\times M}$ (first appears in Section 7.1)
$\lambda_i$, $\kappa$Eigenvalues of the Hessian matrix and others (always with a subscript or with $\max$ or $\min$), and the condition number $\kappa=\lambda_{\max}/\lambda_{\min}$ (in 8.5, the ratio of the singular values $\kappa(\bm{\Phi})=s_{\max}/s_{\min}$; $\kappa(\bm{\Phi}^{\tp}\bm{\Phi})=\kappa(\bm{\Phi})^{2}$) (first appears in Sections 7.1 ($\lambda_i$) and 7.2 ($\kappa$))
$\mathcal{B}$, $B$Minibatch (a set of data indices) and its size $B=\abs{\mathcal{B}}$ (first appears in Section 7.5)
$K$, $k$Number and index of classes (components, states). The correct answer in multiclass problems is a one-hot vector $\bm{y}\in\{0,1\}^{K}$ (first appears in Section 3.3)
$\bm{I}$, ${}^{\tp}$Identity matrix and transpose (first appears in Sections 3.6 ($\bm{I}$) and 1.6 (${}^{\tp}$))
$\argmin_{\bm{w}}L(\bm{w})$The $\bm{w}$ that minimizes $L$ (first appears in Section 1.4)
$\odot$Elementwise product (Hadamard product) (first appears in Section 7.6)

B.1.3 Probability, estimation, and information

Table B.2: Probability, estimation, and information
SymbolMeaning (size, units) and section of first appearance
$P(A)$Probability of an event $A$ (first appears in Section 2.1)
$p(x)$, $p(x,y)$, $p(x\mid y)$Probability mass function or probability density function (both written $p$), joint distribution, conditional distribution (first appears in Sections 2.1 and 2.2)
$\Ex[x]$, $\Var[x]$, $\Cov[x,y]$Expectation, variance, covariance. When the distribution is made explicit, $\Ex_{p}[\,\cdot\,]$ (first appears in Section 2.5)
$\mu$, $\sigma^{2}$, $\sigma$Mean, variance, standard deviation (in the same units as $x$; the variance is its square) (first appears in Section 2.5)
$\bm{\mu}$, $\bm{\Sigma}$Mean vector and covariance matrix $\bm{\Sigma}\in\R^{D\times D}$ (symmetric, positive semidefinite; positive definite when writing the density of the multivariate Gaussian distribution) (first appears in Section 2.5)
$\Normal(x\mid\mu,\sigma^{2})$Gaussian distribution. The second argument is the variance. The multivariate one is $\Normal(\bm{x}\mid\bm{\mu},\bm{\Sigma})$ (first appears in Section 3.5)
$x\sim p(x)$$x$ follows the distribution $p(x)$ (first appears in Section 2.5)
$p(\data\mid\bm{\theta})$Likelihood (viewed as a function of $\bm{\theta}$). The log-likelihood is $\ln p(\data\mid\bm{\theta})$ (first appears in Section 2.7)
$p(\bm{\theta})$, $p(\bm{\theta}\mid\data)$, $p(\data)$Prior distribution, posterior distribution, marginal likelihood (also called the evidence) (first appears in Section 4.3)
$\mu_{\mathrm{ML}}$, $\mu_{\mathrm{MAP}}$Maximum likelihood estimate and MAP estimate (the subscript indicates the method of estimation) (first appears in Section 4.1)
$m$, $l$Numbers of successes and failures in $N$ trials ($l=N-m$) (first appears in Sections 2.7 ($m$) and 4.1 ($l$))
$\sigma^{2}$Variance of the observation noise (common to all chapters). The inverse of PRML’s precision $\beta$ (first appears in Section 4.6)
$\sigma_w^{2}$Prior variance of the weights: $p(\bm{w})$ $=\Normal(\bm{w}\mid\bm{0},\sigma_w^{2}\bm{I})$. The correspondence with ridge regression is $\lambda=\sigma^{2}/\sigma_w^{2}$ (first appears in Section 6.6)
$\mu_N$, $\sigma_N^{2}$Mean and variance of the posterior distribution of the mean of a Gaussian distribution (the prior has $\mu_0,\ \sigma_0^{2}$) (first appears in Section 4.6)
$\bar{x}$Sample mean. $\Var[\bar{x}]=\sigma^{2}/N$ (first appears in Section 2.8)
$\ln$, $\log_2$Natural logarithm (we do not use a bare log without a base), and the logarithm to base 2 used when counting in bits (first appears in Section 5.1)
$\Phi(z)$Cumulative distribution function of the standard Gaussian distribution (in light type; distinct from the design matrix $\bm{\Phi}$) (first appears in Section 3.5)
$\Gamma(a)$, $B(a,b)$Gamma function and beta function (first appears: $\Gamma(a)$ in Section 3.8 (on the introductory route, 4.4), and $B(a,b)$ in Section 2.7 (Example 2.9, the integer case; the general definition is in 3.8))
$h(x)$Self-information $-\ln p(x)$ (nat) (first appears in Section 5.1)
$h[p]$Differential entropy of a continuous variable $-\int p(x)\ln p(x)\,\dd x$ (nat; distinct from the self-information $h(x)$) (first appears in Section 5.3)
$H[p]$, $H[p,q]$Entropy and cross-entropy (nat) (first appears in Section 5.2)
$\KL(p\,\|\,q)$KL divergence (the deviation of $q$ as seen from $p$; asymmetric) (first appears in Section 5.4)
$I[x;y]$Mutual information (first appears in Section 5.7)

B.1.4 Regression, classification, and kernels

Table B.3: Regression, classification, and kernels
SymbolMeaning (size, units) and section of first appearance
$\bm{m}_N$, $\bm{S}_N$Mean and covariance of the posterior distribution of the coefficients of Bayesian linear regression, $\Normal(\bm{w}\mid\bm{m}_N,\bm{S}_N)$ (first appears in Section 8.7)
$\bm{\phi}_*$, $v_*$Basis vector of the test input, and the variance of the predictive distribution $v_*=\sigma^{2}$ $+\bm{\phi}_*^{\tp}\bm{S}_N\bm{\phi}_*$ (first appears in Section 8.8)
$\sigma(a)$Sigmoid function $1/(1+e^{-a})$ (always written with its argument, to distinguish it from the standard deviation $\sigma$) (first appears in Section 8.1)
$a=\bm{w}^{\tp}\bm{\phi}(\bm{x})+b$Activation of logistic regression (log-odds, logit) (first appears in Section 9.3)
$\hat{y}_k$Output of the softmax (the probability of class $k$) (first appears in Section 9.5)
$k(\bm{x},\bm{x}')$Kernel function (first appears in Section 8.9)
$\bm{K}\in\R^{N\times N}$Gram matrix $K_{nm}=k(\bm{x}_n,\bm{x}_m)$ (first appears in Section 8.9)
$\bm{x}_*$, $\bm{k}_*$Test input, and $\bm{k}_*=(k(\bm{x}_1,\bm{x}_*),\dots,$ $k(\bm{x}_N,\bm{x}_*))^{\tp}$ (first appears in Sections 8.8 ($\bm{x}_*$) and 8.9 ($\bm{k}_*$))
$\bm{a}\in\R^{N}$Dual coefficients. In kernel ridge regression, $\bm{a}=(\bm{K}+\lambda\bm{I})^{-1}\bm{y}$; for the Gaussian process (Chapter 12), $\bm{a}=\bm{K}_y^{-1}(\bm{y}-m\bm{1})$ (first appears in Section 10.2)
$\ell$, $\sigma_f^{2}$Length scale of the RBF kernel (in the same units as the input) and signal variance (the square of the units of the output) (first appears in Section 10.5)
$\gamma=1/(2\ell^{2})$Coefficient of the RBF kernel in the SVM literature ($\sigma_f=1$) (first appears in Section 10.5)
$y_n\in\{-1,+1\}$Label convention used only in Chapter 11 (SVM) (other chapters use $y\in\{0,1\}$) (first appears in Section 11.1)
$\alpha_n$, $C$, $\xi_n$Dual variables of the SVM ($0\le\alpha_n\le C$), the penalty coefficient, and the slack variables (first appears in Sections 11.2 ($\alpha_n$) and 11.5 ($C$, $\xi_n$))
$\mathcal{S}$Set of indices of the support vectors (first appears in Section 11.3)
$\Lambda$, $\nu$, $\alpha_j$Lagrangian, multiplier of an equality constraint, multiplier of an inequality constraint (first appears in Section 7.7)

B.1.5 Gaussian processes and Bayesian optimization

Table B.4: Gaussian processes and Bayesian optimization
SymbolMeaning (size, units) and section of first appearance
$f\sim\GP(m,k)$Gaussian process (mean function $m$, covariance function $k$). The mean function in this book is a constant $m$ (first appears in Section 12.1)
$\bm{K}_y\equiv\bm{K}+\sigma^{2}\bm{I}$Gram matrix including the observation noise (first appears in Section 12.4)
$\mu_*$, $\sigma_*^{2}$Predictive mean and predictive variance of the latent function $f_*$ (in the same units as $y$, and its square) (first appears in Section 12.4; introduced in words in 1.5)
$\sigma_*^{2}+\sigma^{2}$Predictive variance of the observed value $y_*$ (distinguishes the band of the latent function from the band of the observed values) (first appears in Section 12.4)
$k_{**}$Abbreviation for $k(\bm{x}_*,\bm{x}_*)$ (first appears in Section 12.4)
$\bm{L}$Lower triangular matrix of the Cholesky decomposition $\bm{K}_y=\bm{L}\bm{L}^{\tp}$ (first appears in Section 10.9)
$a(\bm{x})$Acquisition function (maximization is the default in this book) (first appears in Section 13.1)
$f_{\mathrm{best}}$, $\xi$Best value so far (by default, the maximum of the observed values), and the margin that encourages exploration (default 0) (first appears in Sections 13.1 ($f_{\mathrm{best}}$) and 13.4 ($\xi$))
$\mathrm{PI}$, $\mathrm{EI}$, $\mathrm{UCB}$, $\mathrm{LCB}$Probability of improvement, expected improvement, upper confidence bound, and the lower confidence bound (for minimization) (first appears in Section 13.4; $\mathrm{UCB}$ in 1.5)
$\kappa$Coefficient of the UCB (a different quantity from the condition number of Chapter 7) (first appears in Section 1.5)
$\mathcal{X}$, $\bm{x}^{\star}$Range to be searched, and the maximizer of the objective function (first appears in Section 13.1)
$r_n$Simple regret (the difference between the true value at the recommended point and the true maximum) (first appears in Section 13.8)

B.1.6 Neural networks

Table B.5: Neural networks
SymbolMeaning (size, units) and section of first appearance
$l=1,\dots,n_{\mathrm{layer}}$, $D_l$Index of a layer and the number of layers $n_{\mathrm{layer}}$ ($L$ is used for the loss), and the number of units in the $l$th layer ($D_0=D$) (first appears in Section 14.3)
$\bm{a}^{(l)}$, $\bm{z}^{(l)}$Activation (weighted sum) and output of the $l$th layer, $\bm{z}^{(l)}=h(\bm{a}^{(l)})$, $\bm{z}^{(0)}=\bm{x}$ (first appears in Section 14.3)
$\bm{W}^{(l)}\in\R^{D_l\times D_{l-1}}$, $\bm{b}^{(l)}$Weight matrix and bias of the $l$th layer (first appears in Section 14.3)
$h(\cdot)$, $h'(\cdot)$Activation function and its derivative (sigmoid, tanh, ReLU, and so on) (first appears in Section 14.1)
$H$Number of hidden units (distinct from the entropy $H[p]$) (first appears in Section 14.1)
$\bm{\delta}^{(l)}$Error $\partial\ell/\partial\bm{a}^{(l)}$. At the output layer it is $\hat{\bm{y}}-\bm{y}$ (first appears in Section 14.6)
$\sigma_{\mathrm{init}}^{2}$(Chapter 15) Variance of the random numbers for the initial values of the weights (Xavier and He initialization; a different quantity from the prior variance of the weights $\sigma_w^{2}$) (first appears in Section 15.6)
$\bm{h}_i^{(l)}$, $\mathcal{A}(i)$(Chapter 16) Feature vector of vertex $i$ and the set of its neighbors (first appears in Section 16.5)
$\bm{m}_i$, $\bm{e}_{ij}$(Chapter 16) Message in message passing and edge feature (first appears in Sections 16.6 ($\bm{m}_i$) and 16.5 ($\bm{e}_{ij}$))

B.1.7 Latent variables, the EM algorithm, and PCA

Table B.6: Latent variables, the EM algorithm, and PCA
SymbolMeaning (size, units) and section of first appearance
$\pi_k$, $\bm{\mu}_k$, $\bm{\Sigma}_k$Mixing coefficient ($\sum_k\pi_k=1$) and the mean and covariance of component $k$ (first appears in Section 17.3)
$\bm{z}_n$, $z_{nk}$Latent variable of data point $n$ (a one-hot vector indicating which component) and its components (first appears in Section 17.3)
$\gamma_{nk}$Responsibility $p(z_{nk}=1\mid\bm{x}_n,\bm{\theta})$ (first appears in Section 17.4)
$N_k$Effective number of data points of component $k$, $\sum_n\gamma_{nk}$ (first appears in Section 17.5)
$r_{nk}$, $J$Assignment in k-means (0 or 1) and the objective function (first appears in Section 17.2)
$\bm{\Lambda}_k$Precision matrix of component $k$, $\bm{\Sigma}_k^{-1}$ (first appears in Section 17.5)
$\bm{S}$, $\bm{v}_i$, $\lambda_i$Sample covariance matrix, directions of the principal components (eigenvectors), eigenvalues (first appears in Section 18.2)
$M$, $z_{ni}$(Chapter 18) Dimension of the latent variable (the number of principal components kept, $M\le D$) and the score (first appears in Section 18.1)
$s_i$Singular value (Chapters 8 and 18) (first appears in Section 8.5)
$\bm{W}$, $\bm{C}$Loading matrix of probabilistic PCA, and the covariance of the marginal distribution $\bm{C}=\bm{W}\bm{W}^{\tp}$ $+\sigma^{2}\bm{I}$ (first appears in Section 18.7)

B.1.8 Approximate inference and sampling

Table B.7: Approximate inference and sampling
SymbolMeaning (size, units) and section of first appearance
$q(\bm{\theta})$approximate distribution (first appears in 20.2)
$\ELBO(q)$lower bound on the log marginal likelihood (evidence lower bound). In 17.7 it is $\ELBO(q,\bm{\theta})$ ($q$ is the distribution of the latent variables), and in 20.3 it is $\ELBO(q)=\Ex_q[\ln p(\data,\bm{\theta})]$ $-\Ex_q[\ln q(\bm{\theta})]$ (first appears in 17.7 (the EM form) and 20.3 (the form in $q(\bm{\theta})$))
$\bm{\theta}_{\mathrm{MAP}}$, $\bm{\Lambda}$center of the Laplace approximation, and the Hessian matrix of the negative log posterior probability there (the precision matrix of the approximate distribution; $\Lambda$ for one variable) (first appears in 20.2)
$q_j^{*}$optimal solution for the $j$th factor of the mean-field approximation (first appears in 20.5)
$\tilde{p}(x)$, $Z$unnormalized target distribution and normalization constant, $p(x)=\tilde{p}(x)/Z$ (first appears in 20.2)
$q(x'\mid x)$, $r$proposal distribution and the ratio in the Metropolis–Hastings algorithm (acceptance probability $\min(1,r)$) (first appears in 21.6)
$x^{(m)}$, $S$the $m$th sample (superscript) and the number of samples (first appears in 21.1)
$s$(Chapter 21) proposal width (first appears in 21.6)
$T(x'\mid x)$(Chapter 21) transition probability of a Markov chain (always written with its arguments) (first appears in 21.5)
$w^{(m)}$importance weight in importance sampling (first appears in 21.4)
$\rho_k$, $\tau_{\mathrm{int}}$, $S_{\mathrm{eff}}$autocorrelation, integrated autocorrelation time, and effective sample size $S/\tau_{\mathrm{int}}$ (first appears in 21.8)
$\Var[f]$, $\sqrt{\Var[f]}$(Chapter 21) variance and standard deviation of the function $f$ whose mean we want (not written $\sigma_f$, which is used for Gaussian processes) (first appears in 21.1)
$\hat{R}$convergence diagnostic from multiple chains (first appears in 21.10)
$\mathrm{pa}_k$(Chapter 19) the set of parents of $x_k$ in a directed graph; $p(\bm{x})=\prod_k p(x_k\mid\mathrm{pa}_k)$ (first appears in 19.2)
$\mathrm{do}(x)$(Chapter 19) setting $x$ to some value by an intervention from outside; $p(y\mid\mathrm{do}(x))$ is distinguished from the observational $p(y\mid x)$ (first appears in 19.9)

B.1.9 Sequences, hidden Markov models, the Kalman filter, and RNNs

Table B.8: Sequences, hidden Markov models, the Kalman filter, and RNNs
SymbolMeaning (size, units) and section of first appearance
$T$, $t$sequence length and position (time step) (first appears in 22.1)
$x_{1:T}$, $x_{\lt t}$, $x_{\le t}$the sequence, the part before position $t$, and the part up to position $t$ (first appears in 19.4 ($x_{1:T}$; on the introductory route, 22.1), 2.2 ($x_{\lt t}$), and 5.5 ($x_{\le t}$))
$z_t\in\{1,\dots,K\}$hidden state ($K$ is the number of states) (first appears in 19.4)
$\pi_i$, $\bm{A}$, $\bm{B}$initial distribution, transition matrix $A_{ij}=p(z_t=j\mid z_{t-1}=i)$ (each row sums to 1), emission probability $B_{jv}=p(x_t=v\mid z_t=j)$ (first appears in 22.2 ($\pi_i$, $\bm{A}$) and 22.3 ($\bm{B}$))
$\alpha_t(j)$, $\beta_t(j)$forward variable $p(x_{1:t},z_t=j)$ and backward variable $p(x_{t+1:T}\mid z_t=j)$ (first appears in 22.5)
$\gamma_t(j)$, $\xi_t(i,j)$smoothed state probability, and the joint probability of the states at two adjacent time steps (first appears in 22.4)
$\omega_t(j)$, $\psi_t(j)$maximum in the Viterbi algorithm, and the previous state attaining it (first appears in 22.8)
$q$, $r$, $K_t$, $P_t$process noise variance, observation noise variance, Kalman gain, and variance of the estimate (first appears in 22.9)
$\mu_{t\mid t-1}$, $P_{t\mid t-1}$mean and variance of the one-step-ahead prediction ($P_{1\mid0}=P_0$) (first appears in 22.9)
$\bm{h}_t$hidden state of an RNN (first appears in 23.2)
$\bm{W}_{hh}$, $\bm{W}_{xh}$, $\bm{W}_{hy}$weights of an RNN (hidden→hidden, input→hidden, hidden→output) (first appears in 23.2)
$\bm{o}_t$logit (the score before applying softmax) (first appears in 23.2)
$\bm{c}_t$, $\bm{f}_t$, $\bm{i}_t$, $\bm{q}_t$memory cell, forget gate, input gate, and output gate of an LSTM (much of the literature writes the output gate as $\bm{o}_t$) (first appears in 23.6)

B.1.10 Attention, the Transformer, and GPT (Chapters 24–26; sequences arranged as rows)

Table B.9: Attention, the Transformer, and GPT (Chapters 24–26; sequences arranged as rows)
SymbolMeaning (size, units) and section of first appearance
$\bm{X}\in\R^{T\times d_{\mathrm{model}}}$matrix of the sequence (the $t$th row is the vector at position $t$; linear maps are applied by multiplying from the right) (first appears at the beginning of Chapter 24)
$\bm{Q}$, $\bm{K}$, $\bm{V}$matrices of queries, keys, and values, $\bm{Q}=\bm{X}\bm{W}_Q$, etc. (first appears in 24.2)
$d_k$, $d_v$, $d_{\mathrm{model}}$, $d_{\mathrm{ff}}$dimension of keys and queries, dimension of values, dimension of the model, and the intermediate dimension of the FFN (first appears in 16.9 ($d_k$, $d_v$; on the introductory route, 24.1), at the beginning of Chapter 24 ($d_{\mathrm{model}}$), and in 25.1 ($d_{\mathrm{ff}}$))
$\bm{M}$causal mask ($M_{ij}=0\ (j\le i)$, $-\infty\ (j\gt i)$) (first appears in 24.6)
$A_{ij}$, $\bm{A}$, $\bm{Z}$attention weight (the fraction that position $i$ gathers from position $j$) and its matrix (each row sums to 1); output $\bm{Z}=\bm{A}\bm{V}$. The weights in Chapter 16, Section 16.9 and Chapter 23, Section 23.8 are also written $A_{ij}$ (first appears in 16.9 (on the introductory route, 23.8))
$j$, $\bm{Z}_j$, $\mathrm{MHA}$index of a head in multi-head attention ($j=1,\dots,n_{\mathrm{head}}$), the output of head $j$, and the function that concatenates the heads (abbreviation of multi-head attention) (first appears in 24.7)
$n_{\mathrm{head}}$, $n_{\mathrm{layer}}$, $\bm{W}_O$number of heads, number of layers (blocks), and the matrix that combines the outputs of the heads (first appears in 24.7)
$V_{\mathrm{voc}}$, $T_{\max}$vocabulary size (to be distinguished from the value matrix $\bm{V}$) and context length (first appears in 22.1 ($V_{\mathrm{voc}}$) and 24.12 ($T_{\max}$))
$\bm{W}_E$, $\bm{W}_P$, $\bm{W}_U$token embedding ($V_{\mathrm{voc}}\times d_{\mathrm{model}}$), position embedding, and output projection (first appears in 23.1 ($\bm{W}_E$), 25.2 ($\bm{W}_P$), and 25.7 ($\bm{W}_U$))
$x_t$integer ID of a token (light face). The input vector is written in bold, $\bm{x}_t$ (first appears in 23.1)
$\tau$generation temperature: $p_i=\exp(o_i/\tau)/\sum_j\exp(o_j/\tau)$ (first appears in 26.6)
$\mathrm{PPL}$perplexity $\exp(L)$ (first appears in 26.4)

B.1.11 Statistical mechanics

Table B.10: Statistical mechanics
SymbolMeaning (size, units) and section of first appearance
$k_{\mathrm B}$, $T$Boltzmann constant and temperature (K) (first appears in 5.8)
$\beta\equiv1/(k_{\mathrm B}T)$inverse temperature (first appears in 5.8)
$E$, $Z$energy and partition function $Z=\sum_x e^{-\beta E(x)}$ (first appears in 5.8)
$A=-k_{\mathrm B}T\ln Z$Helmholtz free energy (many books write $F$) (first appears in 5.8)
$S$, $H$thermodynamic entropy ($\mathrm{J\,K^{-1}}$) and Shannon entropy (nat). $S=k_{\mathrm B}H$ (first appears in 5.8)
$A[q]$variational free energy (called the trial free energy in Chapter 20) $\Ex_q[E]-TS[q]\ge A$ (first appears in 20.8)
$s_i$, $J$, $h$spin of the Ising model ($\pm1$), exchange interaction, and external-field term (first appears in 19.2)
$n_{\mathrm{nn}}$, $m$(Chapter 27) number of nearest neighbors and magnetization (first appears in 27.4)
$e_{\mathrm{at}}$(Chapter 27) per-atom energy function (first appears in 27.7)
$U$(Chapter 27) used with two meanings: the energy of the posterior distribution $U(\bm{\theta})$ $\equiv-\ln p(\data\mid\bm{\theta})$ $-\ln p(\bm{\theta})$ (27.1), and, without an argument, the mean of the energy (internal energy) $U$ (27.3) (first appears in 27.1)

B.1.12 Symbols whose meaning changes from chapter to chapter

The following table collects examples in which the same letter stands for different quantities in different chapters. In most cases the meaning is stated where the symbol first appears in the chapter (for example, in the “Notation” box). Even where it is not, many pairs are distinguished by the presence or absence of a subscript ($\lambda$ and $\lambda_i$), of an argument ($\sigma$ and $\sigma(a)$), or by whether the letter is bold ($\Phi(z)$ and $\bm{\Phi}$).

Table B.11: Symbols whose meaning changes from chapter to chapter (the chapters in which each meaning is mainly used are in parentheses)
SymbolMeaning (chapters)
$\lambda$regularization coefficient (no subscript) (Chapters 6, 8, 10, 15)
eigenvalue $\lambda_i$ (always with a subscript) (Chapters 7, 18)
rate of the Poisson distribution and the exponential distribution (Chapters 3, 20, 21)
undetermined multiplier $\lambda_k$ of maximum entropy (Chapter 27)
convergence factor $1-A_{12}-A_{21}$ of a two-state chain (Chapter 22)
X-ray wavelength (Bragg’s law; 4.10) (Chapter 4)
$\kappa$condition number (Chapters 7, 8)
coefficient of UCB (Chapters 1, 13)
peak shape $\kappa(\cdot)$ in kernel density estimation (Chapter 10)
quadratic coefficient in SMO (Chapter 11)
$\beta$inverse temperature $1/(k_{\mathrm B}T)$ (Chapters 5, 19, 20, 21, 27)
coefficients $\beta_1,\beta_2$ of momentum and Adam (Chapter 7)
backward variable $\beta_t(j)$ (Chapter 22)
$\alpha$multiplier of an inequality constraint, dual variable $\alpha_j$, $\alpha_n$ of the SVM (Chapters 7, 11)
forward variable $\alpha_t(j)$ (Chapter 22)
parameter $\alpha_k$ of the Dirichlet distribution (Chapter 3)
$\gamma$responsibility $\gamma_{nk}$ (Chapter 17)
smoothed state probability $\gamma_t(j)$ (Chapter 22)
coefficient $1/(2\ell^{2})$ of the RBF kernel (Chapters 10, 11)
half width at half maximum of the Cauchy distribution (Lorentzian) (Chapters 3, 21)
weight of the force loss (Chapter 15)
width coefficient of the Gaussian expansion of distances (Chapter 16)
$A$, $\bm{A}$Helmholtz free energy $A$ (Chapters 5, 20, 27)
transition matrix $\bm{A}$ of a hidden Markov model or Markov chain (Chapters 21, 22)
attention weights $A_{ij}$ and their matrix $\bm{A}$ (Chapters 16, 23, 24)
matrix $\bm{A}$ whose columns are the lattice vectors (16.5) (Chapter 16)
posterior parameters of the beta distribution $A=a+m$, $B=b+l$ (Chapter 4)
minibatch activations $\bm{A}^{(l)}$ (Chapter 14)
coefficient $A$ of Platt scaling (paired with $B$) (Chapters 9, 11)
$K$, $\bm{K}$Gram matrix $\bm{K}$ (Chapters 10, 12, 28)
key matrix $\bm{K}$ (Chapters 24, 25)
number of classes, components, or states $K$ (Chapters 9, 17, 22)
number of splits $K$ in cross-validation (Chapter 6)
Kalman gain $K_t$ (Chapter 22)
number of values each variable can take $K$ (Chapter 19)
$s$normalized firing temperature $(T-1300\ ^{\circ}\mathrm{C})$ $/(200\ ^{\circ}\mathrm{C})$ of data set A (Chapters 1, 6, 8, 20)
standard deviation ($s_j$ used for standardization, predictive standard deviation $s_n$, etc.) (Chapters 7, 28)
scale of Student’s t distribution (Chapters 3, 4)
strength of the Weibull distribution ($s_0$ is the scale) (Chapter 3)
singular value $s_i$ (Chapters 8, 18)
proposal width of the Metropolis–Hastings algorithm (Chapter 21)
spin $s_i$ of the Ising model (Chapters 19, 21, 27)
width of the Gaussian basis functions (12.3) (Chapter 12)
variance $s^{2}$ in LayerNorm (Chapter 25)
attention scores $s_j$, $s_{ij}$ (Chapter 24)
moving average $\bm{s}_k$ of the squared gradient in RMSProp and Adam (7.6), and $\bm{s}_k=\bm{w}_{k+1}-\bm{w}_k$ in the quasi-Newton method (7.9) (Chapter 7)
$s^{2}=\sigma_f^{2}+\sigma^{2}$ in Example 12.8 (Chapter 12)
$T$temperature (K; statistical mechanics) (Chapters 5, 21, 27)
firing temperature (°C; data set A) (Chapters 1, 6, 28)
sequence length (Chapters 22, 23, 24, 25, 26)
transition probability $T(x'\mid x)$ of a Markov chain (Chapter 21)
second-order tensor $\bm{T}$ (Chapter 16)
$U$energy of the posterior distribution $U(\bm{\theta})$ (27.1) (Chapter 27)
mean of the energy (internal energy) $U$ (27.3) (Chapter 27)
$d$polynomial degree (Chapters 6, 8, 10, 11, 28)
dimensions $d_k$, $d_{\mathrm{model}}$ of attention and the Transformer (Chapters 24, 25, 26)
mean improvement $\mu_*-f_{\mathrm{best}}-\xi$ in EI (Chapters 13, 28)
lengths such as grain size, interplanar spacing, and diameter (Chapters 2, 4, 17, 18, 27)
number of time steps spent in the same state (dwell time) (Chapter 22)
$z$, $\bm{z}$, $\bm{Z}$output of a hidden layer $\bm{z}^{(l)}$ (Chapters 14, 15)
discrete latent variable (one-hot) $\bm{z}_n$ (Chapters 17, 19)
continuous latent variable (score) $\bm{z}_n\in\R^{M}$ (Chapter 18)
hidden state $z_t$ (Chapter 22)
standardized value $z$ (the variable of the standard Gaussian distribution) (Chapters 3, 13, 28)
attention outputs $\bm{z}_i$, $\bm{Z}$ (Chapters 24, 25)
$h$activation function $h(\cdot)$ (Chapters 14, 15, 25)
external-field term of the Ising model (Chapters 19, 20, 21, 27)
self-information $h(x)$, differential entropy $h[p]$ (Chapter 5)
equality constraint $h(\bm{w})=0$ (Chapter 7)
hidden state $\bm{h}_t$ of an RNN (Chapter 23)
feature $\bm{h}_i$ of a graph vertex (Chapter 16)
$H$, $\bm{H}$entropy $H[p]$ (Chapters 5, 20, 27)
number of hidden units $H$ (Chapters 14, 15)
Hessian matrix $\bm{H}$ (Chapters 7, 9)
hat matrix $\bm{H}=\bm{\Phi}(\bm{\Phi}^{\tp}\bm{\Phi})^{-1}\bm{\Phi}^{\tp}$ (Chapters 6, 8)
output $\bm{H}$ of the encoder or the last layer (Chapters 25, 26)
$L$loss $L$ (Chapters 7, 14, 15)
number of data sets $L$ in the bias–variance decomposition (6.4) (Chapter 6)
$\sigma$, $\sigma_w$, $\sigma_f$standard deviation $\sigma$ and sigmoid function $\sigma(a)$ (Chapters 9, 14, 15, 23)
$\sigma_w$: standard deviation of the prior distribution of the weights (Chapters 6, 8, 12, 20)
$\sigma_f$: signal standard deviation of the RBF kernel (Chapters 10, 12, 13)
$\sigma_f$: standard deviation of $f$ in propagation of error (the same subscript convention as $\sigma_x,\ \sigma_y$) (Chapter 2)
$\sigma_i=\pm1$ representing the occupation of an alloy site (19.10) (Chapter 19)
$\tau$generation temperature (Chapters 26, 27)
lifetime of an excited state (Chapter 3)
precision of a mixture component $\tau_k=1/\sigma_k^{2}$ (Chapter 17)
integrated autocorrelation time $\tau_{\mathrm{int}}$ (with a subscript) (Chapter 21)
scale of the prior variance of the weights $\tau^{2}$ (12.3) (Chapter 12)
product of neighboring spins $\tau_i=\sigma_i\sigma_{i+1}$ (Example 19.11) (Chapter 19)
length of the window in truncated BPTT (Chapter 23)
shift amount $S_\tau$ (Chapter 16)
tolerance factor (the descriptor of Bartel et al.) (Chapter 9)
$B$, $\bm{B}$minibatch size (Chapters 7, 14, 15)
budget for the number of evaluations (Chapter 13)
matrix of emission probabilities $\bm{B}$ (Chapter 22)
beta function $B(a,b)$ (Chapters 3, 4)
between-chain variance $B$ in $\hat{R}$ (Chapter 21)
coefficient $B$ of Platt scaling (paired with $A$) (Chapters 9, 11)
$M$, $\bm{M}$number of basis functions, number of parameters (Chapters 6, 8, 20)
dimension of the latent variables (Chapter 18)
causal mask matrix $\bm{M}$ (Chapters 24, 25)
message function $M_l$ (Chapter 16)
$m$number of successes, a count (Chapters 3, 4)
Weibull modulus (Chapter 3)
constant mean function of a Gaussian process (Chapters 12, 28)
messages $m_{\to}$, $m_{f\to x}$ (Chapter 19)
index of a sample (superscript $(m)$) (Chapter 21)
magnetization (Chapter 27)
first moment $\bm{m}_t$ of Adam (Chapter 7)
$q$, $\bm{q}$approximate distribution $q$ (Chapters 17, 20, 27)
proposal distribution $q(x'\mid x)$ (Chapter 21)
process noise variance $q$ of the Kalman filter (Chapter 22)
output gate $\bm{q}_t$ of the LSTM (Chapter 23)
query vector $\bm{q}_i$ (Chapters 16, 24)
$r$ratio in the Metropolis–Hastings algorithm (Chapter 21)
observation noise variance of the Kalman filter (Chapter 22)
simple regret $r_n$ (Chapter 13)
k-means assignment $r_{nk}$ (Chapter 17)
relative error in gradient checking (Chapter 15)
$\pi$the circle constant (no subscript) (Chapters 3, 17)
mixing coefficient $\pi_k$ (Chapters 17, 19)
initial distribution $\pi_i$ of a hidden Markov model (Chapter 22)
precision $\pi_k=1/\sigma_k^{2}$ in sequential updating (solution to Exercise 4.4 in Appendix C)
$\Phi$, $\bm{\Phi}$design matrix $\bm{\Phi}$ (bold) (Chapters 8, 10)
cumulative distribution function $\Phi(z)$ of the standard Gaussian distribution (light face) (Chapters 3, 13, 28)
$\Lambda$, $\bm{\Lambda}$Lagrangian $\Lambda$ (Chapters 7, 11, 17, 18, 26, 27)
precision matrix $\bm{\Lambda}_k$ of a component of a Gaussian mixture (Chapter 17)
curvature (precision) $\Lambda$, $\bm{\Lambda}$ of the Laplace approximation (Chapter 20)
precision matrix $\bm{\Lambda}$ of the target in the example of the mean-field approximation (20.6) (Chapter 20)
$\varepsilon$, $\epsilon$observation noise $\varepsilon$ (Chapters 6, 8, 12, 13)
small positive number $\epsilon$ (finite-difference step, guard against division by zero) (Chapters 7, 15, 17, 25)
random number $\bm{\epsilon}$ in reparameterization (Chapter 20)
$\xi$slack variable $\xi_n$ (Chapter 11)
margin $\xi$ in EI and PI (Chapter 13)
probability $\xi_t(i,j)$ of the states at two adjacent time steps (Chapter 22)
$\psi$potential $\psi_C$ of an undirected graph (Chapter 19)
backpointer $\psi_t(j)$ of the Viterbi algorithm (Chapter 22)
$\nu$multiplier of an equality constraint (Chapters 7, 17, 26)
degrees of freedom of Student’s t distribution (Chapters 3, 4)
smoothness of the Matérn kernel (Chapter 10)
wave number (Chapter 18)
$\ell$length scale of the RBF kernel (Chapters 10, 12, 13, 28)
loss of a single data point $\ell_n$, $\ell_t$ (Chapters 6, 7, 14, 15, 23, 26)
logit $\ell(p)$ (Exercise 9.2) (Chapter 9)
mean log-likelihood $\ell(\bm{\theta})$ (Chapter 27)
$Z$, $\bm{Z}$partition function, normalization constant $Z$ (Chapters 19, 21, 27)
hidden-layer output of a minibatch $\bm{Z}^{(l)}$ (Chapter 14)
matrix collecting the latent variables $\bm{Z}$ (Chapter 17)
attention output $\bm{Z}$ (Chapters 24, 25)
matrix representing a batch of samples $\bm{Z}$ (Chapter 28)
$P$, $\bm{P}$probability of an event $P(\cdot)$ (Chapters 2, 3, 13)
variance of the estimate $P_t$ in the Kalman filter (Chapter 22)
permutation matrix $\bm{P}$ (Chapter 24)
$\hat{R}$empirical loss (training error) $\hat{R}(f)$ (Chapter 6)
convergence diagnostic from multiple chains (Chapter 21)
$\theta$, $\bm{\theta}$parameters in general (Chapters 2, 4, 20, 26)
hyperparameters $(\ell,\sigma_f,\sigma)$ (Chapters 12, 28)
diffraction angle, rotation angle (Chapters 4, 16)
upper limit of gradient clipping (Chapter 23)

B.1.13 Chapters that write the loss as a sum and chapters that write it as a mean

Whether the loss is written as a sum or as a mean over the data does not change the minimizer, but the gradient and the Hessian matrix differ by a factor of $N$. For this reason the size of one step changes even with the same learning rate $\eta$, and the regularization coefficient $\lambda$ in the mean convention also corresponds to $1/N$ of its value in the sum convention.

Table B.12: Loss conventions (sum or mean)
ChapterConventionSection where it is stated
Chapter 7 (optimization)mean $\frac1N\sum_n$7.5
Chapters 8, 9 (linear regression, linear classification)sum $\sum_n$8.1, 9.3
Chapter 10 (kernel methods)sumChapter 10
Chapters 14, 15 (neural networks)minibatch mean $\frac1B\sum_{n\in\mathcal{B}}$15.2
Chapters 23, 26 (language models with RNNs and GPT)mean over the number of positions $T$ (the sequence is $x_1,\dots,x_{T+1}$)23.3, 26.4

B.2 Correspondence of Notation with PRML

This book and its main reference, C. M. Bishop, Pattern Recognition and Machine Learning, Springer (2006) (hereafter PRML), use different symbols in several places. There are two main reasons. First, this book is written for readers in physics and materials science, so it reserves $\beta$ for the inverse temperature, $t$ for time, and $E$ for energy. Second, this book writes the noise and the prior distribution in terms of the variance rather than the precision (the inverse of the variance). The following table lists only the correspondences that could be confirmed in sources quoting PRML’s notation (PRML’s boldface is rendered here as upright boldface). For symbols not in the table, check the defining equations in both books.

Table B.13: Correspondence of notation between this book and PRML
This bookPRMLMeaning and remarks
$y$, $\bm{y}$$t$, $\mathbf{t}$Target value. In this book, $t$ is time or position in a sequence
$f(\bm{x};\bm{w})$$y(\mathbf{x},\mathbf{w})$Model (function). In this book, $\hat{y}$ is the predicted value
$L(\bm{w})$$E(\mathbf{w})$Loss (error function)
$\sigma^{2}$$\beta^{-1}$Variance of the observation noise (PRML’s $\beta$ is a precision). In this book, $\beta$ is the inverse temperature
$\sigma_w^{2}$$\alpha^{-1}$Variance of the prior distribution $\Normal(\bm{w}\mid\bm{0},\sigma_w^{2}\bm{I})$ of the weights
$\lambda=\sigma^{2}/\sigma_w^{2}$$\lambda=\alpha/\beta$Correspondence between ridge regression (weight decay) and MAP estimation
$\bm{S}_N^{-1}=\sigma_w^{-2}\bm{I}+\sigma^{-2}\bm{\Phi}^{\tp}\bm{\Phi}$$\mathbf{S}_N^{-1}=\alpha\mathbf{I}+\beta\boldsymbol{\Phi}^{\mathrm{T}}\boldsymbol{\Phi}$Posterior covariance of Bayesian linear regression (the letters $\bm{m}_N$ and $\bm{S}_N$ are the same)
Degree $d$, number of basis functions $M=d+1$Degree $M$ ($M+1$ coefficients)Example of polynomial fitting. This book uses $M$ only for the number of basis functions
$\bm{K}_y=\bm{K}+\sigma^{2}\bm{I}$$\mathbf{C}_N$Covariance matrix of a Gaussian process including the noise
$\sigma_*^{2}+\sigma^{2}$$\sigma^{2}(\mathbf{x}_{N+1})$Predictive variance of an observed value. In this book, $\sigma_*^{2}$ is the variance of the latent function, which does not include the noise
$\ell$ (length scale of the RBF)$\sigma$ (width of the Gaussian kernel)$k=\exp\bigl(-\norm{\bm{x}-\bm{x}'}^{2}/(2\ell^{2})\bigr)$
$\alpha_n$$a_n$Dual variable (Lagrange multiplier) of the SVM. The labels $\pm1$ are $t_n$ in PRML as well
$\Lambda$, $\nu$, $\alpha_j$$L$, $\lambda$Lagrangian and multipliers
$\gamma_{nk}$$\gamma(z_{nk})$Responsibility
$\ELBO(q)$$\mathcal{L}(q)$ (in Chapter 9, $\mathcal{L}(q,\boldsymbol{\theta})$)Lower bound on the log marginal likelihood (ELBO)
$\mathrm{St}(x\mid\mu,s^{2},\nu)$$\mathrm{St}(x\mid\mu,\lambda,\nu)$Student’s t distribution. PRML’s $\lambda$ is a precision, with $\lambda=1/s^{2}$
$\mathrm{Gam}(x\mid a,b)$$\mathrm{Gam}(\lambda\mid a,b)$Gamma distribution (shape $a$, rate $b$). The letters play the same roles
$I[x;y]$$I[\mathbf{x},\mathbf{y}]$Mutual information
$\bm{v}_i$, $\lambda_i$$\mathbf{u}_i$, $\lambda_i$Direction and eigenvalue of a principal component in PCA
$z_t$, $t=1,\dots,T$$\mathbf{z}_n$, $n=1,\dots,N$Time step of hidden Markov models and state-space models. In this book, $N$ is the number of data points
$\alpha_t(j)$, $\beta_t(j)$$\alpha(\mathbf{z}_n)$, $\beta(\mathbf{z}_n)$Forward variable and backward variable (this book indicates the state $j$ by a subscript)
$P_t$, $P_{t\mid t-1}$, $q$, $r$, $K_t$$\mathbf{V}_n$, $\mathbf{P}_{n-1}$, $\boldsymbol{\Gamma}$, $\boldsymbol{\Sigma}$, $\mathbf{K}_n$Kalman filter: variance of the estimate, variance of the prediction, process noise, observation noise, Kalman gain (this book treats the one-dimensional case)
$m_{f\to x}(x)$$\mu_{f_s\to x}(x)$Message in the sum-product algorithm

Caution: The correspondence table is only for reading symbols across the two books

Reading the symbols across does not guarantee that the equations take the same form. For example, for the predictive variance of a Gaussian process, PRML writes a single value that includes the noise, whereas this book distinguishes the variance $\sigma_*^{2}$ of the latent function from the variance $\sigma_*^{2}+\sigma^{2}$ of an observed value (Chapter 12, Section 12.6). The difference between the sum and the mean of the loss (Table B.12) also affects the value of the regularization coefficient. When comparing numerical values, go back to the defining equations in both books and check them.

B.3 Terminology Correspondence

The terms introduced in bold in the main text are listed in the Japanese gojūon (kana) order of their readings (words that begin with a personal name such as Gauss or Markov are placed at the position of the Japanese reading of the name, that is, ga-u-su or ma-ru-ko-fu). Because the original Japanese terms cannot be reproduced here, the first column gives their Hepburn romanization. “First appears” is the first section in which the term appears in a section title or is introduced in bold. The English is basically the word given in the main text, supplemented with expressions that are common in the field. The notation follows the conventions of this book (personal names are written in Latin script, long vowels are marked, “uncertainty” is used, and so on).

Table B.14: Terminology correspondence (Japanese → English, in gojūon order)
Japanese (romanized)EnglishFirst appears
A row
antensaddle point7.4
Jensen no futōshikiJensen’s inequality20.3
ichi fugōpositional encoding25.2
inshi gurafufactor graph19.6
inshi bunsekifactor analysis18.7
umekomiembedding23.1
enerugī-bēsu moderuenergy-based model27.2
epokkuepoch7.5
entoropīentropy5.2
ōto-enkōdāautoencoder18.8
omomi gensuiweight decay6.6
Ka row
kaikiregression1.2
gaisōextrapolation1.7
Gauss katei kaikiGaussian process regressionChapter 12
Gauss bunpuGaussian distribution (also called normal distribution)3.5
kagakushūoverfitting1.7
gakushūlearning (training)1.1
gakushūritsulearning rate7.2
kakutoku kansūacquisition function13.2
kakuritsu shitsuryō kansūprobability mass function2.1
kakuritsuteki kōbai kōkahōstochastic gradient descent (SGD)7.5
kakuritsu bunpuprobability distribution1.2
kakuritsu hensūrandom variable2.1
kakuritsu mitsudo kansūprobability density function2.1
kakure sōhidden layer14.3
kakure Markov moderuhidden Markov model (HMM)19.4
kasseika kansūactivation function14.1
katsuyōexploitation1.5
kategorikaru bunpucategorical distribution3.3
kāneru kansūkernel function10.3
kāneru torikkukernel trick10.3
kāneru Ridge kaikikernel ridge regression10.6
Kalman firutāKalman filter22.9
kikai gakushū genshikan potenshiarumachine-learning interatomic potential7.11
kikyaku sanpuringurejection sampling21.3
kijutsushidescriptor1.6
kitaichiexpectation2.5
kitei kansūbasis function1.6
kinō baiasuinductive bias16.1
Gibbs sanpuringuGibbs sampling21.9
kyōka gakushūreinforcement learning1.3
kyōshi ari gakushūsupervised learning1.3
kyōshi nashi gakushūunsupervised learning1.3
kyōbunsancovariance2.5
kyōbunsan gyōretsucovariance matrix2.5
kyōhenryō shifutocovariate shift6.9
kyōyaku jizen bunpuconjugate prior3.11
gūzenteki futashikasaaleatoric uncertainty4.8
kurasutā tenkaicluster expansion19.10
kurasutaringuclustering1.2
gurafikaru moderugraphical modelChapter 19
kunren dētatraining data6.1
keikaku gyōretsudesign matrix8.2
keisan gurafucomputational graph15.1
kettei kyōkaidecision boundary9.1
kettei keisūcoefficient of determination6.10
kensaku kakuchō seiseiretrieval-augmented generation (RAG)26.12
kenshō dētavalidation data6.2
goivocabulary22.1
kōsa entoropīcross-entropy5.4
kōsa kenshōcross-validation6.3
kōseicalibration9.8
kōbaigradient1.4
kōbai kurippingugradient clipping23.5
kōbai kōkahōgradient descent1.4
kōbai shōshitsuvanishing gradient15.7
kōrakuconfounding6.11
gosa gyaku denpabackpropagation15.2
Cholesky bunkaiCholesky decomposition8.5
kongō keisūmixing coefficient17.3
kondō gyōretsuconfusion matrix9.7
Sa row
saigenritsurecall9.7
saishō nijōhōleast squares8.2
saidai entoropī genriprinciple of maximum entropy27.5
saiyū suiteimaximum likelihood estimation2.7
sapōto bekutorusupport vector11.3
sapōto bekutoru kaikisupport vector regression (SVR)11.8
sapōto bekutoru mashinsupport vector machine (SVM)Chapter 11
zansaresidual1.4
zansa setsuzokuresidual connection15.7
sanpuringusampling21.3
jikan hōkō no gosa gyaku denpabackpropagation through time (BPTT)23.4
jigen sakugendimensionality reduction1.2
jiko kaikiautoregressive2.2
jiko kyōshi ari gakushūself-supervised learning1.3
jiko jōhōryōself-information5.1
jigo bunpuposterior distribution4.3
jigo yosoku bunpuposterior predictive distribution4.5
shiji chōseiinstruction tuning26.8
shisūgata bunpuzokuexponential family3.11
shisū bunpuexponential distribution2.6
jizen gakushūpre-training1.3
jizen bunpuprior distribution4.3
jidō bibunautomatic differentiation15.9
tsugi tōkun yosokunext-token prediction5.5
jūten sanpuringuimportance sampling21.4
shūhenkamarginalization2.2
shūhen bunpumarginal distribution2.2
shūhen yūdomarginal likelihood (also called evidence)2.4
shuseibun bunsekiprincipal component analysis (PCA)18.2
jun denpaforward propagation14.3
jōkensūcondition number7.2
jōkenzuki kakuritsuconditional probability2.2
jōkenzuki dokuritsuconditional independence2.3
shōsai tsuriaidetailed balance21.5
jōtai kūkan moderustate-space model22.9
surakku hensūslack variable11.5
seiki hōteishikinormal equations1.4
seiseigeneration1.2
seiseiteki bunruigenerative classification9.2
seisokukaregularization6.6
seiteichi kānerupositive definite kernel10.4
seiyakuzuki saitekikaconstrained optimization7.7
sen’i gyōretsutransition matrix21.5
senkei hanbetsu bunsekilinear discriminant analysis (LDA)9.2
senkei bunri kanōlinearly separable9.6
senzai hyōgenlatent representation1.2
senzai hensūlatent variable17.3
sōkan keisūcorrelation coefficient2.5
sōki shūryōearly stopping6.6
sōgo jōhōryōmutual information5.7
sōtsui mondaidual problem7.7
sonshitsu kansūloss function1.4
Ta row
daisū no hōsokulaw of large numbers2.8
dairi moderusurrogate model12.11
takō bunpumultinomial distribution3.3
tasō pāseputoronmultilayer perceptron (MLP)14.3
tatamikomiconvolution16.2
tatamikomi nyūraru nettowākuconvolutional neural network (CNN)16.2
tansakuexploration1.5
tanjun kōkaisimple regret13.8
chikan dōhenseipermutation equivariance24.8
chūshin kyokugen teiricentral limit theorem2.8
Dirichlet bunpuDirichlet distribution3.10
teijō bunpustationary distribution21.5
tekigōritsuprecision (evaluation metric for classification)9.7
tesuto dētatest data1.7
dēta kakuchōdata augmentation15.8
dēta rōeidata leakage1.7
dōji bunpujoint distribution2.2
dōhenequivariant16.3
tokuichi bunkaisingular value decomposition (SVD)8.5
tokuchō shazōfeature map10.1
dokuritsu dō bunpuindependent and identically distributed (i.i.d.)2.8
tōkuntoken23.1
tōkun-katokenization26.2
totsu kansūconvex function7.4
Na row
naisōinterpolation1.7
nagasa sukērulength scale10.5
nikō bunpubinomial distribution3.2
Newton hōNewton’s method7.9
nyūraru nettowākuneural network1.5
nyūronneuron (unit)14.1
ninshikiteki futashikasaepistemic uncertainty4.8
nōdō gakushūactive learning13.9
Ha row
baiasu–bunsan bunkaibias–variance decomposition6.4
baito-tai fugōkabyte pair encoding (BPE)26.2
haipā paramētāhyperparameter6.3
hankageneralization6.1
hanka gosageneralization error6.1
bannō kinji teiriuniversal approximation theorem14.7
Viterbi hōViterbi algorithm22.8
bibun entoropīdifferential entropy5.3
hyōjunkastandardization3.5
hyōjun hensastandard deviation2.5
hinji sonshitsuhinge loss11.5
fain chūningufine-tuning26.7
futanritsuresponsibility17.4
fuheninvariant16.7
puronputoprompt26.7
bunsanvariance2.5
bunpai kansūpartition function19.5
bunmyaku-chōcontext length25.9
bunmyaku-nai gakushūin-context learning26.7
bunruiclassification1.2
heikatsukasmoothing22.6
heikinba kinjimean-field approximation20.5
Beizu saitekikaBayesian optimization1.5
Beizu suiteiBayesian inference1.5
Beizu senkei kaikiBayesian linear regression8.7
Bayes no teiriBayes’s theorem2.4
Hesse gyōretsuHessian7.2
henbun ōto-enkōdāvariational autoencoder (VAE)18.8
henbun suironvariational inference20.3
Poisson bunpuPoisson distribution3.4
potenshiaru enerugī kyokumenpotential energy surface14.9
Boltzmann bunpuBoltzmann distribution19.5
Ma row
materiaruzu infomatikusumaterials informatics1.9
Markov kakuritsubaMarkov random field19.5
Markov burankkettoMarkov blanket19.3
Markov rensaMarkov chain21.5
mi-gakushūunderfitting6.2
mitsudo suiteidensity estimation1.2
minibatchiminibatch7.5
mukō gurafuundirected graph19.2
messēji denpamessage passing (the sum-product algorithm of graphical models, and graph neural networks)16.6
Metropolis–Hastings hōMetropolis–Hastings algorithm21.6
moderu sentakumodel selection6.3
mōmentamumomentum7.6
Monte Carlo hōMonte Carlo method21.1
Ya row
yakinamashi hōsimulated annealing21.10
Jacobi gyōretsuJacobian matrix2.6
Jacobi gyōretsushikiJacobian (determinant)2.6
yūkō gurafudirected graph (Bayesian network)19.2
yūkō hi-junkai gurafudirected acyclic graph (DAG)19.2
yūkō hyōhonsūeffective sample size21.4
yūdolikelihood2.4
yosoku bunpupredictive distribution4.5
Ra row
Lagrange no mitei jōsūhōmethod of Lagrange multipliers7.7
Laplace kinjiLaplace approximation20.2
randamu tansakurandom search13.8
repurezentā teirirepresenter theorem10.7
repurika kōkanhōreplica exchange method21.10
rojisutikku kaikilogistic regression9.3
rojittologit (log-odds; each component of the logits fed into the softmax is also called a logit)9.2
Wa row
Weibull bunpuWeibull distribution3.10

The following terms are used in English (or as alphabetic abbreviations) in the main text as well. A short explanation accompanies the first appearance.

Table B.15: Terms used in English (in alphabetical order)
TermMeaningFirst appearance
AdamAn optimization algorithm that adjusts the step size using the first and second moments of the gradient7.6
attentionA mechanism that gathers information from relevant positions with weights (attention mechanism)10.8
AUCArea under the ROC curve (area under the curve)9.7
BICBayesian information criterion17.10
causal maskAn attention mask that prevents looking at later positions24.6
d-separationA rule for reading conditional independence off a directed graph19.3
decoder, encoderThe network that generates a sequence and the network that reads it in, respectively23.7
ELBOA lower bound on the log marginal likelihood (evidence lower bound)17.7
EM algorithmExpectation–maximization algorithm17.5
feed-forward network (FFN)The sublayer of a Transformer that applies the same two-layer network at every position25.4
GELUAn activation function that uses the cumulative distribution function of the Gaussian (Gaussian error linear unit)14.2
GPTA language model obtained by pre-training a decoder-only Transformer with next-token prediction (generative pre-trained transformer)26.1
greedyA generation method that chooses the token with the highest probability26.6
k-meansA clustering algorithm that assigns each point to the nearest mean (k-means algorithm)17.2
KKT conditionsOptimality conditions for optimization with inequality constraints (Karush–Kuhn–Tucker conditions)7.7
KL divergenceKullback–Leibler divergence. A measure of the difference between distributions5.4
LayerNormNormalization that rescales each vector to mean 0 and variance 1 (layer normalization)25.3
LSTMAn RNN that carries memory through gates (long short-term memory)23.6
MAP estimationMaximum a posteriori estimation4.4
MCMCMarkov chain Monte Carlo21.5
multi-head attentionA mechanism that places the attention of several heads side by side24.7
one-hotA vector in which exactly one component is 1 and the rest are 03.3
perplexityThe exponential of the mean negative log-likelihood. PPL26.4
PR curveThe curve of precision against recall (precision–recall curve)9.7
query, key, valueThe three kinds of vectors used in attention for asking, matching, and retrieving24.1
ReLUThe activation function $\max(0,a)$ (rectified linear unit)14.2
RNNA recurrent neural network that keeps summarizing the past with the same weights23.2
ROC curveReceiver operating characteristic curve9.7
self-attentionAttention that builds the query, key, and value from the same sequence24.5
sigmoidThe function $1/(1+e^{-a})$8.1
SMOA method that solves the dual problem of an SVM two variables at a time (sequential minimal optimization)11.8
softmaxA function that converts scores into probabilities that sum to 19.5
sum-product algorithmMessage passing that computes marginal distributions exactly on a tree (belief propagation)19.8
t-SNE, UMAPNonlinear dimensionality reduction that maps data to two dimensions, for example, while preserving closeness18.9
temperatureThe coefficient $\tau$ that changes the spread of the generation distribution26.6
top-k, top-pGeneration methods that sample from the top $k$ probabilities, or from the tokens up to cumulative probability $p$ (top-p is nucleus sampling)26.6
TransformerA model built by stacking blocks of attention and a position-wise FFN25.1

B.4 List of Probability Distributions and Conjugacy Relations

We collect the properties of the distributions treated in Chapter 3 into a table (this is Table 3.2 of Chapter 3 with a “Chapters where mainly used” column added). The parameters $a,\ b$ of the gamma and beta distributions follow the notation of Chapter 3 (for the gamma distribution, shape $a$ and rate $b$). The derivations of the properties of the distributions are in the sections of Chapter 3.

Table B.16: List of probability distributions (domain, parameters, mean, variance, and the chapters where mainly used)
DistributionDomainParametersMeanVarianceChapters where mainly used
Bernoulli$\{0,1\}$$\mu\in[0,1]$$\mu$$\mu(1-\mu)$3, 4, 9
Binomial$\{0,\dots,N\}$$N$, $\mu$$N\mu$$N\mu(1-\mu)$2, 3, 4
Multinomial (component $k$)$\sum_km_k=N$$N$, $\bm{\mu}$$N\mu_k$$N\mu_k(1-\mu_k)$3
Poisson$\{0,1,2,\dots\}$$\lambda\gt0$$\lambda$$\lambda$3, 4, 20
Gaussian$\R$$\mu$, $\sigma^{2}\gt0$$\mu$$\sigma^{2}$3, 4, 8, 12, 13, 22
Multivariate Gaussian$\R^{D}$$\bm{\mu}$, $\bm{\Sigma}$ (positive definite)$\bm{\mu}$$\bm{\Sigma}$3, 8, 12, 17, 18, 20
Cauchy$\R$$x_0$, $\gamma\gt0$does not existdoes not exist3, 21
Exponential$[0,\infty)$$\lambda\gt0$$1/\lambda$$1/\lambda^{2}$3, 21
Gamma$(0,\infty)$$a\gt0$, $b\gt0$$a/b$$a/b^{2}$3, 4, 17
Beta$[0,1]$$a\gt0$, $b\gt0$$\dfrac{a}{a+b}$$\dfrac{ab}{(a+b)^{2}(a+b+1)}$3, 4, 20, 21
Student’s t$\R$$\mu$, $s\gt0$, $\nu\gt0$$\mu$ ($\nu\gt1$)$\dfrac{s^{2}\nu}{\nu-2}$ ($\nu\gt2$)3, 4
Dirichlet (component $k$)Simplex$\bm{\alpha}$$\alpha_k/\alpha_0$$\dfrac{\alpha_k(\alpha_0-\alpha_k)}{\alpha_0^{2}(\alpha_0+1)}$3, 17, 22
Weibull$[0,\infty)$$m\gt0$, $s_0\gt0$$s_0\Gamma(1+\frac1m)$$s_0^{2}[\Gamma(1+\frac2m)-\Gamma(1+\frac1m)^{2}]$3

B.4.1 Probability mass functions and probability density functions

We restate the defining formulas of Chapter 3 without changing the symbols.

B.4.2 Conjugate prior pairs

When the product of the likelihood and the prior distribution is proportional to a distribution of the same form as the prior distribution, that prior distribution is called a conjugate prior (Chapter 3, Section 3.11). After observing data, updating the parameters amounts to simply adding numbers, as in the table below. The parameters of the prior distribution can be read as “the number of pseudo-observations.” For example, the beta prior distribution $\mathrm{Beta}(a,b)$ has the same form as the posterior distribution obtained by starting from the uniform $\mathrm{Beta}(1,1)$ and observing $a-1$ successes and $b-1$ failures, so $a-1,\ b-1$ are read as the pseudo-counts contained in the prior distribution (Chapter 4, Section 4.4).

Table B.17: Conjugate priors and posterior distributions (after observing $N$ independent data points)
Distribution of the data (likelihood)Quantity to estimatePrior distributionPosterior distributionWhere treated in this book
Bernoulli, binomial ($m$ successes in $N$ trials, $l=N-m$)Probability of success $\mu$$\mathrm{Beta}(\mu\mid a,b)$$\mathrm{Beta}(\mu\mid a+m,\ b+l)$4.4
Categorical, multinomial (outcome $k$ occurs $m_k$ times)Probability vector $\bm{\mu}$$\mathrm{Dir}(\bm{\mu}\mid\bm{\alpha})$$\mathrm{Dir}(\bm{\mu}\mid\bm{\alpha}+\bm{m})$, $\bm{m}=(m_1,\dots,m_K)^{\tp}$Chapter 17, 22.2
Poisson ($N$ counts $x_1,\dots,x_N$)Rate $\lambda$$\mathrm{Gam}(\lambda\mid a,b)$$\mathrm{Gam}\bigl(\lambda\mid a+\sum_nx_n,\ b+N\bigr)$Chapter 4, Exercise 4.3
Gaussian (variance $\sigma^{2}$ known)Mean $\mu$$\Normal(\mu\mid\mu_0,\sigma_0^{2})$$\Normal(\mu\mid\mu_N,\sigma_N^{2})$ (formulas below)4.6
Gaussian (mean $\mu$ known)Precision $1/\sigma^{2}$Gamma (shape $a$, rate $b$)Gamma (shape $a+\frac N2$, rate $b+\frac12\sum_n(x_n-\mu)^{2}$)3.9

The parameters of the posterior distribution of the mean of a Gaussian distribution with known variance are as follows (Chapter 4, Section 4.6). Note that the precision (the inverse of the variance) is additive.

$$ \begin{gathered} \frac{1}{\sigma_N^{2}}=\frac{1}{\sigma_0^{2}}+\frac{N}{\sigma^{2}},\\ \mu_N=\sigma_N^{2}\left(\frac{\mu_0}{\sigma_0^{2}}+\frac{N\bar{x}}{\sigma^{2}}\right) \end{gathered} $$

B.5 Key Equations by Chapter

The key equations of each chapter are listed part by part and chapter by chapter. The equations are copied from the main text without changing any symbols; they carry no equation numbers from the main text, and each is linked to the section in which it appears. What cannot be expressed in a single equation (assumptions and conditions of applicability) is written in the main text, so be sure to read the linked section before using an equation. Pay particular attention to the convention for the loss (sum or mean; Table B.12) and to the convention for arranging items in rows in the entries for Chapters 24–26.

B.5.1 Part I Introduction to Machine Learning and Probability

Chapter 1: What Is Machine Learning?

Chapter 2: Probability, Expectation, and Conditional Probability

Chapter 3: Common Probability Distributions

Chapter 4: Maximum Likelihood, MAP, and Bayesian Estimation

B.5.2 Part II Foundations That Make Learning Work

Chapter 5: Information, Entropy, and the KL Divergence

Chapter 6: Generalization, Model Selection, and Regularization

Chapter 7: Fundamentals of Optimization

B.5.3 Part III Regression, Classification, and Kernels

Chapter 8: Linear Regression Models

Chapter 9: Linear Classification Models

Chapter 10: Kernel Methods

Chapter 11: Support Vector Machines

Chapter 12: Gaussian Process Regression

Chapter 13: Bayesian Optimization and Experimental Design

B.5.4 Part IV Neural Networks

Chapter 14: Representations in Neural Networks

Chapter 15: Backpropagation and Learning

Chapter 16: Deep Learning That Exploits Structure

B.5.5 Part V Latent Variables and Graphical Models

Chapter 17: Clustering, Mixture Distributions, and the EM Algorithm

Chapter 18: Continuous Latent Variables

Chapter 19: Graphical Models

B.5.6 Part VI Approximate Inference and Sampling

Chapter 20: Approximate Inference

Chapter 21: Sampling Methods

B.5.7 Part VII From Sequence Data to GPT

Chapter 22: Sequence Data and Hidden Markov Models

Chapter 23: RNNs, LSTMs, and Sequence Representations

Chapter 24: How Attention Works

Chapter 25: The Structure of the Transformer

Chapter 26: How GPT Learns and Generates Text

B.5.8 Part VIII Connections to Materials Science and a Comprehensive Exercise

Chapter 27: Connections to Materials Science and Statistical Mechanics

Chapter 28: A Comprehensive Exercise in Materials Search