Year: 2019

Abstract:
Continually learning new skills without forgetting old ones is an important quality for an intelligent system, yet most deep learning methods suffer from catastrophic forgetting of the past. Recent works have addressed this by regularising the network weights, but it is challenging to identify weights crucial to avoid forgetting. A better approach is to directly regularise the network outputs at past inputs, e.g., by using Gaussian processes (GPs), but this is usually computationally challenging. In this paper, we propose a scalable functional-regularisation approach where we regularise only over a few memorable past examples that are crucial to avoid forgetting. Our key idea is to use a GP formulation of deep networks, enabling us to both identify the memorable past and regularise over them. Our method achieves state-of-the-art performance on standard benchmarks and opens a new direction for life-long learning where regularisation methods are naturally combined with memory-based methods.

heading: 1 INTRODUCTION
text: The ability to quickly adapt to changing environments is an important quality of intelligent systems. For such quick adaptation, it is important to be able to identify, memorise, and recall useful past experiences when acquiring new ones. Unfortunately, standard deep-learning methods are not good at maintaining previously acquired skills, and can quickly forget them when learning new skills (Kirkpatrick et al., 2017). Such catastrophic forgetting presents a big challenge when deploying deep-learning methods for applications, such as robotics, where new tasks can appear during the training, and data from the previous tasks might be unavailable for retraining.
In recent years, many methods have been proposed to address catastrophic forgetting in deep learning. One of the most popular approaches is to regularise the network weights to keep them close to the weights obtained for the previous tasks/data (Kirkpatrick et al., 2017; Nguyen et al., 2018; Zenke et al., 2017; Ebrahimi et al., 2019; Serra et al., 2018). This is challenging due to the difficulty in identifying the weights that are relevant to past tasks. The exact values of the weights in fact do not matter directly, but rather the network output (Benjamin et al., 2018). Figuring out which weight affects the output is therefore usually difficult. Typically, the Fisher information matrix or covariance matrices over weights are used (Kirkpatrick et al., 2017; Nguyen et al., 2018), but they only partially address the issue.
A better approach is to directly regularise the network outputs, also referred to as functionalregularisation, requiring a memory of past examples (Benjamin et al., 2018; Lopez-Paz & Ranzato, 2017; Rebuffi et al., 2017). However, such methods still lack a mechanism to automatically weight more relevant past memory in the context of the new task, and also do not take uncertainty of the output into account. Methods based on Gaussian processes do this automatically (Titsias et al., 2019), but require optimisation over inducing points and specification of a good kernel, both of which are difficult tasks. In summary, existing methods fall short in building scalable functional-regularisation methods for continual learning.
In this paper, we propose a new functional-regularisation method where we regularise over a few memorable past examples (see Fig. 1). Our approach builds upon a recent method of Khan et al. (2019) that expresses deep networks as Gaussian processes (GPs). We show that the GP formulation not only enables the identification of examples crucial to avoid forgetting, but also computes uncertainty over the network output to appropriately weight the past examples in the light of new
After Task 1 After Task 2 After Task 5
ones. Motivated by the GP perspective, we propose a new loss function for function-regularisation with deep networks. A Laplace approximation of this objective enables scalable training. Our work in this paper focusses on avoiding forgetting, but it opens a new direction for life-long learning methods where regularisation methods are naturally combined with memory-based methods.
Other related works. Broadly, existing work on continual learning can be split into three approaches: inference based, memory/rehearsal based, and model based. Inference based approaches have mostly focused on weight regularisation, with some recent efforts on functional regularisation. Our work falls in the latter category. Memory based approaches either maintain a memory of past data examples (Rebuffi et al., 2017) or train generative models on previous tasks to rehearse pseudo-inputs (Shin et al., 2017). An advantage of our method compared to previous ones is that building memory does not require solving an optimisation problem: the computation simply involves a forward-pass through the network followed by sorting (see Section 3.2).
Similarly to our work, there have also been some efforts in combining the different flavours of approaching continual learning, e.g., VCL plus coresets (Nguyen et al., 2018) and Gradient-Episodic Memory (Lopez-Paz & Ranzato, 2017; Chaudhry et al., 2018). Benjamin et al. (2018) have proposed a similar combination for functional regularisation. In these approaches, two separate methods are usually used for regularisation and memory-building. Recent follow-up work (Aljundi et al., 2019; Chaudhry et al., 2019) has focussed on improving memory-building methods, but this separation has remained the case. In contrast, in our approach, both of these are done within the same GP framework by using the method of Khan et al. (2019).
Finally, model based approaches change the model architecture during training (Rusu et al., 2016), and this can be combined with other approaches (Schwarz et al., 2018). It is possible to use similar features in our GP based framework, which is an interesting future direction to be pursued.

heading: 2 CONTINUAL LEARNING WITH WEIGHT/FUNCTIONAL REGULARISATION
text: In deep learning, we minimise loss functions to estimate network weights. For example, in supervised multi-class classification problems, we are given a dataset D of N input-output pairs with outputs yi , a vector of K classes, and inputs xi , a vector of length D, and our goal is to minimise a loss which takes the following form: ¯̀(w) + δR(w), where ¯̀(w) := 1N ∑N i=1 `(yi, fw(xi)) with deep neural network fw(x) ∈ RK and its weights w. `(y, ŷ) denotes a differentiable loss function between an output y and its prediction ŷ, R(w) is a regularisation function (usually an L2-regulariser R(w) = w>w) and δ > 0 controls the regularisation strength. Standard deep-learning approaches rely on an unbiased stochastic-gradient of the loss ¯̀, which usually requires access to all of the data examples for all classes (Bottou, 2010). It is this unbiased, minibatch setting where deep-learning excels and achieves state-of-the-art performance on many benchmark datasets.
In reality, we do not always have access to all the data at once, and it is not possible to obtain unbiased stochastic gradients. New classes may appear during training and old classes may never be seen again. For such settings, vanilla mini-batch stochastic-gradient methods lead to catastrophic forgetting of past information (Kirkpatrick et al., 2017). Our goal in this paper is to design methods that can avoid such catastrophic forgetting. We focus on a particular setting where the classification task is divided into several tasks, e.g., a task may consist of a classification problem over a subset of classes. We assume that the tasks arrive sequentially one after the other. Once the learning is over, we may never see that task again. Such continual-learning settings have been considered in previous works (Kirkpatrick et al., 2017; Nguyen et al., 2018; Zenke et al., 2017), and our goal is to avoid forgetting of old tasks in this setting.
Recent methods have proposed weight-regularisation as a way to combat catastrophic forgetting. The main idea is to keep the new network weights close to the old ones, e.g., when training a task t while given network weights wt−1 trained on task t − 1, we can minimise the following loss: ¯̀ t (w) + δ(w −wt−1)>Ft (w −wt−1), where ¯̀t (w) is the loss defined over all data examples from task t and Ft is a preconditioning matrix that favors the weights relevant to the past tasks more than the rest. The Elastic-Weight Consolidation (EWC) method (Kirkpatrick et al., 2017), for example, uses the Fisher information matrix as the pre-conditioner, while Ritter et al. (2018) use the Hessian of the loss, and VCL (Nguyen et al., 2018) essentially employs the precision matrix of the variational approximation to do the same. Such weight-space methods reduce forgetting but do not produce satisfactory results.
The challenge in using weight-regularisation lies in the fact that the exact values of the weights do not really matter due to parametric symmetries (Benjamin et al., 2018; Bishop, 2006). Since only the network outputs matter, an alternative approach is to directly regularise these. Benjamin et al. (2018) propose to use an L2-regulariser over the function values on data examples from past tasks:
min w
¯̀ t (w) + δ t−1∑ s=1 ∑ i∈Ms ‖ fw(xi) − fwt−1 (xi)‖22, (1)
where Ms is the set of small examples for task s stored in the working memory (Lopez-Paz & Ranzato, 2017; Rebuffi et al., 2017). One major issue with this approach is that the L2-regulariser weights all the data points equally. In reality, some examples in the memory are more important than others to learn a given task. In addition, the uncertainty of the prediction is also ignored. As we will show, working with distributions over functions allows us to address these two issues.
Gaussian processes (GPs), for example, enable automatic reweighting of old tasks in light of a new one, which happens by using the posterior covariance. Unfortunately, both scalability of GPs as well as the necessity to save many instances of the past makes them impractical. A recent approach by Titsias et al. (2019) attempts to address these issue by employing sparse GP methods with inducing points and using a neural network feature map. However, their approach has some difficulties. Their approach heavily depends on a proper choice of inducing points, which are normally obtained via an ad-hoc procedure. Additionally, they propose using the last layer of the neural network as kernel features, which is limiting as it does not use the whole network’s weights in the kernel.
Ideally, we would want to perform functional regularisation with a deep learning optimiser while borrowing ideas from the GP methods. Our work in this paper takes a step in this direction. Our proposal is to use a GP formulation of neural networks to perform functional regularisation that still allows training with standard deep-learning methods. We also show that the GP view helps in selecting an informative set of memory points.

heading: 3 FUNCTIONAL-REGULARISATION OF MEMORABLE PAST (FROMP)
text: We will now describe our proposed method. The first step is to use the GP formulation of Khan et al. (2019) to compute GP-like posteriors over functions. Then, we propose a method to identify a set of memorable past examples for a task. Finally, we describe our functional-regularisation and discuss approximations used to build a scalable method.

heading: 3.1 FROM DEEP NETWORKS TO GAUSSIAN PROCESS POSTERIORS
text: Khan et al. (2019) propose an approach to convert deep networks into Gaussian processes. Their main result (see Theorem 1 in their paper) states that, at a local minimiser w∗ of ¯̀(w) + δ2 w>w, a Laplace approximation of the posterior over w is equivalent to the posterior distribution of a linear model. Specifically, they use the following scalable variant of the Laplace approximation:
p(w|D) ≈ q(w) := N(w|µ,Σ), where µ = w∗ and Σ−1 = N∑ i=1 J(xi)>Λ(xi, yi)J(xi) + δIP, (2)
where J(xi) := ∇wfw(xi)> is a K × P Jacobian matrix (P being the number of parameters), and Λ(x, y) := ∇2ff`(y, f) is the K × K Hessian of the loss with f = fw(x), all evaluated at w = w∗. They show that q(w) is equal to the posterior of the following linear model:
ỹ = J(x)w + , with ∼ N(0, (Λ(x, y))−1) and w ∼ N(0, δ−1IP), (3) where the observations are defined as ỹi := J(xi)w∗ − ( Λ(xi, yi) )−1 r(xi, yi) with the residual r(x, y) := ∇f`(y, f). They also show that the predictive distribution of this linear model is equivalent to that of a GP regression model defined with a K × K neural tangent kernel (NTK) (Jacot et al., 2018):
ỹ = fGP(x) + , with ∼ N(0, (Λ(x, y))−1) and fGP(x) ∼ GP ( 0, δ−1J(x)J(x′)> ) . (4)
The above result gives a posterior in the defined observation space of ỹ. In the case where we can find a map from ỹ to y, the above inference problem allows for reparameterisation into the original data space. Therefore, we will obtain a GP that serves as an approximation to the neural network posterior. Below, we demonstrate this for binary classification with sigmoid link function and Bernoulli likelihood (see Appendix A for details and extension to multi-class classification).
We parameterise the Bernoulli likelihood by p(x) := σ(fw∗ (x)) where σ is the sigmoid function (note that we now have scalars {f, y, ...} as we are dealing with a single output). The residual and loss Hessian for this model are given by r(x, y) = p(x) − y and Λ(x, y) = p(x)(1− p(x)), respectively, where y ∈ {0, 1}. Because residuals are linear in y and the Hessian is independent of y, we can substitute the definitions of ỹ and r(x, y) into Eq. 3, and rearrange for y,
y = p(x) + Λ(x, y)J(x)(w − w∗)︸ ︷︷ ︸ :=flin(x) +τ, with τ ∼ N(0,Λ(x, y)) and w ∼ N(0, δ−1IP). (5)
The Laplace approximation in Eq. 2 is the posterior of this model after observing data D. We can equivalently write the posterior predictive as a GP (Rasmussen, 2003) with mean and covariance
m(x) := Eq(w) [flin(x)] = p(x, y) + Λ(x, y)J(x)(µ − w∗) = p(x), (6) k(x, x′) := Eq(w) [(flin(x) −m(x)) (flin(x′) −m(x′))]
= Λ(x, y)J(x)Eq(w) [ (w − w∗)(w − w∗)> ] J(x′)>Λ(x′, y′)
= Λ(x, y)J(x)ΣJ(x′)>Λ(x′, y′). (7) A GP defined with the above mean and covariance function can be viewed as an approximation to the posterior process over network outputs. Throughout the paper, we will denote the process obtained at a weight w∗ by a distribution qw∗ (f) where f is a vector of f(x) evaluated at many different inputs x. We will use this GP posterior predictive for functional regularisation.

heading: 3.2 MEMORABLE PAST
text: In the previous section, we derived a GP posterior approximation over the network outputs. Now, we propose a method to obtain a small set of examples that are crucial to avoid forgetting. We first note that the posterior GP mean in Eq. 4 corresponds to a kernel Ridge regression that requires the computation of (δ−1K + Λ−1)−1ỹ where Λ is a block-diagonal matrix containing all Λi := Λ(xi, yi) and K is the NTK defined in Eq. 4. The predictions therefore strongly depend on the eigenvalues of the preconditioning matrix. Selection of important data examples therefore boils down to selecting
Algorithm 1: Functional Regularisation of Memorable Past (FROMP)
important columns of this matrix, such that the predictions remain unchanged. The theory of leverage score sampling (Alaoui & Mahoney, 2015; Bach, 2013) suggests picking the points proportional to the leverage score defined to be the diagonal of the following matrix: K(K + δΛ−1)−1. Typically, this matrix is difficult to compute and methods are employed to approximately obtain the leverage score (Alaoui & Mahoney, 2015).
For deep-learning applications too, exact computation of leverage score is very difficult. We instead propose a simple solution. Since the eigenvalues of the previous matrix heavily depend on δΛ−1i , we can pick the data examples by simply sorting Λi . For the inverse of K + δΛ−1 to have high eigenvalues, we should favour examples with smaller values of Λ−1i . Therefore, we simply sort the Λi and pick the top M examples as the most relevant ones. This simple solution is very effective for our particular problem because Λi are noise variances for the data examples, obtained by using an already trained network. These are second derivatives of the loss for data examples, and so also reflect the sensitivity of the decision boundaries if a particular data point is perturbed. Therefore, they tend to reflect the relevance of data examples. An example is shown in Figure 1 where we clearly see that our solution picks the examples lying close to decision boundary. Computation of Λi requires us to run the forward pass to get the `(yi, ŷi) and then compute its second derivative with respect to ŷi , both of which are cheap operations. Throughout the paper, examples chosen by this method are referred to as the memorable past examples, and denotedMt for task t.

heading: 3.3 FUNCTIONAL-REGULARISATION
text: So far, we described the construction of the GP posterior predictive over the function space, as well as the construction of a set of memorable-past examples. We are now ready to describe our objective function where we employ these two to perform functional regularisation.
Suppose that we are given network weights wt−1 that are obtained by training over data examples from task t − 1. Our goal then is to train a network with weights w such that its performance on memorable pastM1:t−1 is unchanged. We denote the vector of function outputs over these examples by a1:t−1. A straightforward idea is to directly optimise the weights w such that the predictions using qw(ft ) are good on current tasks while the predictive distribution qw(a1:t−1) is close to qwt−1 (a1:t−1). Since the number of tasks can be very large, we choose to regularise each task separately, i.e., we will match qw(as) with qwt−1 (as) separately for all tasks s < t, in line with Titsias et al. (2019). These choices give us the following objective function with trade-off parameter τ:
min w τEqw ( ft ) [ ∑ i∈D t `(yi, f (xi)) ] + t−1∑ s=1 DKL[qw(as) ‖ qwt−1 (as)]. (8)
A major issue with this objective is that computing gradients wrt. the posterior predictive qw will be computationally heavy as it involves gradients of the Jacobian and Λi , which involve higher order derivatives. During training on a task, we have no distribution on parameters (cf. Laplace approximation) and can treat it as fixed. Therefore, taking the gradient wrt. the parameter w of the above objective will only involve differentiating the mean function m(xi) formed by the neural network, and we have equivalence to the following objective:
min w τ ∑ i∈D t `(yi, fw(xi)) + 1 2 t−1∑ s=1 (ms,w −ms,wt−1 )>K−1wt−1,s(ms,w −ms,wt−1 ), (9)
where ms,wt−1 and Kwt−1,s are the vector and matrices containing the corresponding mean and covariance function of the network weights wt−1 evaluated at the memorable past for task s. Eqs 6 and 7 are used to calculate ms,wt−1 and Kwt−1,s respectively. Essentially, this gives us something similar to Eq. 1 but instead of the L2 distance, a kernel is used to improve weighting of examples. The final FROMP algorithm is summarised in Algorithm 1. Please see App. B for details on scaling to the multi-class setting.
The additional time complexity of this algorithm above vanilla Adam is O(MPKt) per optimisation step, and O([MPK + M3]t + NPK) once per task. O(NPK) is for updating the Laplace approximation Σ at the end of training on a task, as the Jacobian for each input training point needs to be calculated (as in Eq. 2). This is similar to EWC (Kirkpatrick et al., 2017). Note that, as we use a diagonal approximation to Σ, inverting it is fast. O(MPKt) is for calculating each of the t matrices Kwt−1,s , and O(M3t) is for inverting them. This is done once before training on each task (Eq. 7). Finally, during optimisation of the objective function, we need O(MPK) for differentiating the mean function m(xi). All of these additional costs are small for small M , except for O(NPK), which can be reduced by randomly sampling a subset of the task’s data. Note that it is possible to be stochastic in sampling a subset of previous tasks’ memory during every update, removing the time complexity dependency on t. Doing this gives the same overall complexity per step as in Adam (as M is usually of the same order as the mini-batch size).

heading: 4 EXPERIMENTS
text: We run the proposed method FROMP on toy datasets, permuted MNIST and split MNIST (LeCun et al., 1998; Goodfellow et al., 2013), and a split version of CIFAR-10 and CIFAR-100 (Krizhevsky et al., 2009). We optimise the objective in Eq. 9 using Adam (Kingma & Ba, 2015) with parameter β1 = 0.99 and further use gradient clipping to speed up training. To identify the individual benefits of the kernel in the loss (Eq. 9) as well as the selection of data points, we compare the following four methods: FROMP uses kernel and the proposed example selection, while FRORP instead uses randomly chosen examples. Further, we replace the kernel by an identity matrix leading to functional L2 regularisation and call the corresponding methods with and without our example selection technique FROMP-L2 and FRORP-L2.

heading: 4.1 TOY DATASET
text: We first test FROMP on many variations of a toy 2D binary classification dataset like that in Figure 1. We want to test its performance when exposed to different datasets of varying difficulty. We use a
2-hidden layer MLP (with 20 hidden units in each layer) for all experiments. Appendix D.3 details hyperparameter selection. In Appendix D.1 we show the brittleness and inconsistent behaviour of weight-space regularisation methods. In contrast, FROMP performs extremely well across many variations, showing consistently good results (see Table 1 and Appendix D.2 for visualisations).

heading: 4.2 PERMUTED AND SPLIT MNIST
text: Permuted MNIST consists of a series of tasks where each task is a fixed permutation of pixels to the entire labelled MNIST dataset. Like in previous work (Nguyen et al., 2018; Kirkpatrick et al., 2017; Zenke et al., 2017; Titsias et al., 2019), we implement a fully connected single-head network with two hidden layers, and report performance after 10 tasks. Each hidden layer consists of 100 hidden units and ReLU activation functions. We set the learning rate to 0.001, batch size to 128, and learn each task for 10 epochs. We use τ = 1 for both FROMP and FROMP-L2 (see Eq. 9).
The Split MNIST experiment was introduced by Zenke et al. (2017) and consists of five binary classification tasks built from MNIST: 0/1, 2/3, 4/5, 6/7, and 8/9. We use a fully connected multi-head neural network with two hidden layers, each with 256 hidden units and ReLU activation functions. Following the settings of previous work, we select 40 memorable points per task. The learning rate is set to 0.0001, batch size to 128, and we learn each task for 15 epochs. We find optimal parameters τ = 1 and τ = 10 for FROMP and FROMP-L2 respectively.
We report the final average accuracy for both benchmarks across all the tasks in Table 2. The proposed method achieves better performance than the weight-space methods EWC and VCL, as well as compared to the function-space method FRCL that is based on a GP formulation. Further, the benchmarks show superior performance of both the approach to select important examples (Sec. 3.2) and the functional regularisation using the kernel (Sec. 3.3). Memorable examples improve performance of the naive and efficient FRORP-L2 method by more than 6% on permuted MNIST and by 0.2% on the split MNIST. Standard deviation is also reduced in both cases. FROMP does not profit much from memorable examples compared to FRORP, probably because the performance is already close to the maximum achievable. Furthermore, Fig. 3c shows that our selection method greatly reduces the number of memorable points required: the L2 algorithm with random points requires over 100 points to match the performance when using 20 carefully selected points, and 200 points to match performance with 40, respectively. When combined with kernel-based functional regularisation, we obtain the best-performing method, particularly when memory size is small. In line with the toy example in Fig. 1, Fig. 4 illustrates the memorable past examples compared to randomly selected examples. The memorable past examples appear to be more special cases, and may therefore lie closer to the decision boundary.
Figs. 3a and 3b show the summed kernels across all the classes in permuted MNIST for a random and memorable set of points. For visualisation purposes, the diagonal is suppressed. Note that random points lead to less uniform weighting in the kernel, making it even more important in functional regularisation, leading to better performance (FRORP vs FROMP). All memorable points are important and the kernel is more uniform. In Fig. 3a, the kernel’s weighting of task 1 is very different from other tasks, leading to different magnitudes in the functional regularisation among tasks and therefore to eventual forgetting. The kernel further tells us that the tasks are correlated, as expected.

heading: 4.3 SPLIT CIFAR
text: Split CIFAR is far more complex than the MNIST experiments and consists of 6 tasks. The first task is the full CIFAR-10 dataset, followed by 5 tasks, each consisting of 10 consecutive classes from CIFAR-100. We follow the SI paper (Zenke et al., 2017) for our model architecture, using a multi-head CNN with 4 convolutional layers, followed by 2 dense layers with dropout. We use learning rate 0.0001 and batch size 256. All tasks are learned for 80 epochs and we use a memory of 10–200 examples. We use τ = 0.1 and τ = 0.05 for FROMP and FROMP-L2 respectively. In addition to continual learning baselines, we report the performance of networks trained from scratch
on each task. These cannot profit from forward/backward transfer. We also report the performance of a network jointly trained on all tasks. This is an upper bound on performance.
The experimental results in Fig. 5a show that FROMP outperforms other continual learning methods by a notable margin. The weight-space methods employed as baselines either cannot learn later tasks to a high accuracy (EWC, SI), or forget previous tasks (VCL). Interestingly, averaged over all tasks, FROMP also out-performs ‘from scratch’ training and achieves performance close to a jointly training on all tasks by a margin of less than 2%. Note that on tasks 4-6, FROMP achieves the same accuracy as the jointly trained model, showing no forgetting. We also calculate the backward transfer metric BWT from Lopez-Paz & Ranzato (2017). We find that FROMP has a score of −2.6 ± 0.9, which is joint best with EWC’s score of −2.3 ± 1.4 (VCL+coresets has −9.2 ± 1.8). Although EWC performs well in backward transfer, it does so at the cost of forward transfer. We calculate a forward transfer metric as the average of the improvement in accuracy on a new task over an independently trained model on that task (see App. C for more precise definitions of these metrics). FROMP achieves a forward transfer of 6.1 ± 0.7, whereas EWC has 0.17 ± 0.9 and VCL+coresets has 1.8 ± 3.1. Although we only focussed on preventing catastrophic forgetting, we find evidence of forward transfer, a key requirement in continual learning. Overall, given final average accuracy, backward transfer and forward transfer, FROMP clearly outperforms the other baselines.
In contrast to the rather simple MNIST benchmarks, both the benefit of selecting memorable points as well as using the kernel are clearly visible in Fig. 5b. If we only memorise a few examples, the performance gap due to using the kernel is around 4%. The selection of memorable points according to our metric leads to an increase in performance of around 7%. Applying both kernel and memorable point selection increases the performance by up to 11%. Additionally, standard deviation is reduced when using memorable points or the kernel. It is clear that both parts of the proposed algorithm are vital in achieving state-of-the-art performance on this benchmark.

heading: 5 DISCUSSION
text: We propose FROMP, a scalable function-regularisation approach for continual learning. FROMP uses a GP formulation of neural networks to select memorable past examples, regularising them using a kernel, and achieving state-of-the-art performance across benchmarks. This work enables a new way of combining regularisation methods and memory-based methods in continual learning. Future research could investigate other ways of selecting a memorable past (e.g. fixed memory size), more efficient ways of calculating kernel matrices, and the case where data does not arrive in tasks.

heading: A DETAILS ON DEEP NETWORKS TO GAUSSIAN PROCESSES
text: In this section, we detail the map that is presented in Sec. 3.1 to go from the posterior of a deep neural network to a Gaussian process. The map for linear regression and logistic regression can be found in the appendix of Khan et al. (2019). We recap the map for logistic regression and, in addition, walk through the case of softmax regression here. Recall the linear model from Eq. 3:
Model: ỹ = J(x)w + , with ∼ N(0, (Λ(x, y))−1) and w ∼ N(0, δ−1IP) (10) Data: ỹi := J(xi)w∗ − ( Λ(xi, yi) )−1 r(xi, yi). (11) Inference in this model yields the deep neural network posterior q(w) in Eq. 2. Logistic regression: as mentioned in Sec. 3.1, the parameter of the Bernoulli likelihood is given by applying the sigmoid link function to f(x) and we defined p(x) := σ(fw∗ (x)). Further, the derivative and Hessian of loss were particularised as r(x, y) = p(x) − y and Λ(x, y) = p(x)(1 − p(x)). We write ε ∼ N(0, 1) for standard noise and plug the quantities model (Eq. 10):
J(x)w∗ − p(x) − y Λ(x, y) = J(x)w + (Λ(x, y)) − 12 εi, (12)
which can be re-arranged to a new model that has an equivalent posterior, but where inference is done by observing original data points D:
y = p(x) + Λ(x, y)J(x)(w − w∗) + τ, with τ ∼ N(0,Λ(x, y)) and w ∼ N(0, δ−1IP). (13)
Softmax regression is a simple extension to the logistic regression case: we have a categorical likelihood with parameter p(x) := softmax(fw∗ (x)) and labels yi that are standard one-hot encoded basis vectors, i.e. have a single 1 at some position and otherwise zeros. Then we have r(x, y) = p(x) − y and Λ(x, y) = diag(p(x)) − p(x)p(x)>. Unfortunately, Λ(x, y) is of rank K − 1 and therefore we cannot uniquely invert it. The theory of Khan et al. (2019) therefore does not allow this because it requires Λ(x, y) 0. However, we can still write a model in line with Eq. 13 that we expect to have a posterior close to that of the deep neural network:
y = p(x) + Λ(x, y)J(x)(w − w∗) + τ with τ ∼ N(0,Λ(x, y)) and w ∼ N(0, δ−1IP). (14)
Conversion to GP can be achieved by taking the expectation and covariance of the linear model. To obtain the GP prior, we take the expectation of the linear model (10) over the prior p(w). To obtain the posterior, we take the expectation over q(w). Since we are interested in the posterior process, the latter is of interest and calculated for the logistic case in Sec. 3.1. The softmax regression case works equivalently but yields a K × K kernel, which can be represented as a symmetric tensor, or a NK×NK matrix over data setD with N examples. To avoid growing complexity with more classes, we model the GPs for each class as being independent, as discussed in Appendix B.

heading: B REDUCING COMPLEXITY IN THE MULTICLASS SETTING
text: For the softmax regression with K classes, we build an individual GP for each class, in order to avoid growing complexity with more classes. We utilise y(k) to denote the k-th item of y in Eq. (14). Then y(k) will be:
y(k) = p(k) + Λ(x, y)(k)J(x)(w − w∗) + τ(k). (15)
Here Λ(x, y)(k) denotes the k-th row of the Hessian matrix. We transform the K models to function space and treat them as independent. This allows us to split the KL-divergence in Eq. 8 into K individual divergences, and we obtain the simplified final objective,
min w τ ∑ i∈D t `(yi, fw(xi)) + 1 2 t−1∑ s=1 K∑ k=1 (m(k)s,w −m(k)s,wt−1 )>[K (k) wt−1,s]−1(m (k) s,w −m(k)s,wt−1 ). (16)

heading: C FURTHER DETAIL ON CONTINUAL LEARNING METRICS REPORTED
text: We report a backward transfer metric and a forward transfer metric on split CIFAR. The backward transfer metric is exactly as defined in Lopez-Paz & Ranzato (2017). The forward transfer metric is a measure of how well the method uses previously seen knowledge to improve classification accuracy on newly seen tasks. Let there be a total of T tasks. Let Ri, j be the classification accuracy of the model on task tj after observing the last sample from task ti . Let Rindi be the classification accuracy of an independent model trained only on task i. Then,
Backward Transfer, BWT = 1
T − 1 T−1∑ i=1 RT,i − Ri,i,
Forward Transfer = 1
T − 1 T∑ i=2 Ri,i − Rindi .

heading: D FURTHER TOY DATA EXPERIMENTS
text: This section provides further information and visualisations of toy 2D datasets, as well as hyperparameter settings for VCL.
D.1 WEIGHT-SPACE REGULARISATION’S INCONSISTENT BEHAVIOUR
Table 3 summarises the performance (measured by train accuracy) of FROMP and VCL+coresets on a toy dataset similar to that in Figure 1. FROMP is very consistent, while VCL (with coresets) is extremely brittle: it can perform well sometimes (1 run out of 5), but usually does not (4 runs out of 5). This is regardless of coreset points chosen for VCL. Without coresets, VCL forgets many past tasks, with very low performance. Previous work (Farquhar & Gal, 2019) has argued that this is inevitable for weight-regularisation-only methods such as VCL and EWC.
We now 3 runs with different random seeds of VCL-MP from Table 3: the coreset is chosen from an independent run of FROMP, with datapoints all on the task boundary. This selection of coreset is intuitively better than a random coreset selection. Please note that the results we show here are not specific to coreset selection. Any coreset selection (whether random or otherwise) all show the same inconsistency when VCL is run on them. This behaviour is not specific to coreset choice.
After Task 5 After Task 5
After Task 5
D.2 DATASET VARIATIONS
This section visualises the different dataset variations presented in Table 1. We pick the middle performing FROMP run (out of 5) and batch Adam run to show.
D.3 VCL AND FROMP HYPERPARAMETER SETTINGS FOR TOY DATASETS
FROMP. We optimised the number of epochs, Adam learning rate, and batch size. We optimised by running various settings for 5 runs and picking the settings with largest mean train accuracy on the toy dataset in Figure 1. We found the best settings were: number of epochs=50, batch size=20, learning rate=0.01. The hyperparameters were then fixed across all toy data experimental runs, including across dataset variations (number of epochs was appropriately scaled by 10 if dataset size was scaled by 10).
VCL+coresets. We optimised the number of epochs, the number of coreset epochs (because VCL+coresets trains on non-coreset data first, then on coreset data just before test-time: see Nguyen et al. (2018)), learning rate (we use Adam to optimise the means and standard deviations of each parameter), batch size, and prior variance. We optimised by running various settings for 5 runs and picking the settings with largest mean train accuracy. We found the best settings were: number of epochs=200, number of coreset epochs=200, a standard normal prior (variance=1), batch size=40, learning rate=0.01. VCL is slow to run (an order of magnitude longer) compared to all other methods (FROMP and batch Adam).

Review summaries:
The paper proposes a method for continuous learning called Functional Regularization of Memorable Past (FROMP) which maintains the output distribution of models on memory samples. FROMP uses the Laplace approximation and Gaussian process with neural tangent kernel (NTK) to approximate the output distribution. According to the leverage score strategy, the sample to be stored is selected. The leverage score strategy tends to select the sample of highest variances.