∎

e1e-mail<EMAIL_ADDRESS>e2e-mail<EMAIL_ADDRESS>e3e-mail:
<EMAIL_ADDRESS>
11institutetext: Department of Mathematics, Birla Institute of Technology and
Science-Pilani, Hyderabad Campus, Hyderabad-500078, India 22institutetext:
International College of Liberal Arts, Yamanashi Gakuin University, Yamanashi
400-0805 Japan.

# Constraining effective equation of state in $f(Q,T)$ gravity

Simran Arorae1,addr1  Abhishek Paridae2,addr2  P.K. Sahooe3,addr1

(Received: 26 March 2021 / Accepted: date)

###### Abstract

New high-precision observations are now possible to constrain different
gravity theories. To examine the accelerated expansion of the Universe, we
used the newly proposed $f(Q,T)$ gravity, where $Q$ is the non-metricity, and
$T$ is the trace of the energy-momentum tensor. The investigation is carried
out using a parameterized effective equation of state with two parameters, $m$
and $n$. We have also considered the linear form of $f(Q,T)=Q+bT$, where $b$
is constant. By constraining the model with the recently published 1048
Pantheon sample, we were able to find the best fitting values for the
parameters $b$, $m$, and $n$. The model appears to be in good agreement with
the observations. Finally, we analyzed the behavior of the deceleration
parameter and equation of state parameter. The results support the feasibility
of $f(Q,T)$ as a promising theory of gravity, illuminating a new direction
towards explaining the Universe’s dark sector.

###### Keywords:

$f(Q,T)$ gravity Effective equation of state Deceleration parameter Dark
energy

###### pacs:

04.50.kd.

††journal: Eur. Phys. J. C

##  1 Introduction

Starting with the Big Bang and moving on to the birth of elements, dark
matter, and anti-matter, some fundamental questions about the universe are now
making their way into the scientific realm. However, there are now several
solutions available to these issues. Around the same time, cosmological
discoveries revealed that the universe seems to be expanding faster. This has
been supported by observations of distant Type Ia Supernovae (SNe Ia) Riess ;
Perlmutter , and it is one of the most intriguing questions in recent years.
Furthermore, these results revealed that a mysterious component known as dark
energy makes up roughly 70% of the universe.

General Relativity is a geometrical theory that has offered a definitive
explanation of the observational evidence and has led to new ideas into the
problems of space and time. Despite its extraordinary success, several recent
observations have raised concerns regarding standard GR validity, which may
still have certain limitations, particularly on cosmic scales and beyond the
solar system. The cosmological constant is the most obvious candidate for dark
energy, but it has flaws like the coincidence problem and fine-tuning problem
Copeland ; Bull ; Weinberg . Rapid expansion can be associated with two
aspects. The first method involves manipulating the energy-momentum tensor in
Einstein’s field equations, such as scalar fields (quintessence, phantom) Wang
; Shinji ; Caldwell , exotic equations of state (Chaplygin gas) Bento ;
Alexander , viscosity (bulk viscosity) Padmanabhan ; Brevik , and so forth.
The second approach is to alter the geometry of spacetime in Einstein’s
equations. This is often known as the modified theories of gravity.
Modified gravity is a prominent branch of modern cosmology that seeks to
provide a unified explanation for the universe’s early epoch while also
accounting for its later accelerated expansion. One of the simplest modified
gravity theories is the $f(R)$ Starobinsky ; Buchdahl ; Martino  gravity
theory, which expresses gravitational motion in terms of an arbitrary function
of $R$, the Ricci scalar. However, the extra degree of freedom afforded by the
metric formulation in $f(R)$ would conflict with observational data observed
in the solar system. Another modified gravity based on a non-minimal
interaction between matter and geometry has been proposed to pass the solar
system level such as $f(R,T)$ theory Xing ; Harko/2014 ; Moraes/2017 ;
Harko/2011 , $f(R,G)$ theory Elizalde ; Bamba/2010 .

The most successful gravity theory at this moment is General Relativity. Not
only did Einstein and Hilbert’s contributions to physics and cosmology have a
significant impact on astronomy, but they also had a significant effect on
mathematics. They employed Riemannian geometry, a geometric theory of gravity
that is now regarded as one of modern science’s key pillars. Till now, GR has
three equivalent geometrical representations: the curvature representation;
the teleparallel representation; and the symmetric teleparallel
representation. Following the introduction of Riemannian geometry in 1918,
Weyl Weyl  attempts to create a more general geometry that can be used to
achieve a geometrical integration of electromagnetism and gravitation. As a
result, a new unified teleparallel theory was proposed Hayashi/1979 . The
torsion in the teleparallel theory is utilized to characterize gravitational
phenomena and is referred to as the teleparallel equivalent of GR or $f(T)$
gravity Yi-Fu ; Capozziello/2011 . Based on the third representation of GR, a
new theory has been proposed Nester  named as symmetric teleparallel gravity,
in which the gravitational interaction is geometrically defined using the non-
metricity $Q$, representing the variability in the length of a vector during
parallel transport. As a result, a new extended gravity called $f(Q)$ was
developed. The cosmological consequences of the $f(Q)$ gravity principle with
observational constraints have also been studied Jimenez/2018 ; Harko/2018 ;
J.Lu ; Lazkoz ; Mandal . It is observed that the cosmological evolution in
$f(Q)$ gravity is similar to $\Lambda$CDM, but it shows deviation from
$\Lambda$CDM at perturbation levelKhyllep/2021 .
After that, Yixin et al. Yixin/2019 ; Yixin/2020  introduced a symmetric
teleparallel gravity extension based on the coupling between non-metricity $Q$
and the trace of the energy-momentum tensor $T$, i.e., considering an
arbitrary function $f(Q,T)$ in the gravitational action. Using some functional
forms of $f(Q,T)$, some works in this modified gravity look at cosmological
models and rapid expansion of the universe. It has recently been discovered
that $f(Q,T)$ gravity dramatically alters the nature of tidal forces and the
equation of motion in the Newtonian limitYang/2021 . Also, it is mentioned
that generalized metric theories can be compared among each other with
experimental results and Newtonian gravity. Thus, the post-Newtonian limit is
almost appropriate for comparing theoretical predictions with solar system
observations. As a result, comparing Weyl type $f(Q,T)$ gravity predictions
concerning tidal force changes with observable evidence from a wide range of
astrophysical phenomena should provide some understanding of the fundamental
characteristics of the gravitational interaction and its geometrical
description. So, there is a motivation to study various theoretical,
observational, and cosmological aspects in $f(Q,T)$ theory. Arora et al. Arora
tried to see if $f(Q,T)$ gravity could solve the late-time acceleration
conundrum without adding an extra form of dark energy from a cosmological
perspective. Bhattacharjee et al. Bhattacharjee  investigated baryogenesis in
$f(Q,T)$ gravity.
As it is well established, the EoS parameter defines the relationship between
pressure and energy density. The EoS parameter is used to classify various
phases of the universe’s decelerated and accelerated expansion. The matter-
dominated phase is represented by $\omega=0$. In the current accelerated
period of evolution, $-1<\omega\leq 0$ represents the quintessence phase,
$\omega=-1$ represents the cosmological constant ($\Lambda$CDM) model, and
$\omega<-1$ is the phantom age. In this work, we use the reconstruction of an
efficient equation of state parameter to understand the late-time acceleration
in $f(Q,T)$ gravity. The effective equation of state is not influenced by the
individual properties of the different components of the matter field. Model
parameters constrained by observational results determine the current value of
the effective equation of the state parameter. Observational cosmology is the
science of using observations to research the structure, existence, and
evolution of the universe. Microwave Background Radiation Eisenstein , Type Ia
Supernovae Riess ; Perlmutter , Cosmic Baryon Acoustic Oscillations Spergel ,
Planck data, and other observational datasets are currently available for
various measurements and are providing robust evidence for the universe’s
acceleration. As a consequence, we will use Pantheon datasets Scolnic  to
constrain the model parameters. The recently proposed Supernovae Pantheon
sample contains 1048 points covering the redshift range $0.01<z<2.26$. We use
the MCMC ensemble sampler given by the emcee library.
The article is divided into various sections. An overview of $f(Q,T)$ gravity
is given in Section 2. In section 3, we discussed the cosmological model and
the parameterized equation of state and obtained an expression of the Hubble
parameter. The brief discussion on observational data used to constrain the
model parameters is given in Section 4. Section 5 includes the behavior of
cosmological parameters such as deceleration parameter and EoS parameter. The
last section 6 contains the concluding remarks.

##  2 Overview of $f(Q,T)$ Gravity

The action which is used to define $f(Q,T)$ gravity read as Yixin/2019 ,

$S=\int\left(\frac{1}{16\pi}f(Q,T)+L_{m}\right)\sqrt{-g}d^{4}x,$ (1)

where $f$ is an arbitrary function that couples the non-metricity $Q$ and the
trace of the energy-momentum tensor $T$. Also, $L_{m}$ represents the matter
Lagrangian and $g=det(g_{\mu\nu})$. We also define the nonmetricity $Q$ as
Jimenez/2018

$Q\equiv-g^{\mu\nu}(L^{\beta}_{\,\,\,\alpha\mu}L^{\alpha}_{\,\,\,\nu\beta}-L^{\beta}_{\,\,\,\alpha\beta}L^{\alpha}_{\,\,\,\mu\nu}),$
(2)

where $L^{\beta}_{\,\,\,\alpha\gamma}$ is the disformation tensor written as,

$L^{\beta}_{\alpha\gamma}=-\frac{1}{2}g^{\beta\eta}(\nabla_{\gamma}g_{\alpha\eta}+\nabla_{\alpha}g_{\eta\gamma}-\nabla_{\eta}g_{\alpha\gamma}).$
(3)

The nonmetricity tensor is represented by

$Q_{\gamma\mu\nu}=\nabla_{\gamma}g_{\mu\nu},$ (4)

with trace of the non-metricity tensor given as

$Q_{\beta}=g^{\mu\nu}Q_{\beta\mu\nu}\qquad\widetilde{Q}_{\beta}=g^{\mu\nu}Q_{\mu\beta\nu}.$
(5)

We can also define a superpotential or the non-metricity conjugate as

$P^{\beta}_{\,\,\,\mu\nu}=-\frac{1}{2}L^{\beta}_{\,\,\,\mu\nu}+\frac{1}{4}(Q^{\beta}-\widetilde{Q}^{\beta})g_{\mu\nu}-\frac{1}{4}\delta^{\beta}_{(\mu}Q_{\nu)}.$
(6)

giving the nonmetricity scalar as Jimenez/2018

$Q=-Q_{\beta\mu\nu}P^{\beta\mu\nu}\,.$ (7)

In addition the energy-momentum tensor is known to be defined as

$T_{\mu\nu}=-\frac{2}{\sqrt{-g}}\dfrac{\delta(\sqrt{-g}L_{m})}{\delta
g^{\mu\nu}}$ (8)

and

$\Theta_{\mu\nu}=g^{\alpha\beta}\frac{\delta T_{\alpha\beta}}{\delta
g^{\mu\nu}}.$ (9)

Also, the variation of energy-momentum tensor with respect to the metric
tensor is such that

$\frac{\delta\,g^{\,\mu\nu}\,T_{\,\mu\nu}}{\delta\,g^{\,\alpha\,\beta}}=T_{\,\alpha\beta}+\Theta_{\,\alpha\,\beta}\,.$
(10)

Thus, taking the variation of action (1) with respect to the metric and
equating it to zero, we get the following field equations:

$-\frac{2}{\sqrt{-g}}\nabla_{\beta}(f_{Q}\sqrt{-g}P^{\beta}_{\,\,\,\,\mu\nu}-\frac{1}{2}fg_{\mu\nu}+f_{T}(T_{\mu\nu}+\Theta_{\mu\nu})\\\
-f_{Q}(P_{\mu\beta\alpha}Q_{\nu}^{\,\,\,\beta\alpha}-2Q^{\beta\alpha}_{\,\,\,\mu}P_{\beta\alpha\nu})=8\pi
T_{\mu\nu}.$ (11)

where $f_{Q}=\dfrac{df}{dQ}$ and $f_{T}=\dfrac{df}{dT}$.

Now, let us assume that the Universe is described by the homogeneous,
isotropic and spatially flat FLRW metric given by,

$ds^{2}=-dt^{2}+a^{2}(t)\delta_{ij}dx^{i}dx^{j},$ (12)

where $a(t)$ is the scale factor of the Universe. Moreover, the matter content
of the Universe is assumed to be consisting of a perfect fluid, for which
energy-momentum tensor is $T^{\mu}_{\,\,\,\nu}=diag(-\rho,p,p,p)$. Also, the
nonmetricity function $Q$ for such a metric is calculated and obtained as
$Q=6H^{2}$.

Using the metric and the field equation (11), the generalized Friedmann
equations are obtained as,

$8\pi\rho=\frac{f}{2}-6FH^{2}-\frac{2\widetilde{G}}{1+\widetilde{G}}(\dot{F}H+F\dot{H}),$
(13)

$8\pi p=-\frac{f}{2}+6FH^{2}+2(\dot{F}H+F\dot{H}).$ (14)

Here ($\cdot$)dot represents a derivative with respect to time, besides
$F=f_{Q}$, and $8\pi\widetilde{G}=f_{T}$ denote differentiation with respect
to $Q$, and $T$, respectively.

Using the above two equations (13) and (14), we can define the equations
similar to the form of standard general relativity(GR),

$3H^{2}=8\pi\rho_{eff}=\frac{f}{4F}-\frac{4\pi}{F}\left[(1+\widetilde{G})\rho+\widetilde{G}p\right],$
(15)

and

$2\dot{H}+3H^{2}=-8\pi p_{eff}=\frac{f}{4F}-\dfrac{2\dot{F}H}{F}+\\\
\frac{4\pi}{F}\left[(1+\widetilde{G})\rho+(2+\widetilde{G})p\right].$ (16)

Moreover, $\rho_{eff}$, and $p_{eff}$ are the effective density and effective
pressure respectively.

##  3 Cosmological model and Equation of State

We consider the simplest functional form $f(Q,T)=Q+bT$, where $b$ is a
constant. So, we get $F=f_{Q}=1$ and $8\pi\widetilde{G}=b$. Now, Solving for p
and $\rho$ from Eqs.(13) and (14). We obtained the effective or total equation
of state parameter $\omega=\frac{p}{\rho}$ as

$\omega=\frac{3H^{2}(8\pi+b)+\dot{H}(16\pi+3b)}{b\dot{H}-3H^{2}(8\pi+b)}.$
(17)

Also, using the relation $\frac{a_{0}}{a}=1+z$, we can define the relation for
t and z as mentioned below.

$\frac{d}{dt}=\frac{dz}{dt}\frac{d}{dz}=-(1+z)H(z)\frac{d}{dz},$ (18)

Normalizing the present value of scale factor to be $a_{0}=a(0)=1$. The Hubble
parameter can be written in the form of

$\dot{H}=-(1+z)H(z)\frac{dH}{dz}.$ (19)

To solve equation (17) for $H$, we need one more alternate equation. So, we
assume a well-motivated parametric form of equation of state parameter as a
function of redshift $z$ Ankan/2016 ,

$\omega=-\frac{1}{1+m(1+z)^{n}},$ (20)

where $m$ and $n$ are model parameters. A. Mukherjee Ankan/2016  has described
the behavior of this considered equation of state parameter. At the epoch of
recent acceleration, it has a negative value of less than $-\frac{1}{3}$. For
positive values of the model parameters $m$ and $n$, the value of $\omega$
tends to zero at a high redshift $z$ and depends on the model parameter at
$z=0$. The functional model of the effective equation of state assumed for the
current reconstruction conveniently accommodates these two phases of
evolution. A positive model parameter often sets a lower bound on the value of
$\omega$ and keeps it in the non-phantom regime.

Using Eqs. (17), (19) and (20), we obtained the Hubble parameter $H$ in terms
of redshift $z$.

$H(z)=H_{0}\left(\frac{b+(16\pi+3b)(1+m(1+z)^{n})}{b+(16\pi+3b)(1+m)}\right)^{l},$
(21)

where $l=\frac{3(8\pi+b)}{n(16\pi+3b)}$, $H_{0}$ is the Hubble value at $z=0$.

##  4 Observational data

This section describes the observational dataset used to constrain the model
parameters $b$, $m$, and $n$ after obtaining the solutions for our model. To
explore the parameter space, we use the MCMC sampling technique and mainly
employ Python’s emcee Mackey  library. For estimating the parameters, one need
not compute the evidence, which is a normalizing constant. Instead, the prior
and likelihood are sufficient to determine the posterior distributions of the
parameters.
We used the recent Pantheon dataset for our work; it consists of 1048
Supernova Type Ia experiment results, discovered by the Pan-STARRS1(PS1)
Medium Deep Survey, the Low-z, SDSS, SNLS, and HST surveys Scolnic ; Chang ,
in the redshift range $z\in(0.01,2.26)$.

The chi-square ($\chi^{2}$) function, which relates the predictions of the
model and SNe Ia observations read as,

$\chi^{2}_{SN}(b,m,n)=\sum_{\mathfrak{D}}\frac{[\mu^{th}(b,m,n,z_{i})-\mu^{obs}(z_{i})]^{2}}{\sigma^{2}_{\mu(z_{i})}},$
(22)

where $\mathfrak{D}$ is the Pantheon samples with 1048 points,
$\sigma^{2}_{\mu(z_{i})}$ is the standard error in the observed value,
$\mu_{i}^{th}$ represents the theoretical value of distance modulus and
$\mu_{i}^{obs}$ is the observed value of distance modulus.

$\mu_{i}^{th}=\mu(D_{l})=m-M=5log_{10}D_{l}(z)+\mu_{0},$ (23)

where $m$ and $M$ are the apparent and absolute magnitudes with

$\mu_{0}=5log(H_{0}^{-1}/Mpc)+25.$ (24)

as the marginalized nuisance parameter. The formula for $D_{l}$ is given by

$D_{L}(z)=(1+z)c\int_{0}^{z}\frac{dz^{\prime}}{H(z^{\prime})}.$ (25)

The 2-$\sigma$ bounds for the parameters from our analysis are
$b=0.2^{+2.7}_{-2.9}\ ,m=0.47^{+0.27}_{-0.21},\ n=3.2^{+1.8}_{-2.0}$. As the
functional form $f$ contains $b$ as a model parameter and $m$, $n$ are the
parameters in the parametric functional form of the equation of state
$\omega$, refer to Eq (17).

Fig. 1 shows a comparison between our model and the widely-accepted
$\Lambda$CDM model in cosmology; we consider $\Omega_{m_{0}}=0.3$,
$\Omega_{\Lambda_{0}}=0.7$ and $H_{0}=67.4\pm 0.5kms^{-1}Mpc^{-1}$ Planck  for
the plot. The figure also includes the Pantheon experimental results, 1048
data points along with their error, and allows for a clear comparison between
the two models.

Figure 1: The plot of distance modulus $\mu(z)$ vs. redshift $z$ for our model
shown in red line and $\Lambda$CDM in black dotted line which shows nice fit
to the 1048 points of the Pantheon datasets shown with it’s error bars.

We present the results in the form of triangle plots in Fig. 2, where, in
addition to the parameter space, we also observe the marginalised distribution
for the parameters $b$, $m$, and $n$ in our model. The contour represent the
$1-\sigma$ and $2-\sigma$ confidence intervals.

Initially, we perform the analysis considering a flat prior for all the
parameters; however, we notice the marginalized distribution for parameter b
to be roughly uniform in the range. We then motivate our work to study the
result in the neighborhood of $b=0$. This approach intends to find any
deviation from GR, which accounts for a local minimum for the function in Eq
(21). We also perform the numerical analysis with a Gaussian prior for the
parameter $b$ with $\sigma=1.0$ as dispersion. The results are presented in
Fig. 2; there is no significant difference in the marginalized distributions
of the remaining parameters, $m$, and $n$.

Figure 2: The plot compares the two numerical analyses with different prior
distributions for the parameter $b$. For either case, we considered a uniform
distribution for the other two parameters, $m$, and $n$. The counter represent
$1-\sigma$ and $2-\sigma$ confidence intervals.

If we consider the case of $b=0$, the model reduces to
$f(Q,T)=f_{\Lambda}(Q)=Q$, i.e. it has a direct link to $\Lambda$CDM model.
Therefore, the equation of Hubble parameter $H$ reduces to

$H(z)=H_{0}\left(\frac{m(z+1)^{n}+1}{m+1}\right)^{\frac{3}{2n}}$ (26)

where $m$ and $n$ are model parameters. One interesting point regarding this
expression of Hubble parameter is that for $n=3$, this becomes exactly like
the $\Lambda$CDM model as stated by Ankan/2016 . The constraints for $m$ and
$n$ using Pantheon SNeIa datasets is shown in Fig. 3.

Figure 3: The plot showing the best fit values of the model parameters $m$ and
$n$ obtained with 1048 points of Pantheon datasets at $1-\sigma$ and
$2-\sigma$ confidence level with $b=0$.

##  5 Cosmological parameters

In this section, we study the behavior of the deceleration parameter and the
equation of state parameter.

###  5.1 The deceleration parameter

The deceleration parameter as a function of Hubble parameter $H$ is defined as

$q=-1-\frac{\dot{H}}{H^{2}}\,.$ (27)

In any cosmological model, the deceleration parameter $q$ play an important
role in characterizing the decelerated phase($q>0$) and an accelerated
phase($q<0$) of the universe. There are many works in literature in which
deceleration parameter is useful in explaining the evolution phase of the
universe Mamon ; Sahoo . The equation of deceleration parameter $q$ according
to our model reads,

$q=-1-\frac{3(b+8\pi)m(-z-1)(z+1)^{n-1}}{b+(3b+16\pi)\left(m(z+1)^{n}+1\right)}.$
(28)

Figure 4: Variation of deceleration parameter $q(z)$ for the best fitted value
of $b=0.2$, $m=0.47$ and $n=3.2$ from the analysis of SNeIa Pantheon samples.

The behavior of $q(z)$ is shown in Fig. 4 according to the estimated values of
model parameters $b$, $m$ and $n$ by Pantheon sample. We can observe that
there is a well behaved transition from deceleration to acceleration phase at
redshift $z_{t}$. The value of the transition redshift is $z_{t}=0.58\pm 0.30$
Farooq . The result obtained is consistent with several works in literature
Cunha ; JV . Also, we can note that the value of $q_{0}=-0.52$ Christine
which is negative at present indicating an acceleration in the universe.

###  5.2 The EoS parameter

The equation of state parameter as a whole determines a relation between
energy density and pressure. The common phases observed through EoS parameter
includes the dust phase at $\omega=0$. Then, $\omega=\frac{1}{3}$ shows the
radiation-dominated phase whereas $\omega=-1$ corresponds to the vacuum energy
i.e. $\Lambda$CDM model. Besides this, the accelerating phase of the universe
which is in recent discussion is depicted when $\omega<-\frac{1}{3}$ which
includes the quintessence ($-1<\omega\leq 0$) and phantom regime
($\omega<-1$).
In this work, we have considered and effective EoS parameter which contains
two model parameters $m$ and $n$. According to the constrained values of m and
n, the behavior of EoS parameter is shown below. The value of EoS parameter at
$z=0$ is $\omega_{0}=-0.68^{+0.10}_{-0.11}$ Christine  which clearly indicates
an accelerating phase.

Figure 5: Variation of EoS parameter for the best fitted value of $m=0.47$ and
$n=3.2$ from the analysis of SNeIa Pantheon samples.

##  6 Conclusion

As new theories of gravity emerge in the literature, it is vital to put them
to the test to see if they are viable in describing the dark sector of the
universe. The $f(Q,T)$ is a promising new gravity theory based on a
combination of the non-metricity function $Q$ and the trace of the energy-
momentum $T$. To begin, we considered the functional form $f(Q,T)=Q+bT$, where
$b$ is a free parameter.
We use a well-motivated parametric form of the equation of state parameter as
a function of redshift $z$ to solve the field equations for $H$. It has a
negative value of less than $-\frac{1}{3}$ at the epoch of recent
acceleration. At a high redshift $z$, the value of $\omega$ tends to zero for
positive values of the model parameters $m$ and $n$ and depends on the model
parameter at $z=0$. The Pantheon study, a recently proposed observational
dataset, was used to constrain the parameter space. The parameters from our
study have 2-$\sigma$ limits of $b=0.2^{+2.7}_{-2.9}\
,m=0.47^{+0.27}_{-0.21},\ n=3.2^{+1.8}_{-2.0}$. The error bar plot of the 1048
points in the Pantheon datasets and our obtained model compared to the
$\Lambda$CDM model considering $\Omega_{m_{0}}=0.3$,
$\Omega_{\Lambda_{0}}=0.7$ and $H_{0}=67.4\pm 0.5kms^{-1}Mpc^{-1}$ shows a
good match to the observational results.
Finally we observed the behavior of the deceleration parameter and equation of
state parameter. We can see that there is a well behaved transition from
deceleration to acceleration phase at redshift $z_{t}$. The value of the
transition redshift $z_{t}=0.58\pm 0.30$ with the value of $q_{0}=-0.52$. And
also, the value of EoS parameter at $z=0$ is
$\omega_{0}=-0.68^{+0.10}_{-0.11}$ which clearly supports an accelerating
phase. The present analysis motivates and encourages the study of such
extensions, which may represent a geometric alternative to dark energy. Apart
from the cosmic evidence, we also need to ensure that the new $f(Q,T)$ theory
is stable so that the differences in approach from $\Lambda$CDM can be
performed at the perturbation level. This can be investigated in detail for
$f(Q,T)$ through future works.

## Acknowledgments

SA acknowledges CSIR, Govt. of India, New Delhi, for awarding Junior Research
Fellowship. PKS acknowledges CSIR, New Delhi, India for financial support to
carry out the Research project [No.03(1454)/19/EMR-II Dt.02/08/2019].

## References

  * (1) A. G. Riess et al., Astron. J., 116 (1998) 1009.
  * (2) S. Perlmutter et al., Astrophys. J., 517 (1999) 565.
  * (3) E. J.Copeland et al., Int. J. mod. Phys. D, 15 (2006) 1753.
  * (4) P. Bull et al., Phys. Dark Univ., 12 (2016) 56.
  * (5) S. Weinberg, Rev. Mod. Phys., 61 (1989) 1.
  * (6) L Wang et al., Astrophys. J., 530 (2000) 17.
  * (7) S. Tsujikawa, Class. Quantum Grav., 30 (2013) 214003.
  * (8) R. R. Caldwell, Phys. Lett. B, 545 (2002) 23.
  * (9) M. C. Bento et al., Phys. Rev. D, 66 (2002) 043507.
  * (10) A. Kamenshchik et al., Phys. Lett. B, 511 (2001) 265.
  * (11) T. Padmanabhan and S.M. Chitre, Phys. Lett. A, 120 (1987) 433.
  * (12) I. Brevik, O. Gorbunova, Gen. Relativ. Gravit., 37(12) (2005) 2039.
  * (13) A. A. Starobinsky, JETP Letters, 86 (2007) 157.
  * (14) H. A. Buchdahl, Month. Not. R. Astron. Soc., 150 (1970) 1.
  * (15) I. De Martino et al., Month. Not. R. Astron. Soc., 442 (2014) 921.
  * (16) Yi-Fu Cai et al., Rep. Prog. Phys., 79 (2016) 106901.
  * (17) S. Capozziello et al., Phys. Rev. D, 84 (2011) 043527.
  * (18) Xing Liu et al., Eur. Phys. J. C, 76 (2016) 420.
  * (19) T. Harko, Phys. Rev. D, 90 (2014) 044067.
  * (20) P.H.R.S. Moraes and P.K. Sahoo, Phys. Rev. D, 96 (2017) 044038.
  * (21) T. Harko et al., Phys. Rev. D , 84 (2011) 024020.
  * (22) E. Elizalde et al., Class. Quant. Grav., 27 (2010) 095007.
  * (23) K. Bamba et al., Eur. Phys. J. C, 67 (2010) 295.
  * (24) J. Beltrán Jiménez et al., Phys. Rev. D, 98 (2018) 044048.
  * (25) T. Harko et al., Phys. Rev. D, 98 (2018) 084043.
  * (26) H. Weyl, Sitzungsber. Preuss. Akad. Wiss. 465 (1918) 1.
  * (27) K. Hayashi and T. Shirafuji, Phys. Rev. D 19 (1979) 3524.
  * (28) J. M. Nester and H. J. Yo, Chin. J. Phys. 37 (1999) 113.
  * (29) J. Lu, X. Zhao, G. Chee, Eur. Phys. J. C 79 (2019) 530.
  * (30) R. Lazkoz et al., Phys. Rev. D, 100 (2019) 104027.
  * (31) S. Mandal et al., Phys. Rev. D, 102(12) (2020) 124029.
  * (32) W. Khyllep, A. Paliathanasis, J. Dutta, Phys. Rev. D, 103 (2021) 103521.
  * (33) Y. Xu et al., Eur. Phys. J. C, 79 (2019) 708.
  * (34) Y. Xu et al., Eur. Phys. J. C, 80 (2020) 449.
  * (35) J-Z. Yang et al., Eur. Phys. J. C, 81 (2021) 111.
  * (36) S. Arora et al., Phys. Dark Univ., 30 (2020) 100664.
  * (37) S. Bhattacharjee and P.K. Sahoo, Eur. Phys. J. C, 80 (2020) 289.
  * (38) D. J. Eisenstein et al., Astrophys. J., 633 (2005) 560.
  * (39) D.N. Spergel et al., Astrophys. J. Suppl. Ser., 170 (2007) 377.
  * (40) A. Mukherjee, Mon. Not. R. Astron. Soc., 460 (2016) 273-282.
  * (41) D. Foreman-Mackey et al., Publ. Astron. Soc. Pac., 125 (2013) 306.
  * (42) D. M. Scolnic et al., The Astrophys. J, 859 (2018) 101.
  * (43) Zhe Chang et al., Chinese Phys. C, 43 (2019) 125102.
  * (44) Planck 2018 results. VI. Cosmological parameters, Astronomy & Astrophysics, 641 (2020) A6.
  * (45) A. Al Mamon and S. Das, Eur. Phys. J. C, 77 (2017) 495.
  * (46) P.K. Sahoo et al., Mod. Phys. Lett. A, 33 (2018) 1850193.
  * (47) O. Farooq and B. Ratra, Astrophys. J., 766 (2013) L7.
  * (48) J. V. Cunha, Phys. Rev. D, 79 (2009) 047301.
  * (49) J. V. Cunha and J. A. S. Lima, Mon. Not. R. Astron. Soc., 390 (2008) 210.
  * (50) C. Gruber and O. Luongo, Phys. Rev. D, 89 (2014) 103506.


# Class-Prototype Conditional Diffusion Model
for Continual Learning with Generative Replay

Khanh Doan1, Quyen Tran1, Tuan Nguyen2, Dinh Phung2, Trung Le2
1VinAI Research, 2Monash University
1{v.khanhdn10, v.quyentt15<EMAIL_ADDRESS>
2{tuan.ng, dinh.phung<EMAIL_ADDRESS>

###### Abstract

Mitigating catastrophic forgetting is a key hurdle in continual learning. Deep
Generative Replay (GR) provides techniques focused on generating samples from
prior tasks to enhance the model’s memory capabilities. With the progression
in generative AI, generative models have advanced from Generative Adversarial
Networks (GANs) to the more recent Diffusion Models (DMs). A major issue is
the deterioration in the quality of generated data compared to the original,
as the generator continuously self-learns from its outputs. This degradation
can lead to the potential risk of catastrophic forgetting occurring in the
classifier. To address this, we propose the Class-Prototype Conditional
Diffusion Model (CPDM), a GR-based approach for continual learning that
enhances image quality in generators and thus reduces catastrophic forgetting
in classifiers. The cornerstone of CPDM is a learnable class-prototype that
captures the core characteristics of images in a given class. This prototype,
integrated into the diffusion model’s denoising process, ensures the
generation of high-quality images. It maintains its effectiveness for old
tasks even when new tasks are introduced, preserving image generation quality
and reducing the risk of catastrophic forgetting in classifiers. Our empirical
studies on diverse datasets demonstrate that our proposed method significantly
outperforms existing state-of-the-art models, highlighting its exceptional
ability to preserve image quality and enhance the model’s memory retention.
Code is available at https://github.com/dnkhanh45/CPDM.

##  1 Introduction

Continual Learning (CL) is a process where neural networks progressively
acquire and accumulate knowledge from sequentially arriving tasks over time.
Mimicking human learning, CL aims to develop models capable of swiftly
adapting to evolving real-world environments. The primary challenge in CL is
addressing Catastrophic Forgetting (CF) [9], which involves the model’s need
to learn new tasks without losing previously acquired knowledge, particularly
when access to old data is not possible.

Continual learning strategies primarily focus on overcoming CF by preserving
knowledge from previous tasks. This is particularly crucial in situations
where privacy concerns prevent the retention of old raw data and the task ID
remains unidentified during testing. In such cases, methods that employ
generative models, specifically Generative Replay (GR), are notably effective
for learning the distribution of past data. GR approaches [33, 17, 10] usually
adopt a two-part system comprising a generator and a classifier. The
generator’s role is to generate samples from prior tasks, which are then used
to train the classifier. The classifier is designed to not only classify
samples from the current task but also effectively categorize the generated
samples, thereby helping to mitigate catastrophic forgetting.

In the context of GR approaches, initial efforts utilized GAN and Variational
Auto Encoder (VAE) architectures, which operate in a single-directional manner
(from generator to classifier) and recycle generated samples, leading to a
gradual decline in image quality. The more recent DDGR method leverages the
benefits of Diffusion Models (DMs) to more effectively prevent forgetting in
generative models. DDGR employs a bi-directional interaction between the
generator and the classifier. The classifier is pretrained on previous tasks,
guides the generator in synthesizing high-quality samples from these tasks.
However, our experimental studies revealed a noticeable decrease in the
quality of generated images when the model was trained on a lengthy sequence
of tasks, adversely affecting its capacity to retain acquired knowledge from
earlier tasks.

To address the challenge of catastrophic forgetting in Continual Learning,
this paper introduces the Class-Prototype conditional Diffusion Model (CPDM).
Operating under GR strategies, CPDM features a dual-component system
consisting of a diffusion-based generator and a classifier. These components
are linked through a bidirectional relationship. In the generator-to-
classifier direction, the generator creates high-quality samples by denoising
the noisy images with class information from previous tasks, which are then
utilized to train the classifier. Conversely, in the classifier-to-generator
direction, the classifier aids the diffusion model in selecting suitable
initial prototypes, enhancing the generation of high-quality images to
mitigate catastrophic forgetting. In summary, our primary contribution can be
outlined as follows:

  * •

We present a novel GR strategy for continual learning, featuring a diffusion-
based generator and a classifier, designed to efficiently mitigate
catastrophic forgetting.

  * •

We propose an efficient training technique for the diffusion model by learning
class prototypes, which capture the most representative examples of classes
from previous tasks. This approach facilitates the generation of high-quality
images through class-prototype conditional denoising.

  * •

To increase the diversity of the generated samples, we suggest a method of
exploring diversity based on the nearest neighbor. This approach entails
seeking the closest class from previous tasks and prompting the denoising
network to synthesize new features inspired by its neighbor.

  * •

The comprehensive results from benchmark datasets show that our proposed
method significantly outperforms the current state-of-the-art model, achieving
higher average accuracy and lower average forgetting rate.

##  2 Related Work

###  2.1 Continual Learning

In general, CL techniques combating catastrophic forgetting are divided into
three main groups: regularization-based, parameter isolation, and memory-based
approaches.

Regularization-based approaches incorporate constraints to parameter updates
[39, 2] or enforce consistency with previous model outputs [22, 41].

Parameter isolation approaches aim to tackle the problem by assigning each
task to a dedicated portion of the network, preventing the overwriting of
weights and the loss of information. When no architectural size constraints
apply, it is possible to grow new branches for new tasks while freezing
previous task parameters [38, 25, 32].

Memory-based approaches exhibit superior performance across diverse settings,
particularly excelling in scenarios where task boundaries during training and
task IDs during testing are unspecified, providing increased flexibility.
Particularly, these approaches utilize episodic memory to store past data [30,
3, 4, 31].

###  2.2 Generative Replay Continual Learning

Generative replay (GR) leverages a generative model [11, 18, 15] to create a
replay memory for old tasks, mitigating catastrophic forgetting. Classical GR
methods typically employ VAE [18] or GAN [11] as the generator for Continual
Learning (CL) [37, 1, 40, 28, 26]. For instance, DGR [33] uses GAN to generate
previous samples for data replaying. MeRGANs [5] addresses forgetting in GANs
and excels in CL. Additionally, the mnemonics training framework proposed by
[23] generates optimizable exemplars. Building on the success of diffusion
models [15, 14], [10] suggests using diffusion models as a generative replay
for Task Incremental Learning (TIL). Despite achieving success in mitigating
the catastrophic forgetting of classifiers in CL, existing generative replay
approaches using VAE, GAN, and diffusion models still face catastrophic
forgetting themselves, resulting in a reduction in the quality of generated
images across tasks. This work proposes an efficient workaround to alleviate
the catastrophic forgetting of a diffusion model-based generative replay. Key
components of our approach include class-conditioned prototypes that summarize
class information to guide the diffusion model and diversity exploration with
neighbor mixstyle to enhance the diversity of generated images.

##  3 Background

###  3.1 Diffusion Models

The forward process of DMs involves incrementally adding Gaussian noise to an
image until it fully transforms into pure Gaussian noise. Given true data
samples $\mathbf{x}_{0}\thicksim q(\mathbf{x}_{0})$, where $q(\mathbf{x}_{0})$
represents the data distribution over $\mathbb{R}^{d}$, the forward process
generates a $K$-length sequence of random variables
$\mathbf{x}_{1},\mathbf{x}_{2},...,\mathbf{x}_{K}$. Setting $\alpha_{1}=1$ and
$\alpha_{k}\downarrow 0$, each $\mathbf{x}_{k}$ is derived from
$\mathbf{x}_{0}$ as follows:

$\mathbf{x}_{k}=\sqrt{\bar{\alpha}_{k}}\mathbf{x}_{0}+\sqrt{1-\bar{\alpha}_{k}}\bm{\epsilon},$
(1)

where $\bar{\alpha}_{k}=\prod_{i=1}^{k}\alpha_{i}$ and
$\bm{\epsilon}\sim\mathcal{N}\left(\mathbf{0},\mathbf{I}\right)$.

The reverse process begins with a prior distribution
$p(\mathbf{x}_{K})=\mathcal{N}(\mathbf{x}_{K};\mathbf{0},\mathbf{I})$, and
then progressively denoise the noisy image $\mathbf{x}_{K}$ to generate new
data. DDPM [15] proposes a simplified objective function for training the
diffusion model as follows:

$\min_{\theta}\mathbb{E}_{k,\mathbf{x}_{0},\bm{\epsilon}}\left[\lVert\bm{\epsilon}-\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k\right)\rVert^{2}\right],$
(2)

where $\mathbf{x}_{k}$ is calculated as described in Eq. (1). This
optimization problem suggests learning a network
$\bm{\epsilon}_{\theta}(\mathbf{x}_{k},k)$ to predict the source noise
$\bm{\epsilon}\sim\mathcal{N}\left(\mathbf{0},\mathbf{I}\right)$.

Ultimately, we can employ Langevin dynamics sampling to generate new images
from noise. This sampling initiates with
$\mathbf{x}_{K}\sim\mathcal{N}(\mathbf{0},\mathbf{I})$. The complete sampling
process is as follows:

$\mathbf{x}_{k-1}=\frac{1}{\sqrt{\alpha_{k}}}\left(\mathbf{x}_{k}-\frac{1-\alpha_{k}}{\sqrt{1-\bar{\alpha}_{k}}}\bm{\epsilon}_{\theta}(\mathbf{x}_{k},k)\right)+\sigma_{k}\mathbf{z},$
(3)

where
$\sigma_{k}=\sqrt{\sigma_{k}^{2}}=\sqrt{\frac{(1-\alpha_{k})(1-\bar{\alpha}_{k-1})}{1-\bar{\alpha}_{k}}}$,
$\mathbf{z}\sim\mathcal{N}(\mathbf{0},\mathbf{I})$, and $k=K,...,1$.

###  3.2 Classifier-free Guidance

The classifier-free approach, as proposed in [14], offers a method to train
diffusion models without the need for a separate classifier. It involves
simultaneous training of a conditional diffusion model and an unconditional
one, generally denoted by $\bm{\epsilon}_{\theta}(\mathbf{x}_{k},k,y)$, where
$y$ represents conditioning information such as the class label of
$\mathbf{x}$. During training, $y$ is randomly chosen to be either the class
$m$-th (i.e., $y=m\in\\{1,2,...,M\\}$), or unknown class (i.e., $y=0$). In the
sampling phase, $\tilde{\bm{\epsilon}}_{\theta}(\mathbf{x}_{k},k,y)$ is
utilized for denoising $\mathbf{x}_{K}$ to generate images with class
information:

$\tilde{\bm{\epsilon}}_{\theta}(\mathbf{x}_{k},k,y)=w\bm{\epsilon}_{\theta}(\mathbf{x}_{k},k,y=m)+(1-w)\bm{\epsilon}(\mathbf{x}_{k},k,y=0),$
(4)

where $w\geq 0$ controls the degree to which the conditioning information is
used.

##  4 Generative Replay Continual Learning with Diffusion Models

In what follows, we present the problem setting of task incremental CL and the
technicality of generative replay CL with diffusion models.

Problem Setting of Task Incremental CL: In Task Incremental Learning (TIL), a
seamless and continuous sequence of tasks, denoted as
$\mathcal{D}^{t}={(\mathbf{x}^{t}_{i},y^{t}_{i})}_{i=1}^{N^{t}}$ for
$t=1,\dots,T$, arrives in the system. Here,
$\mathbf{x}^{t}_{i}\in\mathbb{R}^{d}$ and $y^{t}_{i}\in\mathcal{Y}^{t}$ (the
label set of task $t$). The goal is to train a deep neural network $f_{\phi}$
initialized as $f^{0}_{\phi}$. Upon the arrival of each task
$\mathcal{D}^{t}$, the model needs to adapt from $f^{t-1}_{\phi}$ to
$f^{t}_{\phi}$, mainly relying on the current data in $\mathcal{D}^{t}$
without revisiting the data from previous tasks $\mathcal{D}^{1:t-1}$. One of
the most significant challenges in TIL is catastrophic forgetting, where the
current model $f^{t}_{\phi}$ tends to easily forget information from the
oldest tasks, hence leading to poor predictive performances on these tasks.

Generative Replay with Diffusion Models: To address catastrophic forgetting,
generative models like GAN [11] and VAE [18] are commonly employed to generate
replay memory for old tasks [33, 17]. However, GANs often encounter the mode
collapsing problem, and VAEs may generate blurry images [12]. Recently,
diffusion models [34, 16] have emerged as state-of-the-art generative models
capable of producing high-quality and diverse images. To overcome the inherent
issues of GANs/VAEs and capitalize on the advantages of diffusion models, [10]
proposes using diffusion models as a generative replay for TIL. Specifically,
at the end of task $t$, it trains a diffusion model
$\bm{\epsilon}^{t}_{\theta}(\mathbf{x}_{k},k)$ on the current data
$\mathcal{D}^{t}$ and the replay memory of the previous tasks
$\mathcal{M}^{1:t-1}$. This trained diffusion model
$\bm{\epsilon}^{t}_{\theta}(\mathbf{x}_{k},k)$ is then employed to generate
the replay memory $\mathcal{M}^{1:t}$ for the next task.

##  5 Our Proposed Approach

Figure 1: FID scores across tasks for generated images corresponding to the
first task dataset of the baselines DDGR [10] and our proposed CPDM. The
illustration belongs to the label class “Apple”, whereas the leftmost one is
the real photo. As can be observed, for DDGR, the quality of generated apples
deteriorates significantly across tasks. Consequently, the generated apples of
DDGR in some last tasks become hardly recognizable, while the generated apples
of our proposed CPDM maintain their quality more efficiently. Finally, FID
scores across tasks for our CPDM are significantly better than DDGR,
especially for later tasks when the gap becomes more pronounced.

###  5.1 Motivations

Catastrophic forgetting (CF) in classifiers poses a significant challenge in
TIL. While applying generative models to replay old data can alleviate CF in
classifiers, the generative models themselves may face CF within the context
of CL. This occurs because, at the end of each task $t$, the generative model
is trained based on the new task data $\mathcal{D}^{t}$ and the replay memory
$\mathcal{M}^{1:t-1}$. The latter is generated from the generative model
trained at the end of task $t-1$, using $\mathcal{D}^{t-1}$ and the previous
replay memory $\mathcal{D}^{1:t-2}$. Notably, the quality of old data in the
generative replay memory (e.g., $\mathcal{M}^{1}$) diminishes task by task,
making it increasingly challenging for current and future diffusion models to
maintain high-quality representations on this data.

While it has been demonstrated in [10] that Diffusion Models as generative
replay can assist in mitigating the catastrophic forgetting of generative
models in CL, our observations indicate that challenges still persist. As
illustrated in Figure 1, the quality of generated images for task 1’s data
significantly diminishes across tasks. Consequently, the generated images for
some of the last tasks exhibit very low quality, making it difficult for the
current model to recall old data and exacerbating the issue of catastrophic
forgetting.

Our primary approach to alleviate the CF of diffusion models involves learning
class prototypes that succinctly summarize data within a given class.
Subsequently, during both training and inference of new data, the diffusion
models are conditioned on these class prototypes. It is noteworthy that these
class prototypes are learnable variables, which serve as a reserved
information channel to effectively remind diffusion models of class concepts,
contributing to the reduction of CF across tasks.

###  5.2 Conditional Diffusion Probabilistic Model

In what follows, we present our probabilistic viewpoint of conditional
diffusion models.

Forward process. Let $\mathbf{x}_{0}\thicksim q(\mathbf{x}_{0}|y)$ be clean
data samples, where $q(\mathbf{x}_{0}|y)$ represents the class-conditional
data distribution over $\mathbb{R}^{d}$. Conditioned on $\mathbf{x}_{0}$ and
$y$, the joint distribution of the sequence
$\mathbf{x}_{1},\mathbf{x}_{2},...,\mathbf{x}_{K}$ can be factorized using the
chain rule of probability and the Markov property as follow:

$q(\mathbf{x}_{1:K}|\mathbf{x}_{0},y)=\Pi_{k=1}^{K}q(\mathbf{x}_{k}|\mathbf{x}_{k-1},y).$
(5)

Here, $q(\mathbf{x}_{k}|\mathbf{x}_{k-1},y)$ is defined as a Gaussian
transition kernel:

$q(\mathbf{x}_{k}|\mathbf{x}_{k-1},y)=\mathcal{N}\left(\mathbf{x}_{k};\sqrt{\alpha_{k}}\mathbf{x}_{k-1},\left(1-\alpha_{k}\right)\mathbf{I}\right),$
(6)

where $\alpha_{1}=1$ and $\alpha_{k}\downarrow 0$. Through basic algebraic
manipulations, we reach:

$q(\mathbf{x}_{k}|\mathbf{x}_{0},y)=\mathcal{N}\left(\mathbf{x}_{k};\sqrt{\bar{\alpha}_{k}}\mathbf{x}_{0},\left(1-\bar{\alpha}_{k}\right)\mathbf{I}\right),$
(7)

where $\bar{\alpha}_{k}=\prod_{i=1}^{k}\alpha_{i}$ rapidly approaches $0$ as
$k$ increases. By applying the reparameterization trick, $\mathbf{x}_{k}\sim
q(\mathbf{x}_{k}|\mathbf{x}_{0},y)$ suggests that:

$\mathbf{x}_{k}=\sqrt{\bar{\alpha}_{k}}\mathbf{x}_{0}+\sqrt{1-\bar{\alpha}_{k}}\bm{\epsilon},$
(8)

where $\mathbf{x}_{0}\sim q(\mathbf{x}_{0}|y)$ and
$\bm{\epsilon}\sim\mathcal{N}\left(\mathbf{0},\mathbf{I}\right)$. Eq. (8)
enables the sampling of any noisy version $\mathbf{x}_{k}$ from
$\mathbf{x}_{0}$. As $K$ becomes sufficiently large, it appears that
$\bar{\alpha}_{K}\approx 0$ and $\mathbf{x}_{K}$ seems to be sampled from
$\mathcal{N}(\mathbf{0},\mathbf{I})$.

Reverse process. We begin the reverse process with a prior distribution
$p(\mathbf{x}_{K}|y)=\mathcal{N}(\mathbf{x}_{K};\mathbf{0},\mathbf{I})$, and
then progressively denoise the noisy image $\mathbf{x}_{K}$ to generate new
data that belongs to class $y$. The process is encapsulated in the following
equation:

$p_{\theta}(\mathbf{x}_{0:K}|y)=p(\mathbf{x}_{K}|y)\Pi_{k=1}^{K}p_{\theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k},y).$
(9)

Here, $p_{\theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k},y)$ is a learnable
transition kernel. At $k=1$, $\mathbf{x}_{0}\sim
p_{\theta}(\mathbf{x}_{0}|\mathbf{x}_{1},y)$ seems to be sampled from
$q(\mathbf{x}_{0}|y)$.

Training objective. To learn $p_{\theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k},y)$,
we apply the variational approach, represented by minimizing the cross-entropy
($CE$) between $q\left(\mathbf{x}_{0}|y\right)$ and
$p_{\theta}\left(\mathbf{x}_{0}|y\right)$:

$\displaystyle
CE\left(q\left(\mathbf{x}_{0}|y\right),p_{\theta}\left(\mathbf{x}_{0}|y\right)\right)=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\log
p_{\theta}\left(\mathbf{x}_{0}|y\right)\right]$
$\displaystyle\leq\mathbb{E}_{q\left(\mathbf{x}_{0:K}|y\right)}\left[\log\frac{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}\right].$
(10)

This leads to the optimization problem:

$\min_{\theta}\mathcal{L}\coloneqq\mathbb{E}_{q\left(\mathbf{x}_{0:K}|y\right)}\left[\log\frac{q\left(\mathbf{x}_{0:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}\right].$
(11)

We can further derive $\mathcal{L}$ as:

$\displaystyle\mathcal{L}$
$\displaystyle=\mathbb{E}_{q}\Big{[}\underbrace{D_{KL}\left(q\left(\mathbf{x}_{K}\mid\mathbf{x}_{0},y\right)\|p\left(\mathbf{x}_{K}|y\right)\right)}_{\mathcal{L}_{K}}$
$\displaystyle+\sum_{k>1}\underbrace{D_{KL}\left(q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)\|p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)\right)}_{\mathcal{L}_{k-1}}$
$\displaystyle\underbrace{-\log
p_{\theta}\left(\mathbf{x}_{0}\mid\mathbf{x}_{1},y\right)}_{\mathcal{L}_{0}}\Big{]}$
(12)

(See our supplementary material for more details). While $\mathcal{L}_{K}$ is
a constant, $\mathcal{L}_{0}$ is later integrated with $\mathcal{L}_{k-1}$ in
the simplified version of the training objective (refer to the optimization
problem in Eq. (16)). For $\mathcal{L}_{k-1}$, it is worth noting that
$q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)$ is
tractable when conditioned on $\mathbf{x}_{0}$:

$q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)=\mathcal{N}\left(\tilde{\bm{\mu}}_{k}\left(\mathbf{x}_{k},\mathbf{x}_{0},y\right),\sigma_{k}^{2}\mathbf{I}\right),$
(13) $\displaystyle\text{where
}\tilde{\bm{\mu}}_{k}\left(\mathbf{x}_{k},\mathbf{x}_{0},y\right)=\frac{1}{\sqrt{\alpha_{k}}}\left(\mathbf{x}_{k}-\frac{1-\alpha_{k}}{\sqrt{1-\bar{\alpha}_{k}}}\bm{\epsilon}\right)\,\text{and
}$
$\displaystyle\sigma_{k}^{2}=\frac{(1-\alpha_{k})(1-\bar{\alpha}_{k-1})}{1-\bar{\alpha}_{k}}.\text{
This hints us to parameterize:}$
$p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)=\mathcal{N}\left(\bm{\mu}_{\theta}\left(\mathbf{x}_{k},k,y\right),\bm{\Sigma}_{\theta}\left(\mathbf{x}_{k},k,y\right)\right),$
(14)

where
$\bm{\mu}_{\theta}\left(\mathbf{x}_{k},k,y\right)=\frac{1}{\sqrt{\alpha_{k}}}\left(\mathbf{x}_{k}-\frac{1-\alpha_{k}}{\sqrt{1-\bar{\alpha}_{k}}}\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k,y\right)\right)$,
and
$\bm{\Sigma}_{\theta}\left(\mathbf{x}_{k},k,y\right)=\sigma_{k}^{2}\mathbf{I}$
is untrained time dependent constants. Therefore, minimizing Kullback–Leibler
(KL) divergence in $\mathcal{L}_{k-1}$ leads to training a model
$\bm{\mu}_{\theta}$ that predicts $\tilde{\bm{\mu}}_{k}$, which is formulated
as:

$\mathcal{L}_{k-1}=\mathbb{E}_{q(\mathbf{x}_{k}|\mathbf{x}_{0},y)}\left[\frac{1}{2\sigma_{k}^{2}}\lVert\tilde{\bm{\mu}}_{k}\left(\mathbf{x}_{k},\mathbf{x}_{0},y\right)-\bm{\mu}_{\theta}\left(\mathbf{x}_{k},k,y\right)\rVert^{2}\right]$

(15)

By applying the reparameterization trick and ignoring the scaling factor, we
can further simplify the objective function (15) by learning a network
$\bm{\epsilon}_{\theta}(\mathbf{x}_{k},k,y)$ to predict the source noise
$\bm{\epsilon}\sim\mathcal{N}\left(\mathbf{0},\mathbf{I}\right)$. The final
objective function is as follows:

$\tilde{\mathcal{L}}_{k-1}=\mathbb{E}_{\bm{\epsilon},\mathbf{x}_{0},k,y}\left[\lVert\bm{\epsilon}-\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k,y\right)\rVert^{2}\right],$
(16)

where $\mathbf{x}_{k}$ is calculated via $\mathbf{x}_{0}$ as described in Eq.
(8).

###  5.3 Class-Prototype Conditional Diffusion Model

Eq. (16) directs us to integrate class-specific information into the diffusion
model training. To achieve this, we propose adding class information
variables, $\mathbf{c}(y)$ and $\bm{\tau}(y)$, into our conditional diffusion
model training process. Consequently, the objective function becomes:

$\min_{\theta,\mathbf{c}}\mathcal{L}_{DM}\coloneqq\mathbb{E}_{\bm{\epsilon},\mathbf{x}_{0},k,y}\left[\lVert\bm{\epsilon}-\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k,\mathbf{c}(y),\bm{\tau}(y)\right)\rVert^{2}\right].$
(17)

Here, $\mathbf{c}(y)\in\mathbb{R}^{d}$ is a learnable class-prototype designed
to capture the most representative features of class $y$. Meanwhile,
$\bm{\tau}(y)$ represents the text embedding derived from the CLIP model [27].

###  5.4 GR with Class-Prototype Conditional Diffusion Model

Training Methodology. For each task $t$, we train the classifier
$f^{t}_{\phi}$ by minimizing $CE$ loss w.r.t. $\phi$:

$\min_{\phi}\mathcal{L_{C}}\coloneqq\mathbb{E}_{(\mathbf{x},y)}\left[CE(f^{t}_{\phi}(\mathbf{x}),y)\right],$
(18)

where $(\mathbf{x},y)\sim\mathcal{D}^{t}\cup\mathcal{M}^{1:t-1}$.
Subsequently, the diffusion model
$\bm{\epsilon}^{t}_{\theta}\left(\mathbf{x}_{k},k,\mathbf{c}(y),\bm{\tau}(y)\right)$
learns data from $\mathcal{D}^{t}$ and replay memory $\mathcal{M}^{1:t-1}$ to
generate samples for $\mathcal{M}^{1:t}$ that serves for the next task (as
illustrated in the left part of Figure 2).

Class-prototype Initialization and Update. At task $t$, for each label
$y^{t}_{i}\in\mathcal{Y}^{t}$, we initialize $\mathbf{c}(y^{t}_{i})$ with
sample belonging to this label that our model $f^{t}_{\phi}$ has the highest
confidence on prediction:

$\mathbf{c}(y^{t}_{i})\coloneqq\arg\max_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}p(y^{t}_{i}|\mathbf{x}^{t})=\arg\min_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}\left[CE(f^{t}_{\phi}(\mathbf{x}^{t}),y^{t}_{i})\right],$
(19)

where
$\mathcal{X}^{y^{t}_{i}}\coloneqq\\{\mathbf{x}^{t}|(\mathbf{x}^{t},y^{t})\in\mathcal{D}^{t};y^{t}=y^{t}_{i}\\}$.
This class prototype is then updated alongside the diffusion model (refer to
Eq. (17)).

Figure 2: Overall framework of our CPDM for continual learning with generative
replay. Left: During task $t$, the classifier $f^{t}_{\phi}$ trains on data
from the current task $\mathcal{D}^{t}$ and on data from the previous task
$\mathcal{M}^{1:t-1}$ generated by the diffusion model to reduce catastrophic
forgetting. Right: The diffusion model begins by denoising the initial noise
$\mathcal{N}(\mathbf{0},\mathbf{I})$. Each denoising step incorporates class
information from CLIP embeddings $\bm{\tau}(y)$ and the learned class
prototype $\mathbf{c}(y)$. The class prototype is designed to capture the most
distinctive features of a given class and assists the generator in
synthesizing high-quality images.

Diversity Exploration from the Nearest Neighbor. To boost the diversity of
generated images, at task $t$, we propose seeking the nearest previous class
$\tilde{y}\in\mathcal{Y}^{1:t-1}$ to the current class $y\in\mathcal{Y}^{t}$
by measuring the cosine similarity in CLIP embedding space:

$\tilde{y}=\arg\max_{\tilde{y}}\dfrac{\bm{\tau}(y)\cdot\bm{\tau}(\tilde{y})}{\lVert\bm{\tau}(y)\rVert\lVert\bm{\tau}(\tilde{y})\rVert}.$
(20)

To enhance the variety of classes in the current task, we steer the denoising
network to predict one of its neighbors, guided by the following objective
function:

$\displaystyle\min_{\theta,\mathbf{c}}\mathcal{L}_{DE}\coloneqq\mathbb{E}_{\mathbf{x}_{0},k,y,\tilde{y}}\big{[}k$
$\displaystyle\lVert\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k,\mathbf{c}(y),\bm{\tau}(y)\right)$
$\displaystyle-\bm{\epsilon}_{\theta}\left(\mathbf{x}_{k},k,\tilde{\mathbf{c}}(\tilde{y}),\bm{\tau}(\tilde{y})\right)\rVert^{2}\big{]}.$
(21)

By minimizing this Diversity Exploration (DE) function, the denoising
trajectories are guided to align closely with those of their nearest
neighbors. Consequently, the diffusion model for the current class is
encouraged to synthesize new features inspired by its neighbor, thereby
increasing the diversity of the generated samples. Additionally, this method
aids in preventing mode collapse and improving the classifier’s generalization
capability. The overall objective is then combined into a single function:

$\min_{\theta,\mathbf{c}}{\mathcal{L}_{DM}+\gamma\mathcal{L}_{DE}},$ (22)

where $\gamma>0$ adjusts the balance between diverse image generation and
high-quality, class-specific image generation. The detailed algorithms are
outlined in Algorithms 1 and 2. Finally, a detailed visualization of our CPDM
using generative replay is provided in Figure 2.

0: Task $t$, dataset $\mathcal{D}^{t}$ with labels set $\mathcal{Y}^{t}$,
classifier $f_{\phi}$, diffusion model $\bm{\epsilon}_{\theta}$, set of class-
prototypes $\mathcal{C}$, drop label rate $\delta$, pretrained CLIP model.

0: Optimal $\phi^{*}$

1: for $t=1,...,T$ do

2: if $t\geq 2$ then

3:
$\mathcal{M}^{1:t-1}=\textit{DiffusionSampler}(\mathcal{Y}^{1:t-1},\mathcal{C}^{1:t-1},\tilde{\bm{\epsilon}}_{\theta})$

4: $(\mathbf{x},y)\sim\mathcal{D}^{t}\cup\mathcal{M}^{1:t-1}$

5: else

6: $(\mathbf{x},y)\sim\mathcal{D}^{t}$

7: end if

8: Update $\phi$ according to (18).

9: $\tilde{\delta}\sim\mathcal{U}(0,1)$

10: if $\tilde{\delta}\leq\delta$ then

11: $\bm{\tau}(y)=0$

12: else

13: $\bm{\tau}(y)=CLIP(y)$

14: end if

15: Initialize $\mathbf{c}(y)$ according to (26).

16: Update $\theta,\mathbf{c}\in\mathcal{C}^{t}$ according to (22).

17: end for

Algorithm 1 Pseudocode for training our CPDM.

0: Label set $\mathcal{Y}^{1:t-1}$, class-prototypes from previous tasks
$\mathcal{C}^{1:t-1}$, classifier-free diffusion model
$\tilde{\bm{\epsilon}}_{\theta}$, diffusion steps $K$, number of generated
samples $L$.

0: $\mathcal{M}^{t}$

1: $\mathcal{M}^{t}=\varnothing$

2: for $y\in\mathcal{Y}^{1:t-1}$ do

3: $l=0$

4: while $l\leq L$ do

5: Get $\mathbf{c}(y)$ from $\mathcal{C}^{1:t-1}$

6: $\mathbf{x}_{K}\sim\mathcal{N}(\mathbf{0},\mathbf{I})$

7: for $k=K,...,1$ do

8: $\mathbf{z}\sim\mathcal{N}(\mathbf{0},\mathbf{I})$

9:
$\tilde{\bm{\mu}}_{\theta}=\frac{1}{\sqrt{\alpha_{k}}}\left(\mathbf{x}_{k}-\frac{1-\alpha_{k}}{\sqrt{1-\bar{\alpha}_{k}}}\tilde{\bm{\epsilon}}_{\theta}\left(\mathbf{x}_{k},k,\mathbf{c}(y),\bm{\tau}(y)\right)\right)$

10: $\mathbf{x}_{k-1}=\tilde{\bm{\mu}}_{\theta}+\sigma_{k}\mathbf{z}$

11: end for

12: $\mathcal{M}^{t}=\mathcal{M}^{t}\cup\\{(\mathbf{x}_{0},y)\\}$

13: $l=l+1$

14: end while

15: end for

Algorithm 2 DiffusionSampler

##  6 Experiments

We assess the effectiveness of our proposed CPDM in the commonly encountered
Class Incremental Learning (CIL) scenario [35, 36] in CL. Furthermore, we
extend our assessment to include another setting, Class Incremental Repeat
(CIR) [24, 6], with detailed results and analysis presented in the
supplementary materials.

###  6.1 Setup

To ensure a balanced comparison, we adhere to the four experimental settings
outlined in [10], applied to the CIFAR-100 and ImageNet [8] datasets.

##### Baselines.

We compare our approach with the baselines including Finetuning, SI [39], MAS
[2], EWC [19], IMM [21], DGR [33], MeRGAN [5], PASS [41], and DDGR [10]. SI
(Synaptic Intelligence), MAS (Memory Aware Synapses), EWC (Elastic Weight
Consolidation), and IMM (Incremental Moment Matching) are methods that
primarily focus on estimating the prior distribution of model parameters when
assimilating new data. Generally, these approaches evaluate the significance
of each parameter within a neural network, operating under the assumption of
parameter independence for practicality. On the other hand, DGR (Deep
Generative Replay) and MeRGAN leverage Generative Adversarial Networks (GANs)
to create prior samples, facilitating data replay. Meanwhile, PASS represents
a straightforward approach that does not rely on exemplars.

##### Datasets.

We use two scenarios for each dataset CIFAR-100 and ImageNet. Half of the
classes belong to the first task, the rest is divided equally among the
remaining tasks. Specific details are as follows:

  * •

CIFAR-100: initial task consists of 50 classes with two cases of incremental
tasks: 5 incremental tasks (i.e., 10 classes per task) and 10 incremental
tasks (i.e., 5 classes per task)

  * •

ImageNet: initial task consists of 500 classes with two cases of incremental
tasks: 5 incremental tasks (i.e., 100 classes per task) and 10 incremental
tasks (50 classes per task).

Table 1: Average accuracy and forgetting (%) of methods across 4 benchmark
datasets. Underlined scores represent the second-best results.

|  Average Accuracy $A_{T}(\uparrow)$ |  Average Forgetting $F_{T}(\downarrow)$
---|---|---
| CIFAR-100 | ImageNet | CIFAR-100 | ImageNet
Method | AlexNet | ResNet | AlexNet | ResNet | AlexNet | ResNet | AlexNet | ResNet
|  NC=5 | 10 | 5 | 10 | 50 | 100 | 50 | 100 | 5 | 10 | 5 | 10 | 50 | 100 | 50 | 100
Finetuning | 6.11 | 5.12 | 18.08 | 17.50 | 5.33 | 3.24 | 12.95 | 10.28 | 60.45 | 59.87 | 61.65 | 62.79 | 56.55 | 57.83 | 58.58 | 59.71
SI | 16.96 | 13.57 | 26.45 | 23.15 | 19.38 | 14.38 | 28.88 | 24.38 | 48.58 | 50.18 | 52.27 | 56.65 | 41.18 | 45.94 | 41.93 | 44.56
EWC | 15.29 | 9.71 | 25.49 | 18.82 | 15.22 | 13.03 | 23.51 | 22.03 | 50.38 | 54.27 | 52.83 | 60.47 | 45.65 | 47.01 | 46.98 | 46.96
MAS | 20.13 | 18.94 | 29.94 | 28.28 | 16.35 | 14.51 | 31.25 | 25.51 | 45.75 | 45.37 | 49.38 | 51.31 | 44.85 | 45.70 | 39.55 | 44.34
IMM | 11.26 | 9.87 | 21.02 | 19.79 | 13.68 | 11.13 | 23.19 | 19.73 | 54.60 | 54.57 | 58.12 | 59.89 | 46.65 | 49.31 | 47.70 | 49.62
DGR | 42.49 | 38.16 | 52.96 | 48.94 | 43.94 | 38.81 | 53.32 | 47.56 | 24.08 | 26.52 | 26.36 | 31.14 | 17.31 | 22.52 | 17.96 | 21.84
MeRGAN | 46.03 | 43.23 | 57.19 | 55.69 | — | — | — | — | 36.95 | 26.49 | 20.12 | 22.55 | — | — | — | —
PASS | 53.21 | 48.65 | 62.30 | 60.63 | — | — | — | — | 27.35 | 19.43 | 16.97 | 21.21 | — | — | — | —
DDGR | 59.20 | 52.22 | 63.40 | 60.04 | 53.86 | 52.21 | 64.83 | 61.26 | 23.00 | 16.86 | 15.34 | 19.25 | 6.98 | 7.82 | 5.65 | 7.73
CPDM | 71.35 | 61.01 | 76.56 | 66.52 | 58.02 | 52.46 | 67.97 | 65.53 | 13.80 | 11.71 | 10.79 | 8.73 | 7.06 | 4.78 | 8.52 | 5.02

##### Models.

Following previous works [29, 23, 7], two model architectures are used for the
classifier: AlexNet [20] and 32-layer ResNet [13]. Similarly, following [16],
popular UNet architecture is used for the diffusion model.

##### Evaluations.

Two common metrics are used to evaluate: Average Accuracy and Average
Forgetting during training. Denote $acc_{t}^{i}$ is the accuracy of task $t$
after the model has been trained with task $i$, the metrics of interest can be
computed as:

  * •

Average Accuracy at task $i$:

$A_{i}=\frac{1}{i}\sum_{t=1}^{i}{acc_{t}^{i}},\forall 1\leq i\leq T$ (23)

  * •

Average Forgetting at task $i$ $(F_{1}=0)$:

$F_{i}=\frac{1}{i-1}\sum_{t=1}^{i-1}{(\max_{1\leq
j<i}{acc_{t}^{j}}-acc_{t}^{i})},\forall 2\leq i\leq T$ (24)

Higher final Average Accuracy $A_{T}(\uparrow)$ and lower final Average
Forgetting $F_{T}(\downarrow)$ show better performance of model across all
tasks.

###  6.2 Experimental Results

Table 1 displays the performance of our CPDM compared to baseline models on
the CIFAR-100 and ImageNet datasets. The data shows that CPDM surpasses most
other models in various tasks on these benchmarks. Specifically, on CIFAR-100,
CPDM achieves outstanding results in average accuracy and forgetting,
outperforming the baseline in every setting. For instance, under the setting
$NC=5$, CPDM attains an average accuracy of $71.35\%$, and a forgetting rate
of $13.8\%$, creating a substantial margin of $12.15\%$ in accuracy and
$9.2\%$ in forgetting when compared to the top baseline on AlexNet. Similarly,
in ResNet, CPDM shows a remarkable improvement of $13.16\%$ in average
accuracy for $NC=5$ and $10.52\%$ in forgetting accuracy for $NC=10$. On a
more challenging ImageNet dataset, with its $1000$ classes, CPDM also exceeds
the best baseline in $6/8$ settings. Notably, with $100$ classes per task, the
performance on ResNet is particularly significant, achieving $65.53\%$ in
average accuracy and only $5.02\%$ in average forgetting. This is an
improvement of $4.27\%$ in accuracy and $2.71\%$ in forgetting compared to the
leading baseline DDRG. Additionally, our CPDM also achieved the runner-up
score on the remaining 2 tasks. Moreover, CPDM also secures the second-best
scores in the remaining two tasks.

###  6.3 Ablation Study

##### Catastrophic Forgetting comparison in DMs.

Figure 3 presents the generated images from the CIFAR-100 dataset experiment
($NC=5$), focusing on the initial task. The comparison of our CPDM and DDGR
methods highlights a substantial issue. DDGR faces severe challenges with
generation catastrophic forgetting, as seen in the later tasks where its
generated images become increasingly blurry and difficult to recognize. In
contrast, our CPDM effectively maintains key object features, demonstrating a
more efficient approach to mitigating generation catastrophic forgetting. This
is evident in the clarity and recognizability of the images generated by CPDM,
even in successive tasks.

Figure 3: Comparison of generated images from CPDM and DDGR on CIFAR-100

##### Learning Class-Prototype.

In Figure 4, we present the class-prototypes (on the right) corresponding to
the initially most confident images (on the left). Interestingly, the learned
class-prototypes appear to emphasize and concentrate more on the
foregrounds/objects of the initial images. This focus on foreground
information is undoubtedly beneficial for guiding our CPDM to retain the
class-concept information in subsequent tasks.

(a)

(b)

(c)

Figure 4: Class-prototypes before (left) and after learning (right). Object
and object boundaries are more focused to better preserve object shape.

##### Analysis of Class-Prototype Initialization.

In the CIFAR-100 ($NC=5$) experiment using the AlexNet model, we examine the
various initializations of the class-prototypes. In addition to the original
initialization, given $y^{t}_{i}\in\mathcal{Y}^{t}$, three alternative ones
are also investigated as follows:

  * •

Most confident initialization (as presented in Section 5.4).

$\mathbf{c}(y^{t}_{i})\coloneqq\arg\max_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}p(y^{t}_{i}|\mathbf{x}^{t})=\arg\min_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}\left[CE(f^{t}_{\phi}(\mathbf{x}^{t}),y^{t}_{i})\right].$
(25)

  * •

Least confident initialization

$\mathbf{c}(y^{t}_{i})\coloneqq\arg\min_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}p(y^{t}_{i}|\mathbf{x}^{t})=\arg\max_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}\left[CE(f^{t}_{\phi}(\mathbf{x}^{t}),y^{t}_{i})\right].$
(26)

  * •

Average initialization in the same class

$\mathbf{c}(y^{t}_{i})\coloneqq\frac{1}{|\mathcal{X}^{y^{t}_{i}}|}\sum_{\mathbf{x}^{t}\in\mathcal{X}^{y^{t}_{i}}}{\mathbf{x}^{t}}.$
(27)

  * •

Random initialization

$\mathbf{c}(y)\sim\mathcal{N}(\mathbf{0},\mathbf{I})$ (28)

Figure 5 shows that the most confident initialization achieves the best
performance. Meanwhile, starting from random noise provides a slight
improvement over DDGR.

Figure 5: Comparison of final average accuracy $A_{T}(\uparrow)$ and final
average forgetting $F_{T}(\downarrow)$ in CIFAR-100 ($NC=5$) with different
class-prototype initialization strategies relative to DDGR.

##### Impact of Nearest Neighbors.

Table 2 shows the effect of the nearest neighbor term. As can be observed,
setting $\gamma=1e-4$ helps to improve the performance comparing to without
this term. However, setting $\gamma=5e-4$ hurts the performance.

$\gamma$ | $0.0$ | $1e-4$ | $5e-4$
---|---|---|---
Accuracy | 70.89 | 71.35 | 67.23
Forget | 13.97 | 13.80 | 16.75
Table 2: Effect of the nearest neighbors on CIFAR-100.

##  7 Conclusion

Catastrophic forgetting poses a critical challenge in the realm of continual
learning. Generative replay, a method employing a generative model to recreate
a replay memory for old tasks, aims to reinforce the classifier’s
understanding of past concepts. However, generative models themselves may
encounter catastrophic forgetting, impeding the production of high-quality old
data across tasks. Recent solutions, such as DDGR, integrating diffusion
models, aim to reduce this issue in generation, yet they still face
significant challenges. To address this, in this paper, we propose the Class-
Prototype conditional Diffusion Model (CPDM) to notably enhance the mitigation
of generation catastrophic forgetting. The core idea involves the acquisition
of a class-prototype that succinctly encapsulates the characteristics of each
class. These class-prototypes then serve as guiding cues for diffusion models,
acting as a mechanism to prompt their memory when generating images for
earlier tasks. Through empirical experiments on real-world datasets, our CPDM
demonstrates its superiority, significantly outperforming current leading
methods.

## References

  * Achille et al. [2018] Alessandro Achille, Tom Eccles, Loic Matthey, Christopher P Burgess, Nick Watters, Alexander Lerchner, and Irina Higgins.  Life-long disentangled representation learning with cross-domain latent homologies.  In _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ , page 9895–9905, 2018.
  * Aljundi et al. [2018] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars.  Memory aware synapses: Learning what (not) to forget.  In _Proceedings of the European conference on computer vision (ECCV)_ , pages 139–154, 2018.
  * Chaudhry et al. [2019a] Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny.  Efficient lifelong learning with a-GEM.  In _International Conference on Learning Representations_ , 2019a.
  * Chaudhry et al. [2019b] Arslan Chaudhry, Marcus Rohrbach, Mohamed Elhoseiny, Thalaiyasingam Ajanthan, Puneet K Dokania, Philip HS Torr, and M Ranzato.  Continual learning with tiny episodic memories.  2019b.
  * Chenshen et al. [2018] WU Chenshen, L Herranz, LIU Xialei, et al.  Memory replay gans: Learning to generate images from new categories without forgetting [c].  In _The 32nd International Conference on Neural Information Processing Systems, Montréal, Canada_ , pages 5966–5976, 2018.
  * Cossu et al. [2021] Andrea Cossu, Gabriele Graffieti, Lorenzo Pellegrini, Davide Maltoni, Davide Bacciu, Antonio Carta, and Vincenzo Lomonaco.  Is class-incremental enough for continual learning?, 2021.
  * De Lange et al. [2021] Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Alevs 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.
  * Deng et al. [2009] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei.  Imagenet: A large-scale hierarchical image database.  In _2009 IEEE conference on computer vision and pattern recognition_ , pages 248–255. Ieee, 2009.
  * French [1999] Robert M French.  Catastrophic forgetting in connectionist networks.  _Trends in cognitive sciences_ , 3(4):128–135, 1999.
  * Gao and Liu [2023] Rui Gao and Weiwei Liu.  DDGR: Continual learning with deep diffusion-based generative replay.  In _Proceedings of the 40th International Conference on Machine Learning_ , pages 10744–10763, 2023.
  * Goodfellow et al. [2014] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio.  Generative adversarial nets.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2014.
  * Goodfellow [2016] Ian J. Goodfellow.  Nips 2016 tutorial: Generative adversarial networks.  _ArXiv_ , abs/1701.00160, 2016.
  * He et al. [2016] 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.
  * Ho and Salimans [2021] Jonathan Ho and Tim Salimans.  Classifier-free diffusion guidance.  In _NeurIPS 2021 Workshop on Deep Generative Models and Downstream Applications_ , 2021.
  * Ho et al. [2020a] Jonathan Ho, Ajay Jain, and Pieter Abbeel.  Denoising diffusion probabilistic models.  In _Advances in Neural Information Processing Systems_ , pages 6840–6851. Curran Associates, Inc., 2020a.
  * Ho et al. [2020b] Jonathan Ho, Ajay Jain, and Pieter Abbeel.  Denoising diffusion probabilistic models.  _Advances in neural information processing systems_ , 33:6840–6851, 2020b.
  * Kemker and Kanan [2018] Ronald Kemker and Christopher Kanan.  Fearnet: Brain-inspired model for incremental learning.  In _International Conference on Learning Representations_ , 2018.
  * Kingma and Welling [2014] Diederik P. Kingma and Max Welling.  Auto-encoding variational bayes.  In _2nd International Conference on Learning Representations, ICLR 2014, Banff, AB, Canada, April 14-16, 2014, Conference Track Proceedings_ , 2014.
  * Kirkpatrick et al. [2017] 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.
  * Krizhevsky et al. [2012] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton.  Imagenet classification with deep convolutional neural networks.  _Advances in neural information processing systems_ , 25, 2012.
  * Lee et al. [2017] Sang-Woo Lee, Jin-Hwa Kim, Jaehyun Jun, Jung-Woo Ha, and Byoung-Tak Zhang.  Overcoming catastrophic forgetting by incremental moment matching.  _Advances in neural information processing systems_ , 30, 2017.
  * Li and Hoiem [2017] Zhizhong Li and Derek Hoiem.  Learning without forgetting.  _IEEE transactions on pattern analysis and machine intelligence_ , 40(12):2935–2947, 2017.
  * Liu et al. [2020] Yaoyao Liu, Yuting Su, An-An Liu, Bernt Schiele, and Qianru Sun.  Mnemonics training: Multi-class incremental learning without forgetting.  In _Proceedings of the IEEE/CVF conference on Computer Vision and Pattern Recognition_ , pages 12245–12254, 2020.
  * Lomonaco and Maltoni [2017] Vincenzo Lomonaco and Davide Maltoni.  Core50: a new dataset and benchmark for continuous object recognition, 2017.
  * Mallya and Lazebnik [2018] Arun Mallya and Svetlana Lazebnik.  Packnet: Adding multiple tasks to a single network by iterative pruning.  In _2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 7765–7773, 2018.
  * Mundt et al. [2022] Martin Mundt, Iuliia Pliushch, Sagnik Majumder, Yongwon Hong, and Visvanathan Ramesh.  Unified probabilistic deep continual learning through generative replay and open set recognition.  _Journal of Imaging_ , 8(4):93, 2022.
  * Radford et al. [2021] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever.  Learning transferable visual models from natural language supervision.  In _Proceedings of the 38th International Conference on Machine Learning_ , pages 8748–8763. PMLR, 2021.
  * Ramapuram et al. [2020] Jason Ramapuram, Magda Gregorova, and Alexandros Kalousis.  Lifelong generative modeling.  _Neurocomputing_ , 404:381–400, 2020.
  * Rebuffi et al. [2017] Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert.  icarl: Incremental classifier and representation learning.  In _Proceedings of the IEEE conference on Computer Vision and Pattern Recognition_ , pages 2001–2010, 2017.
  * Robins [1995] Anthony Robins.  Catastrophic forgetting, rehearsal and pseudorehearsal.  _Connection Science_ , 7(2):123–146, 1995.
  * Saha et al. [2021] Gobinda Saha, Isha Garg, and Kaushik Roy.  Gradient projection memory for continual learning.  In _International Conference on Learning Representations_ , 2021.
  * Serra et al. [2018] Joan Serra, Didac Suris, Marius Miron, and Alexandros Karatzoglou.  Overcoming catastrophic forgetting with hard attention to the task.  In _Proceedings of the 35th International Conference on Machine Learning_ , pages 4548–4557. PMLR, 2018.
  * Shin et al. [2017] Hanul Shin, Jung Kwon Lee, Jaehong Kim, and Jiwon Kim.  Continual learning with deep generative replay.  In _Advances in Neural Information Processing Systems_. Curran Associates, Inc., 2017.
  * Sohl-Dickstein et al. [2015] Jascha Sohl-Dickstein, Eric Weiss, Niru Maheswaranathan, and Surya Ganguli.  Deep unsupervised learning using nonequilibrium thermodynamics.  In _International conference on machine learning_ , pages 2256–2265. PMLR, 2015.
  * Van de Ven and Tolias [2018] Gido M Van de Ven and Andreas S Tolias.  Generative replay with feedback connections as a general strategy for continual learning.  _arXiv preprint arXiv:1809.10635_ , 2018.
  * Van de Ven and Tolias [2019] Gido M Van de Ven and Andreas S Tolias.  Three scenarios for continual learning.  _arXiv preprint arXiv:1904.07734_ , 2019.
  * Wu et al. [2018] Chenshen Wu, Luis Herranz, Xialei Liu, Yaxing Wang, Joost van de Weijer, and Bogdan Raducanu.  Memory replay gans: Learning to generate images from new categories without forgetting.  In _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ , page 5966–5976, 2018.
  * Xu and Zhu [2018] Ju Xu and Zhanxing Zhu.  Reinforced continual learning.  In _Proceedings of the 32nd International Conference on Neural Information Processing Systems_ , page 907–916, 2018.
  * Zenke et al. [2017] Friedemann Zenke, Ben Poole, and Surya Ganguli.  Continual learning through synaptic intelligence.  In _International conference on machine learning_ , pages 3987–3995. PMLR, 2017.
  * Zhai et al. [2019] Mengyao Zhai, Lei Chen, Frederick Tung, Jiawei He, Megha Nawhal, and Greg Mori.  Lifelong gan: Continual learning for conditional image generation.  In _Proceedings of the IEEE/CVF international conference on computer vision_ , pages 2759–2768, 2019.
  * Zhu et al. [2021] Fei Zhu, Xu-Yao Zhang, Chuang Wang, Fei Yin, and Cheng-Lin Liu.  Prototype augmentation and self-supervision for incremental learning.  In _Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition_ , pages 5871–5880, 2021.

Supplementary Material for

“Class-Prototype Conditional Diffusion Model

for Continual Learning with Generative Replay”

##  Appendix A Training objective of Conditional Diffusion Probabilistic Model

To learn $p_{\theta}(\mathbf{x}_{k-1}|\mathbf{x}_{k},y)$, we apply the
variational approach, which involves minimizing the cross-entropy divergence
between $q(\mathbf{x}_{0}|y)$ and $p_{\theta}(\mathbf{x}_{0}|y)$, represented
by:

$\displaystyle
CE\left(q\left(\mathbf{x}_{0}|y\right),p_{\theta}\left(\mathbf{x}_{0}|y\right)\right)$
(29) $\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\log
p_{\theta}\left(\mathbf{x}_{0}|y\right)\right]$ (30)
$\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\int
q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\log
p_{\theta}\left(\mathbf{x}_{0}|y\right)d\mathbf{x}_{1:K}\right]$ (31)
$\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\int
q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\log\frac{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}{p_{\theta}\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}d\mathbf{x}_{1:K}\right]$
(32) $\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\int
q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\log\frac{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}\frac{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}d\mathbf{x}_{1:K}\right]$
(33) $\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\int
q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\log\frac{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}d\mathbf{x}_{1:K}+D_{KL}\left(q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\|p_{\theta}\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\right)\right]$
(34) $\displaystyle\leq-\mathbb{E}_{q\left(\mathbf{x}_{0}|y\right)}\left[\int
q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)\log\frac{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}d\mathbf{x}_{1:K}\right]$
(35)
$\displaystyle=-\mathbb{E}_{q\left(\mathbf{x}_{0:K}|y\right)}\left[\log\frac{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}\right]$
(36)
$\displaystyle=\mathbb{E}_{q\left(\mathbf{x}_{0:K}|y\right)}\left[\log\frac{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}\right].$
(37)

The optimization problem then becomes:

$\min_{\theta}\mathcal{L}\coloneqq\mathbb{E}_{q\left(\mathbf{x}_{0:K}|y\right)}\left[\log\frac{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}\right].$
(38)

We further derive the objective function of interest as:

$\displaystyle\log\frac{q\left(\mathbf{x}_{1:K}\mid\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{0:K}|y\right)}$
$\displaystyle=\log\frac{q\left(\mathbf{x}_{K}\mid\mathbf{x}_{0},y\right)}{p\left(\mathbf{x}_{K},y\right)}\times\prod_{t=2}^{K}\frac{q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)}\times\frac{1}{p_{\theta}\left(\mathbf{x}_{0}\mid\mathbf{x}_{1},y\right)}$
(39)
$\displaystyle=\log\frac{q\left(\mathbf{x}_{K}\mid\mathbf{x}_{0},y\right)}{p\left(\mathbf{x}_{K},y\right)}+\sum_{t=2}^{K}\log\frac{q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)}-\log
p_{\theta}(\mathbf{x}_{0}|\mathbf{x}_{1},y),$ (40)

leading us to the following conclusion:

$\displaystyle\mathcal{L}$
$\displaystyle=\mathbb{E}_{q}\left[\log\frac{q\left(\mathbf{x}_{K}\mid\mathbf{x}_{0},y\right)}{p\left(\mathbf{x}_{K}|y\right)}+\sum_{t=2}^{K}\log\frac{q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)}{p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)}-\log
p_{\theta}(\mathbf{x}_{0}|\mathbf{x}_{1},y)\right]$ (41)
$\displaystyle=\mathbb{E}_{q}\Big{[}\underbrace{D_{KL}\left(q\left(\mathbf{x}_{K}\mid\mathbf{x}_{0},y\right)\|p\left(\mathbf{x}_{K}|y\right)\right)}_{\mathcal{L}_{K}}+\sum_{k>1}\underbrace{D_{KL}\left(q\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},\mathbf{x}_{0},y\right)\|p_{\theta}\left(\mathbf{x}_{k-1}\mid\mathbf{x}_{k},y\right)\right)}_{\mathcal{L}_{k-1}}$
$\displaystyle\underbrace{-\log
p_{\theta}\left(\mathbf{x}_{0}\mid\mathbf{x}_{1},y\right)}_{\mathcal{L}_{0}}\Big{]}$
(42)

##  Appendix B Implementation Specification and Additional Experimental
Results

###  B.1 Data preparation and preprocessing

In our implementation, which is grounded on the DDGR framework as delineated
in [10], a standard preprocessing protocol is employed across three distinct
datasets: CIFAR-100, ImageNet, and CORe50 [24]. Central to this protocol is
the resizing of image samples to a uniform dimension of $64\times 64$.
However, an exception is made for ImageNet, wherein the $64\times 64$ resized
samples undergo an additional resizing step, being scaled up to $256\times
256$ before their introduction to the classifier. This resizing process,
applied consistently across all datasets, employs a bilinear technique,
ensuring uniformity in sample processing.

###  B.2 Architecture / Hyperparameters

####  B.2.1 Architecture

We utilize UNet architecture in our implementation. Specifically, we acquire a
noisy sample denoted as $\mathbf{x}_{k}$ at time step $k,$ which mirrors the
dimensions of real data, measuring $3\times 64\times 64.$ Simultaneously, our
class-prototype, $\mathbf{c}(y),$ shares this spatial dimensionality. To
facilitate seamless integration into our subsequent processes, we concatenate
$\mathbf{x}_{k}$ and $\mathbf{c}(y)$ in the channel dimension, resulting in a
composite tensor measuring $6\times 64\times 64.$ This composite tensor is
then seamlessly integrated into the UNet model for further processing and
analysis. Label text embedding, output of CLIP model, having dimensions of
$1\times 768$, is used as key and value of Cross Attention operation in some
specific blocks. Figure 6 presents the pipeline of UNet model.

Figure 6: UNet diffusion model.

####  B.2.2 Label text embeddings

In this section, we detail the method of using text embedding for labels using
CLIP.

##### CI scenario

Two datasets used in this scenario are CIFAR-100 and ImageNet, which have a
relatively clear distinction between the classes. Creating label text
embedding is as simple as follows:

$\mathrm{y}\mapsto\bm{\tau}(y)=\mathbf{CLIP}(``\text{a photo of a
}[\mathbf{classname}(y)]")$ (43)

##### CIR scenario

The CORe50 dataset has a little difference in the meaning of the classes
compared to the above two sets. This dataset has a hierarchical labels set, in
which there are 10 coarse labels, each includes 5 fine labels. Therefore,
label text embedding follows the following formula:

$\mathrm{y}\mapsto\bm{\tau}(y)=\mathbf{CLIP}(``\text{a photo of a
}[\mathbf{classname}(y)]\text{ in category }[\mathbf{classfineindex}(y)]")$
(44)

where $\mathbf{classname}(\cdot)$ and $\mathbf{classfineindex}(\cdot)$ are
presented in the Table 3

Coarse label | Label index $(y)$ | Fine label | Class name | Class fine index
---|---|---|---|---
plug_adapter | $0$ | plug_adapter1 | plug adapter | $1$
$1$ | plug_adapter2 | plug adapter | $2$
$2$ | plug_adapter3 | plug adapter | $3$
$3$ | plug_adapter4 | plug adapter | $4$
$4$ | plug_adapter5 | plug adapter | $5$
mobile_phone | $5$ | mobile_phone1 | mobile phone | $1$
$6$ | mobile_phone2 | mobile phone | $2$
$7$ | mobile_phone3 | mobile phone | $3$
$8$ | mobile_phone4 | mobile phone | $4$
$9$ | mobile_phone5 | mobile phone | $5$
scissor | $10$ | scissor1 | scissor | $1$
$11$ | scissor2 | scissor | $2$
$12$ | scissor3 | scissor | $3$
$13$ | scissor4 | scissor | $4$
$14$ | scissor5 | scissor | $5$
light_bulb | $15$ | light_bulb1 | light bulb | $1$
$16$ | light_bulb2 | light bulb | $2$
$17$ | light_bulb3 | light bulb | $3$
$18$ | light_bulb4 | light bulb | $4$
$19$ | light_bulb5 | light bulb | $5$
can | $20$ | can1 | can | $1$
$21$ | can2 | can | $2$
$22$ | can3 | can | $3$
$23$ | can4 | can | $4$
$24$ | can5 | can | $5$
glass | $25$ | glass1 | glass | $1$
$26$ | glass2 | glass | $2$
$27$ | glass3 | glass | $3$
$28$ | glass4 | glass | $4$
$29$ | glass5 | glass | $5$
ball | $30$ | ball1 | ball | $1$
$31$ | ball2 | ball | $2$
$32$ | ball3 | ball | $3$
$33$ | ball4 | ball | $4$
$34$ | ball5 | ball | $5$
marker | $35$ | marker1 | marker | $1$
$36$ | marker2 | marker | $2$
$37$ | marker3 | marker | $3$
$38$ | marker4 | marker | $4$
$39$ | marker5 | marker | $5$
cup | $40$ | cup1 | cup | $1$
$41$ | cup2 | cup | $2$
$42$ | cup3 | cup | $3$
$43$ | cup4 | cup | $4$
$44$ | cup5 | cup | $5$
remote_control | $45$ | remote_control1 | remote control | $1$
$46$ | remote_control2 | remote control | $2$
$47$ | remote_control3 | remote control | $3$
$48$ | remote_control4 | remote control | $4$
$49$ | remote_control5 | remote control | $5$
Table 3: Details CORe50 dataset labels.

####  B.2.3 Hyperparameters

Details of hyperparameters for each experiment are shown in Table 4.

Scenario | CI | CIR
---|---|---
Dataset | CIFAR-100 | ImageNet | CORe50
Experiment | $NC=5$ | $NC=10$ | $NC=50$ | $NC=100$
Statistic | No. tasks | $11$ | $6$ | $11$ | $6$ | $79$
No. classes/task | Initial task | $50$ | $50$ | $500$ | $500$ | $10$
Rest tasks | $5$ | $10$ | $50$ | $100$ | $5$
No. training samples/task | Initial task | $25000$ | $25000$ | $650000$ | $650000$ | $3000$
Rest tasks | $2500$ | $5000$ | $130000$ | $65000$ | $1500$
Classifier | No. training epochs/task | $100$ | $100$ | $30$ | $30$ | $100$
Batch size | $256$ | $256$ | $64$ | $64$ | $256$
Optimizer | SGD | SGD | SGD | SGD | SGD
Learning rate | $0.001$ | $0.001$ | $0.0001$ | $0.0001$ | $0.0001$
Weight decay | $0.0005$ | $0.0005$ | $0.0005$ | $0.0005$ | $0.0005$
Diffusion | Diversity Exploration weight $(\gamma)$ | $0.0001$ | $0.0001$ | $0.0001$ | $0.0001$ | $0.0$
No. training steps/task | Initial task | $15000$ | $15000$ | $150000$ | $150000$ | $15000$
| Rest tasks | $15000$ | $15000$ | $30000$ | $60000$ | $15000$
Batch size | $64$ | $64$ | $64$ | $64$ | $64$
Mixed precision | fp16 | fp16 | fp16 | fp16 | fp16
Drop label rate (Classifier-free guidance) | $0.2$ | $0.2$ | $0.2$ | $0.2$ | $0.2$
Optimizer | AdamW | AdamW | AdamW | AdamW | AdamW
Learning rate | $0.0001$ | $0.0001$ | $0.0001$ | $0.0001$ | $0.0001$
Weight decay | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$
Gradient clipping | $1.0$ | $1.0$ | $1.0$ | $1.0$ | $1.0$
Training scheduler | DDPM | DDPM | DDPM | DDPM | DDPM
No. training timesteps | $1000$ | $1000$ | $1000$ | $1000$ | $1000$
Inference scheduler | DDIM | DDIM | DDIM | DDIM | DDIM
No. inference timesteps | $100$ | $100$ | $100$ | $100$ | $100$
Classifier-free guidance sampling weight ($w$) | $4.0$ | $4.0$ | $4.0$ | $4.0$ | $4.0$
No. generated samples/class | $20$ | $20$ | $20$ | $20$ | $20$
Class-prototype | Learning rate | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$
Weight decay | $0.01$ | $0.01$ | $0.01$ | $0.01$ | $0.01$
Table 4: Details of hyperparameters.

###  B.3 Additional experiments

####  B.3.1 Result in CIR scenario

In our study, we applied our methodology in the Class Incremental Learning
with Repetition (CIR) framework, utilizing the CORe50 dataset as the basis for
our experiments. The CORe50 dataset is comprised of ten primary categories,
each subdivided into five subclasses. We approached the dataset with a ‘batch’
based task splitting methodology, resulting in a total of 79 distinct tasks.
The initial task encompasses ten classes, each with 3,000 samples, while each
of the subsequent 78 tasks includes five classes with 1,500 samples per task.
A singular, fixed test set comprising 44,972 samples was employed consistently
across all tasks. The final accuracy results obtained on this test set are
detailed in Table 5 in our findings. Our method achieves results approximating
DDGR in experiments with the AlexNet model, while also significantly
outperforming ($8.03$ for $A_{T}$) with ResNet32.

Model architecture | AlexNet | ResNet32
---|---|---
Metric | $A_{T}(\uparrow)$ | $\max_{1\leq i\leq T}(A_{i})(\uparrow)$ | $A_{T}(\uparrow)$ | $\max_{1\leq i\leq T}(A_{i})(\uparrow)$
Method | DDGR | $\approx 31.00$ | $<32.00$ | $40.66$ | $<44.00$
CPDM | $31.05$ | 34.30 | 48.69 | 53.31
Table 5: Accuracy (final and max values) on CORe50 dataset in CIR scenario.

####  B.3.2 Experiment without a large first task

Table 6 presents the Average Accuracy after each task on CIFAR-100 where all
tasks have the same number of classes ($20$) with AlexNet as classifier
architecture. Our method yields better results compared to DDGR and PASS
across all tasks, however the gap about the final Average Accuracy $(5.14)$ is
not as much as in other cases which have a large first task $(NC=5:\text{
}12.15,\text{ }NC=10:\text{ }8.79)$. There are two reasons: fewer tasks are
considered, and the capacity of the first task is smaller. Hence, it becomes
simpler for the classifier to remember old tasks.

Average Accuracy | Task $1$ ($A_{1}$) | Task $2$ ($A_{2}$) | Task $3$ ($A_{3}$) | Task $4$ ($A_{4}$) | Task $5$ ($A_{5}$)
---|---|---|---|---|---
Method | PASS | $70.51$ | $52.17$ | $50.41$ | $47.39$ | $44.32$
DDGR | 70.65 | 54.33 | 53.35 | 51.16 | 49.03
CPDM | 71.15 | 61.30 | 59.52 | 56.88 | 54.17
Table 6: Average Accuracy $A_{i}(\uparrow)$ across tasks on CIFAR-100 $5$
tasks, $20$ classes / task, AlexNet model.

####  B.3.3 The effect of diffusion steps

Increasing the number of diffusion timesteps $(K)$ in training (from $1000$ to
$2000$, $3000$, $4000$) while keeping the number of training steps and the
number of inference timesteps $(100)$ makes the generator converge more slowly
and make it more difficult to form an image, thereby making the results worse.
Table 7 shows final Average Accuracy and final Average Forgetting of AlexNet
model for CIFAR-100 dataset in two cases $NC=5$ and $NC=10$.

No. timesteps $(K)$ | $A_{T}(\uparrow)$ | $F_{T}(\downarrow)$
---|---|---
$NC=5$ | $NC=10$ | $NC=5$ | $NC=10$
$1000$ | $71.35$ | $61.01$ | $13.80$ | $11.71$
$2000$ | $67.06$ | $55.18$ | $17.77$ | $17.01$
$3000$ | 63.23 | $53.36$ | 21.02 | $19.28$
$4000$ | 58.46 | $46.79$ | 25.91 | $24.29$
Table 7: Results on CIFAR-100, AlexNet model, while changing the number of
diffusion timesteps.