Title: NPCL: Neural Processes for Uncertainty-Aware Continual Learning
Venue: NeurIPS 2023
Accepted: yes
Keywords: Continual Learning

Neural Process

Uncertainty

Incremental Learning
Abstract: Continual learning (CL) aims to train deep neural networks efficiently on streaming data while limiting the forgetting caused by new tasks.  However, learning transferable knowledge with less interference between tasks is difficult, and real-world deployment of CL models is limited by their inability to measure predictive uncertainties. To address these issues, we propose handling CL tasks with neural processes (NPs), a class of meta-learners that encode different tasks into probabilistic distributions over functions all while providing reliable uncertainty estimates. Specifically, we propose an NP-based CL approach (NPCL) with task-specific modules arranged in a hierarchical latent variable model. We tailor regularizers on the learned latent distributions to alleviate forgetting. The uncertainty estimation capabilities of the NPCL can also be used to handle the task head/module inference challenge in CL. Our experiments show that the NPCL  outperforms previous CL approaches. We validate the effectiveness of uncertainty estimation in the NPCL for identifying novel data and evaluating instance-level model confidence. Code is available at https://github.com/srvCodes/NPCL.

NPCL: Neural Processes for Uncertainty-Aware Continual Learning

Abstract

Continual learning (CL) aims to train deep neural networks efficiently on streaming data while limiting the forgetting caused by new tasks. However, learning transferable knowledge with less interference between tasks is difficult, and real-world deployment of CL models is limited by their inability to measure predictive uncertainties. To address these issues, we propose handling CL tasks with neural processes (NPs), a class of meta-learners that encode different tasks into probabilistic distributions over functions all while providing reliable uncertainty estimates. Specifically, we propose an NP-based CL approach (NPCL) with task-specific modules arranged in a hierarchical latent variable model. We tailor regularizers on the learned latent distributions to alleviate forgetting. The uncertainty estimation capabilities of the NPCL can also be used to handle the task head/module inference challenge in CL. Our experiments show that the NPCL outperforms previous CL approaches. We validate the effectiveness of uncertainty estimation in the NPCL for identifying novel data and evaluating instance-level model confidence. Code is available at https://github.com/srvCodes/NPCL .

1 Introduction

Continual learning (CL) aims to help deep neural networks (DNNs) learn from a stream of nonstationary tasks by retaining the previously acquired knowledge [54, 35]. To achieve this, CL agents target alleviating the catastrophic forgetting issue with restricted computational and memory costs [42]. This requires balancing the plasticity for new knowledge with the stability for old [37].

To handle forgetting in CL, experience replay (ER) methods [30, 6] are one effective way to train DNNs on a memory buffer with a subset of the past tasks' experiences. Other than the ER methods, many regularization-based approaches have been proposed to penalize the forgetting on the DNNs' parametric [30] or representation spaces [5, 4]. However, these may still suffer from interference due to the regularization on the entire parameter space [7]. To address this, parameter isolation methods [53, 33] define task-specific training components but are usually confined to task incremental CL setups requiring task ID during testing [47]. It is thus challenging for CL agents to maintain transferable and shareable knowledge. Lastly, a hurdle to the real-world deployment of CL agents is their inability to measure predictive uncertainties, which impacts the potential utilization of CL across various practical applications, particularly those with critical safety considerations [31].

To tackle the above issues, we propose to explore CL models using neural processes (NPs) [13, 14], a class of meta-learners that model tasks as data-generating functions from a stochastic process. NPs learn a prior over functions by marginalizing over a set of data points, or context , thus enabling rapid adaptation to new observations through inference on functions. Additionally, their probabilistic nature endows them with reliable uncertainty quantification capabilities [14, 27, 24, 25]. Our motivations to explore NPs for CL are thus two-fold. First, NPs exploit Bayes' theorem, which naturally enables CL through sequential posterior construction. Namely, NPs perform inference over the function space by learning context-based priors, which are updated to posteriors upon observing (additional) targets . Second, NPs meta-learn input correlations through a set of latent variables, which could be a key to meta-learn knowledge transfer across multiple correlated tasks. However, NPs face challenges in directly addressing CL tasks, given that (a) the reliance on a single global latent leads to suboptimal modeling of complex CL tasks where multiple correlated tasks could occur simultaneously, (b) NPs cannot directly handle the forgetting of past task correlations arising from the non-static data stream.

To address the above desiderata, we propose Neural Processes for Continual Learning (NPCL), a hierarchical latent variable model with a global latent variable to capture inter-task correlation and task-specific latent variables for finer knowledge. Fig. 1 shows the NPCL exploiting functional correlation among current and past task training samples of ER. The drift of global and past task-specific distributions away from their original forms is the major cause of forgetting in the NPCL. We thus propose to regularize the latent variables to be similar to their old forms and show the merits of regularization over typical parameter-based regularization. We then leverage the uncertainty encoded by the NPCL for the aforesaid CL challenge of task head inference. To this end, we propose using entropy as an uncertainty quantification metric (UQM). The NPCL outperforms previous probabilistic CL models

Task0

Episodic memory

Task 1

Context

Target

Context

Target

Context

Target

Task 0

Task 0

Task 1

encoder

encoder

encoder

Global

Global

encoder

encoder

Task-specific

regularization

Global

regularization

and delivers better or comparable results than state-of-the-art deterministic CL methods, which usually have an edge over their probabilistic counterparts in terms of accuracy. Moreover, our ablations show the enhanced efficacy offered by the NPCL on continual learning settings requiring model calibration and few-shot replay. To study the further usages of the NPCL's uncertainty estimation, we show its out-of-the-box readiness for novel data detection and instance-level confidence evaluation [17]. Lastly, we list the key limitations of the NPCL as an attempt to lay further solid directions for uncertainty-aware continual learning.

2 Related Work

Continual Learning (CL). Existing CL methods address catastrophic forgetting through three major approaches: (a) Regularization-based methods penalize changes in a model's important weights for previous tasks, such as Elastic Weight Consolidation (EWC) [30], Synaptic Intelligence (SI) [54], etc. (b) Parameter Isolation-based methods partition the network's parameters to specialize on individual tasks, e.g., Douillard et al. [9] learning task-specific tokens for Transformers. (c) Replay-based methods use an episodic memory to preserve a fraction of the past tasks' experience for preventing forgetting while learning on new tasks; e.g., experience replay (ER) [6] storing past inputs, dark experience replay (DER) [4] storing past logits, and Yan et al. [52] using a loss-aware memory for ER. Our method uses (a) via regularization of distributions, (b) via task-specific latent heads, and (c) via replay of past task inputs and distributions.

Neural Processes (NPs). NPs were introduced to meta-learn a distribution of a family of functions modeling the data-generating process through their deterministic [13] and/or latent summaries [14]. Attentive NPs (ANPs) [27] replaced the averaging operation in NPs with a dot-product attention [48] to enhance their expressivity. NPs/ANPs rely on a global latent that limits their ability to

model observations from multiple functions. Some works address this through local latent variables that model fine-grained correlation among a subset of the observations [50]. Recently, multi-task processes (MTPs) [26] have been studied to model multiple tasks with NPs, owing to the hierarchy of task-specific latent variables conditioned on a global latent. However, existing MTPs cannot directly handle CL problem because (a) MTPs are not designed to learn on sequential tasks and thus do not handle forgetting; (b) MTPs target the multi-task learning problem where the label for an input spans the exhaustive output space of available tasks unlike the CL setup where each input may belong to one specific and unknown task, out of multiple seen tasks.

Besides, the added complexity of variational inference has limited NP applications to mostly proofof-concept focused regression tasks [23]. The potential of NPs for large-scale classification tasks thus remains largely under-explored except in some recent works. Wang et al. [49], for instance, leverage the predictive uncertainties of NPs to decide on pseudo labels for unlabeled data in semi-supervised classification. In our work, we use NPs to handle CL with classification tasks, reflecting the benefits of principled Bayesian learning, uncertainty estimation, and easily integrated existing ER.

3 Preliminaries: Neural Processes

Given the data { ( x t , y t ) } = ( X t , Y t ) ∼ D t of a task t , the goal is to learn the mapping F t ∗ : X t → Y t reflecting the data-generating process. NPs [13, 14] meta-learn the distribution over the mapping functions from the given tasks. This is equivalent to meta-learning the distribution over the predictions p ( y t i | x t i , C t ) for the target output y t i belonging to a target data set T t , given the corresponding target input x t i and a context set C t [14, 23]. To reflect the meta-learning behavior of NPs [14], the training samples are split into the context set |C t | = m and a target set |T t | = m + n containing context set C and additional samples. NPs learn the Gaussian priors and posteriors using a neural network F t [ ϕ ; θ ] ≈ F t ∗ for the predictive distribution, where ϕ and θ parameterize an encoder q and a decoder p , respectively. This involves deriving a global variable z G to estimate the prior p ( z G |C t ; ϕ ) , and then maximizing the marginal likelihood p ( Y t T |C t , X t T ; θ ) :

where p ( Y t T | X t T , z G ) = ∏ m + n i =1 p ( y t i | x t i , z G ) is the generative likelihood. In CL with streaming tasks, maintaining the memorization of the task prior p ( z G |C t ; ϕ ) can help NPs avoid forgetting the t -th task. Our aim behind enabling NP for CL is to seek a trade-off to preserve such task priors while sharing the parameters among tasks.

4 Continual Learning with Neural Processes

CL considers learning from a series of different tasks arriving sequentially, i.e. , D t | 0 ≤ t ≤ T -1 . Here, D t can belong to classification tasks with different classes in class incremental CL [8]. Let l be the cross-entropy (CE) loss for classification, the CL objective for the task t involves minimizing:

on all [0 , t ] tasks seen sequentially. Achieving Eq. (2) is challenging in real-world CL scenarios, where the previous datasets can be unavailable due to constraints on privacy, storage, etc. Learning on the sequential data with varying distributions causes catastrophic forgetting . To alleviate the issue, experience replay (ER) is used in CL to store and periodically revisit some past experiences, e.g., samples ( x t , y t ) of task t , in a small episodic memory M for replay in the future [8, 6]. In this work, we develop our method with the classical reservoir sampling-based ER [6] for a task boundary-agnostic updating of M .

CL methods with ER solely still suffer from severe forgetting issues [6, 52, 8]; and jointly optimizing parameters on D t and M has several drawbacks [35, 4]. Considering that a deterministic mapping F t limits capturing the randomness behind the real-world data in a stream, to utilize the meta-learning ability of NPs, we next propose extending models with Eq. (2) and Eq. (1) to arrive at our NPCL model. It allocates small subsets of parameters to learn robust per-task and global priors and uses stochastic factors to meet data-driven challenges such as deducing the right parameters for inference.

f

Input images

x 1

.

.

y 0

1

x m

y t m

MLP

MLP

SAdet

r

1

rm

SAlat

s 1

i

s t

i

CAlat

Σ

t

μG

σG

Σ

μ1

σ1

μ2

σ2

μt

σt

Task-specific distributions

+

+

~

~

~

~

+

+

+

z 1

z t

z 2

CAdet

r

*

Query

x

*

Deterministic Path

Latent Path

Values

x

*

r

*

x

*

r

*

Decoder during training

Decoder during inference

Σ

Aggregation

+

Concatenation

Sampling

~

y

*

z 1

MLPs

MLPs

z 1

z t

Per-task self-

attention

Inter-task cross

attention

Uncertainty

aware inference

Global

distribution

y

*

Per-task

aggregation

Global

aggregation

Inter-task

cross-attention

x 2

y 0

2

z 2

.

.

.

.

.

.

4.1 Neural Processes for Continual Learning

Given the task in a stream, we model the CL task based on NPs formulated in Eq. (1). In ER framework with a small memory buffer, where the context and target could be from tasks indexed by t , Eq. (1) can be extended to derive the joint posterior for NPs [14] as:

where z G models the joint distribution F 0: t ∗ of CL tasks and is an enabler of the knowledge transfer [35] between these (see App. A.3 for ELBO). Eq. (3) poses two challenges. First, a labeled context C is needed for inferring predictions as all NPs, which is unprepared in CL setups by default. To overcome this, we use the memory M offered by the ER-based setups as context during inference. Second, jointly modeling F 0: t ∗ ignores the dynamics of per-task stochasticities and is still prone to the bottlenecks of Eq. (2). We address the issue by introducing hierarchical modeling and redefining Eq. (3) in the following.

4.2 NPs with Hierarchical Task-specific Priors for CL

To learn informative task priors while tackling the forgetting issue in CL, we propose a hierarchical modeling of the NP model. We preserve the global latent z G to induce the direct knowledge transfer and add the task-specific upon the global variable to enhance the capturing of task-specific knowledge in CL. We thus extend Eq. (3) with task-specific latent variables z t = ( z 0 , .., z t ) . As a result, our posterior is a two-step hierarchical latent variable model (Fig. 2) where the global and the per-task latent variables model the inter and intra-task correlations, respectively:

where the entire context C 0: t is first encoded into z G and then conditioned on z G , the task-specific context C t := ( C 0 , .., C t ) are encoded into their respective latent variables. We refer to Eq. (4) as NP for CL (NPCL). The hierarchical modeling enables NPCL to learn the shareable knowledge via z G and the task-specific knowledge via z t in the meta-learning fashion of NPs. Task identity is used in training to specify the task-specific latent variables. Unlike MTP [26] making predictions of all tasks for all inputs, NPCL needs to specify the corresponding output space for each test sample. We further discuss the relationship between NPCL and NP-based meta-learning in App. B.

4.3 The NPCL Architecture

As standard NPs [14, 27], the training samples are split into a context C and a target set T containing C and additional samples. Given the inputs x i from C or T , we first pass these to a feature extractor

f . With a slight abuse of notation, we denote the features as x i : x i ∈ R | f | and let | f | denote the dimension. x i concatenated with the one-hot encoded labels, i.e. , [ x i ; y i ] , is fed to the NPCL encoder with a deterministic and a latent path, and then to the decoder (Fig. 2). All the NPCL layers use multi-layer perceptrons (MLPs) projections, i.e. , MLP ( x ) : R | f | → R | o | , where | o | is the output feature dimension as a hyperparameter. We denote a normal distribution with a mean µ and a variance σ 2 by N ( µ, σ 2 ) ; the global and the task-specific distributions are N ( µ G , σ 2 G ) and N ( µ t , σ 2 t ) .

Latent Encoder. The latent path comprises of the projection Φ lat i = MLP ([ x i ; y i ]) followed by two attention operations [48]. First, per-task projections form the keys, values and queries to taskwise self-attention layers SA t lat that produce order-invariant encodings s t i over the samples of task t . Second, all encodings { s 0: t i } n + m i =1 serve as the keys, values and queries to cross-attention layers CA 0: t lat that enrich their order-invariance from intra-task s t to inter-task s G . s t and s G are used to derive the N and M Monte Carlo samples of the global z G and the task-specific latent variables z t , respectively (see App. C for more details) using the reparameterization trick [29]. We set M = 1 to enhance the inter-task stochasticity in posterior while retaining superior computational efficiency (see App. E). For each input, we thus get N × ( t +1) latent outputs.

Deterministic Encoder. The deterministic path is similar to that of the ANP [27] and outputs an order-invariant representation r ∗ for target x ∗ (see App. C).

Decoder. Based on the task information, the decoder adopts separate mechanisms during training and inference. At train time, we use the available task labels to filter the N true latent variables { z t i } N i =1 , combine them with r ∗ and x ∗ , and decode the logits h ∗ . We discuss the decoding operation in the testing phase without task ID in Sec. 4.5.

4.4 Learning Objectives for the NPCL

The learning of the NPCL involves variational inference alongside additional regularizations.

Evidence Lower Bound (ELBO). The intractability of Eq. (4) leads us to the following ELBO:

where p θ ( Y t T | X t T , z t ) is approximated by the CE loss. D t and D G denote the KL divergence (KLD) between the approximate posterior and prior for the task-specific and global distributions, respectively. We derive the ELBO in App. A.1. We next propose two techniques to counter forgetting in the NPCL. Henceforth, we use D to denote the Jenshen-Shannon (JS) divergence [11] between two distributions.

Global Regularization (GR). The training data of a CL task t is dominated by the tth task samples. For the NPCL, this drifts the global distribution N ( µ t G , σ t G ) of past tasks towards the new task (Fig. 1). We thus regularize their global distribution using the one learned at step t -1 :

Task-specific Regularization (TR). While GR helps preserve the joint distribution of the past tasks, the hierarchy in the NPCL leaves their task-specific distributions to be still prone to forgetting (Fig. 3(a)). This can further amplify the posterior collapse [46] for past task-specific latent variables during CL training (Fig. 3(b)). To alleviate these, we regularize the learning of previous task distributions as:

where j is the step at which the task t arrived. Given the reliance of Eq. (6) and Eq. (7) on past distributions, we maintain a separate buffer, which we refer to as the distribution memory M N , to store the global N ( µ G , σ 2 G ) and the task-specific distributions N ( µ 0: t -1 , σ 2 0: t -1 ) . M N is updated after each incremental training step, where we run an additional pass over the training data of task t alongside replaying M to record the batchwise averaged global and task-specific means and variances.

Integrated objective. Using α , β , γ , and δ to denote the loss weights, our total loss can be written as:

(a) Drift of past task distributions

(b)

log

KL

(

q

|

p

)

w/o TR

(c)

log

KL

(

q

|

p

)

w/ TR

S-CIFAR-10

averaged)

120

Task 0

Task 1

Task 2

100

Task 3

(Batchwise

80

Distance

60

40

1

2

3

4

Incremental training timeline

Global

-2.5

0

-5.0

0

10203040

Train epochs

-3

-4

Task specific

-5

-6

2

7

3

-8

4

-9

0

10203040

Train epochs

Global

0

0

1020304

40

-1

0

Task specific latents

2

3

2

-4

m

-5

-6

0

10203040

Train epochs

where CE, D t , and D G act on the current task data D t and on the buffer M while GR and TR act only on M . By setting 0 < { α, β, γ, δ } < 1 , we resort to using the (respective) cold posteriors [55].

4.5 Inference with Uncertainty Awareness

NPCL's inference uses f to obtain the features x ∗ for the target test images. Although the task identification information is used to train the task-specific module, task identification of test samples is usually unavailable in general real CL tasks (except the restricted task-incremental setting [8]). Given x ∗ from the encoder, this leaves us with { z 0: t i } N i =1 possible modules and the corresponding latent variables to use and infer for obtaining the prediction. A naive solution is to average over N ∗ ( t +1) logits. But as the number of tasks grows, the noise from incorrect task priors would dominate the posterior. We thus propose using entropy as an uncertainty quantification metric (UQM) to filter the logits of the true task head ψ t :

where δ is the softmax function and U is the total Shannon entropy [45] over the N logits per head. As we use true head ψ t ϕ during training, ϕ ∈ ψ t produces low entropy for within distribution data. In light of Eq. (9), the NPCL can be seen as a special case of the mixture-of-expert (MoE) modeling [36, 51], where we leverage uncertainty to select the top-1 expert during inference.

5 Experiments

Datasets. We evaluate the NPCL on class and domain incremental learning (IL) settings. For class-IL, we use three public datasets: sequential CIFAR10 (S-CIFAR-10) [35], sequential CIFAR100 (S-CIFAR-100) [54], and sequential Tiny ImageNet (S-Tiny-ImageNet) [6]. For domain-IL, we use Permuted MNIST (P-MNIST) [30] and Rotated MNIST (R-MNIST) [35]. S-CIFAR-10, S-CIFAR100, and S-Tiny-ImageNet host 10, 100, and 200 classes each with 5000, 500, and 500 training images and 1000, 100, and 50 test images per class, respectively. The number of sequential tasks for S-CIFAR-10 is 5 (2 classes per task); for S-CIFAR-100 and S-Tiny-ImageNet is 10 (10 and 20 classes per task, respectively); for P/R-MNIST is 20. P-MNIST creates tasks out of MNIST [32] by randomly permuting the pixels, and R-MNIST does it by rotating images randomly in [0 , π ) .

Architectures. For a fair comparison against other methods, we rely on the Mammoth CL benchmark [3]. Our backbone for class-IL experiments is a ResNet-18 [20] without pretraining, while for domain-IL, we rely on a fully connected (FC) network with two hidden layers [35]. The NPCL relies on Xavier initialized [15] FC layers with two 256-d hidden layers for class-IL and one 32-d layer for domain-IL setups. For class-IL, each FC layer is followed by layer normalization [1] and ReLU.

Configuration and hyperparameters. We train all models using SGD optimizer. The number of training epochs per task for S-Tiny-ImageNet is 100, for S-CIFAR-(10/100) is 50, and that for (P/R)-MNIST is 1. We detail further the configurations, hyperparameters, and their tuning in App. D.

Baselines. Weemploy several CL methods to compare the NPCL with. Regularization-based methods include oEWC [44] and SI [54]; knowledge distillation-based methods include iCaRL [42] and LwF [34]; rehearsal-based methods are ER [43], RPC [41], FDR [2], DER [4]. Among neural processes, we use the NP [14], the ANP [27], and the Single Task (ST) NPCL (see App. A.2) with only per-task latent variables. We use five non-CL benchmarks as upper bounds on the performances: Joint ResNet / NP / ANP / NPCL perform joint training of all tasks using a single task head while the multitask NPCL infers task heads in joint training using Eq. (9). Finally, the naive NPCL inference averages the logits of all task heads.

5.1 Results

Table 1 reports the average accuracy after training on all tasks. Across all settings, the NPCL boosts the performance of the ER and achieves either comparable or better results against the state-of-theart (SOTA), e.g. , DER. Compared to the regularization-based oEWC and SI, the NPCL obtains a significant gain in performance. This is because the former methods calculate weight importance, which is liable to changes with new tasks. Regularizing explicitly towards the global and per-task distributions of past tasks helps the NPCL overcome this. Further, on both class and domain-IL, the NPCL stands out in the most challenging setting where the episodic memory size is the smallest. On domain-IL where the shift occurs within the domain instead of the classes, the performance of a number of methods degrade as they forget the relations among a task's classes. Preserving the tasks' distributions helps the NPCL maintain valuable information in this case. Analyzing the backward transfer (BWT) scores [39] shows that the NPCL's forgetting is competitive or lesser than the SOTA (see Table 10). Lastly, we note that the ST-NPCL with no hierarchy lags in BWT and accuracy due to limited knowledge transfer between tasks.

5.2 Ablation Studies

Why uncertainty-aware inference works? For our uncertainty-aware task head inference mechanism to be effective, a CL model must produce probabilities that align well with the ground truth labels of the test samples. We thus ablate the calibration errors for different CL baselines using the well-established Expected Calibration Error (ECE) [16] and Adaptive Calibration Error (ACE) [38] metrics. Table 2 shows that the NPCL has the least calibration error across S-CIFAR10 ( M size = 200 ) and S-CIFAR-100 ( M size = 500 ). In general, the probabilistic nature of the ANP [27] and

(a) Accuracy

(b) Uncertainty

06

65

7.5

2.1

3.5

22

80

0.085

0.29

0.45

0.39

0.15

- 0.7

set

M *

N

2.6

1.1

50

13

21

68

14

12

5.9

12

70

40

60

50

set

"

2 -

0.66

0.76

0.11

0.17

0.063

0.17

0.42

0.34

0.34

0.44

-0.6

0.4

0.5

ncertainty

m-

4.

0.95

3.5

7.2

4

1.2

12

1.1

73

6.6

90

- 30

-20

-10

m

0.46

0.31

0.42

0.36

0.39

0.24

0.062

0.62

0.018

0.3

-0.3

0.2

0.1

-o

-

Module ID

2

-m

4

0

Module ID

2

- m

4

(a) Accuracy

(b) Uncertainty

63.8

Contextsize:

0.14

Context size:

63.6

63.2

63.4

50

200

5

100

Uncertainty

0.13

0.12

0.11

100

5

50

200

62.8

63.0

0.10

0.09

0.08

62.6

S-CIFAR-10

S-CIFAR-10

the NPCL benefits them in confidence calibration over the deterministic methods with comparable accuracies, i.e., ER [43] and DER [4].

Uncertainty-Accuracy trade-off. Fig. 4 ablates the average accuracies and uncertainties of each task head predictions over the test set of each task on S-CIFAR-10 (see App. G.2 for S-CIFAR-100). First, we observe that the accuracy of predictions made by true task heads are, in general, a magnitude higher than the rest. For uncertainty, this trend is reversed. This verifies our assumption that restricting latent heads to learn only their true label distribution makes them more confident in modeling the within-task samples. Second, for recently trained tasks, the uncertainty differences between the true task heads and the rest are greater than the earlier tasks. This, in general, suggests that the extent of forgetting goes beyond a CL model's accuracy and to other aspects of its learning such as its predictive confidence. To support the latter claim, we probe the BWT of uncertainty and see a strong correlation with the BWT of accuracy (see Fig. 7).

Learning objectives. Table 3 shows the impact of distribution regularization, with the baseline being the NPCL trained with no regularization. We observe that the baseline performs worse than the ER as the NPCL layers forget more. Including TR in our objectives leads to the single-most gain over the baseline. We further study how these objectives guide the learning of the global and task-specific distributions with training (see App. G.1). We observe that the NPCL w/ TR leads to better learning of the current task as well as preserving the

past task distributions but at the cost of drifting the global distribution. The NPCL w/ GR restricts the drift of the global distribution but not for the per-task distributions. The NPCL w/ GR and TR strikes a balance in between.

Effect of Monte Carlo (MC) samples. We spot two combinations of the number of global N and task-specific M MC samples in favor of performance. Out of these, we choose the one with the superior computational efficiency (see App. E for details).

Context size. We study the average accuracy (Fig. 5(a)) and uncertainty (Fig. 5(b)) after training on S-CIFAR-10 with |M| = 200 , and then varying the context sizes during inference. Similar to other NPs [49, 12], we find a positive correlation between context size and performance, indicating that the NPCL utilizes useful information from diverse contexts, thereby reducing its task inference ambiguity.

Few-shot replay settings. A key strength of NPs remains their few-shot learning capability. To study how well the NPCL retains this trait against other CL baselines, we ablate their accuracy and ECE [16] on rehearsal memory sizes of 5 and 10 (see Table 4). We find that on both memory sizes, the NPCL outperforms ER [43] and DER [4]. For M size = 5 on S-CIFAR-100, we observe that the ER outperforms the DER in terms of accuracy. However, the latter still offers more confident predictions (characterized by a lower ECE). This implies that on few-shot CL replay settings while regularizing the predicted logits towards their old forms - as done by the DER - helps improve the predictive confidence over the ER, regularizing the task distributions towards their old forms - as done by the NPCL - remains the superior way to enhance the model's predictive confidence.

Storage efficiency. For each task, the NPCL stores two new vectors - task-specific mean and variance, and replaces the global mean and variance with the current global ones. The NPCL storage thus scales constantly in the size |M| of the memory. This offers a strong edge on storage efficiency when compared to DER [4] scaling quadratically, i.e. , |M| × N C where N C is the total number of classes. For instance, on S-Tiny-ImageNet with |M| = 500 , N C = 200 , the NPCL's cumulative storage amounts to a (flattened) vector of size 6132 ( 256 × 10 × 2 for 256-d means and variances of 10 tasks plus 256 × 2 for 256-d global mean and variance plus 500 for 1-d task labels) while that of DER amounts to 100,000 ( 200 × 500 for logits of 500 memory samples), i.e., a 93.868% relative storage efficiency. We report the storage efficiency of the NPCL over DER across all settings in App. G.3.

5.3 Applications of Uncertainty Quantification

The probabilistic nature of the NPCL offers it an edge in leveraging data-driven UQMs. To further study the usage of predictive uncertainties, we conduct two experiments with a trained NPCL model.

Novel data identification. Novel data identification seeks to distinguish out-of-distribution data ( D OOD ) from in-domain data ( D ID ) . Forgetting makes CL models struggle further on the task [19]. The probabilistic sampling in the NPCL opens the door for leveraging its predictive variances - which are more reliable estimates of aleatoric uncertainty than pointwise predictions [22]. For the N predicted logits, we thus compute the variances over their softmax scores, σ 2 ( δ ( h ∗ )) , and over their uncertainty scores, σ 2 ( U ( h ∗ )) . Table 5 evaluates these met-

rics for ID (S-CIFAR-10) and OOD (first 10 classes of S-CIFAR-100) data after each task. We observe that the variance scores of either metrics on D ID are up to a magnitude lower than those on D OOD. We further observe an overall decrease in the variances with the arrival of further incremental tasks. This could be attributed to the generalization of more low-level features in the novel data as in-domain [18, 16]. We detail further novel data identification experiments in App. G.5.

Instance-level model confidence evaluation. The confidence evaluation framework of Han et al. [17] provides finer granularity for assessing the predictive confidence of classification models (see App. G.6 for more details and normality test). Table 6 shows the results of one run of the framework after training on S-CIFAR-10. Here, we use the task identity to select the latent head per class. We observe the mean prediction interval width (PIW) of the true class label among the correct predictions to be narrower than that of the incorrect predictions, implying that the NPCL's variations of predicted class labels are smaller when the predictions are correct. We also notice a higher accuracy among the test instances rejected by the t -test than those not rejected.

6 Limitations

We list the key limitations of the NPCL to facilitate future research directions.

Incompetence of dot-product attention. Similar to the ANP [27], the NPCL employs the permutation-invariant scaled-dot product attention [48] to weigh the relevant context and target embeddings. Visualizing the attention weights computed by the cross-attention layers of the deterministic path shows us that the top attended context for the target queries often contain points belonging to other CL tasks (Fig. 11(a)). This limits the performance sensitivity of the NPCL with respect to the increase in context thus resulting in a lag of accuracy behind SOTA on CL setups with larger episodic memory sizes (see Table 1). To further verify the relevance of the attended context, we visualize the self-attention weights of all context points. Fig. 11(b) shows that the lowest or the maximum values in the context dataset have larger weights. Such an observation is in line with existing works pointing that the scaled-dot product attention can derive irrelevant set encodings of the context points and can thus lag at exploiting the context embeddings properly [28].

Computational overhead. Table 7 compares the number of parameters of the NPCL with ER / DER [3] where the latter rely solely on the ResNet-18 backbone as they do not exploit parameter isolation for task heads. Overall, the percentage increase in parameter number is 57 . 6% for S-CIFAR-10, 46 . 57% for S-CIFAR-100 and S-Tiny-ImageNet, and 55 . 25% for P/R-MNIST.

Inference time complexity. The reliance on self-attention means that the inference time complexity of the NPCL is O ( n ∗ m ) , where n is the number of context points (sampled from the episodic memory) and m is the number of target points (the number of test samples). Due to this, the runtime for inference scales polynomially with the number of context points (sampled from the buffer). Table 6 reports the runtime of the NPCL on S-CIFAR-10 and S-CIFAR-100 settings by varying the context sizes. For reference, the first row reports the runtime of

ER / DER whose inference complexity is O (1) in the memory buffer size.

Incompatibility with logits-based replay. The NPCL is incompatible with logits-based replay because of the stochasticity in the posterior induced by Monte Carlo sampling. Overcoming this could help boost the performance of the NPCL further over SOTA like DER [4] and DER++ [3].

7 Conclusion

In this paper, we propose Neural Processes for Continual Learning (NPCL), a hierarchical latent variable setup designed to jointly model the task-agnostic and task-specific data-generating functions in continual learning. We study the potential forgetting aspects in the NPCL and propose to regularize the previously learned distributions at a global and a per-task granularity. We demonstrate that using entropy as an uncertainty quantification metric helps the NPCL infer correct task heads and boost the performance of baseline experience replay to even surpass state-of-the-art deterministic models on several CL settings. Our robust ablations show the efficacy of the NPCL for model calibration measurement and few-shot replay in CL. We further study out-of-the-box applications of the uncertainty estimation capabilities of the NPCL for novel data identification and instance-level confidence evaluation. We conclude our ablations by listing the key limitations of the NPCL, which we hope could lay solid directions for further research on uncertainty-aware continual learning.

Acknowledgment

This work was partially supported by an ARC DECRA Fellowship DE230101591 awarded to Dong Gong. We acknowledge the reviewers for their valuable feedback.

References

Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. 2016.

Ari Benjamin, David Rolnick, and Konrad Kording. Measuring and regularizing networks in function space. In International Conference on Learning Representations , 2018.

Matteo Boschini, Lorenzo Bonicelli, Pietro Buzzega, Angelo Porrello, and Simone Calderara. Class-incremental continual learning into the extended der-verse. IEEE Transactions on Pattern Analysis and Machine Intelligence , 2022.

Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and SIMONE CALDERARA. Dark experience for general continual learning: a strong, simple baseline. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems , volume 33, pages 15920-15930. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper/2020/file/ b704ea2c39778f07c617f6b7ce480e9e-Paper.pdf .

Arslan Chaudhry, Marc'Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-GEM. In International Conference on Learning Representations , 2019. URL https://openreview.net/forum?id=Hkf2_sC5FX .

Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K Dokania, Philip HS Torr, and Marc'Aurelio Ranzato. On tiny episodic memories in continual learning. arXiv preprint arXiv:1902.10486 , 2019.

Arslan Chaudhry, Naeemullah Khan, Puneet Dokania, and Philip Torr. Continual learning in low-rank orthogonal subspaces. Advances in Neural Information Processing Systems , 33: 9900-9911, 2020.

Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Aleš Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. A continual learning survey: Defying forgetting in classification tasks. IEEE transactions on pattern analysis and machine intelligence , 44(7): 3366-3385, 2021.

Arthur Douillard, Alexandre Ramé, Guillaume Couairon, and Matthieu Cord. Dytox: Transformers for continual learning with dynamic token expansion. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 9285-9295, 2022.

Xinjie Fan, Shujian Zhang, Korawat Tanwisuth, Xiaoning Qian, and Mingyuan Zhou. Contextual dropout: An efficient sample-dependent dropout module. In International Conference on Learning Representations , 2021. URL https://openreview.net/forum?id=ct8_a9h1M .

Bent Fuglede and Flemming Topsoe. Jensen-shannon divergence and hilbert space embedding. In International Symposium onInformation Theory, 2004. ISIT 2004. Proceedings. , page 31. IEEE, 2004.

Ning Gao, Hanna Ziesche, Ngo Anh Vien, Michael Volpp, and Gerhard Neumann. What matters for meta-learning vision regression tasks? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 14776-14786, 2022.

Marta Garnelo, Dan Rosenbaum, Christopher Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo Rezende, and SM Ali Eslami. Conditional neural processes. In International Conference on Machine Learning , pages 1704-1713. PMLR, 2018.

Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J Rezende, SM Eslami, and Yee Whye Teh. Neural processes. arXiv preprint arXiv:1807.01622 , 2018.

Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics , pages 249-256. JMLR Workshop and Conference Proceedings, 2010.

Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International conference on machine learning , pages 1321-1330. PMLR, 2017.

Xizewen Han, Huangjie Zheng, and Mingyuan Zhou. CARD: Classification and regression diffusion models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https: //openreview.net/forum?id=4L2zYEJ9d_ .

Jakob D Havtorn, Jes Frellsen, Søren Hauberg, and Lars Maaløe. Hierarchical vaes know what they don't know. In International Conference on Machine Learning , pages 4117-4128. PMLR, 2021.

Jiangpeng He and Fengqing Zhu. Out-of-distribution detection in unsupervised continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 3850-3855, 2022.

Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition , pages 770-778, 2016.

Dan Hendrycks and Kevin Gimpel. A baseline for detecting misclassified and out-of-distribution examples in neural networks. In International Conference on Learning Representations , 2017. URL https://openreview.net/forum?id=Hkg4TI9xl .

Eyke Hüllermeier and Willem Waegeman. Aleatoric and epistemic uncertainty in machine learning: An introduction to concepts and methods. Machine Learning , 110:457-506, 2021.

Saurav Jha, Dong Gong, Xuesong Wang, Richard E Turner, and Lina Yao. The neural process family: Survey, applications and perspectives. arXiv preprint arXiv:2209.00517 , 2022.

Myong Chol Jung, He Zhao, Joanna Dipnall, Belinda Gabbe, and Lan Du. Uncertainty estimation for multi-view data: The power of seeing the whole picture. Advances in Neural Information Processing Systems , 35:6517-6530, 2022.

Myong Chol Jung, He Zhao, Joanna Dipnall, Belinda Gabbe, and Lan Du. Multimodal neural processes for uncertainty estimation. arXiv preprint arXiv:2304.01518 , 2023.

Donggyun Kim, Seongwoong Cho, Wonkwang Lee, and Seunghoon Hong. Multi-task processes. In International Conference on Learning Representations , 2022. URL https://openreview. net/forum?id=9otKVlgrpZG .

Hyunjik Kim, Andriy Mnih, Jonathan Schwarz, Marta Garnelo, Ali Eslami, Dan Rosenbaum, Oriol Vinyals, and Yee Whye Teh. Attentive neural processes. In International Conference on Learning Representations , 2019. URL https://openreview.net/forum?id=SkE6PjC9KX .

Mingyu Kim, Kyeong Ryeol Go, and Se-Young Yun. Neural processes with stochastic attention: Paying more attention to the context dataset. In International Conference on Learning Representations , 2022. URL https://openreview.net/forum?id=JPkQwEdYn8 .

Durk P Kingma, Tim Salimans, and Max Welling. Variational dropout and the local reparameterization trick. Advances in neural information processing systems , 28, 2015.

James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences , 114(13):3521-3526, 2017.

Yann LeCun. A path towards autonomous machine intelligence version 0.9. 2, 2022-06-27. Open Review , 62, 2022.

Yann LeCun, Corinna Cortes, and CJ Burges. Mnist handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist , 2, 2010.

Xilai Li, Yingbo Zhou, Tianfu Wu, Richard Socher, and Caiming Xiong. Learn to grow: A continual structure learning framework for overcoming catastrophic forgetting. In International Conference on Machine Learning , pages 3925-3934. PMLR, 2019.

Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence , 40(12):2935-2947, 2017.

David Lopez-Paz and Marc'Aurelio Ranzato. Gradient episodic memory for continual learning. Advances in neural information processing systems , 30, 2017.

Jiaqi Ma, Zhe Zhao, Xinyang Yi, Jilin Chen, Lichan Hong, and Ed H Chi. Modeling task relationships in multi-task learning with multi-gate mixture-of-experts. In Proceedings of the 24th ACM SIGKDD international conference on knowledge discovery & data mining , pages 1930-1939, 2018.

Martial Mermillod, Aurélia Bugaiska, and Patrick Bonin. The stability-plasticity dilemma: Investigating the continuum from catastrophic forgetting to age-limited learning effects, 2013.

Jeremy Nixon, Michael W Dusenberry, Linchuan Zhang, Ghassen Jerfel, and Dustin Tran. Measuring calibration in deep learning. In CVPR workshops , volume 2, 2019.

Guy Oren and Lior Wolf. In defense of the learning without forgetting for task incremental learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision , pages 2209-2218, 2021.

Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In International conference on machine learning , pages 1310-1318. PMLR, 2013.

Federico Pernici, Matteo Bruni, Claudio Baecchi, Francesco Turchini, and Alberto Del Bimbo. Class-incremental learning with pre-allocated fixed classifiers. In 2020 25th International Conference on Pattern Recognition (ICPR) , pages 6259-6266. IEEE, 2021.

Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In ProceedinFgs of the IEEE conference on Computer Vision and Pattern Recognition , pages 2001-2010, 2017.

Matthew Riemer, Ignacio Cases, Robert Ajemian, Miao Liu, Irina Rish, Yuhai Tu, , and Gerald Tesauro. Learning to learn without forgetting by maximizing transfer and minimizing interference. In International Conference on Learning Representations , 2019. URL https: //openreview.net/forum?id=B1gTShAct7 .

Jonathan Schwarz, Wojciech Czarnecki, Jelena Luketina, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. In International Conference on Machine Learning , pages 4528-4537. PMLR, 2018.

Claude Elwood Shannon. A mathematical theory of communication. The Bell system technical journal , 27(3):379-423, 1948.

Casper Kaae Sønderby, Tapani Raiko, Lars Maaløe, Søren Kaae Sønderby, and Ole Winther. Ladder variational autoencoders. Advances in neural information processing systems , 29, 2016.

Gido M van de Ven, Tinne Tuytelaars, and Andreas S Tolias. Three types of incremental learning. Nature Machine Intelligence , pages 1-13, 2022.

Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems , 30, 2017.

Jianfeng Wang, Thomas Lukasiewicz, Daniela Massiceti, Xiaolin Hu, Vladimir Pavlovic, and Alexandros Neophytou. Np-match: When neural processes meet semi-supervised learning. In International Conference on Machine Learning , pages 22919-22934. PMLR, 2022.

Qi Wang and Herke Van Hoof. Doubly stochastic variational inference for neural processes with hierarchical latent variables. In International Conference on Machine Learning , pages 10018-10028. PMLR, 2020.

Qi Wang and Herke van Hoof. Learning expressive meta-representations with mixture of expert neural processes. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems , 2022. URL https:// openreview.net/forum?id=ju38DG3sbg6 .

Qingsen Yan, Dong Gong, Yuhang Liu, Anton van den Hengel, and Javen Qinfeng Shi. Learning bayesian sparse networks with full experience replay for continual learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 109-118, 2022.

Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. In International Conference on Learning Representations , 2018. URL https://openreview.net/forum?id=Sk7KsfW0-.

Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. In International Conference on Machine Learning , pages 3987-3995. PMLR, 2017.

Guodong Zhang, Shengyang Sun, David Duvenaud, and Roger Grosse. Noisy natural gradient as variational inference. In International conference on machine learning , pages 5852-5861. PMLR, 2018.

A Theory

A.1 ELBO derivation for the NPCL

Borrowing the conventions from Sec. 3, for an incremental task 0 ≤ t ≤ T , we assume the context C and targets T to comprise of samples from all t seen classes. Accordingly, we define these as C = ( X 0: t C , Y 0: t C ) and T = ( X 0: t T , Y 0: t T ) , respectively. To enforce the prior that both C and T follow the same distribution, we assume C t ⊂ T t , and therefore, C ⊂ T . In order to derive predictions Y 0: t T on X 0: t T , the NPCL relies on the context C to build conditional priors p θ ( z G |C ) and p θ ( z t | z G , C t ) , where p θ is the decoder. The decoder's objective thus boils down to maximizing the log-likelihood of the observations, i.e., the evidence log p θ ( Y 0: t T | X 0: t T , C ) . In the following, we derive the evidence lower bound (ELBO):

where the evidence is equal to the sum of the reconstruction likelihood E q ϕ ( z G |T ) [ log p θ ( Y 0: t T | X 0: t T , C , z G ) ] of the decoder and the KL divergence between the true posterior p θ ( z G |T ) and the approximate posterior q ϕ ( z G |T ) learned using the variational distribution, minus the prior matching term D KL ( q ϕ ( z G |T ) ∥ p θ ( z G |C ) ) . In particular, the NPCL learns two approximate distributions q ϕ ( z G |T ) and q ϕ ( z t | z G , T t ) , that seek to estimate the global posterior p θ ( z G |T ) and the task-specific posterior p θ ( z t | z G , T t ) . To realize the latter posterior, we introduce the hierarchy of task-specific latent variables z 0: t . This allows us to expand and derive a lower bound to the reconstruction likelihood as:

Appendix

Plugging Eq. (11g) into Eq. (10j), we get the final ELBO:

where the decoder p θ serves as the conditional prior network and is replaced by the encoder q ϕ serving as the surrogate posterior network. q ϕ can be seen to be producing two intermediate bottleneck distributions: (a) q ϕ ( z G |T ) transforms inputs into a distribution over global latent variables, (b) conditioned on the global latent variables, q ϕ ( z t | z G , T t ) gathers the tth task inputs and learns another distribution over the task-specific latent variables. The task-specific latent variables and their corresponding input covariates X t are then used by the deterministic decoder p θ to decode their corresponding logit h ∗ . It is indeed this dependency of p θ on the task identifier t that makes inference a challenging task in real-world CL settings.

A.2 Single Task NPCL and its ELBO

Single-Task (ST) NPCL preserves all but the inter-task cross attention CA 0: t lat and the global distribution encoder ψ G layers from the architecture of the NPCL (Sec. 4.3). The task-specific latent variables z t are thus derived as:

where s t i and ψ t carry the same meaning as in Eq. (16). For a fair comparison in Table 1, we fix M to be the same as the total number of global ancestral samples N in the NPCL. The corresponding

ELBO amounts to:

A.3 ELBO for the NP [14] and the ANP [27]

The NP [14] and the ANP [27] employ a single latent variable z G to model the global correlation of all tasks. In particular, compared to Sec. 4.3, the task-specific self-attention layer SA t lat and the task-specific distribution encoder ψ t is no longer required. While this enables knowledge sharing among tasks, NPs and ANPs are limited in modeling finer intra-task stochastic factors. The ELBO can be given as:

where z G is derived in a way similar to Eq. (16), and the inputs X T and C belong to [0 , t ] tasks without relying on the task labels for being encoded.

B NPs for Meta-Learning (ML) vs Continual Learning (CL)

Resemblance. For both ML and CL settings, we have multiple tasks and would like to learn an NP with flexible conditioning that generates task-specific functions. Specifically, for each task t , we have Y t = F t [ ϕ ; θ ] ( X t ; z t ) where the latent variable z t is conditioned on the task-specific context C t . As z t is task-specific, this, in turn, makes F t task-specific.

Differences. There are two major differences between the conventional NP for ML and our proposed NP for CL (NPCL):

Architectural difference. In standard NPs, z t is conditioned only on the task-specific context C t while in the NPCL, z t is conditioned on [ C t ; z G ] where z G is the global latent derived from the global context. The added conditioning of global latent reflects the need for cross-task knowledge transfer in CL and thus endows a two-level hierarchy into our model.

Functional difference. The functional difference between the ML and CL (inference) settings call for another adaptation in the NPCL. Namely, ML aims to learn NPs that learn F [ ϕ ; θ ] that can generalize to new tasks. That is why NPs are tested on a new task t ∗ given its context C ∗ . On the other hand, in CL, we wish to learn an F that can perform well on all the seen tasks as there is no new task during inference. Given the absence of a labeled context during inference, our test-time context samples are thus a subset of the training data from the tasks seen so far.

In a nutshell, CL calls for learning a general function that is task-specific but also performs well on all the seen tasks subject to a limited rehearsal memory. To achieve this, we leverage an NP's ability of generating task-specific functions with flexible conditioning. But instead of using the conventional NPs for ML, we propose a hierarchical model to introduce more inter-task knowledge sharing, thus tailored for the CL problem.

C Further on the NPCL Architecture

In the following, we denote multi-head dot product self-attention [48] by SA ( K,V,Q ) where K, V, and Q are the keys, values and queries, respectively. The equivalent notation for cross-attention is CA ( K,V,Q ) .

Latent Encoder. The latent path learns the functional prior and posterior from the context and the target sets, respectively. Each label-concatenated input is projected as Φ lat i = MLP ([ x i ; y i ]) ; then

subjected to two attention operations. First, per-task projections form the keys, values, and queries to taskwise self-attention layers SA t lat (Φ lat i , Φ lat i , Φ lat i ) : Φ lat i → s t i that produce order-invariant encodings s t i over the task t . Second, all encodings { s 0: t i } n + m i =1 serve as the keys, values, and queries to the cross-attention layers CA 0: t lat ( s t i , s t i , s t i ) : s t i → s G i that enrich their order-invariance from intra-task s t to inter-task s G . s t and s G are then used to derive the global z G and the task-specific latent variables z t .

Such globally attended inputs are passed in parallel to two MLP layers constituting the global distribution encoder ψ G whose outputs together parameterize the global distribution N ( µ G , σ 2 G ) over the input set, i.e., ψ G ( s G ) : { s G i } n + m i =1 → ( µ G , σ 2 G ) . Samples { z G i } N i =1 drawn from this distribution are proxies for the variables capturing the global correlation over all tasks in the input set. It is indeed this sampling step that induces the stochasticity into the learned posteriors of the NPCL.

To model finer task-specific distribution for task t conditioned on the global distribution, we retain the task-specific self-attended representations s t i and concatenate these with the global latent variables { z G i } N i =1 to produce N distinct encodings per input point. These encodings are then passed through the tth task distribution encoder ψ t that again constitutes a mean and a variance MLP head and produces outputs that parameterize the tth task distribution N ( µ t , σ 2 t ) , i.e. , ψ t ( s t ) : { s t i } n + m i =1 → ( µ t , σ 2 t ) . Samples { z T j } i M = j drawn from each such distribution thus capture the per-task stochastic factors. To limit the randomness in the learned prior/posterior, we use M = 1 . The latent encoder thus outputs a subtotal of N × ( t +1) encodings per input point.

Put together, the global and task-specific latent variables can be derived as:

where ψ G and ψ t are the global and per-task distribution encoders, respectively.

Deterministic Encoder. The deterministic path is similar to that of an ANP [27] where the context projections Φ det i = MLP ([ x i ; y i ]) form the keys, queries and values for a self-attention operation, SA det (Φ det i , Φ det i , Φ det i ) : Φ det i → r i . The resulting order-invariant context representations { r i } i m =1 are fed as values to a subsequent target-to-context cross-attention operation CA det . The keys x i and queries x ∗ for CA det come from the context x i ∈ X C and target x ∗ ∈ X T covariates, respectively, i.e., CA det ( x i , s C , x ∗ ) : x ∗ → r ∗ where r ∗ is invariant to the order of context.

Decoder. Different from other NP variants, the NPCL decoder adopts separate decoding mechanisms during training and inference. At train time, we use the available task identity to filter the true N out of N ∗ ( t +1) latent path outputs to be processed by the decoder. After this, the decoder concatenates a target input x t ∗ ∈ X t T with its N true task-specific latent variables { z t i } N i =1 obtained from the latent path and its order-invariant feature r ∗ obtained from the deterministic path thus resulting in N distinct inputs. For N > 1 samples of z t , we first make N copies of x ∗ and r ∗ each, and then concatenate these with each z t . p θ thus performs the projection p θ ([ x ∗ ; r ∗ ; { z t i } N i =1 ]) : x → h ∗ where x ∈ R f +2 ∗ o and h ∗ are the logits of an MLP classifier for the target label y ∗ . We detail the inference-time decoding in Sec. 4.5.

D Experiments and Reproducibility

Configuration. For a fair comparison with the benchmarks of Buzzega et al. [4], we fix the batch sizes for new task's samples and for replay samples to 32 each for the class-IL datasets and to 128 each for the domain-IL datasets. Both the context and target datasets use the same set of augmentations. For S-CIFAR-10, S-CIFAR-100, and S-Tiny-ImageNet, we apply random crops and horizontal flips to both stream and buffer examples following Buzzega et al. [4] and Boschini et al. [3]. For each setting of memory size on each dataset, the NPCL adopts the same learning rate (LR) as reported in Buzzega et al. [4] and Boschini et al. [3]. However, the NPCL training additionally relies on linearly increasing the learning rate (LR) over a period of 4000 iterations for class-IL and 40 iterations for domain-IL settings. We further apply gradient clipping [40] on L2-norm of the NPCL parameters with a cap of 10000.

Hyperparameter tuning. We arrive at the best hyperparameter settings for each of our datasets through grid search over a validation set made of 10 % of the training set on each dataset. The search range for number of samples N from the global distribution N ( µ G , σ 2 G ) is [2 , 5 , 10 , 20 , 50 , 100] . Out of these, we found N = 50 during training and N = 10 during evaluation to perform better in general across all settings.

Similarly, we conducted a grid search over the batch size of the context set C over the range [1 / 16 , 1 / 8 , 1 / 4 , 1 / 2 , 1 , 1 . 25] of the original (target) batch sizes for each of the dataset. In general, we found that fixing the context batch size to 1 / 8 of the target batch size performed better across all datasets. Such context batches are sampled from a context dataset D t C for each task t . D t C is itself created by randomly selecting a subset of the training samples for each class at the beginning of each incremental training task. To decide on the size of the subset for each class, we ran a grid search over the range [50 , 100 , 150 , 200] samples per class and found that incorporating 100 random samples per class into D t C performed well across all datasets.

Finally, to decide on the loss weights α , β , γ and δ for D t , D G , L GR, and L t TR , we ran gridsearch for each over possible values [0.0, 0.01, 0.05, 0.08, 0.1, 0.15, 0.2, 0.4]. We report the best settings across datasets in Table 9:

E On the number of Monte Carlo samples

Figure 6 shows the effect of the number of Monte Carlo (MC) samples for global N and task-specific M latent variables on accuracy during inference. In particular, we observe two favorable spots in terms of accuracy, one centered around ( M = 1 , N = 50) and the other around ( M = 10 , N = 20) . It is worth noting that the total number of inference time MC samples grow quadratically with the number of tasks t , i.e., O ( NMt ) , and that a higher number of samples leads to a larger computational overhead. For instance, based on Eq. (9) in the main paper, the inference on the 10 -th task of S-CIFAR-100, i.e., t = 10 , given the two favorable spots amounts to selecting the set of task-specific module predictions with the least uncertainty from a total of (a) 1 × 50 × 10 = 500 predictions using ( M = 1 , N = 50) , and (b) 10 × 20 × 10 = 2000 predictions using ( M = 10 , N = 20) . We, therefore, opt for the more efficient setting of ( M = 1 , N = 50) throughout our experiments in the paper.

AverageAccuracy(%)

37.5

37.0

2

36.5

5

36.0

M0

35.5

20

35.0

50

34.5

100

34.0

1

2

5

10

20

50

100

N

F Results: Backward Transfer

Table 10 reports the backward transfer for the accuracy scores mentioned in table 1. We further compute the backward transfer based on uncertainty scores to study the effect of forgetting on uncertainty. Fig. 7 shows the correlation between backward transfer of accuracy and uncertainty for the domain-IL datasets P-MNIST and R-MNIST.

P-MNIST

R-MNIST

20

30

score

transferscore

transfer

20

10

10

0

Backward

Backward

0

-10

-10

accuracy

accuracy

uncertainty

-20

uncertainty

０１２３４５６７８９０１１１1５1７8

０１２３４５６７８９1１１１1５1１8

Task ID

Task ID

G Ablations

G.1 On the effect of regularization on the learned distributions

We record the per epoch L1-norms of global and task-specific means and variances on the last incremental task (task 4) of S-CIFAR-10. As shown in Fig. 8(a) and Fig. 8(b), regularizing the global distribution (GR) alleviates forgetting by limiting the learning of the global and the current task's (task 4) means and variances. This is evident through larger L1-norm of means and smaller L1-norm of variances when GR = 0, i.e., +TR setting. On the other hand, excluding all the objectives, i.e., the Baseline NPCL as well as excluding TR from the learning objectives, i.e., +GR setting lead to

relatively unstable evolution of the past task means and variances, hence characterizing an increased forgetting. Including both GR and TR in the objective, i.e., the NPCL helps find a balance between preserving the global and the past-task distributions while facilitating the learning of the current task distribution.

Means

200

40

200

180

30

140

120

ou

100

80

120

10

60

100

0

10

Training epochs

20

30

40

50

40

0

10

Training epochs

20

30

40

50

0

10

Training epochs

20

30

40

50

Loss settings:

w/ GR and TR

w/ only TR

w/ only GR

180

180

Baseline (w/o GR or TR)

180

160

160

L1 norm of task 3 mean

160

140

120

80

120

100

60

100

80

40

10

20

30

40

50

0

10

Training epochs

20

30

40

50

0

10

Training epochs

20

30

40

50

Variances

12

185.8

193.5

L1 norm of global variance

10

185.7

8

192.5

185.5

192.0

ou

3

191.5

185.3

W

191.0

0

10

20

Training epochs

30

40

50

185.2

0

10

Training epochs

20

30

40

50

190.5

0

10

Training epochs

20

30

40

50

Loss settings:

w/ GR and TR

w/ only GR

w/ only TR

190.5

Baseline (w/o GR or TR)

188

193

190.0

187

192

186

190

183-

188

188.0

182

187

186

0

10

Training epochs

20

30

40

50

0

10

Training epochs

20

30

40

50

10

Training epochs

20

30

40

50

G.2 How does forgetting effect uncertainty?

Fig. 9 ablates the average accuracies and uncertainties of each task head predictions over the test set of each task at the end of incremental training on S-CIFAR-100. Similar to S-CIFAR-10 (Fig. 4), we observe that the accuracy of predictions made by true task heads are higher than the rest. For predictive uncertainties, the trend is the opposite. Also, more recently trained tasks show lesser forgetting both in terms of accuracy (higher values) and uncertainty (lower values). This generalizes

our conclusion on S-CIFAR-10 regarding the outreach of forgetting in CL going beyond accuracy and to other aspects of learning such as the model's predictive confidence.

(a) Accuracy heatmap

(b) Uncertainty heatmap

0

29

11

9.8

6.2

13

5.2

4.4

7.8

6.3

7.2

60

3.2

36

7.4

14

10

4.1

4.7

5.8

3.1

12

50

2·

2.3

7.5

47

6

11

4.1

4.9

6.9

4.1

6.5

m-

1.7

8.1

7.1

38

9.4

4.4

5.4

4.5

4.3

18

40

4

2.2

8.6

9.8

6.4

42

7

4.1

3.8

5.3

11

5.

3.9

6.2

6.3

4.7

8.4

40

6.8

5.8

4.8

14

30

司

9

1.9

7.2

7

4.6

8.1

6.3

40

8.2

5.5

11

20

7

2

7.9

10

5.5

8.5

7.2

8.4

34

4.6

11

8-

1.5

5

7.2

15

7.4

5.9

4.7

3.6

36

14

-10

.6

1.2

4.9

4.4

4.3

8.6

5.3

3.5

4.7

1.4

62

0

1

1

-2

-3

4

-5

6

-7

8

！

9

Module ID

0.32

0.34

0.37

0.41

0.35

0.51

0.51

0.41

0.45

0.58

- 0.9

0.73

0.18

0.41

0.31

0.34

0.54

0.49

0.51

0.5

0.48

-0.8

2.

0.9

0.39

0.17

0.43

0.35

0.61

0.49

0.49

0.62

0.61

- 0.7

m-0.86

0.42

0.44

0.17

0.33

0.5

0.51

0.56

0.45

0.35

-0.6

Uncertainty

司

-0.82

5

0.66

0.45

0.43

0.41

0.54

0.41

0.52

0.18

0.42

0.53

0.19

0.47

0.6

0.47

0.4

0.48

0.46

0.43

0.5

- 0.4

0.5

O-0.86

0.42

0.49

0.46

0.39

0.48

0.18

0.37

0.57

0.44

-0.88

0.45

0.45

0.49

0.45

0.55

0.4

0.2

0.58

0.54

- 0.3

0.77

0.47

0.48

0.37

0.45

0.53

0.51

0.48

0.17

0.39

0.2

6

0.65

0.35

0.49

0.38

0.33

0.37

0.42

0.4

0.47

0.072

0.1

0

1

2

3

4

1

5

6

7

8

6

Module ID

G.3 On the storage gain of the NPCL over DER

Table 11 compares the total episodic memory sizes of the NPCL (ours) and DER [4]. We report storage sizes as the dimension of a single 1-d vector constructed by flattening all the vectors that need to be stored by each method in the episodic memory. Namely, the NPCL stores 2 ∗ t +2 vectors of fixed dimension R | o | where t is the total number of tasks in a dataset and o is the output size of the mean and variance heads. On the other hand, DER stores |M| number of logits of dimension R | N C | where N C denotes the total number of classes in a CL dataset. As a result, the NPCL has significant storage gains on settings with either large number of classes or a larger memory size. It is worth noting that both the NPCL and DER rely on storing original input images and therefore, our comparison does not take the inputs into account.

G.4 On the importance of correct context

̸

To study the significance of correct task-specific context C t for the NPCL, we design a simple experiment. While training on an incremental task t > 0 onwards, after having derived the global latent samples { z G } N i =1 , we tinker with the flow of the task-specific context points C t to the different task-specific encoders of the NPCL. In specific, instead of directing C t to the t -th encoder, we misdirect it to the task encoder j ∋ j = t where, j is chosen at random from the pool of all seen task ids. Note that the presence of such randomly allocated context points during training implies that we now have a noisy task-specific prior q ϕ ( z t | z G , C j ) to match in the ELBO, i.e., a corrupted second term on the right-hand side of eq. (5). We keep all our other training settings (including the loss coefficient values) unchanged.

Table G.4 compares the performance of the NPCL with the noisy task-specific priors on the two different memory sizes of S-CIFAR-10. While the performance gain of the NPCL over its noisy prior counterpart remains significant, we observe that in comparison with the ST-NPCL (which lacks hierarchy), the presence of noisy priors degrade the performance of the NPCL (which has hierarchy) further as the replay memory size increases from 200 to 500. This is because, with a larger memory size, more context points from past tasks are diverted to the random task components during training. This leads to a noisier task-specific prior matching. Such noisy priors further lead to higher

fluctuations in the accuracy, as marked by the larger standard deviations in their accuracy over the ST-NPCL and the NPCL. This validates the fact that the conditioning on the correct task-specific context remains crucial to the performance of the NPCL.

G.5 On out-of-the box novel data identification

Our novel data identification experiments use the S-CIFAR-10 and S-CIFAR-100 datasets interchangeably as D ID and D OOD given the high degree of similarity between a number of their classes [21]. 2 Namely, while evaluating the NPCL trained on S-CIFAR-100, we consider the entire CIFAR-10 test set as D OOD whereas the evaluation of the S-CIFAR-10 model treats the test set of first 10 class labels of CIFAR100 to be D OOD. Further, for an incremental task t , the test sets for [0 , t ] tasks make up for the ID data D ID.

As shown in Table 13, the variances computed using either of our proposed metrics on D ID are up to a magnitude lower than those on D OOD. This trend is evident across the incremental evaluation steps even if the differences in the variances between D ID and D OOD slump with the further arriving tasks. Moreover, for the model trained on the more challenging S-CIFAR-100 setting, we observe that the differences between the D ID and D OOD variances even grow during the course of incremental training. This implies the potential perks of enabling the inter-task knowledge sharing among the NPCL parameters in a CL setup.

G.6 On instance-level model confidence evaluation

For each target instance x ∗ , the instance-level model confidence evaluation framework [17] uses the N predictions obtained from stochastic sampling to compute: (a) the prediction interval width (PIW) between the [2 . 5 , 97 . 5] percentile range of the N predicted classes, (b) the paired two-sample t -test [10] to evaluate the significance of difference between the mean predicted probabilities for the top-2

most predicted classes. As a prerequisite to the latter test, we first verify the normality assumption of the probability differences for the NPCL (Fig. 10).

Similar to Fan et al. [10], after computing the PIW per test instance, we split the instances into two groups by the correctness of the majority-vote predictions, obtain the PIW of the true class per instance, and compute the mean PIW of the true class within each group. For t-test evaluation, we compute the mean accuracy per group of the test instances split by their t -test rejection status.

H Incompetence of Dot-product attention

(a) Cross-attention visualization

(b) Self-attention visualization

Query

20

50

10

10

20

Query

20

30

Task ID

0

-10

10

20

30

40

50

60

60

-50

-40

30

20

10

1

Query

2

3

-10

50

-20

30

40

30

50

20

10

Query

70

-10

10

20

20

30

O

50

60

Context-to-context attention weights

0.20

- 0.18

- 0.16

0.14

0.12

-0.10

-0.08

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a new method for Continual Learning (CL) through Neural Processes (NPs) framework. Especially, they are inspired by MTP [1] which utilizes the global latent and task-specific latent for inter-task and intra-task knowledge representation. In this paper, the authors additionally regularize on parameter updates of MTP not too much be updated, and task-wise inference through an uncertainty quantification metric. Through this, they can achieve comparable performance with state-of-the-art prior works while maintaining smaller memory. \n\n[1] Buzzega, Pietro, et al. \"Dark experience for general continual learning: a strong, simple baseline.\" Advances in neural information processing systems 33 (2020): 15920-15930.\n\nSTRENGTHS:\n- This paper proposes new regulations to utilize NPs for CL.\n- The prior works are well summarized and they discussed their model adequately.\n- They evaluated it on multiple benchmarks including class and domain incremental learning benchmarks with diverse prior works including NPs [1] and ANPs [2], and showed their model, the NPCL shows comparable performance to state-of-the-art methods such as DER [3].\n- They studied diverse ablations such as their regularization losses, latent types (e.g., when only task-wise latent is learned), task-wise inference, and context sizes. In this study, they showed their task-wise inference is important for their model's performance and the uncertainty on the logits of the task heads is a good measurement for task label estimation. Additionally, they also compared their model with DER for the storage overhead. For this aspect, NPCL shows more efficient storage utilization than DER.\n- They also showed the uncertainty on the task heads can be utilized to identify the novel data from out-of-distribution or not and uncertainty-based task-wise inference can show higher confidence for correct task labels.\n- Lastly, they clearly discussed the limitations of their model such as more computational overhead and inference time complexity caused by multi-head attention.\n\n[1] Garnelo, M., Schwarz, J., Rosenbaum, D., Viola, F., Rezende, D. J., Eslami, S. M., & Teh, Y. W. (2018). Neural processes. arXiv preprint arXiv:1807.01622.\n\n[2] Kim, H., Mnih, A., Schwarz, J., Garnelo, M., Eslami, A., Rosenbaum, D., ... & Teh, Y. W. (2019). Attentive neural processes. arXiv preprint arXiv:1901.05761.\n\n[3] Buzzega, P., Boschini, M., Porrello, A., Abati, D., & Calderara, S. (2020). Dark experience for general continual learning: a strong, simple baseline. Advances in neural information processing systems, 33, 15920-15930.\n\nWEAKNESSES:\n- The motivation is not strong enough. Their motivation to utilize NPs for CL is to measure predictive uncertainties. However, it is not clearly discussed why it is important for CL.\n- Figures (Figures 1, 2, 4, and 6) are not recognizable. Especially their fonts are too small. For Figure 6, they missed labeling the axes.\n- In lines 38-39, they mentioned one of their motivations is NPs can meta-learn input correlations across correlated tasks. However, in the limitation section, they analyzed it as the incompetence of dot-product attention (lines 305-306). It is the opposite analysis of their motivation.\n- The equation (7) and relevant explanations are confusing. In the previous section for GR, task $t$ is dominated by the t-$th$ task samples, while it is referred to as $j$ in this section. As I understood, they tried to regularize the task $t$'s task latent on that at the step when the task $t$ arrived, but it is not easy to follow in their explanation.\n- The equation (8) is hard to understand. In their explanation about the memory management of their model, the sample $x$ is not stored, but it is not in this equation (without $x$, $L_{CE}$ cannot be calculated). \n- The comparison in Table 1 can cause confusion. At first glance, we can expect NPCL and DER to show comparable performance in the same memory usage, but their storage usages are quite different as shown in Appendix E.3. I can recommend showing as a plot in which the x-axis is real storage usage and the y-axis is accuracy.\n- (minor) typos\n\n    - In equation (8), the bracket for $L_{GR}$ and $L_{TR}$ is missed. \n    - In table 2, baseline is not w/o GR *or* TR, but GR *and* TR.\n    - In line 208, with. -> with\n\nQUESTIONS:\n- Can you additionally analyze why small $N$ is not working well with the additional experimental results for diverse $N$ values?\n- In your design, the sum pooling is used to get the global and task-specific latent. Could you replace it with Multi-head Attention Pooling (MAP) [1] (e.g., using the learnable additional token for the latent) and test it for a few tasks?\n\n[1] Lee, J., Lee, Y., Kim, J., Kosiorek, A., Choi, S., & Teh, Y. W. (2019, May). Set transformer: A framework for attention-based permutation-invariant neural networks. In International conference on machine learning (pp. 3744-3753). PMLR.\n\nLIMITATIONS:\nThe authors adequately discussed the limitations of their work. Thanks for their detailed analysis of their limitations.", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-06-30"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper suggests tackling continual learning (CL) with a neural process model (NP).  The authors describe a hierarchical latent variable model, with one global latent, and t per-task latents.  As is common in NPs, the latent posteriors are a function of a context of datapoints with their corresponding labels, and then a decoder maps the latents to an output prediction.  \n\nDuring training time, the model is trained with access to task labels, and uses data from different tasks to train the corresponding task-specific latent posteriors. A replay buffer stores and reuses data from old tasks during training, and additional regularization terms are introduced, in order to minimize effects of drifting away from previous tasks ('forgetting').\n\nAt test time, there is no access to task labels, and therefore the model is run for all tasks, and the output with the least entropy is used. \n\nThe model is compared to various CL approaches and is shown to achieve and sometimes surpass the state of the art. The paper describes more ablations and analysis of the results.\n\nSTRENGTHS:\nThe main strengths of this paper are:\n1. An interesting model with non-trivial components put together:\n    - the hierarchical structure of the latents\n    - the difference treatment of training time and test time with respect to access to context latent\n2. The result seems to surpass previous approaches\n3. Extensive analysis of the results\n\nWEAKNESSES:\nThe main weakness of this paper is that modeling continual learning as meta learning via neural processes is not exactly valid. \nSpecifically, NPs assume that the dataset contains many different functions or tasks, and one of the main challenges is that the task id is not accessible and has to be inferred. This is the reason a \"context\" of labeled points is used - to infer the task at hand. \nIn the setup described in the paper, it is assumed that the task id is accessible at training time, which allows designating different parts of the model to different tasks.\nAt test time, the model uses a context coming from the training data with little overlap to the task of the test data. This is a major difference from NPs.\nI think that the presented model is interesting and can have a significant contribution to the community but that the good performance exhibited is not connected to NPs as stated, but rather merely a result of the higher capacity of hierarchical latent variable models.\nSince the model is conditioned on training points during evaluation, perhaps a better way to present it is as a non-parametric method (e.g.[1]) rather than a neural process.\n\n[1] Self-Attention Between Datapoints: Going Beyond Individual Input-Output Pairs in Deep Learning. Jannik Kossen, Neil Band, Clare Lyle, Aidan N. Gomez, Tom Rainforth, Yarin Gal\n\nQUESTIONS:\n1. The paragraph in line 110 is not clear. What does it mean to optimize parameters of $\\mathcal{D}^t$? \n2. In equation 3, does the context define the task (as modeled in standard NPs)? If so why are there superscripts of all the tasks 0:t? \n3. In equation 4 why are $z^t$ conditioned on the contexts $\\mathcal{C}^t$? If the task id is given then the context doesn’t have any information.\n4. The number of samples described in line 151 is not clear. If every point is mapped to one task then only the corresponding latent needs to be sampled, making the number of samples M. Is this wrong?\n\nLIMITATIONS:\nI did not find any unaddressed limitations or potential negative impact in this work.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2023-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents an uncertainty-aware continual learning framework that utilizes Neural Processes (NPs). The NP model employs a hierarchical latent variable model in conjunction with an experience replay buffer, where a global latent variable captures inter-task correlations and task-specific latents encode more detailed knowledge. To prevent catastrophic forgetting, the method regularizes a Jenson-Shannon divergence between current and past distributions of latent variables. The paper employs entropy for uncertainty quantification.\n\nSTRENGTHS:\n- The concept of regularizing latent distributions between preceding and current tasks is both simple and intuitive.\n- Experimental results demonstrate that the proposed approach is competitive with state-of-the-art continual learning methods, while also being capable of quantifying model uncertainty.\n- The proposed method only stores two vectors for each task, showcasing memory efficiency in terms of experience replay.\n- Generally, the paper is well-written and easy to understand.\n\nWEAKNESSES:\n- Given that the encoder includes self-attention and cross-attention layers, the proposed method exhibits quadratic complexity relative to the training data. This complexity could prove problematic when the training dataset is substantial (e.g., 10000).\n\nQUESTIONS:\n- Why was Jensen-Shannon Divergence (JSD) chosen as a regularization metric? Have other distribution divergence metrics, such as Kullback-Leibler Divergence (KLD), been explored?\n- A key strength of the NP family is its few-shot learning capability. Given that the size of the replay buffer can be a limiting factor in some applications, would the proposed approach still be effective with a much smaller buffer size (e.g., 10)?\n- How do accuracy and uncertainty depend on the size of the Monte Carlo sampling (N, M)?\n\nLIMITATIONS:\nThe authors have addressed the limitations.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper introduces an uncertainty-aware continual learning framework based on neural processes. The proposed method casts CL into a hierarchical latent model from the global variables to the task-specific variables, and the corresponding regularization terms for each to ensure minimum forgetting along the course of new task learning. The naturally reliable uncertain estimation of NP facilitates class incremental setting by allowing accurate task-specific latent selections.\n\nSTRENGTHS:\n- The presentation of this paper is mostly clear, with the equations properly delivering the ideas. \n\n- The idea of applying NP in CL, explicitly modeling task-specific latent variables, and uncertainty quantification for class-incremental CL are very intriguing.\n\nWEAKNESSES:\n**Writing and clarity**\nThe writing can be further improved. \n\nFor example, in my understanding, following Line 163, the two regularization terms are introduced to counter the forgetting instead of being 'two key aspects of forgetting in NPCL.' \n\nIn line 114, the authors mentioned 'uses generative factors', while the term 'generative factors' is not appropriately explained here or in the following sections. \n\n\n**Quantitative comparisons**\n\nWhile clear improvements over some baseline methods and other NP-based methods are reported, I believe the compared CL methods are all relatively classic but old. More up-to-date might be helpful to better position the proposed method. \n\n\nOther minor points:\n\n- Figure 2 is too small \n\n- The authors might consider refining the formats of the reference list, as currently the formats are very inconsistent.\n\nQUESTIONS:\nPlease see the Weakness section. \n\nHow is the uncertainty estimation of the proposed method quantitatively? Some further evaluation using metrics like ECE can be more insightful.\n\nLIMITATIONS:\nThe authors discussed the limitations of the proposed method very comprehensively in Section 6.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-07-07"}