\begin{table*}
\centering
\caption{Results for Continual Learning by comparing the performance of the proposed HyperHawkes with regularization against under HyperHawkes without regularization (Lower MNLL and MAE indicates better performance) 
}
\label{Tab:cl}
\tabcolsep=0.2cm
\begin{tabular}{c|cc|cc||cc|cc} 
\hhline{=====:t:====}
\multirow{3}{*}{Dataset} & \multicolumn{4}{c||}{HyperHawkes-FNN}                                                          & \multicolumn{4}{c}{HyperHawkes-FNN-RNN}                                                                           \\ 
\cline{2-9}
                         & \multicolumn{2}{c|}{MNLL}                               & \multicolumn{2}{c||}{MAE}            & \multicolumn{2}{c|}{MNLL}                               & \multicolumn{2}{c}{MAE}                                 \\ 
\cline{2-9}
                         & WithoutCL & WithCL                                      & WithoutCL & WithCL                   & WithoutCL & WithCL                                      & WithoutCL & WithCL                                      \\ 
\hline
Yelp                     & -4.8627   & \textbf{\textbf{\textbf{\textbf{-5.6928}}}} & 0.00159    & \textbf{\textbf{0.00149}} & -5.2629   & \textbf{\textbf{\textbf{\textbf{-5.7727}}}} & 0.00152    & \textbf{\textbf{\textbf{\textbf{0.00150}}}}  \\
Meme                     & -2.8550   & \textbf{\textbf{-5.1462}}                   & 0.00548    & \textbf{0.00471}          & -3.8254   & \textbf{\textbf{-5.1192}}                   & 0.00508    & \textbf{\textbf{0.00471}}                    \\
\hhline{=====:b:====}
\end{tabular}
\end{table*}
\textbf{Training}
We adopt a training procedure where we train hypernetwork using the maximum likelihood estimation for the NHP model. For each seen sequence $\mathcal{T}^s$ from $D^S$, we sample a mini-batch consisting of events. The sequence descriptor $\mathbf{d}^s$ of this sequence is used to generate parameters of the neural Hawkes process using the hyper-network and its parameters.  These values are then used in Equation \ref{eq:log_lik_nhp} to find the log-likelihood of the event times of the seen sequences. So, the log-likelihood described in Equation \ref{eq:log_lik_nhp} will now be:
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}

Given a sequence description $\mathbf{d}^s$ for the descriptor $\mathcal{T}^s$, our descriptor conditioned hypernetwork $f_r(\cdot)$ can generate parameters $W_r^s$ and $f_t(\cdot)$ can generate parameters $W_t^s$. To perform continual learning, we use regularization to penalize changes in $\{W_r^c, W_t^c\}$ generated for past sequences in order to retain information from those sequences and to learn continually. The  regularization is applied to the hypernetwork parameters while learning a new event sequence, and this prevents adaptation of the hypernetworks parameters completely to the new event sequence.  For a new event sequence $\mathcal{T}^s$ and its corresponding descriptor $\mathbf{d}^s$, the hypernetwork parameters are learnt by minimizing the following continual learning loss over events in the  sequence:
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}

\begin{equation}
\label{eq:log_lik_nhp_cl}
\begin{split}
&\sum_{j=1}^{n^s}  -\log p(t^s_j|\mathcal{H}^s_j;(f_r(\mathbf{d}^s;\theta_{fr}), 
f_t(\mathbf{d}^s;\theta_{ft}))) \\
 & +\frac{\beta}{s-1}\sum_{c=1}^{s-1}\biggl(\parallel f_r(\mathbf{d}^c;\theta_{fr})-f_r(\mathbf{d}^c; \bar{\theta}_{fr})\!\!\parallel^2 \\
& + \parallel f_t(\mathbf{d}^c; \theta_{ft}) - f_t(\mathbf{d}^c; \bar{\theta}_{ft}) \parallel^2 \biggr)
 \end{split}
\end{equation}

where $\{\bar{\theta}_{fr}, \bar{\theta}_{ft}\}$ represents the stored hypernetwork parameters after learning until  sequence $s-1$ and $\{\theta_{fr}, \theta_{ft}\}$ represent the hypernetwork parameters learnt considering the event sequence $s$ and regularization to avoid forgetting. The regularization term ensures that the newly learnt hyper-network parameters will be able to produce the required main network parameters from the past event sequences given the sequence descriptor without forgetting and the regularization constant $\beta$ captures the importance associated with it.   So, in this way, we try to retain the information from previous sequences at a meta-level. By including a simple regularization term within the framework of \textit{HyperHawkes}, our model is capable of learning sequences continually without forgetting knowledge learnt from previous sequences. We are able to achieve this because of the use of sequence-conditioned hypernetwork on the top of neural Hawkes process, emphasizing its usefulness for continual learning over event sequences in addition to zero shot learning. 

\subsection{Baselines}
To the best of our knowledge, the proposed problem statement is the first work along this direction. Therefore, we propose our own baselines as - \textbf{1) FNHP:} This includes fully neural Hawkes process \cite{omi2019fully}. This approach doesn't incorporate the sequence descriptor. \textbf{2) FNHP-Descriptor:} In this variant, we use concatenated descriptor and time as input to RNN and FNN.  For Continual learning setup, we compare against HyperHawkes without any regularization as baseline. 

\subsection{Experimental Setup}
We consider these experimental setups to evaluate the performance of our model - 
\textbf{1) Zero-Shot:} Training is done on seen sequences and testing is done on unseen sequences.  \textbf{2) Generalized Zero-Shot:} In this, testing is done by randomly sampling 20\% of events from seen sequences and unseen sequences.  \textbf{3) Standard Event Modeling:} Training is done on the first 70\% of the events from all sequences. Testing is done on the last 20\% events for unseen sequences. 
Mean negative log-likelihood (MNLL) and mean absolute error (MAE) are considered as evaluation metrics for both zero-shot and continual learning setup. Lower MNLL and MAE indicates better performance.

\section{Results and Analysis}
\subsection{Zero-Shot Learning}
Results for zero-shot setup are presented in Table \ref{Tab:zsl}. A better model is expected to have lower MNLL and MAE. We can observe that the proposed method HyperHawkes performs better than the baselines in terms of both evaluation metrics MNLL and MAE. We can observe that zero-shot setup, which consists of predictive performance for unseen sequences, exhibits significantly lower MNLL and MAE for HyperHawkes-FNN as compared to FNHP and FNHP-Descriptor. Also, HyperHawkes-FNN-RNN yields lower MAE for Meme dataset, however, MNLL for both the variants of the proposed methods is close. Comparing the results of generalized zero-shot setup where we consider instances from seen sequences as well as unseen sequences, we can observe that HyperHawkes-FNN-RNN performs better for both the datasets. The final section of the table discusses results for standard event modeling where we test on the last 20\% of the events of unseen sequences. HyperHawkes-FNN-RNN performs well here as well except for MAE for Yelp dataset. We can also observe that HyperHawkes-FNN-RNN performs slightly better for generalized zero-shot and standard event modeling setup. Moreover, it is interesting to note that inclusion of sequence descriptors within FNHP in FNHP-Descriptor has not helped much in prediction of unseen sequences. In fact, in various cases, it has performed worse than FNHP itself. This confirms the necessity of an event sequence specific framework which can predict better for unseen sequences as well. Therefore, our results indicate that the proposed variants of HyperHawkes perform consistently and significantly better than the baselines for both the datasets.  

\subsection{Continual Learning}
Table \ref{Tab:cl} presents the averaged results over all tasks by enabling HyperHawkes for continual learning. We can observe that averaged performance for the proposed model is better than the case when no regularization is incorporated. Also, we can observe that both the proposed variants perform better than the model without using regularization (corresponds to the case when $\beta$ from Equation \ref{eq:log_lik_nhp_cl} is set to 0). Hence the use of regularization within the framework of HyperHawkes supports that proposed method can avoid catastrophic forgetting. Fig \ref{fig:cl_plots} displays sequence-wise performance for both the datasets for the proposed variants HyperHawkes-FNN and HyperHawkes-FNN-RNN.\ref{fig:avg_mnll_yelp}) displays average MNLL over previous sequences for both the models for Yelp. This shows that while training the model without regularization over new sequences, the network is unable to retain information learnt from previous sequences, hence MNLL increases as we train new sequences. However, with the use of regularization, we can avoid catastrophic forgetting, hence having lower MNLL for successive tasks. Similar behavior is observed by \ref{fig:cl_chfn_rnn_averaged_mae_meme}) as well which displays average MAE over previous sequences for both the variants, with and without CL for Meme. So, this corroborates that use of regularization with HyperHawkes can help in backward transfer. \ref{fig:mnll_yelp}) shows MNLL for each sequence using the model HyperHawkes-FNN-RNN with regularization. MNLL for the model with regularization is having lower MNLL as compared to the model without any regularization. This essentially reflects that the proposed model is able to forward transfer the knowledge learnt from previous sequences as well. So, the model is able to perform forward and backward transfer, which are important continual learning desiderata. \ref{fig:ablation}) displays the effect of various regularization parameters for Yelp and Meme dataset for HyperHawkes-FNN. A possible explanation could be for Meme for $\beta$, the model is not able to learn from previous sequences and for large $\beta$ might not be able to learn from new sequences. To conclude, presented results suggest that proposed framework can aid in avoiding catastrophic forgetting while learning continually.
{"value": "-4.8627", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithoutCL": "true"}} {"value": "-5.6928", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithCL": "true"}} {"value": "0.00159", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithoutCL": "true"}} {"value": "0.00149", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithCL": "true"}} {"value": "-5.2629", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithoutCL": "true"}} {"value": "-5.7727", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithCL": "true"}} {"value": "0.00152", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithoutCL": "true"}} {"value": "0.00150", "type": "Result", "training data/set": "Yelp", "test data/set": "Yelp", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithCL": "true"}} {"value": "-2.8550", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithoutCL": "true"}} {"value": "-5.1462", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithCL": "true"}} {"value": "0.00548", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithoutCL": "true"}} {"value": "0.00471", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN", "model settings": {"WithCL": "true"}} {"value": "-3.8254", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithoutCL": "true"}} {"value": "-5.1192", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MNLL", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithCL": "true"}} {"value": "0.00508", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithoutCL": "true"}} {"value": "0.00471", "type": "Result", "training data/set": "Meme", "test data/set": "Meme", "task": ["event modeling", "time-to-event modeling"], "metric": "MAE", "experimental settings": {"Continual Learning": "true"}, "model": "HyperHawkes-FNN-RNN", "model settings": {"WithCL": "true"}}