---
abstract: 'In the past decades, spectral clustering (SC) has become one of the most effective clustering algorithms.  However, most previous studies focus on spectral clustering tasks with a fixed task set, which cannot incorporate with a new spectral clustering task without accessing to previously learned tasks.  In this paper, we aim to explore the problem of spectral clustering in a lifelong machine learning framework, *i.e.,* ifeong pectral lustering (${\mathrm}{L^2SC}$).  Its goal is to efficiently learn a model for a new spectral clustering task by selectively transferring previously accumulated experience from knowledge library.  Specifically, the knowledge library of ${\mathrm}{L^2SC}$ contains two components: 1) orthogonal basis library: capturing latent cluster centers among the clusters in each pair of tasks; 2) feature embedding library: embedding the feature manifold information shared among multiple related tasks.  As a new spectral clustering task arrives, ${\mathrm}{L^2SC}$ firstly transfers knowledge from both basis library and feature library to obtain encoding matrix, and further redefines the library base over time to maximize performance across all the clustering tasks.  Meanwhile, a general online update formulation is derived to alternatively update the basis library and feature library.  Finally, the empirical experiments on several real-world benchmark datasets demonstrate that our ${\mathrm}{L^2SC}$ model can effectively improve the clustering performance when comparing with other state-of-the-art spectral clustering algorithms.' 
author:
- |
    [Gan Sun]{}^1,\ 3^[^1], [Yang Cong]{}^2^, [Qianqian Wang]{}^3^, [Jun Li]{}^4^, [Yun Fu]{}^3^\
    ^1^[University of Chinese Academy of Sciences, China.]{} [ ^2]\
    ^2^[State Key Laboratory of Robotics, Shenyang Institute of Automation, Chinese Academy of Sciences, China.]{}\
    ^3^[Northeastern University, USA.]{}  ^4^[MIT, USA.]{}\
    {sungan1412, congyang81}@gmail.com, qianqian174@foxmail.com, junl.mldl@gmail.com, yunfu@ece.neu.edu
bibliography:
- 'LifelongSpectralClustering.bib'
title: Lifelong Spectral Clustering
---

Introduction
============

Spectral clustering algorithms [@ng2002spectral; @shi2000normalized] discover the corresponding embedding of data via utilizing manifold information embedded in the sample distribution, which has shown the state-of-the-art performance in many applications [@li2015superpixel; @zhao2017multi; @Seg_Lichen_TIP18].  In addition to single spectral clustering task scenario, [@yang2015multitask] proposes a multi-task spectral clustering model, and aims to perform multiple clustering tasks and make them reinforce each other.  However, most recently-proposed models [@zhang2018multi; @pang2018spectral; @kang2018unified] focus on clustering tasks with a fixed task set.  When applied into a new task environment or incorporated into a new spectral clustering task, these models have to repeatedly access to previous clustering tasks, which can result in high energy consumption in real applications, *e.g.,* in mobile applications.  In this paper, our work explores how to adopt the spectral clustering scenario into the setting of lifelong machine learning. 

![ The demonstration of our lifelong spectral clustering model, where different shapes are from different clusters.  When a new clustering task $X^t$ is coming, the knowledge is iteratively transferred from orthogonal basis library $B$ and feature embedding library $F$ to encode the new task.[]{data-label="fig:lifelongspectralclustering"}](LSC_Qian.pdf){width=".95\columnwidth"}

For the lifelong machine learning, recent works [@ruvolo2013ella; @isele2016using; @xu2018lifelong; @sun2018robust; @sun2019representative] have explored the methods of accumulating the single task over time.  Generally, lifelong learning utilizes knowledge from previously learned tasks to improve the performance on new tasks, and accumulates a knowledge library over time.  Although these models have been successfully adopted into supervised learning [@chen2018lifelong; @sun2018active] and reinforcement learning [@ammar2014online; @isele2018selective], its application in spectral clustering, one of the most classical research problems in machine learning community, is still sparse. * Take the news clustering tasks as an example, the semantic meaning of *Artificial Intelligence* and *NBA* are very dissimilar in the newspaper of year 2010, and should be divided into different clusters.  The clustering task of year 2010 can thus contribute to the clustering task of year 2020 in a never-ending perspective, since the correlation information between *Artificial Intelligence* and *NBA* of year 2020 is similar with that in year 2010.* 

Inspired by the above scenario, this paper aims to establish a lifelong learning system with spectral clustering tasks, *i.e.,* lifelong spectral clustering.  Generally, the main challenges among multiple consecutive clustering tasks are as follows: 1) **Cluster Space Correlation:** the latent cluster space should be consistent among multiple clustering tasks.  For example, for the news clustering task, the cluster centers in year 2010 can be {Business, Technology, Science, etc}, while the cluster centers in year 2020 are similar to that in year 2010; 2) **Feature Embedding Correlation:** another correlation among different clustering tasks is feature correlation.  For example, in consecutive news cluster tasks, the semantic meaning of *Artificial Intelligence* are very similar in year 2010 and year 2020.  Thus, the feature embedding of *Artificial Intelligence* should be same for these two tasks. 

To tackle the challenges above, as shown in Figure \[fig:lifelongspectralclustering\], we propose a ifeong pectral lustering (*i.e.,* ${\mathrm}{L^2SC}$) model by integrating cluster space and feature embedding correlations, which can achieve never-ending knowledge transfer between previous clustering tasks and later ones.  To achieve this, we present two knowledge libraries to preserve the common information among multiple clustering tasks, *i.e.,* orthogonal basis and feature embedding libraries.  Specifically, 1) orthogonal basis library contains a set of latent cluster centers, *i.e.,* each sample of cluster tasks can be effectively assigned to multiple clusters with different weights; 2) feature embedding library can be modeled by introducing bipartite graph co-clustering, which can not only discover the shared manifold information among cluster tasks, but also maintain the data manifold information of each individual task.  When a new spectral clustering task is coming, ${\mathrm}{L^2SC}$ can firstly encode the new task via transferring the knowledge of both orthogonal basis library and feature embedding library to encode the new task.  Accordingly, these two libraries can be refined over time to keep on improving across all clustering tasks.  For model optimisation, we derive a general lifelong learning formulation, and further optimize this optimization problem via applying an alternating direction strategy.  Finally, we evaluate our proposed model against several spectral clustering algorithms and even multi-task clustering models on several datasets.  The experimental results strongly support our proposed ${\mathrm}{L^2SC}$ model. 

The novelties of our proposed ${\mathrm}{L^2SC}$ model include:

-   To our best knowledge, this work is the first attempt to study the problem of spectral clustering in the lifelong learning setting, *i.e.,* Lifelong Spectral Clustering (${\mathrm}{L^2SC}$), which can adopt previously accumulated experience to incorporate new cluster tasks, and improve the clustering performance accordingly. 

-   We present two common knowledge libraries: orthogonal basis library and feature embedding libray, which can simultaneously preserve the latent clustering centers and capture the feature correlations among different clustering tasks, respectively. 

-   We propose an alternating direction optimization algorithm to optimize the proposed ${\mathrm}{L^2SC}$ model efficiently, which can incorporate fresh knowledge gradually from online dictionary learning perspective.  Various experiments show the superiorities of our proposed model in terms of effectiveness and efficiency. 

Related Work {#sec:related work}
============

In this section, we briefly provide a review on two topics: **Multi-task Clustering** and **Lifelong Learning**.  For the **Multi-task Clustering** [@zhang2018multi], the learning paradigm is to combine multi-task learning [@sun2017joint] with unsupervised learning, and the key issue is how to transfer useful knowledge among different clustering tasks to improve the performance.  Based on this assumption, recently-proposed methods [@zhang2017multi; @huy2013feature] achieve knowledge transfer for clustering via using some sample from other tasks to form better distance metrics or $K$-nn graphs.  However, these methods ignore employing the task relationships in the knowledge transfer process.  To preserve task relationships, multi-task Bregman clustering (MBC) [@zhang2011multitask] captures the task relationships by alternatively update clusters among different tasks.  For the spectral clustering based multi-task clustering, multi-task spectral clustering (MTSC) [@yang2015multitask] take the first attempt to extend spectral clustering into multi-task learning.  By using the inter-task and intra-task correlations, a $\ell_{2,p}$-norm regularizer is adopted in MTSC to constrain the coherence of all the tasks based on the assumption that a low-dimensional representation is shared by related tasks.  Then a mapping function is learned to predict cluster labels for each individual task.  For the **Lifelong Learning**, the early works on this topic focus on transferring the selective information from task cluster to the new tasks [@thrun1996discovering; @sun2018lifelong], or transferring invariance knowledge in neural networks [@thrun2012explanation].  In contrast, an efficient lifelong learning algorithm (ELLA) [@ruvolo2013ella] is developed for online learning multiple tasks in the setting of lifelong learning.  By assuming that models of all related tasks share a common basis, each new task can be obtained by transferring knowledge from the basis.  Furthermore, [@ammar2014online] extends this idea into learn decision making tasks consecutively, and achieves dramatically accelerate learning on a variety of dynamical systems; [@isele2016using] proposes a coupled dictionary to incorporate task descriptors into lifelong learning, which can enable performing zero-shot transfer learning.  Since observed tasks in lifelong learning system may not compose an *i.i.d* samples, learning an inductive bias in form of a transfer procedure is proposed in [@pentina2015lifelong].  Different from traditional learning models [@rannen2017encoder], [@li2016learning] proposes a learning without forgetting method for convolutional neural network, which can train the network only using the data of the new task, and retain performance on original tasks via knowledge distillation [@hinton2015distilling], and train the network using only the data of the new task.  Among the discussion above, there is no works concerning lifelong learning in the spectral clustering setting, and our current work represents the first work to achieve lifelong spectral clustering. 

Lifelong Spectral Clustering (${\mathrm}{L^2SC}$) {#sec:formulation}
=================================================

This section introduces our proposed lifelong spectral clustering (${\mathrm}{L^2SC}$) learning model.  Firstly, we briefly review a general spectral clustering formulation for single spectral clustering task.  Our ${\mathrm}{L^2SC}$ model for lifelong spectral clustering task problem is then given. 

Revisit Spectral Clustering Algorithm
-------------------------------------

This subsection reviews a general spectral clustering algorithm with normalized cut.  Given an undirected similarity graph $G^t=\{X^t,W^t\}$ with a vertex set $X^t\in {\mathbb}{R}^{d\times n_t}$ and an corresponding affinity matrix $W^t\in {\mathbb}{R}^{n_t\times n_t}$ for the clustering task $t$, where $d$ is the number of the features, $n_t$ is the total number of data samples for the task $t$, each element $w_{ij}^t$ in symmetric matrix $W^t$ denotes the similarity between a pair of vertices $(x_i^t,x_j^t)$. The common choice for matrix $W^t$ can be defined as follows: $$w_{ij}^t=\begin{cases}
{\mathrm}{exp}\Big(\!\!-\!\frac{\left\|x_i^t-x_j^t\right\|^2}{2\sigma^2}\!\Big), \; {\mathrm}{if}\; x_i^t \!\in \! { \mathcal}{N}(x_j^t)\, {\mathrm}{or}\, x_j^t \!\in \! { \mathcal}{N}(x_i^t) \\
0, \quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad  {\mathrm}{otherwise}, \\
\end{cases}$$ where ${\mathcal}{N}(\cdot)$ is the function for searching $K$-nearest neighbors, and $\sigma$ controls the spread of the neighbors.  After applying the normalized Laplacian: $$\label{eq:spectralcluster_k}
W_N^t=(D^t)^{-\frac{1}{2}}L^t(D^t)^{-\frac{1}{2}}=I-(D^t)^{-\frac{1}{2}}W^t(D^t)^{-\frac{1}{2}},$$ where $D^t$ is a diagonal matrix with the diagonal elements as $D_{ii}^t=\sum_{j}w_{ij}^t\, (\forall i)$. The final formulation of spectral clustering turns out to be the well-known normalized cut [@shi2000normalized], and can be expressed as: $$\label{eq:spectralcluster_single}
  \max_{F^t}\; {\mathrm}{tr}\big((F^t)^{\top}K^tF^t\big),\quad s.t., ( F^t)^{\top}F^t=I_k,$$ where $K^t=(D^t)^{-\frac{1}{2}}W^t(D^t)^{-\frac{1}{2}}$, the optimal cluster assignment matrix $F^t$ can be achieved via eigenvalue decomposition of matrix $K^t$. Based on the relaxed continuous solution, then the final discrete solution of $F^t$ can be obtained by spectral rotation or $K$-means, *e.g.,* the $j$-th element of $f_i^t$ is $1$, if the sample $x_i^t$ is assigned to the $j$-th cluster; $0$, otherwise. 

Problem Statement
-----------------

Given a set of $m$ unsupervised clustering tasks ${\mathcal}{T}^1,\ldots,{\mathcal}{T}^m$, where each individual clustering task ${\mathcal}{T}^t$ has a set of $n_t$ training data samples $X^t\in {\mathbb}{R}^{d\times n_t}$, and the dimensionality of feature space is $d$. The original intention of multi-task spectral clustering method [@yang2015multitask] is to uncover the correlations among all the clustering tasks, and predict the cluster assignment matrices $\{F^t\}_{t=1}^m$ for each clustering task.  However, learning incremental spectral clustering tasks without accessing to the previously-adopted clustering data is not considered in traditional single or multi-task spectral clustering models.  In the setting of spectral clustering, a lifelong spectral clustering system encounters a series of spectral clustering tasks ${\mathcal}{T}^1,\ldots,{\mathcal}{T}^m$, where each task ${\mathcal}{T}^t$ is defined in Eq.  , and intends to obtain new cluster assignment matrix $F^t \in {\mathbb}{R}^{n_t\times k}$ for the task $t$. For convenience, this paper assume that the learner in this lifelong machine learning system do not know any information about clustering tasks, *e.g.,* the task distributions, the total number of spectral clustering tasks $m$, etc.  When lifelong spectral clustering system receives a batch of data for some spectral clustering task $t$ (either a new spectral clustering task or previously learning task $t$) in each period, this system should obtain cluster assignment matrix of samples of encountered tasks.  The goal is to obtain corresponding task assignment matrices $F^1, \ldots,F^m$ such that: **1)** Clustering Performance: each obtained assignment matrix $F^t$ should preserve the data configuration of the $t$-th task, and partition the new clustering task more accurate; **2)** Computational Speed: in each clustering period, obtaining each $F^t$ should be faster than that among traditional multi-task spectral clustering methods; **3)** Lifelong Learning: new $F^t$’s can be arbitrarily and efficiently added when the lifelong clustering system faces with new unsupervised spectral clustering tasks. 

The Proposed ${\mathrm}{L^2SC}$ Model
-------------------------------------

In this section, we introduce how to model the lifelong learning property and cross-task correlations simultaneously.  Basically, there are two challenges in the ${\mathrm}{L^2SC}$ model:

**1) Orthogonal Basis Library:** in order to achieve lifelong learning, one of the major component is how to store the previously accumulated experiences, *i.e.,* knowledge library.  To tackle this issue, inspired by [@han2015unsupervised] which employs the orthogonal basis clustering to uncover the latent cluster centers, each assignment matrix $F^t$ can be decomposed into two submatrices, *i.e.,* a basis matrix $B\in {\mathbb}{R}^{k\times k}$ called orthogonal basis library, and a cluster encoding matrix $E^t\in{\mathbb}{R}^{n_t \times k}$, as $F^t=E^tB$. Then the multi-task spectral clustering formulation can be expressed as: $$\begin{aligned}\label{eq:final_problem1}
\max_{\atop \{E^t\}_{t=1}^m} &   \frac{1}{m}\sum_{t=1}^m\! { \mathrm}{tr}\big(\big(E^tB\big)^{\top}\!K^tE^tB\big), \\
s.t., &  B^{\top}B=I_k, (E^t)^{\top}E^t\!=\!I_k,  \forall t=1,\ldots,m,
\end{aligned}$$ where the orthogonal constraint of matrix $B$ encourages each column of $B$ to be independent, and $K^t$ is defined in the Eq.  .  Therefore, the orthogonal basis library $B$ can be used to refine the latent cluster centers and further obtain an excellent cluster separation. ** 2) Feature Embedding Library:** even though the latent cluster centers can be captured gradually in Eq.  , it does not consider the common feature embedding transfer across multiple spectral clustering tasks.  Motivated by [@jiang2012transfer] which adopts graph based co-clustering to control and achieve the knowledge transfer between two tasks, we propose to link each pair of clustering tasks together such that one embedding obtained in one task can facilitate the discover of the embedding in another task.  We thus define an invariant feature embedding library $L\in {\mathbb}{R}^{d\times k}$ with group sparse constraint, and give the graph co-clustering term as: $$\label{eq:final_problem2}
  \max_{L} \frac{1}{m}\!\sum_{t=1}^m {\mathrm}{tr} (L^{\top}\hat{X}^tE^tB)\!+\!\mu\!\left\|L\right\|_{2,1},  s.t.,  L^{\top}L=I_k,$$ and $\hat{X}^t$ for the $t$-th task is defined as: $$\label{eq:define_X}
 \hat{X}^t =(D_1^t)^{-\frac{1}{2}}X^t(D_2^t)^{-\frac{1}{2}},$$ where $D_1^t={\mathrm}{diag}(X^t\bm{1})$, and $D_2^t={\mathrm}{diag}\big((X^t)^{\top}\bm{1}\big)$. Intuitively, with this sharing embedding library $L$, multiple spectral clustering tasks can transfer embedding knowledge with each other in a perspective of common feature learning [@Argyriou:2008]. 

Given the same graph construction method and training data for each spectral clustering task, we solve the optimal cluster assignment matrix $\{F^t\}_{t=1}^m$ while encouraging each clustering task to share common knowledge in libraries $B$ and $L$. By combining these two goals in Eq.   and Eq.  , then lifelong spectral clustering model can be expressed as the following objective function: $$\begin{aligned}\label{eq:lsc_finalproblem}
   \max_{B,L,\{E^t\}_{t=1}^m} & \; \frac{1}{m}\sum_{t=1}^m \Big\{{\mathrm}{tr}\big(\big(E^tB\big)^{\top}K^tE^tB\big)\\
    &+\lambda_t {\mathrm}{tr}(L^T\hat{X}^tE^tB)\Big\}+\mu\left\|L\right\|_{2,1},\\
   s.t. ,\;    B^{\top}&B=I_k, L^{\top}L=I_k, (E^t)^{\top}E^t=I_k,
  \end{aligned}$$ where $\lambda_t$’s are the trade-off between the each spectral clustering task with the co-clustering objective.  If $\lambda_t$’s are set as $0$, this model can reduce to the multi-task spectral clustering model with common cluster centers. 

**Input:** Spectral clustering tasks: $X^1,\ldots, X^m$, Library: $B\leftarrow \bm{0}_{k\times k}$, $L\leftarrow \bm{0}_{d\times k}$, $\mu\geq 0, \lambda_t \geq0,\forall t=1,\ldots,m$, Statistical records: $M_0 \leftarrow \bm{0}_{k\times k}$, $C_0\leftarrow \bm{0}_{d\times k}$; New $t$-th task: $(X^t,t)$; Construct matrices $\{K^t, \hat{X}^t\}$; Update $E^t$ via Eq.  ; Update $B$ via Eq.  ; Update $L$ via Eq.  ; Update $\Theta$ via $\Theta_{ii}=\frac{1}{2\left\|l_i\right\|_2}, (\forall i=1,\ldots,d)$; Compute cluster assignment matrices via $\{E^tB\}_{t=1}^m$; Compute final indicator matrices via $K$-means;

Model Optimization
------------------

This section shows how to optimize our proposed ${\mathrm}{L^2SC}$ model.  Normally, standard alternating direction strategy using all the learned tasks is inefficient to this lifelong learning model in Eq.  .  Our goal in this paper is to build an lifelong clustering algorithm that both CPU time and memory space have lower computational cost than offline manner.  When a new spectral clustering task $m$ arrives, the basic ideas for optimizing Eq.   is: both $L$, $B$ and $E^m$ should be updated without accessing to the previously learned tasks, *e.g.,* the previous data in matrices $\{K^{t},\hat{X}^t\}_{t=1}^{m-1}$. In the following, we briefly introduce the proposed update rules, and provide the convergence analysis in the experiment. 

### Updating $E^m$ with fixed $L$ and $B$:

With the fixed $L$ and $B$, the problem for solving encoding matrix $E^m$ can be expressed as: $$\label{eq:optimize_E_t}
  \max_{(E^m)^{\top}E^m=I_k} \!\!\!{\mathrm}{tr}\big(\big(E^mB\big)^{\top}\!\!K^mE^mB\big)\!  +\!\lambda_m  {\mathrm}{tr}\big(L^{\top}\!\hat{X}^mE^mB\big).$$ With the orthonormality constraint, $E^m$ can be updated in the setting of Stiefel manifold [@manton2002optimization], which is defined by the following Proposition. 

Let $X\in {\mathbb}{R}^{n\times k}$ be a rank $p$ matrix, where the singular value decomposition (*i.e.,* SVD) of $X$ is $U\Sigma V^{\top}$. The projection of matrix $X$ on Stiefel manifold is defined as: $$\pi(X)=\mathop{\arg\min}_{Q^{\top}Q=I}\; \left\|X-Q\right\|_F^2.$$ The projection could be calculated as: $\pi(X)=UI_{n,k}V^{\top}$.

Therefore, we can update $E^m$ by moving it in the direction of increasing the value of the objective function, and the update operator can be given as: $$\label{eq:solution_E_t}
  E^m=\pi(E^m+\eta_m \nabla f(E^m)),$$ where $\eta_m$ is the step size, $f(E^m)$ is the objective function of Eq.  , and $\nabla f(E^m)$ can be defined as $2(K^m)^{\top}E^mBB^{\top}+\lambda_m(\hat{X}^m)^{\top}LB^{\top}$. To guarantee the convergence of the optimization problem in Eq.  , we provide a convergence analysis at the experiment section. 

### Updating $B$ with fixed $L$ and $\{E^t\}_{t=1}^m$:

With the obtained encoding matrix $E^m$ for the new coming $m$-th task, the optimization problem for variable $B$ can be:

$$\label{eq:optimize_B}
  \hspace{-3pt}\max_{B^{\top}B=I_k}\!\!  \frac{1}{m}\sum_{t=1}^{m}\!{\mathrm}{tr}\big(B^{\top}\big(E^t\big)^{\top}\!K^tE^tB\big)\!+\!\lambda_t  {\mathrm}{tr}(L^{\top}\hat{X}^tE^tB).$$

Based on the orthonormality constraint $B^{\top}B=I_k$, we can rewrite Eq.   as follows:

$$\begin{aligned}
  & \!  \max_{B^{\top}B=I_k} \! \!  \frac{1}{m}\sum_{t=1}^{m}{\mathrm}{tr}(B^{\top}\big(\big(E^t\big)^{\top}K^tE^t+\lambda_tBL^{\top}\hat{X}^tE^t\big)B), \\
  \Leftrightarrow  & \!\!\!\!  \max_{B^{\top}B=I_k} \! \!\! { \mathrm}{tr}(B^{\top}\!\big(\frac{1}{m}\!\!\sum_{t=1}^{m}\!(E^t)^{\top}\!K^tE^t \!+ \!  \frac{1}{m}\!\!\sum_{t=1}^{m}\lambda_tBL^{\top}\!\hat{X}^tE^t\big)B)
\end{aligned}$$

To better store the previous knowledge of learned clustering tasks, we then introduce two statistical variables: $$\label{eq:statistical_records}
  M_m\!=\!M_{m-1}+(E^m)^{\top}K^mE^m, C_m\!=\!C_{m-1}+\lambda_m\hat{X}^mE^m,$$ where $M_{m-1}=\sum_{t=1}^{m-1}(E^t)^{\top}K^tE^t$, and $C_{m-1}=\sum_{t=1}^{m-1}\lambda_t\hat{X}^tE^t$. Therefore, knowledge of new task is $(E^m)^{\top}K^mE^m$ and $\hat{X}^mE^m$. With $B$ as a warm start, so:

$$\label{eq:solution_B}
    B=\mathop{\arg\max}_{B^{\top}B=I_k}\; {\mathrm}{tr}\big(B^{\top}\big(M_m/m+BL^{\top}C_m/m\big)B\big).$$

It is well-known that the solution of $B$ can be relaxedly obtained by the eigen-decomposition of $\big(M_m/m+BL^{\top}C_m/m\big)$. Notice that even though the input parameter of Eq.   contains $B$, the above solution is also effective since the proposed algorithm converges very quickly in the online manner. 

### Updating $L$ with fixed $B$ and $\{E^t\}_{t=1}^m$:

With the obtained center library $B$ and encoding matrix $E^m$ for the new coming $m$-th task, the optimization problem for variable $L$ can be denoted as: $$\begin{aligned}\label{eq:optimize_L}
\max_{L^{\top}L=I_k} & \; \frac{1}{m}\sum_{t=1}^m \lambda_t  {\mathrm}{tr}\big(L^{\top}\hat{X}^tE^tB\big)+\mu\left\|L\right\|_{2,1},
\end{aligned}$$ and the equivalent optimization problem can be formulated as following equations: $$\begin{aligned}\label{eq:solution_L1}
  &\min_{L^{\top}L=I_k } -{\mathrm}{tr}\big(L^{\top} (\frac{1}{m}\sum_{t=1}^m\lambda_t \hat{X}^tE^t)B+\mu \Theta L)\big),\\
  \Leftrightarrow &\min_{L^{\top}L=I_k } \left\|L-\big((\frac{1}{m}\sum_{t=1}^m\lambda_t \hat{X}^tE^t)B+\mu \Theta^{-1} L\big)\right\|_F^2,\\
 \Leftrightarrow &\min_{L^{\top}L=I_k } \left\|L-\big(C_mB+\mu \Theta^{-1} L\big)\right\|_F^2,
\end{aligned}$$ which is also definition of projection of $(C_mB+\mu \Theta L)$ on the Stiefel manifold.  Further, $\Theta$ denotes a diagonal matrix with each diagonal element as: $\Theta_{ii}=\frac{1}{2\left\|l_i\right\|_2}$ [@nie2010efficient], where $l_i$ is the $i$-th row of $L$. Finally, the cluster assignment matrices for all learned tasks can be computed via $\{E^tB\}_{t=1}^m$, and final indicator matrices are obtained using $K$-means.  The whole optimization procedure is summarized in **Algorithm 1**. 

\[table:WebKB4\]

\[table:Reuters\]

\[table:20NewsGroups\]

\[table:runtime\]

Experiments {#sec:experiment}
===========

This section evaluates the clustering performance of our proposed ${\mathrm}{L^2SC}$ model via several empirical comparisons.  We firstly introduce the used competing models.  Several adopted datasets and experimental results are then provided, followed by some analyses of our model. 

Comparison Models and Evaluation
--------------------------------

The experiments in this subsection evaluate our proposed ${\mathrm}{L^2SC}$ model with three single spectral clustering models, and five multi-task clustering models. 

*Single spectral clustering models*: 1) Spectral Clustering (stSC) [@ng2002spectral]: standard spectral clustering model; 2) Spectral clustering-union (uSC) [@ng2002spectral]: spectral clustering model, which can be achieved via collecting all the clustering task data (*i.e.,* “pooling” all the task data and ignoring the multi-task setting); 3) One-step spectral clustering (OnestepSC) [@zhu2017one]: single spectral clustering task model. 

*Multi-task clustering models*: 1) Multi-task Bregman Clustering (MBC) [@zhang2011multitask]: this model consists of average Bregman divergence and a task regularization; 2) Smart Multi-task Bregman Clustering (SMBC) [@zhang2015smart]: unsupervised transfer learning model, which focuses on clustering a small collection of target unlabeled data with the help of auxiliary unlabeled data; 3) Smart Multi-task Kernel Clustering (SMKC) [@zhang2015smart]: this model can deal with nonlinear data by introducing Mercer kernel; 4) Multi-Task Spectral Clustering (MTSC) [@yang2015multitask]: this model performs spectral clustering over multiple related tasks by using their inter-task correlations; 5) Multi-Task Clustering with Model Relation Learning (MTCMRL) [@zhang2018multi]: this model can automatically learn the model parameter relatedness between each pair of tasks. 

For the evaluation, we adopt three performance measures: normalized mutual information (NMI), clustering purity (Purity) and rand index (RI) [@schutze2008introduction] to evaluate the clustering performance.  The bigger the value of NMI, Purity and RI is, the better the clustering performance of the corresponding model will be.  We implement all the models in MATLAB, and all the used parameters of the models are tuned in $\{10^{-3}\times i\}_{i=1}^{10}\cup \{10^{-2}\times i\}_{i=2}^{10}\cup \{10^{-1}\times i\}_{i=2}^{10}\cup \{2\times i\}_{i=1}^{10}\cup \{40\times i\}_{i=1}^{20}$. Although different $\lambda_t$’s are allowed for different tasks in our model, this paper we only differentiate between $\mu$ and $\lambda=\lambda_{t}>0 $. 

Real Datasets $\&$ Experiment Results
-------------------------------------

According to whether the number of cluster center is consistent or not, there are two different scenarios for multi-task clustering tasks: **Cluster-consistent** and **Cluster-inconsistent**.  For the **Cluster-consistent** dataset, it can be roughly divided into: same clustering task and different clustering tasks with same number of cluster centers.  We thus use two datasets in this paper: WebKB4[^3] with 2500 dimensions and Reuters[^4] with 6370 dimensions, respectively.  For the WebKB4 dataset, which includes web pages collected from computer science department websites at 4 universities: Cornell, Texas, Washington and Wisconsin, and 7 categories.  Following the setting in [@zhang2018multi], 4 most populous categories (*i.e.,* course, faculty, project and student) are chosen for clustering.  Accordingly, for the Reuters dataset, 4 most populous root categories (*i.e.,* economic index, energy, food and metal) are chosen for clustering, and the total number of task is 3.  For the **Cluster-inconsistent** dataset, we also adopt 20NewsGroups[^5] dataset with 3000 dimensions by following [@zhang2018multi], which consists of the news documents under 20 categories.  Since “negative transfer” [@zhou2015flexible] will happen when the cluster centers of multiple consecutive spectral tasks have significant changes, 4 most populous root categories (*i.e.,* comp, rec, sci and talk) are selected for clustering, while the 1-th and 3-th tasks are set as 3 categories, and the 2-th and 4-th tasks are set as 4 categories. 

The experimental results (competing models with parameter setting are averaged over 10 random repetitions) are provided in Table \[table:WebKB4\], Table \[table:Reuters\] and Table \[table:20NewsGroups\], where the task sequence for our ${\mathrm}{L^2SC}$ is in a random way.  From the presented results, we can notice that: **1)** Our proposed lifelong spectral clustering model outperforms the single-task spectral clustering methods, since ${\mathrm}{L^2SC}$ can exploit the information among multiple related tasks, whereas the single-task spectral clustering model only use the information within each task.  MTCMRL performs worse than our proposed ${\mathrm}{L^2SC}$ in most cases, because even though it incorporates the cross-task relatedness with the linear regression model, it does not consider the feature embedding correlations among each pair of clustering tasks.  The reason why MTCMRL performs better than our ${\mathrm}{L^2SC}$ in Task1 of 20NewsGroups is that we set $k=4$ in this **Cluster-inconsistent** dataset, whereas the number of cluster center is $3$ in Task1. ** 2)** In addition to MTCMRL and single-task spectral clustering models, our ${\mathrm}{L^2SC}$ performs much better than the comparable multi-task clustering model cases.  It is because that ${\mathrm}{L^2SC}$ can not only learn the latent cluster center between each pair of tasks via the orthogonal basis library $B$, but also control the number of embedded features common across the clustering tasks. ** 3)** Additionally, Table \[table:runtime\] also shows that the runtime comparisons between our ${\mathrm}{L^2SC}$ model and other single/multi-task clustering models.  ${\mathrm}{L^2SC}$ is faster and better than the most multi-task clustering models on WebKB, Reuters and 20NewsGroups datasets, *e.g.,* SMBC and MTSC, also OnestepSC.  However, ${\mathrm}{L^2SC}$ is little slower than stSC and uSC.  This is because both stSC and uSC can obtain the cluster assignment matrix via closed-form solution, *i.e.,* eigenvalue decomposition of the $K^t$ in Eq.  .  We perform all the experiments on the computer with Intel i7 CPU, 8G RAM. 

**Evaluating Lifelong learning:** This subsection studies the lifelong learning property of our ${\mathrm}{L^2SC}$ model by following [@ruvolo2013ella], *i.e.,* how well the clustering performance will be as the number of clustering tasks $t$ increases.  We adopt the WebKB4 dataset, set the sequence of learned $t$ tasks as: Task1, Task2, Task3 and Task4, and present the clustering performance in Figure \[fig:lifelonglearning\].  Obviously, as new clustering task is imposed step-by-step, the performances (*i.e.,* Purity and NMI) for both learned and learning task are improved gradually when comparing with stSC (initial clustering result of each line in Figure \[fig:lifelonglearning\]), which justifies ${\mathrm}{L^2SC}$ can accumulate continually knowledge and accomplish lifelong learning just like “human learning”.  Furthermore, the performance of early clustering tasks can improve obviously than succeeding ones, *i.e.,* the early spectral clustering tasks can benefit more from the stored knowledge than later ones. 

**Parameter Investigation:** In order to study how the parameters $\lambda$ and $\mu$ affect the clustering performance of our ${\mathrm}{L^2SC}$. For the WebKB4 dataset, we repeat the ${\mathrm}{L^2SC}$ ten times by fixing one parameter and tuning the other parameters in $[0.001,0.01,0.1,1,10,100]$. As depicted in Figure \[fig:parameter\], we can notice that clustering performance changes with different ratio of parameters, which give the evidence that the appropriate parameters can make the generalization performance better, *e.g.,* $\lambda=100$ for WebKB4 dataset. 

**Convergence Analysis:** To investigate the convergence of our proposed optimisation algorithm for solving ${\mathrm}{L^2SC}$ model, we plot the value of total loss terms for each new task on WebKB4 and 20NewsGroups datasets.  As shown in Figure \[fig:convergence\], the objective function values increase with respect to iterations, and the values for each new task approach to be a fixed point after a few iterations (*e.g.,* less than 20 iteration for Task 4 on both datasets), *i.e.,* although the convergence analysis of ${\mathrm}{L^2SC}$ cannot be proved directly in our paper, we find it converge asymptotically on the real-world datasets. 

Conclusion {#sec:conclusion}
==========

This paper studies how to add spectral clustering capability into original spectral clustering system without damaging existing capabilities.  Specifically, we propose a lifelong learning model by incorporating spectral clustering: lifelong spectral clustering (${\mathrm}{L^2SC}$), which learns a library of orthogonal basis as a set of latent cluster centers, and a library of embedded features for all the spectral clustering tasks.  When a new spectral clustering task arrives, ${\mathrm}{L^2SC}$ can transfer knowledge embedded in the shared knowledge libraries to encode the coming spectral clustering task with encoding matrix, and redefine the libraries with the fresh knowledge.  We have conducted experiments on several real-world datasets; the experimental results demonstrate the effectiveness and efficiency of our proposed ${\mathrm}{L^2SC}$ model. 

[^1]: The corresponding author is Gan Sun. 

[^2]: This work has been done during Gan Sun visiting Northeastern University. 

[^3]: http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo20/www\
    /data/

[^4]: http://www.cad.zju.edu.cn/home/dengcai/Data/TextData.html

[^5]: http://qwone.com/ jason/20Newsgroups/
