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
- Vectors and matrices: A vector is a bold lowercase letter $\bm{x}$ and is a column vector; a matrix is a bold uppercase letter $\bm{X}$. The transpose is $\bm{x}^{\tp}$. The size is written as a set, as in $\bm{\Phi}\in\R^{N\times M}$ ($N$ rows and $M$ columns). Only in Chapters 24–26 (attention, the Transformer, and GPT), however, following the original papers, we use the matrix whose rows are the elements of a sequence, $\bm{X}\in\R^{T\times d_{\mathrm{model}}}$, and multiply linear transformations from the right ($\bm{X}\bm{W}$).
- Probability: A random variable and its value are written with the same lowercase letter. The probability mass function and the probability density function are both written $p(\cdot)$, and the probability of an event is $P(\cdot)$. A condition is written with a vertical bar, $p(x\mid y)$, and a probability conditioned on the data always carries $\mid\data$. The second argument of the Gaussian distribution $\Normal(x\mid\mu,\sigma^{2})$ is the variance.
- Logarithms: The natural logarithm is $\ln$. Only when information is counted in bits do we use $\log_2$.
- Noise and prior distributions: Observation noise is written with the variance $\sigma^{2}$ (the precision $\beta$ is not used), and $\beta$ is reserved for the inverse temperature $1/(k_{\mathrm B}T)$ of statistical mechanics. The variance of the prior distribution of the weights is $\sigma_w^{2}$.
- Target values: The supervisory signal is $y$ (PRML’s $t$). The symbol $t$ is used for time and for position in a sequence.
- Loss: The loss is $L$ (we do not write $E(\bm{w})$; $E$ is energy and $\Ex$ is the expectation (expected value)). Some chapters write it as a sum over the data and others as a mean, so the meaning of the magnitude of the regularization coefficient $\lambda$ differs by a factor of $N$ (Table B.12).
B.1.2 Common symbols (data, models, learning)
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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
| Symbol | Meaning (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)
| Symbol | Meaning (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
| Symbol | Meaning (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}$).
| Symbol | Meaning (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.
| Chapter | Convention | Section 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) | sum | Chapter 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.
| This book | PRML | Meaning 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).
| Japanese (romanized) | English | First appears |
|---|---|---|
| A row | ||
| anten | saddle point | 7.4 |
| Jensen no futōshiki | Jensen’s inequality | 20.3 |
| ichi fugō | positional encoding | 25.2 |
| inshi gurafu | factor graph | 19.6 |
| inshi bunseki | factor analysis | 18.7 |
| umekomi | embedding | 23.1 |
| enerugī-bēsu moderu | energy-based model | 27.2 |
| epokku | epoch | 7.5 |
| entoropī | entropy | 5.2 |
| ōto-enkōdā | autoencoder | 18.8 |
| omomi gensui | weight decay | 6.6 |
| Ka row | ||
| kaiki | regression | 1.2 |
| gaisō | extrapolation | 1.7 |
| Gauss katei kaiki | Gaussian process regression | Chapter 12 |
| Gauss bunpu | Gaussian distribution (also called normal distribution) | 3.5 |
| kagakushū | overfitting | 1.7 |
| gakushū | learning (training) | 1.1 |
| gakushūritsu | learning rate | 7.2 |
| kakutoku kansū | acquisition function | 13.2 |
| kakuritsu shitsuryō kansū | probability mass function | 2.1 |
| kakuritsuteki kōbai kōkahō | stochastic gradient descent (SGD) | 7.5 |
| kakuritsu bunpu | probability distribution | 1.2 |
| kakuritsu hensū | random variable | 2.1 |
| kakuritsu mitsudo kansū | probability density function | 2.1 |
| kakure sō | hidden layer | 14.3 |
| kakure Markov moderu | hidden Markov model (HMM) | 19.4 |
| kasseika kansū | activation function | 14.1 |
| katsuyō | exploitation | 1.5 |
| kategorikaru bunpu | categorical distribution | 3.3 |
| kāneru kansū | kernel function | 10.3 |
| kāneru torikku | kernel trick | 10.3 |
| kāneru Ridge kaiki | kernel ridge regression | 10.6 |
| Kalman firutā | Kalman filter | 22.9 |
| kikai gakushū genshikan potenshiaru | machine-learning interatomic potential | 7.11 |
| kikyaku sanpuringu | rejection sampling | 21.3 |
| kijutsushi | descriptor | 1.6 |
| kitaichi | expectation | 2.5 |
| kitei kansū | basis function | 1.6 |
| kinō baiasu | inductive bias | 16.1 |
| Gibbs sanpuringu | Gibbs sampling | 21.9 |
| kyōka gakushū | reinforcement learning | 1.3 |
| kyōshi ari gakushū | supervised learning | 1.3 |
| kyōshi nashi gakushū | unsupervised learning | 1.3 |
| kyōbunsan | covariance | 2.5 |
| kyōbunsan gyōretsu | covariance matrix | 2.5 |
| kyōhenryō shifuto | covariate shift | 6.9 |
| kyōyaku jizen bunpu | conjugate prior | 3.11 |
| gūzenteki futashikasa | aleatoric uncertainty | 4.8 |
| kurasutā tenkai | cluster expansion | 19.10 |
| kurasutaringu | clustering | 1.2 |
| gurafikaru moderu | graphical model | Chapter 19 |
| kunren dēta | training data | 6.1 |
| keikaku gyōretsu | design matrix | 8.2 |
| keisan gurafu | computational graph | 15.1 |
| kettei kyōkai | decision boundary | 9.1 |
| kettei keisū | coefficient of determination | 6.10 |
| kensaku kakuchō seisei | retrieval-augmented generation (RAG) | 26.12 |
| kenshō dēta | validation data | 6.2 |
| goi | vocabulary | 22.1 |
| kōsa entoropī | cross-entropy | 5.4 |
| kōsa kenshō | cross-validation | 6.3 |
| kōsei | calibration | 9.8 |
| kōbai | gradient | 1.4 |
| kōbai kurippingu | gradient clipping | 23.5 |
| kōbai kōkahō | gradient descent | 1.4 |
| kōbai shōshitsu | vanishing gradient | 15.7 |
| kōraku | confounding | 6.11 |
| gosa gyaku denpa | backpropagation | 15.2 |
| Cholesky bunkai | Cholesky decomposition | 8.5 |
| kongō keisū | mixing coefficient | 17.3 |
| kondō gyōretsu | confusion matrix | 9.7 |
| Sa row | ||
| saigenritsu | recall | 9.7 |
| saishō nijōhō | least squares | 8.2 |
| saidai entoropī genri | principle of maximum entropy | 27.5 |
| saiyū suitei | maximum likelihood estimation | 2.7 |
| sapōto bekutoru | support vector | 11.3 |
| sapōto bekutoru kaiki | support vector regression (SVR) | 11.8 |
| sapōto bekutoru mashin | support vector machine (SVM) | Chapter 11 |
| zansa | residual | 1.4 |
| zansa setsuzoku | residual connection | 15.7 |
| sanpuringu | sampling | 21.3 |
| jikan hōkō no gosa gyaku denpa | backpropagation through time (BPTT) | 23.4 |
| jigen sakugen | dimensionality reduction | 1.2 |
| jiko kaiki | autoregressive | 2.2 |
| jiko kyōshi ari gakushū | self-supervised learning | 1.3 |
| jiko jōhōryō | self-information | 5.1 |
| jigo bunpu | posterior distribution | 4.3 |
| jigo yosoku bunpu | posterior predictive distribution | 4.5 |
| shiji chōsei | instruction tuning | 26.8 |
| shisūgata bunpuzoku | exponential family | 3.11 |
| shisū bunpu | exponential distribution | 2.6 |
| jizen gakushū | pre-training | 1.3 |
| jizen bunpu | prior distribution | 4.3 |
| jidō bibun | automatic differentiation | 15.9 |
| tsugi tōkun yosoku | next-token prediction | 5.5 |
| jūten sanpuringu | importance sampling | 21.4 |
| shūhenka | marginalization | 2.2 |
| shūhen bunpu | marginal distribution | 2.2 |
| shūhen yūdo | marginal likelihood (also called evidence) | 2.4 |
| shuseibun bunseki | principal component analysis (PCA) | 18.2 |
| jun denpa | forward propagation | 14.3 |
| jōkensū | condition number | 7.2 |
| jōkenzuki kakuritsu | conditional probability | 2.2 |
| jōkenzuki dokuritsu | conditional independence | 2.3 |
| shōsai tsuriai | detailed balance | 21.5 |
| jōtai kūkan moderu | state-space model | 22.9 |
| surakku hensū | slack variable | 11.5 |
| seiki hōteishiki | normal equations | 1.4 |
| seisei | generation | 1.2 |
| seiseiteki bunrui | generative classification | 9.2 |
| seisokuka | regularization | 6.6 |
| seiteichi kāneru | positive definite kernel | 10.4 |
| seiyakuzuki saitekika | constrained optimization | 7.7 |
| sen’i gyōretsu | transition matrix | 21.5 |
| senkei hanbetsu bunseki | linear discriminant analysis (LDA) | 9.2 |
| senkei bunri kanō | linearly separable | 9.6 |
| senzai hyōgen | latent representation | 1.2 |
| senzai hensū | latent variable | 17.3 |
| sōkan keisū | correlation coefficient | 2.5 |
| sōki shūryō | early stopping | 6.6 |
| sōgo jōhōryō | mutual information | 5.7 |
| sōtsui mondai | dual problem | 7.7 |
| sonshitsu kansū | loss function | 1.4 |
| Ta row | ||
| daisū no hōsoku | law of large numbers | 2.8 |
| dairi moderu | surrogate model | 12.11 |
| takō bunpu | multinomial distribution | 3.3 |
| tasō pāseputoron | multilayer perceptron (MLP) | 14.3 |
| tatamikomi | convolution | 16.2 |
| tatamikomi nyūraru nettowāku | convolutional neural network (CNN) | 16.2 |
| tansaku | exploration | 1.5 |
| tanjun kōkai | simple regret | 13.8 |
| chikan dōhensei | permutation equivariance | 24.8 |
| chūshin kyokugen teiri | central limit theorem | 2.8 |
| Dirichlet bunpu | Dirichlet distribution | 3.10 |
| teijō bunpu | stationary distribution | 21.5 |
| tekigōritsu | precision (evaluation metric for classification) | 9.7 |
| tesuto dēta | test data | 1.7 |
| dēta kakuchō | data augmentation | 15.8 |
| dēta rōei | data leakage | 1.7 |
| dōji bunpu | joint distribution | 2.2 |
| dōhen | equivariant | 16.3 |
| tokuichi bunkai | singular value decomposition (SVD) | 8.5 |
| tokuchō shazō | feature map | 10.1 |
| dokuritsu dō bunpu | independent and identically distributed (i.i.d.) | 2.8 |
| tōkun | token | 23.1 |
| tōkun-ka | tokenization | 26.2 |
| totsu kansū | convex function | 7.4 |
| Na row | ||
| naisō | interpolation | 1.7 |
| nagasa sukēru | length scale | 10.5 |
| nikō bunpu | binomial distribution | 3.2 |
| Newton hō | Newton’s method | 7.9 |
| nyūraru nettowāku | neural network | 1.5 |
| nyūron | neuron (unit) | 14.1 |
| ninshikiteki futashikasa | epistemic uncertainty | 4.8 |
| nōdō gakushū | active learning | 13.9 |
| Ha row | ||
| baiasu–bunsan bunkai | bias–variance decomposition | 6.4 |
| baito-tai fugōka | byte pair encoding (BPE) | 26.2 |
| haipā paramētā | hyperparameter | 6.3 |
| hanka | generalization | 6.1 |
| hanka gosa | generalization error | 6.1 |
| bannō kinji teiri | universal approximation theorem | 14.7 |
| Viterbi hō | Viterbi algorithm | 22.8 |
| bibun entoropī | differential entropy | 5.3 |
| hyōjunka | standardization | 3.5 |
| hyōjun hensa | standard deviation | 2.5 |
| hinji sonshitsu | hinge loss | 11.5 |
| fain chūningu | fine-tuning | 26.7 |
| futanritsu | responsibility | 17.4 |
| fuhen | invariant | 16.7 |
| puronputo | prompt | 26.7 |
| bunsan | variance | 2.5 |
| bunpai kansū | partition function | 19.5 |
| bunmyaku-chō | context length | 25.9 |
| bunmyaku-nai gakushū | in-context learning | 26.7 |
| bunrui | classification | 1.2 |
| heikatsuka | smoothing | 22.6 |
| heikinba kinji | mean-field approximation | 20.5 |
| Beizu saitekika | Bayesian optimization | 1.5 |
| Beizu suitei | Bayesian inference | 1.5 |
| Beizu senkei kaiki | Bayesian linear regression | 8.7 |
| Bayes no teiri | Bayes’s theorem | 2.4 |
| Hesse gyōretsu | Hessian | 7.2 |
| henbun ōto-enkōdā | variational autoencoder (VAE) | 18.8 |
| henbun suiron | variational inference | 20.3 |
| Poisson bunpu | Poisson distribution | 3.4 |
| potenshiaru enerugī kyokumen | potential energy surface | 14.9 |
| Boltzmann bunpu | Boltzmann distribution | 19.5 |
| Ma row | ||
| materiaruzu infomatikusu | materials informatics | 1.9 |
| Markov kakuritsuba | Markov random field | 19.5 |
| Markov burankketto | Markov blanket | 19.3 |
| Markov rensa | Markov chain | 21.5 |
| mi-gakushū | underfitting | 6.2 |
| mitsudo suitei | density estimation | 1.2 |
| minibatchi | minibatch | 7.5 |
| mukō gurafu | undirected graph | 19.2 |
| messēji denpa | message passing (the sum-product algorithm of graphical models, and graph neural networks) | 16.6 |
| Metropolis–Hastings hō | Metropolis–Hastings algorithm | 21.6 |
| moderu sentaku | model selection | 6.3 |
| mōmentamu | momentum | 7.6 |
| Monte Carlo hō | Monte Carlo method | 21.1 |
| Ya row | ||
| yakinamashi hō | simulated annealing | 21.10 |
| Jacobi gyōretsu | Jacobian matrix | 2.6 |
| Jacobi gyōretsushiki | Jacobian (determinant) | 2.6 |
| yūkō gurafu | directed graph (Bayesian network) | 19.2 |
| yūkō hi-junkai gurafu | directed acyclic graph (DAG) | 19.2 |
| yūkō hyōhonsū | effective sample size | 21.4 |
| yūdo | likelihood | 2.4 |
| yosoku bunpu | predictive distribution | 4.5 |
| Ra row | ||
| Lagrange no mitei jōsūhō | method of Lagrange multipliers | 7.7 |
| Laplace kinji | Laplace approximation | 20.2 |
| randamu tansaku | random search | 13.8 |
| repurezentā teiri | representer theorem | 10.7 |
| repurika kōkanhō | replica exchange method | 21.10 |
| rojisutikku kaiki | logistic regression | 9.3 |
| rojitto | logit (log-odds; each component of the logits fed into the softmax is also called a logit) | 9.2 |
| Wa row | ||
| Weibull bunpu | Weibull distribution | 3.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.
| Term | Meaning | First appearance |
|---|---|---|
| Adam | An optimization algorithm that adjusts the step size using the first and second moments of the gradient | 7.6 |
| attention | A mechanism that gathers information from relevant positions with weights (attention mechanism) | 10.8 |
| AUC | Area under the ROC curve (area under the curve) | 9.7 |
| BIC | Bayesian information criterion | 17.10 |
| causal mask | An attention mask that prevents looking at later positions | 24.6 |
| d-separation | A rule for reading conditional independence off a directed graph | 19.3 |
| decoder, encoder | The network that generates a sequence and the network that reads it in, respectively | 23.7 |
| ELBO | A lower bound on the log marginal likelihood (evidence lower bound) | 17.7 |
| EM algorithm | Expectation–maximization algorithm | 17.5 |
| feed-forward network (FFN) | The sublayer of a Transformer that applies the same two-layer network at every position | 25.4 |
| GELU | An activation function that uses the cumulative distribution function of the Gaussian (Gaussian error linear unit) | 14.2 |
| GPT | A language model obtained by pre-training a decoder-only Transformer with next-token prediction (generative pre-trained transformer) | 26.1 |
| greedy | A generation method that chooses the token with the highest probability | 26.6 |
| k-means | A clustering algorithm that assigns each point to the nearest mean (k-means algorithm) | 17.2 |
| KKT conditions | Optimality conditions for optimization with inequality constraints (Karush–Kuhn–Tucker conditions) | 7.7 |
| KL divergence | Kullback–Leibler divergence. A measure of the difference between distributions | 5.4 |
| LayerNorm | Normalization that rescales each vector to mean 0 and variance 1 (layer normalization) | 25.3 |
| LSTM | An RNN that carries memory through gates (long short-term memory) | 23.6 |
| MAP estimation | Maximum a posteriori estimation | 4.4 |
| MCMC | Markov chain Monte Carlo | 21.5 |
| multi-head attention | A mechanism that places the attention of several heads side by side | 24.7 |
| one-hot | A vector in which exactly one component is 1 and the rest are 0 | 3.3 |
| perplexity | The exponential of the mean negative log-likelihood. PPL | 26.4 |
| PR curve | The curve of precision against recall (precision–recall curve) | 9.7 |
| query, key, value | The three kinds of vectors used in attention for asking, matching, and retrieving | 24.1 |
| ReLU | The activation function $\max(0,a)$ (rectified linear unit) | 14.2 |
| RNN | A recurrent neural network that keeps summarizing the past with the same weights | 23.2 |
| ROC curve | Receiver operating characteristic curve | 9.7 |
| self-attention | Attention that builds the query, key, and value from the same sequence | 24.5 |
| sigmoid | The function $1/(1+e^{-a})$ | 8.1 |
| SMO | A method that solves the dual problem of an SVM two variables at a time (sequential minimal optimization) | 11.8 |
| softmax | A function that converts scores into probabilities that sum to 1 | 9.5 |
| sum-product algorithm | Message passing that computes marginal distributions exactly on a tree (belief propagation) | 19.8 |
| t-SNE, UMAP | Nonlinear dimensionality reduction that maps data to two dimensions, for example, while preserving closeness | 18.9 |
| temperature | The coefficient $\tau$ that changes the spread of the generation distribution | 26.6 |
| top-k, top-p | Generation methods that sample from the top $k$ probabilities, or from the tokens up to cumulative probability $p$ (top-p is nucleus sampling) | 26.6 |
| Transformer | A model built by stacking blocks of attention and a position-wise FFN | 25.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.
| Distribution | Domain | Parameters | Mean | Variance | Chapters 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 exist | does not exist | 3, 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.
- Bernoulli distribution (3.2) $$ \mathrm{Bern}(x\mid\mu)=\mu^{x}(1-\mu)^{1-x} $$
- Binomial distribution (3.2) $$ \begin{aligned}&\mathrm{Bin}(m\mid N,\mu)\\&=\binom{N}{m}\mu^{m}(1-\mu)^{N-m}\end{aligned} $$
- Categorical distribution (3.3) $$ \mathrm{Cat}(\bm{x}\mid\bm{\mu})=\prod_{k=1}^{K}\mu_k^{x_k} $$
- Multinomial distribution (3.3) $$ \begin{aligned}&\mathrm{Mult}(m_1,\dots,m_K\mid N,\bm{\mu})\\&=\frac{N!}{m_1!\,m_2!\cdots m_K!}\prod_{k=1}^{K}\mu_k^{m_k},\\&\sum_{k}m_k=N\end{aligned} $$
- Poisson distribution (3.4) $$ \mathrm{Pois}(m\mid\lambda)=\frac{\lambda^{m}e^{-\lambda}}{m!} $$
- Exponential distribution (3.1, $t\ge0$) $$ p(t\mid\lambda)=\lambda e^{-\lambda t} $$
- Gaussian distribution (3.5) $$ \begin{aligned}&\Normal(x\mid\mu,\sigma^{2})\\&=\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\!\left[-\frac{(x-\mu)^{2}}{2\sigma^{2}}\right]\end{aligned} $$
- Multivariate Gaussian distribution (3.6) $$ \begin{aligned}&\Normal(\bm{x}\mid\bm{\mu},\bm{\Sigma})\\&=\frac{1}{(2\pi)^{D/2}\abs{\bm{\Sigma}}^{1/2}}\\&\quad\times\exp\Bigl[-\frac12(\bm{x}-\bm{\mu})^{\tp}\\&\qquad\qquad\ \bm{\Sigma}^{-1}(\bm{x}-\bm{\mu})\Bigr]\end{aligned} $$
- Cauchy distribution (Lorentzian) (3.7) $$ \begin{aligned}&p(x\mid x_0,\gamma)\\&=\frac{1}{\pi}\,\frac{\gamma}{(x-x_0)^{2}+\gamma^{2}}\end{aligned} $$
- Gamma distribution (3.8) $$ \begin{aligned}&\mathrm{Gam}(x\mid a,b)\\&=\frac{b^{a}}{\Gamma(a)}\,x^{a-1}e^{-bx}\end{aligned} $$
- Beta distribution (3.8) $$ \begin{aligned}&\mathrm{Beta}(\mu\mid a,b)\\&=\frac{1}{B(a,b)}\,\mu^{a-1}(1-\mu)^{b-1}\\&=\frac{\Gamma(a+b)}{\Gamma(a)\Gamma(b)}\\&\quad\times\mu^{a-1}(1-\mu)^{b-1}\end{aligned} $$
- Student’s t distribution (3.9) $$ \begin{aligned}&\mathrm{St}(x\mid\mu,s^{2},\nu)\\&=\frac{\Gamma\bigl(\frac{\nu+1}{2}\bigr)}{\Gamma\bigl(\frac{\nu}{2}\bigr)\sqrt{\nu\pi}\,s}\\&\quad\times\left[1+\frac{(x-\mu)^{2}}{\nu s^{2}}\right]^{-(\nu+1)/2}\end{aligned} $$
- Dirichlet distribution (3.10) $$ \begin{aligned}&\mathrm{Dir}(\bm{\mu}\mid\bm{\alpha})\\&=\frac{\Gamma(\alpha_0)}{\Gamma(\alpha_1)\cdots\Gamma(\alpha_K)}\\&\quad\times\prod_{k=1}^{K}\mu_k^{\alpha_k-1}\end{aligned} $$
- Weibull distribution (3.10, $s\ge0$. $m$ is the Weibull modulus and $s_0$ is the scale) $$ p(s)=\frac{m}{s_0}\left(\frac{s}{s_0}\right)^{m-1}\exp\!\left[-\left(\frac{s}{s_0}\right)^{m}\right], $$
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).
| Distribution of the data (likelihood) | Quantity to estimate | Prior distribution | Posterior distribution | Where 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?
- A straight-line model (two parameters) (Section 1.4) $$ \begin{aligned} f(x;\bm{w})&=w_0+w_1x,\\ \bm{w}&=\begin{pmatrix}w_0\\ w_1\end{pmatrix}\in\R^{2} \end{aligned} $$
- The squared-error loss (Section 1.4) $$ L(\bm{w})=\frac12\sum_{n=1}^{N}\bigl(y_n-f(x_n;\bm{w})\bigr)^{2} $$
- Learning means finding the parameters that minimize the loss (Section 1.4) $$ \hat{\bm{w}}=\argmin_{\bm{w}}L(\bm{w}) $$
- The normal equations for fitting a straight line (Section 1.4) $$ \begin{aligned} &N\,w_0+\Bigl(\sum_n x_n\Bigr)w_1\\ &\qquad=\sum_n y_n,\\ &\Bigl(\sum_n x_n\Bigr)w_0+\Bigl(\sum_n x_n^{2}\Bigr)w_1\\ &\qquad=\sum_n x_ny_n \end{aligned} $$
Chapter 2: Probability, Expectation, and Conditional Probability
- The sum rule (marginalization) (Section 2.2) $$ p(x)=\sum_{y}p(x,y) $$
- The product rule (Section 2.2) $$ \begin{aligned} p(x,y)&=p(y\mid x)\,p(x)\\ &=p(x\mid y)\,p(y) \end{aligned} $$
- Bayes’s theorem (Section 2.4) $$ \begin{gathered} p(x\mid y)=\frac{p(y\mid x)\,p(x)}{p(y)},\\ p(y)=\sum_{x'}p(y\mid x')\,p(x') \end{gathered} $$
- The decomposition obtained by repeating the product rule (the origin of the autoregressive decomposition of a sequence) (Section 2.2) $$ \begin{aligned} &p(x_1,x_2,\dots,x_T)\\ &=\prod_{t=1}^{T}p(x_t\mid x_{\lt t}),\\ &x_{\lt t}\equiv(x_1,\dots,x_{t-1}) \end{aligned} $$
- The variance of a sum (Section 2.5) $$ \begin{aligned} &\Var[x+y]\\ &=\Var[x]+\Var[y]\\ &\quad+2\,\Cov[x,y] \end{aligned} $$
- The mean and variance of the sample mean of i.i.d. samples (Section 2.8) $$ \Ex[\bar{x}]=\mu,\quad \Var[\bar{x}]=\frac{\sigma^{2}}{N} $$
Chapter 3: Common Probability Distributions
- The univariate Gaussian distribution (Section 3.5) $$ \begin{aligned}&\Normal(x\mid\mu,\sigma^{2})\\&=\frac{1}{\sqrt{2\pi\sigma^{2}}}\exp\!\left[-\frac{(x-\mu)^{2}}{2\sigma^{2}}\right]\end{aligned} $$
- The multivariate Gaussian distribution (Section 3.6) $$ \begin{aligned}&\Normal(\bm{x}\mid\bm{\mu},\bm{\Sigma})\\&=\frac{1}{(2\pi)^{D/2}\abs{\bm{\Sigma}}^{1/2}}\\&\quad\times\exp\Bigl[-\frac12(\bm{x}-\bm{\mu})^{\tp}\\&\qquad\qquad\ \bm{\Sigma}^{-1}(\bm{x}-\bm{\mu})\Bigr]\end{aligned} $$
- The conditional mean and covariance of a multivariate Gaussian distribution (Section 3.6) $$ \begin{aligned}\bm{\mu}_{a\mid b}&=\bm{\mu}_a+\bm{\Sigma}_{ab}\bm{\Sigma}_{bb}^{-1}(\bm{x}_b-\bm{\mu}_b) \\ \bm{\Sigma}_{a\mid b}&=\bm{\Sigma}_{aa}-\bm{\Sigma}_{ab}\bm{\Sigma}_{bb}^{-1}\bm{\Sigma}_{ba}\end{aligned} $$
- The exponential family (Section 3.11) $$ \begin{aligned}&p(x\mid\bm{\eta})\\&=h(x)\,g(\bm{\eta})\exp\!\left(\bm{\eta}^{\tp}\bm{u}(x)\right)\end{aligned} $$
Chapter 4: Maximum Likelihood, MAP, and Bayesian Estimation
- The maximum likelihood estimate of the success probability of a Bernoulli distribution (Section 4.2) $$ \mu_{\mathrm{ML}}=\frac{m}{N} $$
- The maximum likelihood estimates of the mean and variance of a Gaussian distribution (Section 4.2) $$ \begin{gathered} \mu_{\mathrm{ML}}=\bar{x}=\frac{1}{N}\sum_{n=1}^{N}x_n,\\ \sigma^{2}_{\mathrm{ML}}=\frac{1}{N}\sum_{n=1}^{N}(x_n-\bar{x})^{2} \end{gathered} $$
- The posterior distribution of the Beta–Bernoulli model (Section 4.4) $$ \begin{aligned} &p(\mu\mid\data)\\ &=\mathrm{Beta}(\mu\mid a+m,\ b+l) \end{aligned} $$
- The posterior mean and the MAP estimate (Section 4.4) $$ \begin{gathered} \Ex[\mu\mid\data]=\frac{a+m}{a+b+N},\\ \mu_{\mathrm{MAP}}=\frac{a+m-1}{a+b+N-2}\\ (a+m\gt1\ \text{and}\\ b+l\gt1\ \text{hold}) \end{gathered} $$
- The posterior distribution of the mean of a Gaussian distribution with known variance (Section 4.6) $$ \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} $$
- The two components of the predictive variance (aleatoric and epistemic) (Section 4.8) $$ \Var[x\mid\data]=\underbrace{\sigma^{2}}_{\text{aleatoric}}+\underbrace{\sigma_N^{2}}_{\text{epistemic}} $$
B.5.2 Part II Foundations That Make Learning Work
Chapter 5: Information, Entropy, and the KL Divergence
- Self-information (Section 5.1) $$ h(x)=-\ln p(x)=\ln\frac{1}{p(x)} $$
- Entropy (Section 5.2) $$ \begin{aligned} H[p]&=\Ex_{p}\bigl[-\ln p(x)\bigr]\\ &=-\sum_{x}p(x)\ln p(x) \end{aligned} $$
- The KL divergence (Section 5.4) $$ \begin{aligned} \KL(p\,\|\,q)&=\Ex_{p}\!\left[\ln\frac{p(x)}{q(x)}\right]\\ &=\sum_{x}p(x)\ln\frac{p(x)}{q(x)} \end{aligned} $$
- The decomposition of the cross-entropy (Section 5.4) $$ H[p,q]=H[p]+\KL(p\,\|\,q) $$
- Minimizing the KL divergence from the empirical distribution is maximum likelihood estimation (Section 5.5) $$ \begin{aligned} &\KL(\hat{p}\,\|\,q_{\bm{\theta}})\\ &=-\frac1N\sum_{n=1}^{N}\ln q_{\bm{\theta}}(x_n)\\ &\quad-H[\hat{p}] \end{aligned} $$
- Mutual information (Section 5.7) $$ \begin{aligned} I[x;y]&=\KL\bigl(p(x,y)\\ &\qquad\quad\|\,p(x)p(y)\bigr)\\ &=\sum_{x}\sum_{y}p(x,y)\\ &\qquad\times\ln\frac{p(x,y)}{p(x)\,p(y)} \end{aligned} $$
Chapter 6: Generalization, Model Selection, and Regularization
- The generalization error (expected loss) (Section 6.1) $$ \begin{aligned} R(f)&=\Ex_{(\bm{x},y)\sim p}\bigl[\ell\bigl(y,f(\bm{x})\bigr)\bigr]\\ &=\iint \ell\bigl(y,f(\bm{x})\bigr)\\ &\qquad\times p(\bm{x},y)\,\dd\bm{x}\,\dd y \end{aligned} $$
- The bias–variance decomposition (Section 6.4) $$ \begin{aligned} &\Ex_{\data,\varepsilon}\bigl[(y-\hat{f}(x;\data))^{2}\bigr]\\ &\quad=\underbrace{\bigl(\bar{f}(x)-g(x)\bigr)^{2}}_{(\text{bias})^{2}}+\underbrace{\sigma^{2}}_{\text{noise}}\\ &\qquad+\underbrace{\Ex_{\data}\bigl[(\hat{f}(x;\data)-\bar{f}(x))^{2}\bigr]}_{\text{variance}} \end{aligned} $$
- The estimator of K-fold cross-validation (Section 6.5) $$ \begin{aligned} \mathrm{CV}_K&=\frac{1}{N}\sum_{k=1}^{K}\sum_{n\in\mathcal{I}_k}\ell\bigl(y_n,\\ &\qquad\qquad\hat{f}^{(-k)}(\bm{x}_n)\bigr) \end{aligned} $$
- The loss of ridge regression (sum convention) (Section 6.6) $$ \begin{aligned} L(\bm{w})&=\frac12\norm{\bm{y}-\bm{\Phi}\bm{w}}^{2}\\ &\qquad+\frac{\lambda}{2}\norm{\bm{w}}^{2} \end{aligned} $$
- The simultaneous equations for the solution of ridge regression (Section 6.6) $$ (\bm{\Phi}^{\tp}\bm{\Phi}+\lambda\bm{I})\,\bm{w}=\bm{\Phi}^{\tp}\bm{y} $$
Chapter 7: Fundamentals of Optimization
- The gradient descent update (Section 7.2) $$ \bm{w}_{k+1}=\bm{w}_k-\eta\,\nabla L(\bm{w}_k) $$
- The condition on the learning rate for gradient descent to converge on a quadratic function (Section 7.2) $$ 0\lt\eta\lt\frac{2}{\lambda_{\max}} $$
- The speed of convergence at the optimal learning rate and the condition number (Section 7.2) $$ \begin{aligned} \rho_{\mathrm{opt}}&=1-\frac{2\lambda_{\min}}{\lambda_{\max}+\lambda_{\min}}\\ &=\frac{\kappa-1}{\kappa+1},\quad \kappa\equiv\frac{\lambda_{\max}}{\lambda_{\min}} \end{aligned} $$
- The Adam update (Section 7.6) $$ \begin{aligned}\bm{m}_t&=\beta_1\bm{m}_{t-1}+(1-\beta_1)\,\bm{g}_t \\ \bm{v}_t&=\beta_2\bm{v}_{t-1}+(1-\beta_2)\,\bm{g}_t\odot\bm{g}_t \\ \hat{\bm{m}}_t&=\frac{\bm{m}_t}{1-\beta_1^{t}},\ \ \hat{\bm{v}}_t=\frac{\bm{v}_t}{1-\beta_2^{t}} \\ \bm{w}_t&=\bm{w}_{t-1}-\frac{\eta\,\hat{\bm{m}}_t}{\sqrt{\hat{\bm{v}}_t}+\epsilon}\end{aligned} $$
- The optimality condition under an equality constraint (Section 7.7) $$ \nabla f(\bm{w}^{*})+\nu\,\nabla h(\bm{w}^{*})=\bm{0} $$
- One step of Newton’s method (Section 7.9) $$ \begin{aligned} \bm{H}_k\,\bm{\Delta}_k&=-\bm{g}_k,\\ \bm{w}_{k+1}&=\bm{w}_k+\bm{\Delta}_k \end{aligned} $$
B.5.3 Part III Regression, Classification, and Kernels
Chapter 8: Linear Regression Models
- A linear model in basis functions (Section 8.1) $$ \begin{aligned}f(\bm{x};\bm{w})&=\sum_{j=0}^{M-1}w_j\phi_j(\bm{x})\\&=\bm{w}^{\tp}\bm{\phi}(\bm{x})\end{aligned} $$
- The normal equations (Section 8.2) $$ \bm{\Phi}^{\tp}\bm{\Phi}\,\bm{w}=\bm{\Phi}^{\tp}\bm{y} $$
- The normal equations of ridge regression (Section 8.6) $$ (\bm{\Phi}^{\tp}\bm{\Phi}+\lambda\bm{I})\,\bm{w}=\bm{\Phi}^{\tp}\bm{y} $$
- The posterior distribution of Bayesian linear regression (Section 8.7) $$ \begin{aligned} p(\bm{w}\mid\data)&=\Normal(\bm{w}\mid\bm{m}_N,\ \bm{S}_N),\\ \bm{S}_N^{-1}&=\sigma_w^{-2}\bm{I}+\sigma^{-2}\bm{\Phi}^{\tp}\bm{\Phi},\\ \bm{m}_N&=\sigma^{-2}\bm{S}_N\bm{\Phi}^{\tp}\bm{y}. \end{aligned} $$
- The predictive distribution (two widths: noise and lack of knowledge) (Section 8.8) $$ \begin{aligned} &p(y_*\mid\bm{x}_*,\data)\\ &\quad=\Normal\bigl(y_*\mid\bm{m}_N^{\tp}\bm{\phi}_*,\ v_*\bigr),\\ &v_*=\underbrace{\sigma^{2}}_{\text{noise}}+\underbrace{\bm{\phi}_*^{\tp}\bm{S}_N\bm{\phi}_*}_{\text{lack of knowledge}} \end{aligned} $$
Chapter 9: Linear Classification Models
- The logistic regression model (Section 9.3) $$ \begin{aligned} \hat{y}(\bm{x})&=p(y=1\mid\bm{x};\bm{w},b)\\ &=\sigma(a),\\ a&=\bm{w}^{\tp}\bm{\phi}(\bm{x})+b \end{aligned} $$
- The cross-entropy loss (sum convention) (Section 9.3) $$ \begin{aligned} L(\bm{w},b)&=\sum_{n=1}^{N}L_n\\ L_n&=-y_n\ln\hat{y}_n\\ &\quad-(1-y_n)\ln(1-\hat{y}_n) \end{aligned} $$
- The gradient of the loss is a weighted sum of “prediction − ground truth” (Section 9.3) $$ \begin{aligned} \nabla_{\bm{w}}L&=\sum_{n=1}^{N}(\hat{y}_n-y_n)\,\bm{\phi}_n,\\ \pdiff{L}{b}&=\sum_{n=1}^{N}(\hat{y}_n-y_n) \end{aligned} $$
- The softmax (Section 9.5) $$ \hat{y}_k=\frac{e^{a_k}}{\sum_{j=1}^{K}e^{a_j}} $$
- The gradient of the multiclass cross-entropy (Section 9.5) $$ \begin{aligned} \pdiff{L}{\bm{W}}&=\sum_{n=1}^{N}(\hat{\bm{y}}_n-\bm{y}_n)\,\bm{\phi}_n^{\tp},\\ \pdiff{L}{\bm{b}}&=\sum_{n=1}^{N}(\hat{\bm{y}}_n-\bm{y}_n) \end{aligned} $$
- The kernel as a dot product of feature maps (Section 10.3) $$ k(\bm{x},\bm{x}')=\bm{\phi}(\bm{x})^{\tp}\bm{\phi}(\bm{x}') $$
- The RBF kernel (Section 10.5) $$ k(\bm{x},\bm{x}')=\sigma_f^{2}\exp\!\bigl(-\norm{\bm{x}-\bm{x}'}^{2}/(2\ell^{2})\bigr) $$
- The solution and prediction of kernel ridge regression (Section 10.6) $$ \begin{aligned}\bm{a}&=(\bm{K}+\lambda\bm{I}_N)^{-1}\bm{y} \\ f(\bm{x}_*)&=\bm{k}_*^{\tp}\bm{a} \\ &=\sum_{n=1}^{N}a_n\,k(\bm{x}_n,\bm{x}_*)\end{aligned} $$
- The form of the representer theorem (Section 10.7) $$ f(\cdot)=\sum_{n=1}^{N}a_n\,k(\bm{x}_n,\cdot) $$
- Nadaraya–Watson kernel regression (Section 10.8) $$ \begin{aligned} f(\bm{x}_*)&=\sum_{n=1}^{N}w_n(\bm{x}_*)\,y_n\\ w_n(\bm{x}_*)&=\frac{k(\bm{x}_*,\bm{x}_n)}{\sum_{m=1}^{N}k(\bm{x}_*,\bm{x}_m)} \end{aligned} $$
Chapter 11: Support Vector Machines
- The primal problem with a hard margin (Section 11.1) $$ \begin{aligned} &\min_{\bm{w},\,b}\ \frac12\norm{\bm{w}}^{2}\\ &\text{subject to: }\ y_n\bigl(\bm{w}^{\tp}\bm{\phi}_n+b\bigr)\ge1\\ &\qquad(n=1,\dots,N) \end{aligned} $$
- The dual problem (Section 11.2) $$ \begin{aligned} &\max_{\bm{\alpha}}\ D(\bm{\alpha}),\\ &D(\bm{\alpha})=\sum_{n=1}^{N}\alpha_n\\ &\quad-\frac12\sum_{n,m}\alpha_n\alpha_my_ny_m\,K_{nm} \end{aligned} $$ $$ \text{Constraints: }\ \alpha_n\ge0\ \ (\text{for all }n),\quad \sum_{n}\alpha_ny_n=0 $$
- The prediction written with support vectors only (Section 11.3) $$ \begin{aligned} f(\bm{x})&=\sum_{n\in\mathcal{S}}\alpha_ny_n\,k(\bm{x}_n,\bm{x})\\ &\quad+b \end{aligned} $$
- The primal problem with a soft margin (Section 11.5) $$ \begin{aligned} &\min_{\bm{w},\,b,\,\bm{\xi}}\ \frac12\norm{\bm{w}}^{2}\\ &\qquad+C\sum_{n=1}^{N}\xi_n\\ &\text{subject to: }\ y_nf(\bm{x}_n)\ge1-\xi_n,\\ &\qquad\ \xi_n\ge0 \end{aligned} $$
- The three kinds of points read off from the KKT conditions (Section 11.5) $$ \begin{aligned} \alpha_n=0&\Rightarrow y_nf(\bm{x}_n)\ge1,\\ \alpha_n\in(0,C)&\Rightarrow y_nf(\bm{x}_n)=1,\\ \alpha_n=C&\Rightarrow y_nf(\bm{x}_n)\le1 . \end{aligned} $$
Chapter 12: Gaussian Process Regression
- The definition of a Gaussian process (any finite set of function values follows a multivariate Gaussian distribution) (Section 12.1) $$ p(\bm{f})=\Normal(\bm{f}\mid\bm{m},\bm{K}) $$
- The Gram matrix including observation noise (Section 12.4) $$ \bm{K}_y\equiv\bm{K}+\sigma^{2}\bm{I}\in\R^{N\times N} $$
- The predictive mean, the predictive variance of the latent function, and the predictive variance of the observed value (Section 12.4) $$ \begin{aligned}\mu_*&=m \\ &\quad+\bm{k}_*^{\tp}\bm{K}_y^{-1}(\bm{y}-m\bm{1}) \\ \sigma_*^{2}&=k_{**} \\ &\quad-\bm{k}_*^{\tp}\bm{K}_y^{-1}\bm{k}_* \\ \Var[y_*\mid\data]&=\sigma_*^{2}+\sigma^{2}\end{aligned} $$
- The log marginal likelihood (data fit and complexity penalty) (Section 12.7) $$ \begin{aligned} &\ln p(\bm{y}\mid\bm{\theta})\\ &=\underbrace{-\tfrac12\tilde{\bm{y}}^{\tp}\bm{K}_y^{-1}\tilde{\bm{y}}}_{\text{data fit}}\\ &\quad\underbrace{-\tfrac12\ln\abs{\bm{K}_y}}_{\text{complexity penalty}}\ \underbrace{-\tfrac{N}{2}\ln2\pi}_{\text{constant}}\\ &\tilde{\bm{y}}\equiv\bm{y}-m\bm{1}\in\R^{N} \end{aligned} $$
- The Cholesky decomposition (Section 12.8) $$ \bm{K}_y=\bm{L}\bm{L}^{\tp} $$
Chapter 13: Bayesian Optimization and Experimental Design
- UCB (maximization) (Section 13.3) $$ \mathrm{UCB}(\bm{x})=\mu_*(\bm{x})+\kappa\,\sigma_*(\bm{x}) $$
- The probability of improvement, PI (Section 13.4) $$ \begin{aligned} \mathrm{PI}(\bm{x})&=P\bigl(f\gt f_{\mathrm{best}}+\xi\mid\data_n\bigr)\\ &=\Phi(z) \end{aligned} $$
- The expected improvement, EI (Section 13.4) $$ \begin{aligned} \mathrm{EI}&=d\,\Phi(z)+\sigma_*\,\Normal(z\mid0,1),\\ d&=\mu_*-f_{\mathrm{best}}-\xi,\quad z=\frac{d}{\sigma_*} \end{aligned} $$
- The EI in the limit where the predictive width goes to 0 (Section 13.4) $$ \lim_{\sigma_*\to0}\mathrm{EI}=\max(d,\ 0) $$
- The simple regret (Section 13.8) $$ r_n=f(\bm{x}^{\star})-f(\hat{\bm{x}}_n) $$
B.5.4 Part IV Neural Networks
Chapter 14: Representations in Neural Networks
- A single neuron (Section 14.1) $$ \begin{aligned} a&=\bm{w}^{\tp}\bm{x}+b\\ &=\sum_{i=1}^{D}w_ix_i+b,\\ z&=h(a) \end{aligned} $$
- Forward propagation through a layer (Section 14.3) $$ \begin{aligned} \bm{a}^{(l)}&=\bm{W}^{(l)}\bm{z}^{(l-1)}+\bm{b}^{(l)},\\ \bm{z}^{(l)}&=h_l\bigl(\bm{a}^{(l)}\bigr) \end{aligned} $$
- Activation functions and their derivatives (Section 14.2) $$ \begin{aligned}\sigma(a)&=\frac{1}{1+e^{-a}}, \\ \sigma'(a)&=\sigma(a)\bigl(1-\sigma(a)\bigr)\end{aligned} $$
- The error at the output layer is the difference between the prediction and the ground truth (Section 14.6) $$ \begin{aligned} \bm{\delta}^{(n_{\mathrm{layer}})}&=\pdiff{\ell}{\bm{a}^{(n_{\mathrm{layer}})}}\\ &=\hat{\bm{y}}-\bm{y} \end{aligned} $$
- The minibatch-mean loss and weight decay (Section 14.6) $$ \begin{aligned} L(\bm{\theta})={}&\frac{1}{B}\sum_{n\in\mathcal{B}}\ell_n\\ &+\frac{\lambda}{2}\sum_{l=1}^{n_{\mathrm{layer}}}\norm{\bm{W}^{(l)}}^{2} \end{aligned} $$
Chapter 15: Backpropagation and Learning
- Backpropagation (1): the error at the output layer (Section 15.2) $$ \bm{\delta}^{(n_{\mathrm{layer}})}=\hat{\bm{y}}-\bm{y} $$
- Backpropagation (2): passing the error back by one layer (Section 15.2) $$ \bm{\delta}^{(l)}=h'\bigl(\bm{a}^{(l)}\bigr)\odot\bigl(\bm{W}^{(l+1)\tp}\bm{\delta}^{(l+1)}\bigr) $$
- Backpropagation (3): the gradient with respect to the weights (Section 15.2) $$ \pdiff{\ell}{\bm{W}^{(l)}}=\bm{\delta}^{(l)}\,\bm{z}^{(l-1)\tp} $$
- Backpropagation (4): the gradient with respect to the bias (Section 15.2) $$ \pdiff{\ell}{\bm{b}^{(l)}}=\bm{\delta}^{(l)} $$
- The forward and central differences used in gradient checking (Section 15.4) $$ \begin{aligned} \hat{g}_{\mathrm{fwd}}&=\frac{L(w{+}\epsilon)-L(w)}{\epsilon},\\ \hat{g}_{\mathrm{c}}&=\frac{L(w{+}\epsilon)-L(w{-}\epsilon)}{2\epsilon} \end{aligned} $$
- The variances of the Xavier and He initializations (Section 15.6) $$ \begin{aligned} &\text{Xavier:}\\ &\quad\sigma_{\mathrm{init}}^{2}=\frac{2}{D_{l-1}+D_l},\\ &\text{He:}\\ &\quad\sigma_{\mathrm{init}}^{2}=\frac{2}{D_{l-1}} \end{aligned} $$
Chapter 16: Deep Learning That Exploits Structure
- A one-dimensional convolution (in the form of a cross-correlation) (Section 16.2) $$ y_t=\sum_{u=-r}^{r}w_u\,x_{t+u}+b $$
- The message in message passing (Section 16.6) $$ \begin{aligned} \bm{m}_i^{(l)}&=\sum_{j\in\mathcal{A}(i)}M_l\bigl(\bm{h}_i^{(l)},\\ &\qquad\quad\bm{h}_j^{(l)},\,\bm{e}_{ij}\bigr) \end{aligned} $$
- The update of the vertex features (Section 16.6) $$ \bm{h}_i^{(l+1)}=U_l\bigl(\bm{h}_i^{(l)},\,\bm{m}_i^{(l)}\bigr) $$
- The readout (a sum over atoms) (Section 16.6) $$ \hat{y}=R\Bigl(\sum_{i=1}^{N_{\mathrm{at}}}g\bigl(\bm{h}_i^{(n_{\mathrm{layer}})}\bigr)\Bigr) $$
- Invariance (Section 16.7) $$ f(g\cdot\bm{\mathcal{R}})=f(\bm{\mathcal{R}}) $$
- Equivariance (Section 16.7) $$ f(g\cdot\bm{\mathcal{R}})=g\cdot f(\bm{\mathcal{R}}) $$
B.5.5 Part V Latent Variables and Graphical Models
Chapter 17: Clustering, Mixture Distributions, and the EM Algorithm
- The objective function of k-means (Section 17.2) $$ \begin{aligned} J&=\sum_{n=1}^{N}\sum_{k=1}^{K}r_{nk}\\ &\qquad\times\norm{\bm{x}_n-\bm{\mu}_k}^{2} \end{aligned} $$
- The Gaussian mixture model (Section 17.3) $$ \begin{aligned} p(\bm{x})&=\sum_{\bm{z}}p(\bm{x},\bm{z})\\ &=\sum_{k=1}^{K}\pi_k\,\Normal(\bm{x}\mid\bm{\mu}_k,\bm{\Sigma}_k) \end{aligned} $$
- The responsibility (Section 17.4) $$ \begin{aligned} \gamma_{nk}&\equiv p(z_{nk}=1\mid\bm{x}_n,\bm{\theta})\\ &=\frac{\pi_k\Normal(\bm{x}_n\mid\bm{\mu}_k,\bm{\Sigma}_k)}{\sum_{j=1}^{K}\pi_j\Normal(\bm{x}_n\mid\bm{\mu}_j,\bm{\Sigma}_j)} \end{aligned} $$
- M step: the update of the means (Section 17.5) $$ \bm{\mu}_k=\frac{1}{N_k}\sum_{n=1}^{N}\gamma_{nk}\,\bm{x}_n $$
- M step: the update of the covariances (Section 17.5) $$ \begin{aligned} \bm{\Sigma}_k&=\frac{1}{N_k}\sum_{n=1}^{N}\gamma_{nk}(\bm{x}_n-\bm{\mu}_k)\\ &\qquad\times(\bm{x}_n-\bm{\mu}_k)^{\tp} \end{aligned} $$
- The decomposition of the log-likelihood into the ELBO and a KL divergence (Section 17.7) $$ \begin{aligned} &\ln p(\bm{X}\mid\bm{\theta})\\ &=\ELBO(q,\bm{\theta})\\ &\quad+\KL\bigl(q\,\|\,p(\bm{Z}\mid\bm{X},\bm{\theta})\bigr) \end{aligned} $$
Chapter 18: Continuous Latent Variables
- Sample mean and sample covariance matrix (Section 18.2) $$ \begin{aligned} \bar{\bm{x}}&=\frac1N\sum_{n=1}^{N}\bm{x}_n,\\ \bm{S}&=\frac1N\sum_{n}(\bm{x}_n-\bar{\bm{x}})\\ &\qquad\times(\bm{x}_n-\bar{\bm{x}})^{\tp}\\ &=\frac1N\bm{X}^{\tp}\bm{X} \end{aligned} $$
- Minimum reconstruction error when projecting onto $M$ dimensions (Section 18.2) $$ \begin{aligned}&\min_{\bm{B}}\frac1N\sum_{n=1}^{N}\norm{\bm{x}_n-\hat{\bm{x}}_n}^{2}\\&=\sum_{i=M+1}^{D}\lambda_i\end{aligned} $$
- Proportion of variance and cumulative proportion of variance (Section 18.4) $$ \begin{aligned}&\text{proportion of variance}=\frac{\lambda_i}{\sum_{j=1}^{D}\lambda_j},\\ &\text{cumulative proportion of variance}=\frac{\sum_{i=1}^{M}\lambda_i}{\sum_{j=1}^{D}\lambda_j}\end{aligned} $$
- Marginal distribution of probabilistic PCA (Section 18.7) $$ \begin{aligned}p(\bm{x})&=\int p(\bm{x}\mid\bm{z})\,p(\bm{z})\,\dd\bm{z}\\&=\Normal(\bm{x}\mid\bm{\mu},\ \bm{C}),\\ \bm{C}&=\bm{W}\bm{W}^{\tp}+\sigma^{2}\bm{I}_D\end{aligned} $$
- Reconstruction error of an autoencoder (Section 18.8) $$ \begin{aligned}L&=\frac1N\sum_{n=1}^{N}\norm{\bm{x}_n-\hat{\bm{x}}_n}^{2},\\ \hat{\bm{x}}_n&=f_{\mathrm{d}}\bigl(f_{\mathrm{e}}(\bm{x}_n)\bigr)\end{aligned} $$
- Factorization of a joint distribution by a directed graph (Section 19.2) $$ p(\bm{x})=\prod_{k=1}^{n}p(x_k\mid\mathrm{pa}_k) $$
- Undirected graph (product of potentials) (Section 19.5) $$ \begin{aligned} p(\bm{x})&=\frac{1}{Z}\prod_{C\in\mathcal{C}}\psi_C(\bm{x}_C),\\ Z&=\sum_{\bm{x}}\prod_{C\in\mathcal{C}}\psi_C(\bm{x}_C) \end{aligned} $$
- Factor graph (Section 19.6) $$ p(\bm{x})=\prod_{s}f_s(\bm{x}_s) $$
- Marginal distribution from messages on a chain (Section 19.7) $$ \begin{aligned} p(x_k)&=\frac{m_{\to}(x_k)\,m_{\leftarrow}(x_k)}{Z},\\ Z&=\sum_{x_k}m_{\to}(x_k)\\ &\qquad\times m_{\leftarrow}(x_k) \end{aligned} $$
- Distribution under an intervention (adjustment formula) and conditional distribution of an observation (Section 19.9) $$ \begin{aligned}&p(y\mid\mathrm{do}(x))\\ &\quad=\sum_{z}p(z)\,p(y\mid x,z) \\ &p(y\mid x)\\ &\quad=\sum_{z}p(z\mid x)\,p(y\mid x,z)\end{aligned} $$
B.5.6 Part VI Approximate Inference and Sampling
Chapter 20: Approximate Inference
- Integral for the posterior distribution and the marginal likelihood (Section 20.1) $$ \begin{aligned} p(\bm{\theta}\mid\data)&=\frac{p(\data\mid\bm{\theta})\,p(\bm{\theta})}{p(\data)},\\ p(\data)&=\int_{\R^{M}}p(\data\mid\bm{\theta})\\ &\qquad\times p(\bm{\theta})\,\dd\bm{\theta} \end{aligned} $$
- Laplace approximation (Section 20.2) $$ \begin{aligned} q(\bm{\theta})&=\Normal\bigl(\bm{\theta}\mid\bm{\theta}_{\mathrm{MAP}},\,\bm{\Lambda}^{-1}\bigr),\\ \bm{\Lambda}&=-\nabla\nabla\ln p(\bm{\theta}\mid\data)\big|_{\bm{\theta}_{\mathrm{MAP}}} \end{aligned} $$
- Decomposition of the log marginal likelihood into the ELBO and a KL divergence (Section 20.3) $$ \begin{aligned} &\ln p(\data)\\ &\ =\ELBO(q)\\ &\qquad+\KL\bigl(q\,\|\,p(\bm{\theta}\mid\data)\bigr),\\ &\ELBO(q)\\ &\ =\Ex_{q}[\ln p(\data,\bm{\theta})]\\ &\qquad-\Ex_{q}[\ln q(\bm{\theta})] \end{aligned} $$
- Two forms of the ELBO (Section 20.4) $$ \begin{aligned} &\ELBO(q)\\ &\ =\Ex_{q}[\ln p(\data,\bm{\theta})]+H[q]\\ &\ =\Ex_{q}[\ln p(\data\mid\bm{\theta})]\\ &\qquad-\KL\bigl(q(\bm{\theta})\,\|\,p(\bm{\theta})\bigr) \end{aligned} $$
- Optimal factor in the mean-field approximation (Section 20.5) $$ \begin{aligned} \ln q_j^{*}(\bm{\theta}_j)&=\Ex_{i\ne j}\bigl[\ln p(\data,\bm{\theta})\bigr]\\ &\quad+\text{constant} \end{aligned} $$
- Variational principle of statistical mechanics (Gibbs–Bogoliubov) (Section 20.8) $$ \begin{aligned} A&=-k_{\mathrm B}T\ln Z\\ &\le A[q]\\ &=\Ex_{q}[E]-T\,S[q] \end{aligned} $$
- Monte Carlo integration (Section 21.1) $$ \hat{I}_S=\frac{1}{S}\sum_{m=1}^{S}f\bigl(x^{(m)}\bigr) $$
- Importance sampling estimator (Section 21.4) $$ \begin{aligned} \hat{I}_{\mathrm{IS}}&=\frac1S\sum_{m=1}^{S}w^{(m)}f\bigl(x^{(m)}\bigr),\\ w^{(m)}&=\frac{p(x^{(m)})}{q(x^{(m)})} \end{aligned} $$
- Detailed balance (Section 21.5) $$ \begin{aligned} &p(x)\,T(x'\mid x)\\ &\quad=p(x')\,T(x\mid x') \end{aligned} $$
- Acceptance ratio of the Metropolis–Hastings algorithm (Section 21.6) $$ r=\frac{\tilde{p}(x')\,q(x^{(m)}\mid x')}{\tilde{p}(x^{(m)})\,q(x'\mid x^{(m)})} $$
- Integrated autocorrelation time and effective sample size (Section 21.8) $$ \begin{aligned} \tau_{\mathrm{int}}&=1+2\sum_{k=1}^{\infty}\rho_k,\\ \Var[\bar{f}]&\approx\frac{\Var[f]\,\tau_{\mathrm{int}}}{S},\\ S_{\mathrm{eff}}&=\frac{S}{\tau_{\mathrm{int}}} \end{aligned} $$
- Acceptance probability of the Metropolis algorithm for the Boltzmann distribution (Section 21.11) $$ \begin{aligned} \min(1,r)&=\min\!\left(1,e^{-\beta\,\Delta E}\right),\\ \Delta E&=E(x')-E(x) \end{aligned} $$
B.5.7 Part VII From Sequence Data to GPT
Chapter 22: Sequence Data and Hidden Markov Models
- Joint distribution of a hidden Markov model (Section 22.3) $$ \begin{aligned} &p(x_{1:T},z_{1:T})\\ &\quad=\pi_{z_1}\prod_{t=2}^{T}A_{z_{t-1}z_t}\prod_{t=1}^{T}B_{z_tx_t} \end{aligned} $$
- Forward algorithm (Section 22.5) $$ \begin{aligned} \alpha_1(j)&=\pi_jB_{jx_1},\\ \alpha_t(j)&=B_{jx_t}\\ &\times\sum_{i=1}^{K}\alpha_{t-1}(i)A_{ij},\\ p(x_{1:T})&=\sum_{j=1}^{K}\alpha_T(j) \end{aligned} $$
- Backward algorithm and smoothing (Section 22.6) $$ \begin{aligned} \beta_T(i)&=1,\\ \beta_t(i)&=\sum_{j=1}^{K}A_{ij}\,B_{jx_{t+1}}\\ &\quad\times\beta_{t+1}(j),\\ \gamma_t(j)&=\frac{\alpha_t(j)\,\beta_t(j)}{p(x_{1:T})} \end{aligned} $$
- Viterbi algorithm (Section 22.8) $$ \begin{aligned} \omega_t(j)&=B_{jx_t}\max_{i}\bigl[\omega_{t-1}(i)A_{ij}\bigr],\\ \psi_t(j)&=\argmax_{i}\bigl[\omega_{t-1}(i)A_{ij}\bigr] \end{aligned} $$
- Kalman filter (one-dimensional) (Section 22.9) $$ \begin{aligned} \mu_{t\mid t-1}&=\mu_{t-1},\\ P_{t\mid t-1}&=P_{t-1}+q,\\ K_t&=\frac{P_{t\mid t-1}}{P_{t\mid t-1}+r},\\ \mu_t&=\mu_{t\mid t-1}\\ &\quad+K_t\bigl(x_t-\mu_{t\mid t-1}\bigr),\\ P_t&=(1-K_t)\,P_{t\mid t-1} \end{aligned} $$
Chapter 23: RNNs, LSTMs, and Sequence Representations
- Update of the hidden state of an RNN (Section 23.2) $$ \begin{aligned} &\bm{h}_t=\tanh\bigl(\bm{W}_{hh}\bm{h}_{t-1}\\ &\qquad+\bm{W}_{xh}\bm{x}_t+\bm{b}_h\bigr) \end{aligned} $$
- Output (logit) (Section 23.2) $$ \bm{o}_t=\bm{W}_{hy}\bm{h}_t+\bm{b}_y $$
- Loss as a language model (mean) (Section 23.3) $$ \begin{aligned} L&=-\frac{1}{T}\sum_{t=1}^{T}\ln p(x_{t+1}\mid x_{\le t})\\ &=\frac{1}{T}\sum_{t=1}^{T}\ell_t,\\ \ell_t&\equiv-\ln\softmax(\bm{o}_t)_{x_{t+1}} \end{aligned} $$
- Product of Jacobian matrices of the hidden state (the cause of vanishing and exploding gradients) (Section 23.4) $$ \begin{aligned} \pdiff{\bm{h}_t}{\bm{h}_k}&=\pdiff{\bm{h}_t}{\bm{h}_{t-1}}\cdots\pdiff{\bm{h}_{k+1}}{\bm{h}_k}\\ &=\prod_{i=k+1}^{t}\bigl[\diag\bigl(\bm{1}-\bm{h}_i\odot\bm{h}_i\bigr)\\ &\qquad\quad\times\bm{W}_{hh}\bigr] \end{aligned} $$
- Update of the LSTM memory cell (Section 23.6) $$ \bm{c}_t=\bm{f}_t\odot\bm{c}_{t-1}+\bm{i}_t\odot\tilde{\bm{c}}_t $$
Chapter 24: How Attention Works
- Scaled dot-product attention (Section 24.2) $$ \begin{aligned} &\mathrm{Attention}(\bm{Q},\bm{K},\bm{V})\\ &\quad=\softmax\!\left(\frac{\bm{Q}\bm{K}^{\tp}}{\sqrt{d_k}}\right)\bm{V} \end{aligned} $$
- Scores and weights (softmax of each row) (Section 24.2) $$ \begin{aligned} s_{ij}&=\frac{\bm{q}_i^{\tp}\bm{k}_j}{\sqrt{d_k}},\\ A_{ij}&=\frac{\exp(s_{ij})}{\sum_{j'=1}^{T_k}\exp(s_{ij'})} \end{aligned} $$
- Causal mask (Section 24.6) $$ M_{ij}=\begin{cases}0 & (j\le i)\\ -\infty & (j\gt i)\end{cases} $$
- The variance of the dot product is $d_k$ (Section 24.4) $$ \begin{aligned} \Var\bigl[\bm{q}^{\tp}\bm{k}\bigr]&=\sum_{l=1}^{d_k}\Var[q_lk_l]\\ &=d_k . \end{aligned} $$
- Multi-head attention (Section 24.7) $$ \begin{aligned} &\mathrm{MHA}(\bm{X})\\ &\quad=\bigl[\bm{Z}_1\ \cdots\ \bm{Z}_{n_{\mathrm{head}}}\bigr]\,\bm{W}_O \end{aligned} $$
Chapter 25: The Structure of the Transformer
- Input to the first layer (embedding + position) (Section 25.2) $$ \bm{x}^{(0)}_t=\bm{e}_{x_t}\bm{W}_E+\bm{p}_t $$
- Sinusoidal positional encoding (Section 25.2) $$ \begin{aligned}PE_{(pos,\,2i)}&=\sin\bigl(\omega_i\,pos\bigr), \\ PE_{(pos,\,2i+1)}&=\cos\bigl(\omega_i\,pos\bigr),\\ \omega_i&=\frac{1}{10000^{2i/d_{\mathrm{model}}}}\end{aligned} $$
- Pre-LN Transformer block (Section 25.3) $$ \begin{aligned} \bm{U}&=\bm{X}\\ &\quad+\mathrm{MHA}\bigl(\mathrm{LN}_1(\bm{X})\bigr),\\ \bm{Y}&=\bm{U}\\ &\quad+\mathrm{FFN}\bigl(\mathrm{LN}_2(\bm{U})\bigr). \end{aligned} $$
- Position-wise FFN (Section 25.4) $$ \begin{aligned} &\mathrm{FFN}(\bm{x})\\ &=h\bigl(\bm{x}\bm{W}_1+\bm{b}_1\bigr)\,\bm{W}_2\\ &\quad+\bm{b}_2 \end{aligned} $$
- LayerNorm (Section 25.5) $$ \begin{aligned} \hat{x}_k&=\frac{x_k-\bar{x}}{\sqrt{s^{2}+\epsilon}},\\ \mathrm{LN}(\bm{x})_k&=g_k\,\hat{x}_k+b_k \end{aligned} $$
Chapter 26: How GPT Learns and Generates Text
- Autoregressive decomposition (Section 26.3) $$ p(x_{1:T})=\prod_{t=1}^{T}p(x_t\mid x_{\lt t}) $$
- The probability of the next token is the softmax of the logits (Section 26.3) $$ \begin{aligned} &p_{\bm{\theta}}(x_{t+1}=i\mid x_{\le t})\\ &=\softmax(\bm{o}_t)_i\\ &=\frac{\exp(o_{t,i})}{\sum_{j=1}^{V_{\mathrm{voc}}}\exp(o_{t,j})} \end{aligned} $$
- Loss for next-token prediction (mean) (Section 26.4) $$ \begin{aligned} &L(\bm{\theta})\\ &=-\frac{1}{T}\sum_{t=1}^{T}\ln p_{\bm{\theta}}(x_{t+1}\mid x_{\le t}) \end{aligned} $$
- The gradient with respect to the logits is “probability − correct answer” (Section 26.4) $$ \begin{aligned} &\pdiff{\ell_t}{\bm{o}_t}=\bm{p}_t-\bm{y}_t,\\ &\bm{p}_t=\softmax(\bm{o}_t)\in\R^{V_{\mathrm{voc}}} \end{aligned} $$
- Perplexity (Section 26.4) $$ \begin{aligned} \mathrm{PPL}&=\exp(L)\\ &=\Bigl(\prod_{t=1}^{T}p_t\Bigr)^{-1/T} \end{aligned} $$
- Softmax with temperature (Section 26.6) $$ \begin{aligned} &p_i(\tau)\\ &=\frac{\exp(o_i/\tau)}{\sum_{j=1}^{V_{\mathrm{voc}}}\exp(o_j/\tau)} \end{aligned} $$
B.5.8 Part VIII Connections to Materials Science and a Comprehensive Exercise
Chapter 27: Connections to Materials Science and Statistical Mechanics
- Boltzmann distribution (Section 27.1) $$ \begin{aligned}p(x)&=\frac{e^{-\beta E(x)}}{Z},\\ Z&=\sum_{x}e^{-\beta E(x)},\quad \beta\equiv\frac{1}{k_{\mathrm B}T}\end{aligned} $$
- Energy-based model (Section 27.2) $$ \begin{aligned}p_{\bm{\theta}}(x)&=\frac{e^{-E_{\bm{\theta}}(x)}}{Z_{\bm{\theta}}},\\ Z_{\bm{\theta}}&=\sum_{x}e^{-E_{\bm{\theta}}(x)}\end{aligned} $$
- Gradient of the log-likelihood of an energy-based model (Section 27.2) $$ \begin{aligned}\pdiff{\ell}{\bm{\theta}}&=-\underbrace{\frac1N\sum_{n=1}^{N}\pdiff{E_{\bm{\theta}}(x_n)}{\bm{\theta}}}_{\text{average over the data}}\\ &\quad+\underbrace{\Ex_{p_{\bm{\theta}}}\Bigl[\pdiff{E_{\bm{\theta}}}{\bm{\theta}}\Bigr]}_{\text{average over the model}}\end{aligned} $$
- Variational free energy (Section 27.4) $$ \begin{aligned}A[q]&\equiv\Ex_q[E]-TS[q],\\ S[q]&=-k_{\mathrm B}\,\Ex_q[\ln q]\end{aligned} $$
- Exponential-family distribution obtained from the principle of maximum entropy (Section 27.5) $$ \begin{aligned}p(x)&=\frac{1}{Z(\bm{\lambda})}\\ &\quad\times\exp\Bigl(-\sum_{k}\lambda_kf_k(x)\Bigr),\\ Z(\bm{\lambda})&=\sum_x\exp\Bigl(-\sum_{k}\lambda_kf_k(x)\Bigr)\end{aligned} $$
- Sum over atoms in a machine-learning interatomic potential (Section 27.7) $$ E(\bm{R})=\sum_{i=1}^{N_{\mathrm{at}}}e_{\mathrm{at}}(\bm{G}_i) $$
Chapter 28: A Comprehensive Exercise in Materials Search
- Standardization by the mean and standard deviation of the training data (Section 28.4) $$ \tilde{c}=\frac{c-\bar{c}_{\mathrm{tr}}}{s_{c,\mathrm{tr}}},\qquad \tilde{T}=\frac{T-\bar{T}_{\mathrm{tr}}}{s_{T,\mathrm{tr}}} $$
- Gaussian process prediction (standardized inputs) (Section 28.4) $$ \begin{aligned} \mu_*&=m+\bm{k}_*^{\tp}\bm{K}_y^{-1}(\bm{y}-m\bm{1}),\\ \sigma_*^{2}&=k(\tilde{\bm{x}}_*,\tilde{\bm{x}}_*)-\bm{k}_*^{\tp}\bm{K}_y^{-1}\bm{k}_* \end{aligned} $$
- Predictive variance of an observed value measured in a new batch (including the batch offset) (Section 28.5) $$ \begin{aligned} &\Var[y_*\mid\data]\\ &=\sigma_*^{2}+\sigma_b^{2}+\sigma^{2} \end{aligned} $$
- Coverage of the prediction interval (Section 28.5) $$ \mathrm{cov}=\frac1N\sum_{n=1}^{N}\chi_n $$
- EI (maximization) (Section 28.6) $$ \begin{aligned} &\mathrm{EI}(\bm{x})=d\,\Phi(z)\\ &\quad+\sigma_*\,\Normal(z\mid0,1) \end{aligned} $$