# Improving repeatably in Matrix Factorization algorithms for Top-N
recommendations

Giovanni Gabbolini  Insight Centre for Data AnalyticsUniversity College Cork,
Ireland<EMAIL_ADDRESS>,  Edoardo D’Amico  Insight
Centre for Data AnalyticsUniversity College Dublin, Ireland
<EMAIL_ADDRESS>,  Cesare Bernardis  0000-0002-8972-0850
Politecnico di Milano, Italy<EMAIL_ADDRESS>and  Paolo Cremonesi
0000-0002-1253-8081 Politecnico di Milano, Italy<EMAIL_ADDRESS>
(2021)

# Improving stability in Matrix Factorization algorithms for Top-N
recommendations

Giovanni Gabbolini  Insight Centre for Data AnalyticsUniversity College Cork,
Ireland<EMAIL_ADDRESS>,  Edoardo D’Amico  Insight
Centre for Data AnalyticsUniversity College Dublin, Ireland
<EMAIL_ADDRESS>,  Cesare Bernardis  0000-0002-8972-0850
Politecnico di Milano, Italy<EMAIL_ADDRESS>and  Paolo Cremonesi
0000-0002-1253-8081 Politecnico di Milano, Italy<EMAIL_ADDRESS>
(2021)

# Improving stability in Matrix Factorization
for Top-N recommendations

Giovanni Gabbolini  Insight Centre for Data AnalyticsUniversity College Cork,
Ireland<EMAIL_ADDRESS>,  Edoardo D’Amico  Insight
Centre for Data AnalyticsUniversity College Dublin, Ireland
<EMAIL_ADDRESS>,  Cesare Bernardis  0000-0002-8972-0850
Politecnico di Milano, Italy<EMAIL_ADDRESS>and  Paolo Cremonesi
0000-0002-1253-8081 Politecnico di Milano, Italy<EMAIL_ADDRESS>
(2021)

# On the instability of embedding-based recommenders: the case of Matrix
Factorization

Giovanni Gabbolini  Insight Centre for Data AnalyticsUniversity College Cork,
Ireland<EMAIL_ADDRESS>,  Edoardo D’Amico  Insight
Centre for Data AnalyticsUniversity College Dublin, Ireland
<EMAIL_ADDRESS>,  Cesare Bernardis  0000-0002-8972-0850
Politecnico di Milano, Italy<EMAIL_ADDRESS>and  Paolo Cremonesi
0000-0002-1253-8081 Politecnico di Milano, Italy<EMAIL_ADDRESS>
(2021)

# On the instability of embeddings for recommender systems:
the case of Matrix Factorization

Giovanni Gabbolini  Insight Centre for Data AnalyticsUniversity College Cork,
Ireland<EMAIL_ADDRESS>,  Edoardo D’Amico  Insight
Centre for Data AnalyticsUniversity College Dublin, Ireland
<EMAIL_ADDRESS>,  Cesare Bernardis  0000-0002-8972-0850
Politecnico di Milano, Italy<EMAIL_ADDRESS>and  Paolo Cremonesi
0000-0002-1253-8081 Politecnico di Milano, Italy<EMAIL_ADDRESS>
(2021)

###### Abstract.

Most state-of-the-art top-N collaborative recommender systems work by learning
embeddings to jointly represent users and items. Learned embeddings are
considered to be effective to solve a variety of tasks. Among others,
providing and explaining recommendations. In this paper we question the
reliability of the embeddings learned by Matrix Factorization (MF). We
empirically demonstrate that, by simply changing the initial values assigned
to the latent factors, the same MF method generates very different embeddings
of items and users, and we highlight that this effect is stronger for less
popular items. To overcome these drawbacks, we present a generalization of MF,
called Nearest Neighbors Matrix Factorization (NNMF). The new method
propagates the information about items and users to their neighbors, speeding
up the training procedure and extending the amount of information that
supports recommendations and representations. We describe the NNMF variants of
three common MF approaches, and with extensive experiments on five different
datasets we show that they strongly mitigate the instability issues of the
original MF versions and they improve the accuracy of recommendations on the
long-tail.

Matrix Factorization, Nearest Neighbors, Stability, Popularity Bias

††journalyear: 2021††copyright: acmcopyright††conference: The 36th ACM/SIGAPP
Symposium on Applied Computing; March 22–26, 2021; Virtual Event, Republic of
Korea††booktitle: The 36th ACM/SIGAPP Symposium on Applied Computing (SAC
’21), March 22–26, 2021, Virtual Event, Republic of Korea††price: 15.00††doi:
10.1145/3412841.3442011††isbn: 978-1-4503-8104-8/21/03††ccs: Information
systems Recommender systems††ccs: Information systems Collaborative
filtering††ccs: Information systems Personalization††ccs: Information systems
Relevance assessment

##  1\. Introduction

The main goal of a wide variety of top-N collaborative recommender systems is
to learn embeddings to jointly represent users and items (Cremonesi et al.,
2010; He et al., 2017; Xue et al., 2017). Embeddings are derived in such a way
that similar items (or similar users) have similar embeddings (Liang et al.,
2016). Embeddings can be learnt with either Matrix Factorization (MF) or deep
learning (DL) techniques (Koren et al., 2009; He et al., 2017). For both
families of techniques, the learning procedure requires to sample the
interaction space during the training (e.g., stochastic-gradient-descent
(Ruder, 2016), skip-grams with negative sampling (Mikolov et al., 2013)).

Embedding-based models are characterized by various sources of randomness in
their training, such as the initial values of the embeddings and the sampled
interactions. Different random seeds or random generators might lead to
different results in terms of embeddings learnt and, consequently, items
recommended. The magnitude of these differences determines whether an
algorithm can be considered stable or not. If these differences are too large
(i.e, if the algorithm is not stable), we incur in severe issues that could
mine the reliability and the credibility of a recommender. First, we cannot
consider its recommendations to be reliable anymore, as the same algorithm
executed on the same dataset could make totally different predictions for the
same user-item pair (Madhyastha and Jain, 2019). Second, the instability of
users’ and items’ representations may have strong implications in the
explainability of the recommendations. Interpreting the predictions of
embedding models is a difficult task, because there is not a clear and direct
relationship between the representations learnt by the model and the
attributes or the interactions of users and items. Most solutions provide
explanations identifying similarities between the embeddings obtained by the
model (Tintarev and Masthoff, 2007; Abdollahi and Nasraoui, 2017), but if the
representations of users and items in the embedding space are not stable, the
quality of such explanations might be compromised. Third, our definition of
stability is strictly connected to that of _repeatability_ as defined, for
instance, in the SIGIR Initiative to implement the ACM Artifact Review and
Badging guidelines111acm.org/publications/policies/artifact-review-and-
badging-current. According to this definition, an unstable algorithm is not
repeatable.

Alongside these examples, the works that leverage the embeddings of a model to
various extents are not concerned with the potential consequences of this
instability. Indeed, our notion of stability of a recommender system is
different from what has been commonly addressed in the literature. Some works
focus on the stability of the model when you introduce noisy or malicious
perturbations in the dataset (Said et al., 2012; Mobasher et al., 2007), or
when it evolves naturally with more interactions (Adomavicius and Zhang, 2014,
2012). In this work we focus on the stability of a recommender system when the
same model is trained on the same dataset in exactly the same experimental
conditions but with a different random sequence (e.g., due to a different
random seed).

The variance in both the internal representation of the model (embeddings) and
the output of the model (estimated relevance) can be reduced if enough samples
are collected for each user and item to be modeled. Unfortunately, most
datasets exhibit strong popularity biases (Anderson, 2006). Because of these
biases, unpopular items (i.e., items with very few interactions) and short-
profile users (i.e., users with very few interactions) will not collect enough
samples during their training to smooth out the noise introduced by the
randomness. Embeddings learnt on a small sample size will be biased and
unstable (Skurichina and Duin, 1998).

Different techniques exist to improve the generalization capabilities of a
model by leveraging or controlling the randomness of the training procedure.
Bagging (Skurichina and Duin, 1998) is an ensemble method that trains
different models from boostrap replica of the same dataset and average their
predictions. However, it requires to retrain the model several times and is
designed to improve the generalization capabilities and not to stabilize the
model. Other techniques, such as Stochastic Weight Averaging (SWA), produce an
ensemble by averaging the weights of the same model at different epochs of the
training process (Madhyastha and Jain, 2019; Izmailov et al., 2018). In case
of linear models, such as with Matrix Factorization, this is equivalent to
averaging the embedding vectors during the gradient descent optimization. All
these techniques are model agnostic and do not take into account the
neighborhood properties of user and item embeddings: similar items (users)
have similar embeddings.

In this paper, we focus on the stability of a widely employed family of
embedding-based models, that is Matrix Factorization, as a function of random-
seed. We are especially interested in investigating if MF based models under
different initializations of latent factors generated by distinct random
seeds, produce similar predictions and similar embeddings. We propose a new
framework called Nearest Neighbors Matrix Factorization (NNMF), a
generalization of classic Matrix Factorization that merges MF with nearest
neighbors (NN) in order to alleviate the effects brought by the scarcity of
interactions for unpopular items. While in classic MF the latent
representations of items or users are treated independently, in NNMF we force
each embedding to be a linear combination of the embeddings of a set of their
most similar neighbors. With this approach we map the neighborhood
relationships among items or users from the original interaction space to the
new latent space. This mapping has the effect to propagate the updates applied
to an item or a user also to their respective neighbors.

We provide an extensive set of experiments, testing NNMF with three MF
approaches (BPR-MF, Funk-MF and P-MF) over five different datasets. The
results show that:

  * •

all the three MF methods suffer from the instability problem: on average,
recommended items change by more than 50%;

  * •

the three NNMF variants greatly improve stability: on average, recommended
items change by less than 25%;

  * •

the NNMF variants have better accuracy on the long tail with respect to the
original MF methods, as well as other baselines, in almost all measures and
datasets;

  * •

the improved stability and the information propagation of NNMF allow to reach
convergence in a fraction of the number of epochs required by MF.

The rest of the paper is organized as follows. In Section 2 we list a set of
works related to the argument we treat in this paper. In Section 3 we
introduce the issues of classic Matrix Factorization techniques and we present
our new framework called Nearest Neighbor Matrix Factorization. We also
describe some practical implementations over three well known MF algorithms.
In Section 4 we discuss the results obtained by an extensive set of
experiments over a variety of different datasets, testing the new models under
different aspects. Finally, in Section 5, we provide some concluding remarks.

##  2\. Related Work

There exist different definitions of stability of a recommender system in the
literature, and different ways to improve each of these definitions. Most
works define the stability of a recommender system as the ”consistent
agreement of predictions” made to the same user by the same algorithm, when
new incoming interactions are added to the system in complete agreement to
system’s prior predictions (Adomavicius and Zhang, 2012). For instance, the
work in (Adomavicius and Zhang, 2014) adopts bagging and iterative smoothing
in conjunction with different traditional recommendation algorithms to improve
their consistency. Other works define stability as the ability of the
recommender system to provide consistent recommendations when malicious
perturbations are performed to the dataset (Adomavicius and Zhang, 2012). The
work in (Mobasher et al., 2007) suggests hybrid collaborative and content-
based filtering as the best solution to mitigate the effects of attacks on the
consistency of recommendations. Finally, other works (Said and Bellogín, 2018)
relate the stability, or confidence, of a recommender system with the quality
of a dataset, either at system level (the magic barrier described in (Said and
Bellogín, 2018)) or at user-level (Bernardis et al., 2019). Our notion of
stability – the consistency of both recommendations and latent representations
of users and items when the same model is trained on exactly the same dataset
with a different random sequence – is different from the definitions used in
the literature.

There are also several works that try to control (or leverage) the randomness
intrinsic in machine learning algorithms in order to improve the
generalization capabilities of a model. Bagging is the most widely adopted
black-box method used to leverage randomness in the input data in order
improve the classification accuracy of a model (Skurichina and Duin, 1998).
Bagging builds an ensemble of models by (i) running the same training
algorithm on different boostrap replica of the same dataset and (ii) by
aggregating their predictions. Training multiple model for prediction
averaging, as with bagging, is computationally expensive. Therefore, other
works train a single model and save the model parameters (snapshots) along the
optimization path. The predictions of the snapshot models are later combined
to produce the final prediction (Huang et al., 2017). Differently from bagging
and snapshots, that build ensambles in the model space, other works build
ensembles in the weights space. For instance, the works in (Madhyastha and
Jain, 2019) and (Izmailov et al., 2018) use two variants of the same
technique, Stochastic Weight Averaging (SWA), to compute a running average of
the model weights during the last epochs of the training process.

Note also that even though the idea to merge MF and NN is not new (Nova et
al., 2014; Koren, 2008), this is the first work, to the best of our knowledge,
that addresses this particular stability issue and proposes a generic
framework for MF that alleviates its drawbacks.

##  3\. Models

In the following Sections, we denote with $\mathcal{U}$ and $\mathcal{I}$ the
sets of users and items and with $|\mathcal{U}|$ and $|\mathcal{I}|$ their
cardinalities. Lower case letters $u,v$ will be used to refer to users, while
$i,j,k$ will refer to items. The user rating matrix (URM) is indicated by the
uppercase bold letter $\mathbf{R}$ and each cell $r_{ui}$ contains the value
of the preference, either explicit or implicit, if expressed, 0 otherwise.
Lower case, bold letters indicate vectors in column format, unless differently
specified. In particular, $\mathbf{r_{u}}$ indicates the user profile,
intended as the $u$-th row of matrix $\mathbf{R}$. The set of $(u,i)$ couples
for which $r_{ui}$ is known is denoted with $\kappa$.

In its basic form, MF consists in representing users and items in a latent
factor space of dimension $f$. In particular, users and items are represented
respectively in matrices $\mathbf{P}\in\mathbb{R}^{|\mathcal{U}|\times f}$ and
$\mathbf{Q}\in\mathbb{R}^{|\mathcal{I}|\times f}$. A row $\mathbf{p_{u}}$ of
$\mathbf{P}$ and $\mathbf{q_{i}}$ of $\mathbf{Q}$ handle, respectively, the
representation of a user and an item on the same latent factor space. The dot
product

(1)
$\overline{r}_{ui}=\mathbf{p_{u}}\text{\large{{\textperiodcentered}}}\mathbf{q_{i}^{T}}$

measures how much user $u$ and item $i$ are aligned in the new latent space
and therefore an estimate of the rating $\overline{r}_{ui}$ is provided.
Consequently, the user-rating matrix can be estimated as:

(2) $\overline{\mathbf{R}}=\mathbf{P}\mathbf{Q^{T}}$

###  3.1. Matrix Factorization drawbacks

Over the years, researchers proposed various MF algorithms, varying how
matrices $\mathbf{P}$ and $\mathbf{Q}$ are learned (Funk, 2006; Rendle et al.,
2012; Salakhutdinov and Mnih, 2007) in order to improve the quality of
recommendations under different aspects. Most of them learn the parameters of
the model optimizing an objective function through stochastic gradient
descent, iterating over the available data. The training phases of such
algorithms share a common schema, which is partially altered from case to
case. Firstly the two latent factor matrices $\mathbf{P}$ and $\mathbf{Q}$ are
initialized with random values, then an iterative learning procedure begins.
With each iteration, one or more interactions are selected among the available
ones, and the objective function is computed alongside its respective
gradient. Finally, the latent factors of the sampled items and users are
updated accordingly.

The interactions are strongly biased towards popular items and long profiles.
As such, the latent representations of users and items are updated based on
this biased distribution: factors belonging to popular items (users) are
updated far more often than niche ones. This means that the random
initialization of the latent representations values for unpopular items and
short-profile users has a strong impact on their final representations at
convergence. We refer to this issue as instability of representations.

This problem directly affects also the recommendation lists generated by the
algorithms: if the representation of a user is unstable, also the closest
items in the latent space are unstable, leading to the generation of different
recommendation lists for the same user, based on different random initial
conditions. We refer to this issue as instability of recommendations.

Table 1. Stability of Top-10 recommendation lists generated by three MF techniques expressed with Jaccard index. Higher values indicate a better stability. Datasets names abbreviations are reported in Section 4.4. Algorithm | LFM | M1M | BCR | PIN | CUL
---|---|---|---|---|---
BPR-MF | 0.70 | 0.78 | 0.28 | 0.50 | 0.49
Funk-MF | 0.72 | 0.60 | 0.05 | 0.28 | 0.31
P-MF | 0.62 | 0.60 | 0.23 | 0.39 | 0.37

As an example, in Table 1 we show the stability of the top-10 recommendations
for three common MF techniques, expressed with the Jaccard index, that
indicates how much the generated lists overlap. The details of the
experimental setup are described in Section 4. We compare the recommendations
provided by 10 instances of the same model, all trained on the same data and
with the same configuration, changing only the random seed, which, in turn,
affects the initial values of the latent factors. The results in Table 1 show
that, according to the Jaccard index, the recommendation lists overlap by less
than 50% for three datasets out of five. For these datasets, more than 50% of
the recommended items change by changing the initial random seed, i.e. by
simply altering the initial values of the latent factors. For the BookCrossing
dataset the instability is even more dramatic: lists overlap by less than 30%.
More details about the experimental procedure and a wider range of experiments
are described in Section 4.

###  3.2. Nearest Neighbors Matrix Factorization

The objective of MF is to learn users and items representations, also called
embeddings, in a new latent space where users are mapped close to items they
have expressed positive preference for. MF algorithms perform this task
treating users and items as independent entities, without explicitly taking
into account existing relationships among users and among items. However,
these meaningful relationships should be reproduced also in the new latent
space. We hence propose a new framework called Nearest Neighbors Matrix
Factorization (NNMF), which is able to let Matrix Factorization algorithms
leverage knowledge about users and items relationships, under the form of
similarities, during the algorithm learning procedure. Given the two latent
factor matrices $\mathbf{P}$ and $\mathbf{Q}$ defined in Section 3, we define
the new neighborhood-aware latent representations for users $\mathbf{P^{*}}$
and items $\mathbf{Q^{*}}$

$\mathbf{P^{*}}=\mathbf{S^{U}}\mathbf{P}\hskip
30.0pt\mathbf{Q^{*}}=\mathbf{S^{I}}\mathbf{Q}$

where $\mathbf{S^{U}}$ and $\mathbf{S^{I}}$ are a user similarity matrix and
an item similarity matrix, respectively, the first with size
$|\mathcal{U}|\times|\mathcal{U}|$ and the second with size
$|\mathcal{I}|\times|\mathcal{I}|$. Each element $s_{xy}$ stores the value of
the similarity between entity $x$ and $y$, being them either users or items
(i.e. $x,y\in\mathcal{U}$ or $x,y\in\mathcal{I}$). We require $s_{xx}$ to be
equal to 1 for any $x$. Notice that if both similarity matrices
$\mathbf{S^{U}}$ and $\mathbf{S^{I}}$ are identity matrices, NNMF collapses to
classic MF. It follows that the new NNMF framework is a generalization of MF.

An important characteristic of the new technique can be highlighted by
exploding the neighborhood-aware representations

(3)
$\mathbf{p^{*}_{u}}=\sum_{v\in\mathcal{U}}s^{U}_{uv}\mathbf{p_{v}}=\mathbf{p_{u}}+\sum_{v\in\mathcal{U}\setminus\\{u\\}}s^{U}_{uv}\mathbf{p_{v}}$
(4)
$\mathbf{q^{*}_{i}}=\sum_{j\in\mathcal{I}}s^{I}_{ij}\mathbf{q_{j}}=\mathbf{q_{i}}+\sum_{j\in\mathcal{I}\setminus\\{i\\}}s^{I}_{ij}\mathbf{q_{j}}$

We can clearly distinguish the contributions of the independent factors
$\mathbf{p_{u}}$ and $\mathbf{q_{i}}$ from the contributions of the
neighborhoods embeddings. The magnitude of the contribution of each neighbor
is defined by the similarity with the user or the item we are considering: the
more similar they are, the stronger the contribution will be. Finally, we can
modify (2), used to estimate the preferences and provide recommendations, with
the new formulation of the latent representations, rewriting it as:

(5)
$\overline{\mathbf{R}}=\mathbf{P^{*}}\mathbf{Q^{*T}}=\mathbf{S^{U}}\mathbf{P}\mathbf{Q^{T}}\mathbf{S^{I^{T}}}$
(6)
$\overline{r}_{ui}=\mathbf{p^{*}_{u}}\text{\large{{\textperiodcentered}}}\mathbf{q^{*T}_{i}}=\bigg{(}\sum_{v\in
U}s^{U}_{uv}\mathbf{p_{v}}\bigg{)}\text{\large{{\textperiodcentered}}}\bigg{(}\sum_{j\in
I}s^{I}_{ij}\mathbf{q_{j}}\bigg{)}$

In our implementation, the similarity matrices $\mathbf{S^{U}}$ and
$\mathbf{S^{I}}$ are constant matrices that can be pre-computed by using any
traditional nearest-neighbor collaborative-filtering approach. As such, NNMF
can be easily applied to almost any MF algorithm.

Note that with the proposed formulation, $\mathbf{P}$ and $\mathbf{Q}$ do not
directly contain users and items embeddings. They contain, instead, vectors
that form a generating set, not necessarily a basis, for the vector space
where users and items representations are projected. Embeddings for users and
items are now contained in $\mathbf{P^{*}}$ and $\mathbf{Q^{*}}$,
respectively. Another important aspect to notice is how an estimated rating
$\overline{r}_{ui}$ is now dependent on multiple users and items and it is not
restricted to $u$ and $i$ anymore.

There are two main advantages with NNMF over traditional MF. The first
advantage is that it allows to have a larger amount of information supporting
the latent representations of items and users, a particularly important aspect
for users and items that have scarce data available, leading to a higher
stability of recommendations and representations. The second advantage is that
the updates made to the embeddings during the learning procedure are not
restricted to the user and the item associated to the sampled interaction, but
are also propagated to the representations of users and items in the
neighborhoods of $u$ and $i$, resulting in a faster convergence of the model.

##  4\. Experiments

###  4.1. Similarity

In the NNMF algorithm, relationships among users and items are modeled in the
form of similarity matrices $\mathbf{S^{U}}$ and $\mathbf{S^{I}}$. Even though
we did not make any assumption on how these matrices are obtained, for the
experimental part of this paper we assume that the similarity values are
calculated using the shrinked cosine similarity function:

(7)
$s_{uv}=\frac{\mathbf{r_{u}}\cdot\mathbf{r_{v}}}{||\mathbf{r_{u}}||\cdot||\mathbf{r_{v}}||+h_{U}}\hskip
56.9055pts_{ij}=\frac{\mathbf{r_{i}}\cdot\mathbf{r_{j}}}{||\mathbf{r_{i}}||\cdot||\mathbf{r_{j}}||+h_{I}}$

where $\mathbf{r_{u}}$ and $\mathbf{r_{v}}$ are user profiles,
$\mathbf{r_{i}}$ and $\mathbf{r_{j}}$ are item profiles and $h_{U}$ and
$h_{I}$ are the shrink terms. Moreover, for every item and user we kept only a
small number of the nearest neighbors, since we noticed that this approach led
to the best performance.

Note that the choice of the cosine has two main advantages. The first is that
it is simple and fast to compute. The second is that this way, the NNMF model
has the same complexity of the original MF ones and also the same number of
parameters to learn.

###  4.2. Instances

We experimented NNMF with three well known MF algorithms: Funk-MF (Funk,
2006), BPR-MF (Rendle et al., 2012) and P-MF (Salakhutdinov and Mnih, 2007).

  * •

The NNMF loss function for Funk-MF is

$\sum_{(u,i)}\bigg{(}r_{ui}-\bigg{(}\sum_{v}s_{uv}\mathbf{p_{v}}\bigg{)}\text{\large{{\textperiodcentered}}}\bigg{(}\sum_{j}s_{ij}\mathbf{q_{j}}\bigg{)}\bigg{)}+\lambda_{p}\sum_{v}||\mathbf{p_{v}}||^{2}+\lambda_{q}\sum_{j}||\mathbf{q_{j}}||^{2}$

where $\lambda_{p}$ and $\lambda_{q}$ control the regularization.

  * •

The maximum posterior estimator for the NNMF version of BPR-MF is

$\sum_{(u,i,j)}{\ln{\sigma(\overline{x}_{uij}(\Theta))}}+\lambda_{\Theta}\left\|\Theta\right\|^{2}$

where $\lambda_{\Theta}$ are model specific regularization parameters and
$\sigma(\cdot)$ is the logistic function. The difference to the original MF
version is in how $\overline{x}_{uij}(\Theta)$ is calculated, that for NNMF is

$\overline{x}_{uij}(\Theta)=\bigg{(}\sum_{v}s_{uv}\mathbf{p_{v}}\bigg{)}\text{\large{{\textperiodcentered}}}\bigg{(}\sum_{k}s_{ik}\mathbf{q_{k}}\bigg{)}-\bigg{(}\sum_{v}s_{uv}\mathbf{p_{v}}\bigg{)}\text{\large{{\textperiodcentered}}}\bigg{(}\sum_{k}s_{jk}\mathbf{q_{k}}\bigg{)}$

  * •

The loss of the NNMF version of P-MF is

(8)
$\sum_{u,i}\bigg{(}r_{ui}-\sigma\bigg{(}\sum_{v}s_{uv}\mathbf{p_{v}}\text{\large{{\textperiodcentered}}}\sum_{k}s_{ik}\mathbf{q_{k}}\bigg{)}\bigg{)}^{2}+\frac{\lambda_{p}}{2}\sum_{u}||\mathbf{p_{u}}||^{2}+\frac{\lambda_{q}}{2}\sum_{i}||\mathbf{q_{i}}||^{2}$

where $\lambda_{p}$ and $\lambda_{q}$ are the regularization parameters.

In the experiments we forced all the NNMF models to use at least 2 neighbors
for users or items, in order to ensure that a difference exists between the MF
and the NNMF instances of the same approach222If the number of neighbors for
items and users is 1, NNMF is equivalent to MF. All the algorithms have been
trained using an early stopping technique based on the accuracy performance on
the validation set. We also performed a Bayesian optimization on a validation
set to find the best parameters for every approach we tested. The source code
used to perform the experiments is publicly
available333https://github.com/damicoedoardo/NNMF.

###  4.3. Baselines

We compare the stability of the NNMF algorithms with the stability of the
corresponding standard MF algorithm. Moreover, we compare accuracy with some
additional collaborative filtering baselines:

ItemKNN, UserKNN:

Traditional item and user-based nearest neighbors approaches with cosine
similarity. (Ricci et al., 2010)

SLIM:

Linear regression model for top-n recommendation tasks with Bayesian
Personalized Ranking as optimization function. (Ning and Karypis, 2011)

PureSVD:

Basic Matrix Factorization model based on SVD decomposition (Cremonesi et al.,
2010). Notice that contrarily to the other MF methods we consider in this
paper, it has an exact mathematical solution that can not include the
similarity matrices introduced by NNMF.

All baselines have been tuned on a validation set by using a Bayesian
optimizer.

###  4.4. Datasets

We carry out experiments employing a number of research datasets:

LastFM (LFM):

Implicit interactions gathered from the music website Last.fm. In particular,
user listened artist relations expressed as listening counts. (Cantador et
al., 2011)

Movielens1M (M1M):

Explicit interactions gathered from the website MovieLens. In particular, user
rated movie relations. (Harper and Konstan, 2015)

BookCrossing (BCR):

Explicit interactions gathered from the online book club BookCrossing. In
particular, user rated book relations. (Ziegler et al., 2005)

Pinterest (PIN):

Implicit interactions gathered from the social network Pinterest. In
particular, user pin-to-own-board image relations. (Geng et al., 2015)

CiteULike (CUL):

Implicit interactions gathered from the online scientific community CiteULike.
In particular, user saved-to-own-library paper relations. (Wang et al., 2013)

We employ datasets with densities of interactions that range from 0.04% to
2.51%, as we want to take into account the effect of a varying density of the
datasets on both the accuracy and stability of the models. The statistical
details of the datasets are described in Table 2.

Table 2. Statistics of the evaluation datasets Dataset | Users | Items | Interactions | Density
---|---|---|---|---
LFM | 1859 | 2823 | 42798 | 0.81%
M1M | 6038 | 3307 | 501114 | 2.51%
BCR | 13975 | 33925 | 314499 | 0.06%
PIN | 55186 | 9637 | 877796 | 0.16%
CUL | 5536 | 15429 | 119919 | 0.14%

The datasets used for the experiments have been preprocessed in two steps.
First, we brought all the interactions to either zero or one by means of
thresholding, since BPR requires binary preference values. Among the implicit
datasets, only LFM needs thresholding: we use threshold value equal to one,
hence we convert every interaction to one if the user has listened at least
once to an artist. In explicit datasets we use threshold value equal to six
for one to ten ratings and equal to three for one to five ratings. Second we
applied a filtering procedure keeping only users and items with at least five
interactions, in order to remove entities with a too scarce amount of
information.

Each dataset has been randomly partitioned performing a standard holdout
procedure in three sets: train, validation and test accounting for 60, 20 and
20 percent of the available interactions.

###  4.5. Stability of representations

Table 3. Stability of representations @10 expressed as Jaccard index. Underline indicates the most stable algorithm. Bold indicates which is more stable between MF and NNMF. Algorithm | LFM | M1M | BCR | PIN | CUL
---|---|---|---|---|---
Item | User | Item | User | Item | User | Item | User | Item | User
BPR-MF | 0.73 | 0.67 | 0.70 | 0.70 | 0.47 | 0.32 | 0.45 | 0.30 | 0.57 | 0.58
BPR-NNMF | 0.82 | 0.87 | 0.93 | 0.91 | 0.55 | 0.57 | 0.66 | 0.51 | 0.69 | 0.69
Funk-MF | 0.66 | 0.61 | 0.36 | 0.33 | 0.17 | 0.13 | 0.34 | 0.19 | 0.48 | 0.48
Funk-NNMF | 0.81 | 0.83 | 0.95 | 0.92 | 0.42 | 0.25 | 0.68 | 0.58 | 0.64 | 0.61
P-MF | 0.62 | 0.56 | 0.55 | 0.47 | 0.38 | 0.26 | 0.32 | 0.19 | 0.60 | 0.40
P-NNMF | 0.76 | 0.78 | 0.81 | 0.68 | 0.57 | 0.62 | 0.63 | 0.46 | 0.75 | 0.71

Assessing the stability of representations requires to use a technique which
is invariant to transformations on the vector space, such as permutation or
rotation of coordinates. The representation of an item, or user, is stable if,
in every new latent space, it is close to the same items, or users. So we want
to assess if the relationships among items and among users are maintained in
the different embedding spaces and we can check this condition by ensuring
that the neighborhoods formed in the new spaces are composed by the same set
of users or items. Note that the cross-entity relationships between users and
items are checked with the stability of recommendations experiment in the next
section.

We compare MF and NNMF in a pairwise manner considering the differences in the
stability of representations. Every algorithm tested is executed ten times,
changing the latent factor initialization, an effect obtained simply using
different seeds for the random number generator used to assign the initial
values. The order in which the training data samples are explored during the
different runs of the algorithms, instead, is ensured to be constant. We
consider the latent factors representations learned and we create a list of
the closest items to every item and users to every user, by means of a cosine
similarity on the latent factor space. We compute these lists of $K$ nearest
neighbors for the first of the ten models, both for MF and NNMF approaches.
Then, we measure the degree of similarity of the $K$ nearest neighbors of the
other nine models against the first considering the Jaccard index, a common
statistic used to asses the similarity between sets. Higher similarity of the
nearest neighbors in the latent space across different runs suggests a higher
similarity of the latent factor representations. We performed the experiments
using both $K=10$ and $K=100$ obtaining the same results, so, for brevity, in
Table 3 we report only the results with $K=10$.

The most evident trend is that we have a large improvement in the stability of
the recommendations when applying the new NNMF method with respect to original
MF algorithm in every configuration. NNMF stability is over 50% in almost all
the experiments, and well above 80% in two out of five datasets. MF
approaches, on the contrary, struggle to reach 50% of stability for both users
and items in three datasets out of five. Analyzing the results, we observe
higher stability for denser datasets, while it drops when the density of
interactions is really low. Among the MF algorithms, it is interesting to
notice that the BPR-MF approach (and its NNMF variant) have a better stability
than the other methods on almost all the experiments.

(a) BPR-MF vs BPR-NNMF

(b) Funk-MF vs Funk-NNMF

(c) P-MF vs P-NNMF

Figure 1. Stability of items representations for popularity ranges on the LFM
dataset expressed as Jaccard @10. Every point represents the average stability
value of the items in a bin. A bin contains all the items that belong to a
range of popularity.

As second step of this experiment, we also want to understand if a correlation
between the popularity of an item and its stability exists, so we analyze the
items’ stabilities grouped by their popularity. We divide the items in 6 bins,
depending on their popularity, using 1, 0.66, 0.4, 0.3, 0.2, 0.1 and 0 as
thresholds. The first bin contains all the most popular items that account for
the $1-0.66=34\%$ of the interactions in the dataset, i.e. the short-
head444The short-head is defined as complementary to the long-tail, which is
the set of less popular items that account for the 66% of the interactions.
The second bin contains all the most popular items, excluding those in the
first bin, that account for the $0.66-0.4=26\%$ of interactions. And so on.
For each bin, we average the stability of the items that belong to it.

For brevity, in Figure 1 we show the results of the experiment performed only
on the LFM dataset, but we obtained very similar results on all the datasets.
As expected, the stability of NNMF models is globally higher than the MF
counterparts. However, the plots show another clear trend: the representations
of popular items are much more stable than unpopular ones. This behavior is
not surprising, since higher popularity determines a higher number of updates
and, consequently, a more detailed representation supported by a higher amount
of information. Instead, niche items representations are subject of few
updates during the learning process, resulting in more fuzzy representations
even at model convergence, where the impact of the initialization values used
is still strong. It is also evident that MF is subject to higher drops of
stability, compared to NNMF, when passing from popular to niche items,
widening the difference between them. The proposed analysis proves that the
recommendations made by MF models are noisy and strongly impacted the random
initialization of the latent factors, since the available information about
the real user’s taste is often poor and marginally exploited. NNMF models,
instead, are overall more stable, and the stability is high also when
considering non-popular items. This has an impact also on the stability of
recommendations and on the overall accuracy of the models, as we show in the
following Sections.

###  4.6. Stability of recommendations

Table 4. Stability of recommendations @10 expressed as Jaccard index. Underline indicates the most stable algorithm. Bold indicates which is more stable between MF and NNMF. Algorithm | LFM | M1M | BCR | PIN | CUL
---|---|---|---|---|---
BPR-MF | 0.70 | 0.78 | 0.28 | 0.50 | 0.49
BPR-NNMF | 0.86 | 0.95 | 0.52 | 0.69 | 0.65
Funk-MF | 0.72 | 0.60 | 0.05 | 0.28 | 0.31
Funk-NNMF | 0.87 | 0.95 | 0.18 | 0.75 | 0.51
P-MF | 0.62 | 0.60 | 0.23 | 0.39 | 0.37
P-NNMF | 0.79 | 0.76 | 0.61 | 0.78 | 0.66

As second experiment, we compare MF and NNMF in order to assess the
differences in the stability of recommendations. The experimental procedure is
similar to the one described in last Section: every algorithm tested is
executed ten times, changing the latent factor initialization. But in this
case we consider the top-10 recommendations provided by the ten models, both
for MF and NNMF approaches, measuring the degree of similarity of the
recommendations of the first model against the other nine, resorting again to
the Jaccard index. Table 4 shows compatible results in the stability of
recommendations with respect to what we observed for the representations in
Table 3. The recommendation lists generated by NNMF models are always widely
more stable than their MF counterparts. The MF implementations fail to reach
the 50% threshold for the Jaccard index in many configurations, with a
negative spike of 5% of Funk-MF on BCR. The NNMF versions largely mitigate
this issue, as they are always able to outperform the respective MF
implementations with a wide margin. As for the representations, also in this
case the difference between dense datasets and sparse ones is evident, with a
higher stability in the first scenario. Moreover, notice how the stability in
both experiments tends to be higher for small datasets. This is not only
related to the density of the dataset, since the number of items and users
influence it, but having fewer items to take into account also reduces the
different available options in the recommendation phase. As final observation,
among the MF algorithms note that the BPR-MF approach is steadily better than
the others on all the datasets, while among the NNMF this trend is not evident
anymore.

###  4.7. Accuracy

Table 5. Long-tail accuracy. Bold indicates the best between MF and NNMF. Underline indicates the best performing algorithm. Algorithm | LFM | M1M | BCR | PIN | CUL
---|---|---|---|---|---
MAP | Recall | MAP | Recall | MAP | Recall | MAP | Recall | MAP | Recall
@5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10 | @5 | @10
ItemKNNCF | 0.028 | 0.030 | 0.040 | 0.073 | 0.005 | 0.005 | 0.006 | 0.013 | 0.014 | 0.014 | 0.018 | 0.027 | 0.013 | 0.016 | 0.023 | 0.044 | 0.047 | 0.051 | 0.065 | 0.110
UserKNNCF | 0.020 | 0.022 | 0.032 | 0.065 | 0.005 | 0.006 | 0.007 | 0.022 | 0.007 | 0.007 | 0.010 | 0.016 | 0.010 | 0.013 | 0.019 | 0.037 | 0.047 | 0.052 | 0.071 | 0.116
SLIM BPR | 0.024 | 0.026 | 0.038 | 0.068 | 0.002 | 0.003 | 0.003 | 0.010 | 0.004 | 0.005 | 0.006 | 0.010 | 0.010 | 0.012 | 0.017 | 0.035 | 0.045 | 0.050 | 0.071 | 0.114
PureSVD | 0.027 | 0.028 | 0.045 | 0.084 | 0.022 | 0.021 | 0.020 | 0.047 | 0.002 | 0.002 | 0.003 | 0.004 | 0.005 | 0.007 | 0.010 | 0.022 | 0.018 | 0.019 | 0.022 | 0.046
BPRMF | 0.035 | 0.037 | 0.050 | 0.087 | 0.022 | 0.022 | 0.025 | 0.051 | 0.006 | 0.007 | 0.009 | 0.014 | 0.010 | 0.012 | 0.018 | 0.035 | 0.037 | 0.042 | 0.060 | 0.099
BPR NNMF | 0.039 | 0.040 | 0.058 | 0.099 | 0.017 | 0.016 | 0.018 | 0.039 | 0.009 | 0.008 | 0.011 | 0.016 | 0.012 | 0.015 | 0.023 | 0.046 | 0.039 | 0.043 | 0.060 | 0.099
FunkSVD | 0.033 | 0.035 | 0.050 | 0.085 | 0.017 | 0.015 | 0.018 | 0.034 | 0.004 | 0.004 | 0.006 | 0.009 | 0.010 | 0.013 | 0.019 | 0.037 | 0.044 | 0.049 | 0.069 | 0.108
Funk NNMF | 0.033 | 0.036 | 0.052 | 0.094 | 0.034 | 0.028 | 0.024 | 0.046 | 0.006 | 0.007 | 0.010 | 0.016 | 0.011 | 0.014 | 0.021 | 0.041 | 0.053 | 0.058 | 0.080 | 0.127
ProbMF | 0.019 | 0.020 | 0.030 | 0.058 | 0.008 | 0.009 | 0.010 | 0.027 | 0.001 | 0.001 | 0.002 | 0.003 | 0.009 | 0.011 | 0.016 | 0.033 | 0.033 | 0.038 | 0.052 | 0.090
Prob NNMF | 0.034 | 0.036 | 0.054 | 0.095 | 0.027 | 0.024 | 0.025 | 0.048 | 0.007 | 0.007 | 0.009 | 0.014 | 0.011 | 0.013 | 0.020 | 0.038 | 0.047 | 0.049 | 0.064 | 0.107

Recommending non-popular items adds novelty and serendipity to the users, but
it is usually a more difficult task compared to the recommendation of popular
ones (Cremonesi et al., 2010). In this experiment we measure the accuracy of
MF and NNMF in suggesting non-trivial items with a standard long-tail accuracy
experiment, i.e. we compute the top-n performance of the algorithms using as
ground truth the long-tail of the test set, while the training set is
considered at its whole. We define as long-tail all the least popular items
that account for the 66% of the interactions in the dataset. We evaluate the
behavior of NNMF and MF approaches in this scenario, carrying out pairwise
comparisons. Moreover, to provide context to our results, we additionally
score other competitive collaborative baselines (Ferrari Dacrema et al., 2019)
described in Section 4.3. In Table 5 we report the performance obtained by the
different algorithms, expressed by the Mean Average Precision and the Recall
at two cutoffs, 5 and 10. In almost 90% of the measures, the NNMF algorithms
perform better than or equal to the corresponding MF versions, and in more
than 80% of the measures, the improvement provided by NNMF is consistent.

(a) BPR-Opt

(b) MAP

Figure 2. Comparison between the training procedures of BPR-MF and BPR-NNMF on
the CUL dataset. The plot on the left represents the BPR-Opt value on the
training set. The plot on the right represents the MAP@5 obtained on the
validation set.

NNMF models achieve highest accuracy on three datasets over five and in the
remaining cases they try to fill the gap between the best performing model
(usually ItemKNN) and classic MF algorithms, proving to be at least
competitive against the other models across the datasets. Indeed, notice that
even when a NNMF model is not the most accurate model on the long tail, it is
the second best performing algorithm. The poor long-tail accuracy of MF
obtained in many scenarios is quite surprising, especially if we consider that
MF approaches are known for being less popularity biased than other CF
approaches (Abdollahpouri et al., 2019; Channamsetty and Ekstrand, 2017;
Jannach et al., 2013). We can conclude that these models are able to recommend
niche items, but they are often noisy recommendations, resulting from the low
number of updates on the latent factors of non-popular items, rather than a
real evidence of the user’s taste. NNMF models, instead, leverage the
knowledge of the neighborhood to construct more consistent item
representations on the long-tail, transforming its part of non-popular
recommendations in higher quality long-tail accuracy.

###  4.8. Model training

As last experiment, we also investigated the behavior of the models during the
training procedure. For brevity, in Figure 2 we show, as an example, the
comparison between BPR-MF and BPR-NNMF on the CUL dataset, but we could
observe the same trend in all the other configurations. The plot on the left
shows the maximum posterior estimator, called BPR-Opt in (Rendle et al.,
2012), on the training set, while the one on the right shows the performance
on the validation set, expressed as the MAP@5. Even if the starting and the
convergence values of both the BPR-Opt and the MAP are quite similar between
the two models, the NNMF version of the algorithm reaches lower BPR-Opt values
and higher performance in a largely smaller amount of epochs. Indeed, notice
that the NNMF version reaches convergence after about 200 epochs and the
training is interrupted by the early stopping technique, while the original MF
version needs about 1000 epochs to reach the same performance. This result
proves that the propagation of the information we have about a user or an item
also to its neighbors is very effective and useful, allowing the model to
reach the optimal performance in a lower number of iterations over the
training data.

##  5\. Conclusions and Future Works

In this paper we present Nearest Neighbors Matrix Factorization, a
generalization of classic Matrix Factorization. The new framework merges
nearest neighbors and Matrix Factorization techniques in order to mitigate the
drawbacks induced by the scarcity of collaborative information available,
especially for unpopular items.

The results of extensive experiments on five different datasets show that
classic MF approaches are particularly affected by instability. By simply
changing the initial values assigned to the latent factors of users and items,
the same model, trained on the same data and with the exactly same
configuration, provides very different recommendations and latent
representations of users and items at convergence, two issues that we call,
respectively, instability of recommendations and instability of
representations. Moreover, we show that exists a correlation between the
popularity of an item and the stability of its representation.

To assess the validity of the new technique, we propose the NNMF extensions of
three of the most common MF algorithms, checking the accuracy and the
stability of the new models. The NNMF approaches provide large and consistent
stability improvements in every scenario, and they are also able to increase
the accuracy of their MF counterparts in almost every configuration,
certifying the quality of the proposed framework. Finally, we show that the
new models are able to reach convergence in a fraction of the epochs necessary
to the MF approaches, thanks to the propagation of the information through the
neighborhood relations.

Future works are addressed towards the study of the stability of more complex
embedding-based models.

## Acknowledgement

Giovanni Gabbolini and Edoardo D’Amico would like to acknowledge a grant from
Science Foundation Ireland (SFI) under Grant Number 12/RC/2289-P2, which is
co-funded under the European Regional Development Fund, that partially
supported this research.

## References

  * (1)
  * Abdollahi and Nasraoui (2017) Behnoush Abdollahi and Olfa Nasraoui. 2017.  Using explainability for constrained matrix factorization. In _Proceedings of the Eleventh ACM Conference on Recommender Systems_. 79–83.
  * Abdollahpouri et al. (2019) Himan Abdollahpouri, Masoud Mansoury, Robin Burke, and Bamshad Mobasher. 2019.  The unfairness of popularity bias in recommendation.  _arXiv preprint arXiv:1907.13286_ (2019).
  * Adomavicius and Zhang (2012) Gediminas Adomavicius and Jingjing Zhang. 2012.  Stability of recommendation algorithms.  _ACM Transactions on Information Systems (TOIS)_ 30, 4 (2012), 1–31.
  * Adomavicius and Zhang (2014) Gediminas Adomavicius and Jingjing Zhang. 2014.  Improving stability of recommender systems: a meta-algorithmic approach.  _IEEE Transactions on Knowledge and Data Engineering_ 27, 6 (2014), 1573–1587.
  * Anderson (2006) Chris Anderson. 2006\.  _The long tail: Why the future of business is selling less of more_.  Hachette Books.
  * Bernardis et al. (2019) Cesare Bernardis, Maurizio Ferrari Dacrema, and Paolo Cremonesi. 2019\.  Estimating Confidence of Individual User Predictions in Item-Based Recommender Systems. In _Proceedings of the 27th ACM Conference on User Modeling, Adaptation and Personalization_ _(UMAP ’19)_. Association for Computing Machinery, New York, NY, USA, 149–156.  https://doi.org/10.1145/3320435.3320453
  * Cantador et al. (2011) Iván Cantador, Peter Brusilovsky, and Tsvi Kuflik. 2011\.  Second workshop on information heterogeneity and fusion in recommender systems (HetRec2011). In _Proceedings of the fifth ACM conference on Recommender systems_. ACM, New York, NY, USA, 387–388.
  * Channamsetty and Ekstrand (2017) Sushma Channamsetty and Michael D Ekstrand. 2017.  Recommender response to diversity and popularity bias in user profiles. In _The Thirtieth International Flairs Conference_.
  * Cremonesi et al. (2010) Paolo Cremonesi, Yehuda Koren, and Roberto Turrin. 2010\.  Performance of Recommender Algorithms on Top-n Recommendation Tasks. In _Proceedings of the Fourth ACM Conference on Recommender Systems_ _(RecSys ’10)_. Association for Computing Machinery, New York, NY, USA, 39–46.  https://doi.org/10.1145/1864708.1864721
  * Ferrari Dacrema et al. (2019) Maurizio Ferrari Dacrema, Paolo Cremonesi, and Dietmar Jannach. 2019\.  Are We Really Making Much Progress? A Worrying Analysis of Recent Neural Recommendation Approaches.  https://doi.org/10.1145/3298689.3347058
  * Funk (2006) Simon Funk. 2006\.  Netflix Update: Try This At Home.  _http://sifter.org/ simon/journal/20061211.html_ (2006).
  * Geng et al. (2015) Xue Geng, Hanwang Zhang, Jingwen Bian, and Tat-Seng Chua. 2015\.  Learning image and user features for recommendation in social networks. In _Proceedings of the IEEE International Conference on Computer Vision_. 4274–4282.
  * Harper and Konstan (2015) F. Maxwell Harper and Joseph A. Konstan. 2015.  The MovieLens Datasets: History and Context.  _ACM Trans. Interact. Intell. Syst._ 4, Article 19 (Dec. 2015), 19 pages.  https://doi.org/10.1145/2827872
  * He et al. (2017) Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu, and Tat-Seng Chua. 2017\.  Neural collaborative filtering. In _Proceedings of the 26th international conference on world wide web_. 173–182.
  * Huang et al. (2017) Gao Huang, Yixuan Li, Geoff Pleiss, Zhuang Liu, John E Hopcroft, and Kilian Q Weinberger. 2017.  Snapshot ensembles: Train 1, get m for free.  _arXiv preprint arXiv:1704.00109_ (2017).
  * Izmailov et al. (2018) Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. 2018\.  Averaging weights leads to wider optima and better generalization.  _arXiv preprint arXiv:1803.05407_ (2018).
  * Jannach et al. (2013) Dietmar Jannach, Lukas Lerche, Fatih Gedikli, and Geoffray Bonnin. 2013.  What Recommenders Recommend – An Analysis of Accuracy, Popularity, and Sales Diversity Effects. In _User Modeling, Adaptation, and Personalization_ , Sandra Carberry, Stephan Weibelzahl, Alessandro Micarelli, and Giovanni Semeraro (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 25–37.
  * Koren (2008) Yehuda Koren. 2008\.  Factorization Meets the Neighborhood: A Multifaceted Collaborative Filtering Model _(KDD ’08)_. Association for Computing Machinery, New York, NY, USA, 426–434.  https://doi.org/10.1145/1401890.1401944
  * Koren et al. (2009) Yehuda Koren, Robert Bell, and Chris Volinsky. 2009\.  Matrix factorization techniques for recommender systems.  _Computer_ 42, 8 (2009), 30–37.
  * Liang et al. (2016) Dawen Liang, Jaan Altosaar, Laurent Charlin, and David M Blei. 2016.  Factorization meets the item embedding: Regularizing matrix factorization with item co-occurrence. In _Proceedings of the 10th ACM conference on recommender systems_. 59–66.
  * Madhyastha and Jain (2019) Pranava Madhyastha and Rishabh Jain. 2019.  On Model Stability as a Function of Random Seed.  _arXiv preprint arXiv:1909.10447_ (2019).
  * Mikolov et al. (2013) Tomáš Mikolov, Wen-tau Yih, and Geoffrey Zweig. 2013\.  Linguistic regularities in continuous space word representations. In _Proceedings of the 2013 conference of the north american chapter of the association for computational linguistics: Human language technologies_. 746–751.
  * Mobasher et al. (2007) Bamshad Mobasher, Robin Burke, Runa Bhaumik, and Jeff J Sandvig. 2007.  Attacks and remedies in collaborative recommendation.  _IEEE Intelligent Systems_ 22, 3 (2007), 56–63.
  * Ning and Karypis (2011) X. Ning and G. Karypis. 2011.  SLIM: Sparse Linear Methods for Top-N Recommender Systems. In _2011 IEEE 11th International Conference on Data Mining_. 497–506.
  * Nova et al. (2014) David Nova, Pablo A. Estévez, and Pablo Huijse. 2014\.  K-Nearest Neighbor Nonnegative Matrix Factorization for Learning a Mixture of Local SOM Models. In _Advances in Self-Organizing Maps and Learning Vector Quantization_ , Thomas Villmann, Frank-Michael Schleif, Marika Kaden, and Mandy Lange (Eds.). Springer International Publishing, Cham, 229–238.
  * Rendle et al. (2012) Steffen Rendle, Christoph Freudenthaler, Zeno Gantner, and Lars Schmidt-Thieme. 2012.  BPR: Bayesian Personalized Ranking from Implicit Feedback.  _CoRR_ abs/1205.2618 (2012).  arXiv:1205.2618 http://arxiv.org/abs/1205.2618
  * Ricci et al. (2010) Francesco Ricci, Lior Rokach, Bracha Shapira, and Paul B. Kantor. 2010.  _Recommender Systems Handbook_ (1st ed.).  Springer-Verlag, Berlin, Heidelberg.
  * Ruder (2016) Sebastian Ruder. 2016\.  An overview of gradient descent optimization algorithms.  _arXiv preprint arXiv:1609.04747_ (2016).
  * Said and Bellogín (2018) Alan Said and Alejandro Bellogín. 2018.  Coherence and inconsistencies in rating behavior: estimating the magic barrier of recommender systems.  _User Modeling and User-Adapted Interaction_ 28, 2 (2018), 97–125.
  * Said et al. (2012) Alan Said, Brijnesh J Jain, Sascha Narr, and Till Plumbaum. 2012\.  Users and noise: The magic barrier of recommender systems. In _International Conference on User Modeling, Adaptation, and Personalization_. Springer, 237–248.
  * Salakhutdinov and Mnih (2007) Ruslan Salakhutdinov and Andriy Mnih. 2007.  Probabilistic Matrix Factorization. In _Proceedings of the 20th International Conference on Neural Information Processing Systems_ _(NIPS ’07)_. Curran Associates Inc., USA, 1257–1264.  http://dl.acm.org/citation.cfm?id=2981562.2981720
  * Skurichina and Duin (1998) Marina Skurichina and Robert PW Duin. 1998.  Bagging for linear classifiers.  _Pattern Recognition_ 31, 7 (1998), 909–930.
  * Tintarev and Masthoff (2007) Nava Tintarev and Judith Masthoff. 2007.  A survey of explanations in recommender systems. In _2007 IEEE 23rd international conference on data engineering workshop_. IEEE, 801–810.
  * Wang et al. (2013) Hao Wang, Binyi Chen, and Wu-Jun Li. 2013.  Collaborative Topic Regression with Social Regularization for Tag Recommendation. In _IJCAI_.
  * Xue et al. (2017) Hong-Jian Xue, Xinyu Dai, Jianbing Zhang, Shujian Huang, and Jiajun Chen. 2017.  Deep Matrix Factorization Models for Recommender Systems.. In _IJCAI_. 3203–3209.
  * Ziegler et al. (2005) Cai-Nicolas Ziegler, Sean M. McNee, Joseph A. Konstan, and Georg Lausen. 2005.  Improving Recommendation Lists through Topic Diversification. In _Proceedings of the 14th International Conference on World Wide Web_ _(WWW ’05)_. Association for Computing Machinery, New York, NY, USA, 22–32.  https://doi.org/10.1145/1060745.1060754


# On-shell action of T$\bar{\text{T}}$-deformed Holographic CFTs

Jia<EMAIL_ADDRESS>
###### Abstract

In this work, we study the holographic dual of the T$\overline{\text{T}}$
deformation following the mixed boundary condition proposal. We point out that
a boundary term should be included in the gravity action in the holographic
dictionary. In particular, we consider the deformed CFT defined on a sphere
(dS) or AdS background and explain the difference between the holographic
results and field theory results.

Kavli Institute for Theoretical Sciences (KITS),
University of Chinese Academy of Science, 100190 Beijing, P. R. China

###### Contents

  1. 1 Introduction
  2. 2 Holographic dictionary of T$\overline{\text{T}}$ deformed theories
    1. 2.1 Setup
    2. 2.2 The On-shell action
  3. 3 Examples
    1. 3.1 Torus background: the thermal state in flat spacetime
    2. 3.2 Conical background: the primary state in flat spacetime
    3. 3.3 Non-flat boundary
    4. 3.4 Sphere background in the vacuum state
    5. 3.5 Poincar$\acute{\text{e}}$ disk background in the vacuum state
  4. 4 Conclusion and Discussion
  5. A Convention and Notation
  6. B Sphere partition functions

##  1 Introduction

The T$\overline{\text{T}}$ deformations [1, 2] have been studied extensively
in recent years due to their remarkable properties [3, 4]. From the
perspective of quantum gravity, the two most appealing properties are that the
deformed theory is conjectured to be non-local but UV complete and that the
deformations have interesting applications to AdS/CFT holography [5, 6, 7].

The holographic dual of the T$\overline{\text{T}}$ deformation of a
holographic CFT is a bulk gravity theory with mixed boundary conditions for
the bulk fields[8]. The holographic dictionary for the T$\overline{\text{T}}$
-deformed theories can be summarized as [3] 222the notation will become clear
in a moment.

$\displaystyle Z_{\text{T$\overline{\text{T}}$
,CFT}}[\gamma^{[\mu]}_{\alpha\beta}]=Z_{\text{grav}}\left[g_{\alpha\beta}^{(0)}+\frac{\mu}{16\pi
G_{N}}g_{\alpha\beta}^{(2)}+\frac{\mu^{2}}{(16\pi
G_{N})^{2}}g_{\alpha\beta}^{(4)}=\gamma^{[\mu]}_{\alpha\beta}\right],$ (1)

where $\mu$ is the deformation parameter. Another well-used holographic
proposal is the geometric bulk cut-off proposal [9, 10] (or glue-on proposal
[11]) which has some limitations as explained in [8]. However, the cut-off
proposal is simpler to apply. For example, it is proposed that the
entanglement entropy can be computed by the Ryu-Takayanagi (RT) formula [12]
in the cut-off geometry, and for vacuum states the result agrees with the
field theory calculations [13]. But a disagreement has also been found in [14]
when they considered the deformed entanglement entropy of a thermal state. In
this paper, we want to argue that the RT formula does not give the full answer
of the entanglement entropy because there is an extra term in the gravity
action.

The key observation of us is that in the dictionary (1) we should add a proper
boundary term to the gravity action333Perhaps this is already hidden written
in[8].. The presence of this boundary term is natural considering that the
double trace deformation not only shifts the source but also shifts the
generating function [16, 17]. We will compute several examples explicitly to
confirm this observation. Shifting the action by a universal constant will
only change the entanglement entropy by some constant which can be absorbed
into the UV cut-off. However, if the entanglement entropy does not depend on
the UV cut-off or the constant is not universal but state-dependent then this
constant should have physical meaning and the correct RT formula should
capture it.

Usually T$\overline{\text{T}}$ deformation is only well defined for the
theories on flat spacetime. For example, the important factorization property
of the T$\overline{\text{T}}$ operator will lose on a general curved
background [18]. However for holographic CFTs, in the large $N$ limit,
composite operators always factorize and the dictionary (1) applies to
arbitrary 2-dimensional (2d) backgrounds even though constructing the general
bulk dual is very challenging. By restricting our considerations to the vacuum
state and a curved background with a constant Ricci curvature, we find that
the construction of the bulk dual can be simplified to solve the well-known
and integrable Liouville equation. The partition function of the
T$\overline{\text{T}}$ -deformed CFT on a sphere in the vacuum state has been
derived in [13] by solving the flow equation directly. Our holographic result
differs from it by a universal Weyl anomaly constant which is proportional to
the Euler character of the background and a $\mu$–dependent constant. From a
deformation perspective, our holographic result is favored because it has an
undeformed limit. In contrast, the partition function derived in [13] diverges
in the limit $\mu\rightarrow 0$. The Weyl anomaly constant is also important.
It turns out that it will cancel out the UV divergence in the entanglement
entropy. From our point of view, this cancellation explains why in [13] the
entanglement entropy is UV finite. We further consider the AdS background.
Because the AdS space is not compact the on-shell action is divergent however
the holographic entanglement entropy can be computed in the same way and the
result is similar to the one in the sphere background case.

##  2 Holographic dictionary of T$\overline{\text{T}}$ deformed theories

In this section, we briefly review the derivation of the holographic
dictionary (1). The derivation [8] is based on the variational principle and
the holographic dual of the double-trace deformation [16, 17]. Our convention
and notation are summarized in Appendix A.

###  2.1 Setup

The T$\overline{\text{T}}$ deformation of 2d field theory with action
$S_{\text{CFT}}$ is defined by the flow equation

$\displaystyle\frac{dS^{[\mu]}_{\text{CFT}}}{d\mu}=\int
d^{2}x\sqrt{\gamma}\,\text{T}\bar{\text{T}}^{[\mu]},$ (2.1)

where in principle the 2d background can be arbitrary. In the linear order,
the deformation is just a double trace deformation

$\displaystyle S_{CFT}^{[\mu]}=S_{CFT}+\mu\int
d^{2}x\sqrt{\gamma}\,\text{T$\overline{\text{T}}$ }+\mathcal{O}(\mu^{2}).$
(2.2)

The double trace deformation does two things to the generating function. It
shifts the source by the expectation value of the dual operator and it shifts
the generating function (or the on-shell action) by subtracting the double
trace operator, i.e.

$\displaystyle W^{[\mu]}=W_{0}-\mu\int
d^{2}x\sqrt{\gamma}\,\text{T$\overline{\text{T}}$ }.$ (2.3)

Using the defining property of the generating function $\delta
W=\frac{1}{2}\int
d^{2}x\sqrt{\gamma}T_{\alpha\beta}\delta\gamma^{\alpha\beta}$, we can obtain a
flow equation

$\displaystyle\frac{1}{2}\partial_{\mu}\left(\int
d^{2}x\sqrt{\gamma^{[\mu]}}T_{\alpha\beta}^{[\mu]}\delta\gamma_{\alpha\beta}^{[\mu]}\right)=-\delta\left(\int
d^{2}x\sqrt{\gamma^{[\mu]}}\text{T}\bar{\text{T}}^{[\mu]}\right),$ (2.4)

which can be solved by [8]

$\displaystyle\gamma_{\alpha\beta}^{[\mu]}=\gamma_{\alpha\beta}^{[0]}+\frac{1}{2}\mu\hat{T}_{\alpha\beta}^{[0]}+\frac{1}{16}\mu^{2}\hat{T}_{\alpha\rho}^{[0]}\hat{T}_{\sigma\beta}^{[0]}{\gamma^{[0]}}^{\rho\sigma},$
(2.5)
$\displaystyle\hat{T}^{[\mu]}_{\alpha\beta}=\hat{T}^{[0]}_{\alpha\beta}+\frac{1}{4}\mu\hat{T}_{\alpha\rho}^{[0]}\hat{T}_{\sigma\beta}^{[0]}{\gamma^{[0]}}^{\rho\sigma},$
(2.6)

where $\hat{T}_{\alpha\beta}=T_{\alpha\beta}-\gamma_{\alpha\beta}T$. The
proposal of [8] is that $\gamma^{[\mu]}_{\alpha\beta}$ and
$T^{[\mu]}_{\alpha\beta}$ are the sources and dual operators of the deformed
holographic theory which is still an asymptotic AdS3 gravity theory. The
general asymptotic AdS3 solution can be written in the Fefferman-Graham gauge
like [20]

$\displaystyle
ds^{2}=g_{\alpha\beta}(\rho,x^{\alpha})dx^{\alpha}dx^{\beta}+\frac{d\rho^{2}}{4\rho^{2}},\quad
g_{\alpha\beta}(\rho,x^{\alpha})=\frac{g_{\alpha\beta}^{(0)}}{\rho}+g_{\alpha\beta}^{(2)}+\rho
g_{\alpha\beta}^{(4)},$ (2.7)

where $g^{(2)}$ corresponds to the initial expectation value of the CFT
operator

$\displaystyle\hat{T}^{[0]}_{\alpha\beta}=\frac{1}{8\pi
G_{N}}g_{\alpha\beta}^{(2)}.$ (2.8)

The solution (2.5) implies that the deformed boundary metric is

$\displaystyle\gamma_{\alpha\beta}^{[\mu]}=g_{\alpha\beta}^{(0)}+\frac{\mu}{16\pi
G_{N}}g_{\alpha\beta}^{(2)}+\frac{\mu^{2}}{(16\pi
G_{N})^{2}}g_{\alpha\beta}^{(4)}=\rho_{c}g_{\alpha\beta}(\rho_{c}),\quad\rho_{c}=\frac{\mu}{16\pi
G_{N}},$ (2.9)

which gives the holographic dictionary (1) as proposed in [8]. The dictionary
seems to suggest that the on-shell action of the holographic theory is simply

$\displaystyle
I_{\text{Euclidean}}^{[\mu]}=I_{\text{Euclidean}}^{[0]}\left(\gamma^{[\mu]}_{\alpha\beta}=g_{\alpha\beta}^{(0)}+\frac{\mu}{16\pi
G_{N}}g_{\alpha\beta}^{(2)}+\frac{\mu^{2}}{(16\pi
G_{N})^{2}}g_{\alpha\beta}^{(4)}\right).$ (2.10)

But we will show that it is not correct. The proper on-shell action should be

$\displaystyle I_{\text{on-shell}}^{[\mu]}$ $\displaystyle=$ $\displaystyle
I_{\text{Euclidean}}^{[0]}\left(\gamma^{[\mu]}_{\alpha\beta}=g_{\alpha\beta}^{(0)}+\frac{\mu}{16\pi
G_{N}}g_{\alpha\beta}^{(2)}+\frac{\mu^{2}}{(16\pi
G_{N})^{2}}g_{\alpha\beta}^{(4)}\right)-\mu\int\sqrt{\gamma^{[\mu]}}\text{T}\bar{\text{T}}^{[\mu]}$
(2.11) $\displaystyle\equiv$ $\displaystyle
I_{\text{bulk}}^{[\mu]}+I_{\text{bdy}}^{[\mu]},$

which is similar to the one (2.3) of double trace deformation. The second term
is a surface integral and it will not modify the bulk equation of motion. But
it contributes to the on-shell action and it is necessary to include it if we
want to compute the correlation functions or entanglement entropy correctly.
For example, it will potentially modify the description of the RT surface
which we also comment on below. Using (2.5) and (2.6) one can show that
$\sqrt{\gamma}\text{T$\overline{\text{T}}$ }$ is invariant under the flow so
the boundary term in (2.11) can also be written as

$\displaystyle-\mu\int\sqrt{\gamma^{[\mu]}}\text{T}\bar{\text{T}}^{[\mu]}=-\mu\int\sqrt{g^{[0]}}\text{T}\bar{\text{T}}^{[0]}.$
(2.12)

###  2.2 The On-shell action

Choosing the conformal gauge, the boundary metric can be written as

$\displaystyle g_{ij}^{(0)}dx^{i}dx^{j}=e^{\phi}dyd\bar{y},$ (2.13)

and complete 3d metric is given by [20] 444 The AdS radius $l$ is set to be
$1$.

$\displaystyle
ds^{2}=\frac{d\rho^{2}}{4\rho^{2}}+\frac{1}{\rho}e^{\phi}dyd\bar{y}+\frac{1}{2}\mathcal{T}_{\phi}dy^{2}+\frac{1}{2}\bar{\mathcal{T}}_{\phi}d\bar{y}^{2}+\frac{1}{4}R_{\phi}dyd\bar{y}$
$\displaystyle\quad+\frac{1}{4}\rho
e^{-\phi}(\mathcal{T}_{\phi}dy+\frac{1}{4}R_{\phi}d\bar{y})(\bar{\mathcal{T}}_{\phi}d\bar{y}+\frac{1}{4}R_{\phi}d{y}),$
(2.14)

where

$\displaystyle\mathcal{T}_{\phi}=\partial_{y}^{2}\phi-\frac{1}{2}(\partial_{y}\phi)^{2}+L(y),\quad\bar{\mathcal{T}}_{\phi}=\bar{\partial}_{y}^{2}\phi-\frac{1}{2}(\bar{\partial}_{y}\phi)^{2}+\bar{L}(\bar{y}),\quad
R_{\phi}=4\partial_{y}\bar{\partial}_{y}\phi$ (2.15)

and the boundary Ricci scalar for the metric $g_{ij}^{(0)}$ is
$R^{(0)}=-e^{-\phi}R_{\phi}$. $L(y)$ and $\bar{L}(\bar{y})$ are two arbitrary
functions that characterize different states of the holographic CFT. This bulk
solution is the most general AdS3 solution and it is a generalization of the
well-known Ba$\tilde{\text{n}}$ados geometry which has a flat boundary metric.
The vacuum state corresponds to the case when $L(y)=\bar{L}(\bar{y})=0$ and
the vacuum metric can be mapped to the Poincar$\acute{\text{e}}$ metric by
555For non-trivial $L(y)$ and $\bar{L}(\bar{y})$ the metric can also be mapped
to Poincar$\acute{\text{e}}$ metric since AdS3 gravity has no local degrees of
freedom but the transformation is much more complicated.

$\displaystyle\frac{1}{\eta}=\rho^{-1/2}e^{\phi/2}+\frac{1}{4}\rho^{1/2}e^{-\phi/2}|\partial_{y}\phi|^{2},\quad
z=y+\frac{1}{2}\frac{\rho e^{-\phi}\bar{\partial}_{y}\phi}{1+\frac{1}{4}\rho
e^{-\phi}|\partial_{y}\phi|^{2}},$ (2.16)

with the resulting metric

$\displaystyle ds^{2}=\frac{d\eta^{2}+dzd\bar{z}}{\eta^{2}}.$ (2.17)

The 3d Euclidean AdS Einstein gravity has the action

$\displaystyle I_{E}^{[0]}=\frac{1}{16\pi
G_{N}}\left(-\int_{B}\sqrt{h}(R+2)-2\int_{\partial
B}\sqrt{\gamma}K+2\int_{\partial B}\sqrt{\gamma}\right).$ (2.18)

Here $\partial B$ is the UV regulator surface which is usually chosen to be at

$\displaystyle\rho_{UV}=\delta^{2},$ (2.19)

which implies

$\displaystyle\sqrt{h}=\sqrt{g^{(0)}}\left(\frac{1}{2\rho^{2}}+\frac{e^{-\phi}R_{\phi}}{8\rho}+\frac{e^{-2\phi}}{128}(R_{\phi}^{2}-16\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi})\right),$
(2.20)
$\displaystyle\sqrt{\gamma}=\sqrt{g^{(0)}}\left(\frac{1}{\delta^{2}}+\frac{e^{-\phi}R_{\phi}}{4}+\frac{e^{-2\phi}}{64}(R_{\phi}^{2}-16\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi})\delta^{2}\right),$
(2.21)
$\displaystyle\sqrt{\gamma}K=\sqrt{g^{(0)}}\left(\frac{2}{\delta^{2}}-\frac{e^{-2\phi}}{32}(R_{\phi}^{2}-16\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi})\delta^{2}\right).$
(2.22)

The 3d metric degenerates at the positions where $\sqrt{h}=0$ which has two
solutions

$\displaystyle\rho_{\pm}=\frac{8e^{\phi}}{-R_{\phi}\pm
4\sqrt{\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi}}}.$ (2.23)

When $\rho_{+}>0$, we should only include the spacetime below the curve
$\rho_{H}=\rho_{+}$. Then the on-shell action is equal to

$\displaystyle I_{E}^{[0]}=-\frac{1}{16\pi G_{N}}\int_{\partial
B}\sqrt{g^{(0)}}\left(\frac{1}{2}R^{(0)}(1+\log{\rho_{H}})+2\sqrt{\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi}}\right)+\frac{c}{6}\chi(\partial
B)\log\delta,$ (2.24)

where we have used the relation $c=\frac{3}{2G_{N}}$ and $\chi(\partial B)$
denotes the Euler character of the boundary manifold $\partial B$. The second
term is divergent but universal which captures the Weyl anomaly. Sometimes in
the literature, the second term is ignored so that the on-shell action is
finite. But later we will see that this term will contribute to the
entanglement entropy. When the boundary metric is flat and $\chi=0$, the on-
shell action reduces to

$\displaystyle
I_{E}^{[0]}=-\frac{c}{12\pi}\int\sqrt{g^{(0)}}{\sqrt{\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi}}}.$
(2.25)

To compute the first term in the deformed on-shell action (2.11), we only need
to choose the physical metric $\gamma^{[\mu]}$ on which the deformed theory is
defined, solve the bulk metric according to the holographic dictionary and
then substitute the results into the general formula (2.24). To compute the
boundary term we use the holographic dictionary (2.8) and the result is

$\displaystyle-\mu\int\sqrt{g^{(0)}}\text{T}\bar{\text{T}}^{[0]}=\frac{\mu}{4096G_{N}^{2}\pi^{2}}\int\sqrt{g^{(0)}}e^{-2\phi}\left(R_{\phi}^{2}-16\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi}\right),$
(2.26)

which in the flat limit reduces to

$\displaystyle-\frac{\mu
c^{2}}{576\pi^{2}}\int\sqrt{g^{(0)}}\mathcal{T}_{\phi}\bar{\mathcal{T}}_{\phi}.$
(2.27)

##  3 Examples

###  3.1 Torus background: the thermal state in flat spacetime

The thermal state in flat spacetime corresponds to choosing the following
parameters

$\displaystyle\phi=0,\quad\mathcal{T}_{\phi}=\bar{\mathcal{T}}_{\phi}=2L_{0},$
(3.1)

where $L_{0}$ is some constant. The bulk geometry is the BTZ black hole whose
metric is

$\displaystyle
ds^{2}=\frac{d\rho^{2}}{4\rho^{2}}+\frac{(1+L_{0}\rho)^{2}dx^{2}+(-1+L_{0}\rho)^{2}d\tau^{2}}{\rho}$
(3.2)

and the asymptotic boundary manifold is a torus with the spatial and thermal
period being $w_{0},\beta_{0}=\pi/\sqrt{L_{0}}$, respectively. Using (2.25),
we can get the on-shell action

$\displaystyle
I_{E}^{[0]}=-\frac{c}{12\pi}\omega_{0}\beta_{0}(2L_{0})=-\frac{c\pi}{6}\frac{\omega_{0}}{\beta_{0}}.$
(3.3)

When the deformed metric is flat so is the boundary metric and these two
metrics are related by a coordinate transformation [8] which is reminiscent of
the dynamical coordinate transformation interpretation of
T$\overline{\text{T}}$ deformation introduced in [22, 23].

According to the dictionary (1), this bulk solution (3.2) is dual to the
deformed theory defined on the 2d torus with metric666Note that here
$\rho_{c}$ can be both positive and negative.

$\displaystyle
ds^{2}=(L_{0}\rho_{c}+1)^{2}dx^{2}+(L_{0}\rho_{c}-1)^{2}d\tau^{2}\equiv
dX^{2}+dY^{2},$ (3.4)

whose spatial and thermal period $w,\beta$ are related by $w_{0},\beta_{0}$
via

$\displaystyle\beta_{0}=\frac{1}{2}\left(\beta+\sqrt{\beta^{2}+4\pi^{2}{\rho_{c}}}\right),\quad\omega_{0}=\frac{1}{2}\omega\left(\frac{\beta}{\sqrt{\beta^{2}+4\pi^{2}\rho_{c}}}+1\right).$
(3.5)

Therefore the bulk part of the deformed on-shell action is simply given by
substituting (3.5) into (3.3)

$\displaystyle I_{\text{bulk}}^{[\mu]}$ $\displaystyle=$
$\displaystyle-\frac{c\pi}{6}\frac{\omega_{0}}{\beta_{0}}=-\frac{c\pi}{6}\frac{\omega}{\sqrt{\beta^{2}+4\pi^{2}\rho_{c}}}$
(3.6) $\displaystyle=$
$\displaystyle-\frac{c\pi}{6}\frac{\omega}{\beta}+\frac{c\pi^{3}\omega\rho_{c}}{3\beta^{3}}+\mathcal{O}(\rho_{c}^{2}),$
(3.7)

and the boundary part is

$\displaystyle I_{\text{bdy}}^{[\mu]}$ $\displaystyle=$
$\displaystyle-\mu\int\sqrt{\gamma^{[0]}}\langle\text{T$\overline{\text{T}}$
}\rangle=-\mu\int\left(\frac{L_{0}}{8\pi
G_{N}}\right)^{2}=-\frac{\mu\omega_{0}\beta_{0}}{(8\pi
G)^{2}}\left(\frac{\pi^{2}}{\beta_{0}^{2}}\right)^{2}$ (3.8) $\displaystyle=$
$\displaystyle-\frac{2c\rho_{c}\pi^{3}w}{3\sqrt{4\pi^{2}\rho_{c}+\beta^{2}}(\beta+\sqrt{4\pi^{2}\rho_{c}+\beta^{2}})^{2}}=-\frac{c\pi^{3}w\rho_{c}}{6\beta^{3}}+\mathcal{O}(\rho_{c}^{2}).$

Adding these two terms together we get the final deformed on-shell action

$\displaystyle I_{\text{on-shell}}^{[\mu]}$ $\displaystyle=$
$\displaystyle\frac{c\omega(\beta-\sqrt{\beta^{2}+4\pi^{2}\rho_{c}})}{12\pi\rho_{c}}=-\frac{c\pi\omega}{6\beta}+\frac{c\pi^{3}\omega\rho_{c}}{6\beta^{3}}+\mathcal{O}(\rho^{2}_{c})$
(3.9) $\displaystyle=$ $\displaystyle I_{\text{on-
shell}}^{[0]}+\mu\int\sqrt{\gamma^{[0]}}\langle\text{T$\overline{\text{T}}$
}\rangle+\mathcal{O}(\rho^{2}_{c}),$ (3.10)

which matches the perturbative results of the field theory.

To verify the proposal of the on-shell action. Let us consider the
entanglement entropy of the whole spatial circle. Using the replica trick, the
R$\acute{\text{e}}$nyi entropy can be computed as

$\displaystyle S_{n}$ $\displaystyle=$
$\displaystyle\frac{1}{1-n}\log\frac{Z_{n}}{Z_{1}^{n}}=\frac{1}{1-n}\log\frac{e^{-I^{[\mu]}_{\text{on-
shell}}(n\beta)}}{e^{-nI^{[\mu]}_{\text{on-
shell}}(\beta)}}=\frac{c\omega\left(n\sqrt{4\pi^{2}\rho_{c}+\beta^{2}}-\sqrt{4\pi^{2}\rho_{c}+n^{2}\beta^{2}}\right)}{12(n-1)\pi\rho_{c}}$
(3.11) $\displaystyle=$
$\displaystyle\frac{c\pi\omega}{3\sqrt{4\pi^{2}\rho_{c}+\beta^{2}}}-\frac{(n-1)c\pi\omega\beta^{2}}{6(4\pi^{2}\rho_{c}+\beta^{2})^{3/2}}+\mathcal{O}((n-1)^{2}).$

Therefore the entanglement entropy is

$\displaystyle
S_{1}=\frac{c\pi\omega}{3\sqrt{4\pi^{2}\rho_{c}+\beta^{2}}}=\frac{c\pi
w_{0}}{3\beta_{0}}=\frac{\gamma}{4G_{N}},$ (3.12)

which agrees with the RT formula.

###  3.2 Conical background: the primary state in flat spacetime

Let us start from the vacuum Poincar$\acute{\text{e}}$ AdS3 metric

$\displaystyle ds^{2}=\frac{dwd\bar{w}+dz^{2}}{z^{2}},$ (3.13)

and consider the conformal transformation $w=y^{n},\bar{w}=\bar{y}^{n}$. Using
the Ba$\tilde{\text{n}}$ados map [26] we obtain a excited bulk geometry in the
form (2.2) with

$\displaystyle\phi=0,\quad\mathcal{T}_{\phi}=\frac{n^{2}-1}{2y^{2}}\equiv\frac{2a^{2}}{y^{2}},\quad\bar{\mathcal{T}}_{\phi}=\frac{2a^{2}}{\bar{y}^{2}}.$
(3.14)

In the radial coordinates the 3d metric is

$\displaystyle
ds^{2}=\frac{d\rho^{2}}{4\rho^{2}}+\frac{1}{\rho}\left((1+\frac{a^{2}\rho}{r^{2}})^{2}dr^{2}+(r-\frac{a^{2}\rho}{r})^{2}d\theta^{2}\right),$
(3.15)

which degenerates at $\rho_{H}=r^{2}/a^{2}$, so we only need to consider the
spacetime below it. The boundary manifold has a conical singularity at $r=0$
since $\theta\sim\theta+2\pi/n$. Using (2.25) we can get the on-shell action

$\displaystyle
I_{E}^{[0]}=-\frac{c}{12\pi}\int_{\epsilon_{0}}^{\Lambda_{0}}rdr\int_{0}^{\frac{2\pi}{n}}d\theta\,\frac{2a^{2}}{r^{2}}=-\frac{ca^{2}}{3n}\log\frac{\Lambda_{0}}{\epsilon_{0}}.$
(3.16)

The bulk solution (3.15) is dual to the deformed theory which is defined on
the 2d disk with metric

$\displaystyle
ds^{2}=(1+\frac{a^{2}\rho_{c}}{r^{2}})^{2}dr^{2}+(r-\frac{a^{2}\rho_{c}}{r})^{2}d\theta^{2}\equiv
dR^{2}+R^{2}d\theta^{2},$ (3.17)

where

$\displaystyle r=\frac{1}{2}\left(\sqrt{R^{2}+4a^{2}\rho_{c}}+R\right).$
(3.18)

Then the deformed on-shell action is given by

$\displaystyle I_{\text{on-
shell}}^{[\mu]}=-\frac{ca^{2}}{3n}\log\frac{\Lambda_{0}}{\epsilon_{0}}-\mu\int\sqrt{\gamma^{[0]}}\langle\text{T$\overline{\text{T}}$
}\rangle$
$\displaystyle=-\frac{ca^{2}}{3n}\log\frac{\Lambda+\sqrt{4a^{2}\rho_{c}+\Lambda^{2}}}{\epsilon+\sqrt{4a^{2}\rho_{c}+\epsilon^{2}}}+\frac{2a^{4}c\rho_{c}}{3n}\left(\frac{1}{\left(\Lambda+\sqrt{4a^{2}\rho_{c}+\Lambda^{2}}\right)^{2}}-\frac{1}{\left(\epsilon+\sqrt{4a^{2}\rho_{c}+\epsilon^{2}}\right)^{2}}\right)$
$\displaystyle=\frac{a^{2}c}{3n}\log\frac{\epsilon}{\Lambda}+\frac{a^{4}c\rho_{c}}{6n}\left(\frac{1}{\epsilon^{2}}-\frac{1}{\Lambda^{2}}\right)+\mathcal{O}(\rho_{c}^{2})=I_{\text{on-
shell}}^{[0]}+\mu\int\sqrt{\gamma^{[0]}}\langle\text{T$\overline{\text{T}}$
}\rangle+\mathcal{O}(\rho_{c}^{2})$ (3.19)

as desired.

###  3.3 Non-flat boundary

The general bulk solution (2.2) depends on three arbitrary functions
$\phi(y,\bar{y}),L(y)$ and $\bar{L}(\bar{y})$. It is either dual to a CFT
defined on the boundary with metric $g_{\mu\nu}^{[0]}$ or dual to a
T$\overline{\text{T}}$ -deformed QFT defined on a 2d manifold with metric

$\displaystyle\gamma_{\alpha\beta}^{[\mu]}dx^{\alpha}dx^{\beta}$
$\displaystyle=$
$\displaystyle\frac{(8-R^{(0)}\rho_{c})^{2}}{64}e^{\phi}\left(dy+\frac{4\rho_{c}e^{-\phi}\bar{\mathcal{T}}_{\phi}}{8-R^{(0)}\rho_{c}}d\bar{y}\right)\left(d\bar{y}+\frac{4\rho_{c}e^{-\phi}\mathcal{T}_{\phi}}{8-R^{(0)}\rho_{c}}d{y}\right)$
(3.20) $\displaystyle\equiv$ $\displaystyle e^{\sigma}dUd\bar{U},$ (3.21)

where the two metrics are related by a coordinate transformation and a Weyl
transformation [27] as

$\displaystyle\lambda(y,\bar{y})\left(dy+\frac{4\rho_{c}e^{-\phi}\bar{\mathcal{T}}_{\phi}}{8-R^{(0)}\rho_{c}}d\bar{y}\right)=dU,\quad\bar{\lambda}(y,\bar{y})\left(d\bar{y}+\frac{4\rho_{c}e^{-\phi}\mathcal{T}_{\phi}}{8-R^{(0)}\rho_{c}}d{y}\right)=d\bar{U},$
(3.22) $\displaystyle
e^{\sigma}=\frac{(8-R^{(0)}\rho_{c})^{2}}{64\lambda\bar{\lambda}}e^{\phi}.$
(3.23)

The two functions $\lambda$ and $\bar{\lambda}$ are integrating factors that
are usually hard to determine but they do exist according to the theory of
differential equations. In particular, they are not unique because the
conformal gauge is not unique. If $\lambda,\bar{\lambda}$ are proper
integrating factors then $F(U(y,\bar{y}))\lambda$ and
$\bar{F}(\bar{U}(y,\bar{y}))\bar{\lambda}$ are also good integrating factors.
When the boundary manifold is flat i.e. $\phi=0$ we can choose
$\lambda=\bar{\lambda}=1$ such that

$\displaystyle
dU=dy+\frac{1}{2}\bar{\mathcal{T}}_{\phi}(\bar{y})d\bar{y},\quad
d\bar{U}=d\bar{y}+\frac{1}{2}{\mathcal{T}}_{\phi}({y})d{y},\quad
e^{\sigma}=\frac{1}{8},$ (3.24)

which implies that metric $\gamma_{\alpha\beta}$ is also flat. In general, if
we choose an arbitrary $\gamma_{\alpha\beta}$ it is very challenging to
construct the bulk solution. Below we will consider some special cases where
the metric $\gamma_{\alpha\beta}$ is maximally symmetric.

###  3.4 Sphere background in the vacuum state

To fix $\gamma_{\alpha\beta}^{[\mu]}$ to be a sphere, one should start from
the general metric (3.20) and solve the Einstein equation
$R^{[\mu]}=-\Lambda,\,\Lambda<0$. However, for the special case $L=\bar{L}=0$
which corresponds to the ground state, it turns out that if the boundary
metric $g_{\alpha\beta}^{[0]}$ is a sphere then $\gamma_{\alpha\beta}^{[\mu]}$
is also a sphere but with a different radius. The boundary Einstein equation
$R^{(0)}=-\Lambda_{0}$ is much simpler to solve because it is just the famous
Liouville equation

$\displaystyle 4\partial_{y}\partial_{\bar{y}}\phi-e^{\phi}\Lambda_{0}=0,$
(3.25)

whose solution is

$\displaystyle\phi=-2\log(1+y\bar{y})+\log(\frac{-8}{\Lambda_{0}}),\quad\Lambda_{0}<0.$
(3.26)

The resulting 3d metric can be written as

$\displaystyle
ds^{2}=\frac{d\rho^{2}}{4\rho^{2}}+\frac{(8+\Lambda_{0}\rho)^{2}}{(-8\Lambda_{0})(1+\kappa^{2})^{2}\rho}(d\kappa^{2}+\kappa^{2}d\varphi^{2}),\quad
y=\kappa e^{\text{i}\varphi},$ (3.27)

which can be transformed into the AdS global coordinates

$\displaystyle
ds^{2}={d\tilde{\rho}^{2}}+\sinh^{2}\tilde{\rho}(d\theta^{2}+\sin^{2}\theta
d\varphi^{2})$ (3.28)

via the coordinate transformation

$\displaystyle\theta=2\arctan\kappa,\quad\sinh\tilde{\rho}=\frac{8+\Lambda_{0}\rho}{\sqrt{-32\Lambda_{0}\rho}}.$
(3.29)

Using the dictionary (1) one can easily find that deformed metric

$\displaystyle
ds^{2}=-\frac{(8+\Lambda_{0}\rho_{c})^{2}}{8\Lambda_{0}(1+y\bar{y})^{2}}dyd\bar{y}\equiv-\frac{8}{\Lambda}\frac{dyd\bar{y}}{(1+y\bar{y})^{2}},$
(3.30)

indeed describes a sphere with a different radius given by

$\displaystyle\Lambda_{0}=-\frac{8(\rho_{c}\Lambda-4+2\sqrt{4-2\rho_{c}\Lambda})}{\rho_{c}^{2}\Lambda}.$
(3.31)

Ignoring the universal Weyl anomaly divergent term for a moment, the on-shell
action (2.24) for this geometry is

$\displaystyle
I_{\text{bulk}}^{[\mu]}=-\frac{c}{6}\left(1+\log\frac{8}{-\Lambda_{0}}\right)=\frac{c}{6}\left(1+\log\frac{\rho_{c}^{2}\Lambda}{\Lambda\rho_{c}-4+2\sqrt{4-2\Lambda\rho_{c}}}\right),$
(3.32) $\displaystyle
I_{\text{bdy}}^{[\mu]}=\frac{\mu}{4096G_{N}^{2}\pi^{2}}\int\sqrt{g^{[0]}}e^{-2\phi}R_{\phi}^{2}=-\frac{c\Lambda_{0}\rho_{c}}{48},$
(3.33) $\displaystyle I_{\text{on-
shell}}^{[\mu]}=I_{\text{bulk}}^{[\mu]}+I_{\text{bdy}}^{[\mu]}=-\frac{c}{6}\left(1+\log\frac{8}{-\Lambda}\right)+\frac{c\Lambda\rho_{c}}{48}+\mathcal{O}(\rho_{c}^{2}).$
(3.34)

Comparing with the results (C.8) of the field theory we see that they are
different by a $\mu$-dependent constant 777Note that the relation between the
Ricci scalar and the radius of the sphere is $\Lambda\to-\frac{2}{r^{2}}$.

$\displaystyle I_{\text{on-
shell}}^{[\mu]}-S_{QFT}^{\mu}=\frac{c}{6}\log\frac{24\pi}{c\mu}.$ (3.35)

This is because instead choosing the limit condition $S_{QFT}^{\mu}(r=0)=0$,
we have chosen a different scheme

$\displaystyle I_{\text{on-
shell}}^{[\mu]}(\Lambda=-\infty)=\frac{c}{6}\log\frac{24\pi}{c\mu}.$ (3.36)

The decision to set $S_{QFT}^{\mu}(r=0)=0$ in [13] is based on the assumption
that the action should become zero when the sphere collapses to a point. From
our perspective, it is not a favorable option as the action $S_{QFT}^{\mu}$
lacks an undeformed limit. In our approach, there is an ambiguity to choose
the UV cut-off when we define the regulated on-shell action and we have
specially chosen the one which has an undeformed limit. By using the replica
trick, one can show that shifting the on-shell action will shift the
entanglement entropy as

$\displaystyle I_{\text{on-shell}}\rightarrow I_{\text{on-shell}}+\alpha,\quad
S_{A}\rightarrow S_{A}-\alpha.$ (3.37)

Usually, this constant can be absorbed into the UV cut-off when the constant
is finite. When $\alpha$ is also infinite, the situation becomes very subtle.
For example, if we also include the Weyl anomaly contribution, the total
action should be

$\displaystyle I_{\text{on-shell,Weyl}}^{[\mu]}=I_{\text{on-
shell}}^{[\mu]}+\frac{c}{6}\log\delta^{2}.$ (3.38)

Note that if the entanglement entropy of the theory with the action
$I_{\text{on-shell,Weyl}}^{[\mu]}$ has a universal UV divergence

$\displaystyle\frac{c}{3}\log\frac{1}{\delta}$ (3.39)

then the theories with the action $I_{\text{on-shell}}^{[\mu]}$ and also
$S_{QFT}^{\mu}$ will not have it because it is canceled by the universal Weyl
anomaly. This is the reason why in [13], a UV finite entanglement entropy is
obtained. Have figured out how the entanglement entropy for different actions
is related to each other, let us compute the deformed entanglement entropy. It
turns out that the RT formula gives the correct result up to a constant.

It is useful to compute the undeformed entanglement entropy first. Let us
consider a single interval with two endpoints. Using the isometry of the
sphere we can always choose them to be $(\rho,y,\bar{y})=(\delta^{2},0,0)$ and
$(\rho,y,\bar{y})=(\delta^{2},\tan\frac{\theta_{0}}{2},\tan\frac{\theta_{0}}{2})$.
Then using the RT formula we can find the entanglement entropy

$\displaystyle
S_{A}=\frac{\gamma}{4G_{N}}=\frac{c}{6}\log\left(\frac{8\sin^{2}\frac{\theta_{0}}{2}}{-\Lambda_{0}\delta^{2}}\right).$
(3.40)

The geodesic length can be easily found by transforming the two points into
the Poincar$\acute{\text{e}}$ coordinates via (2.16). Then the deformed
entanglement entropy should be

$\displaystyle S_{A}^{(\mu)}$ $\displaystyle=$
$\displaystyle\frac{c}{6}\log\left(\frac{8\sin^{2}\frac{\theta_{0}}{2}}{-\Lambda_{0}\delta^{2}}\right)=\frac{c}{6}\log\left(\frac{\Lambda\rho_{c}^{2}\sin^{2}\left(\frac{\theta_{0}}{2}\right)}{\delta^{2}\left(2\sqrt{4-2\Lambda\rho_{c}}+\Lambda\rho_{c}-4\right)}\right),$
(3.41) $\displaystyle=$
$\displaystyle\frac{c}{6}\log\frac{8\sin^{2}\frac{\theta_{0}}{2}}{-\Lambda\delta^{2}}-\frac{c^{2}\Lambda\mu}{576\pi}+\mathcal{O}(\mu^{2}).$
(3.42)

For the special case when $\theta_{0}=\pi$, the result coincides with one in
[13] if we take accounts of the shift due to Weyl anomaly and the shift
between $I_{\text{on-shell}}^{[\mu]}$ and $S_{QFT}^{\mu}$. The other thing we
want to emphasize is that our result is valid for both signs of the
deformation parameter $\mu$.

###  3.5 Poincar$\acute{\text{e}}$ disk background in the vacuum state

The situation is very similar to the one with the sphere background. For
negative Ricci curvature, the solution of the Liouville equation is

$\displaystyle\phi=-2\log(1-y\bar{y})+\log(\frac{8}{\Lambda_{0}}),\quad\Lambda_{0}>0$
(3.43)

and the deformed metric is

$\displaystyle\gamma_{ij}^{(\mu)}dx^{i}dx^{j}=\frac{(8+\Lambda_{0}\rho_{c})^{2}}{8\Lambda_{0}(1-y\bar{y})^{2}}dyd\bar{y}\equiv\frac{8}{\Lambda}\frac{dyd\bar{y}}{(1-y\bar{y})^{2}},$
(3.44)

with

$\displaystyle\Lambda_{0}=-\frac{8\left(2\sqrt{4-2\Lambda\rho_{c}}+\Lambda\rho_{c}-4\right)}{\Lambda\rho_{c}^{2}}.$
(3.45)

Since the $AdS$ space is not compact, the on-shell action has an IR
divergence. So let us focus on the holographic entanglement entropy. For the
interval with endpoints at $(y,\bar{y})=(0,0)$ and $(a,a)$, the entanglement
entropy is

$\displaystyle S_{A}^{(\mu)}$ $\displaystyle=$
$\displaystyle\frac{c}{6}\log\frac{8a^{2}}{(\Lambda_{0}(1-a^{2})\delta^{2})}=\frac{c}{6}\log\left(\frac{a^{2}\Lambda\rho_{c}^{2}}{\left(a^{2}-1\right)\delta^{2}\left(2\sqrt{4-2\Lambda\rho_{c}}+\Lambda\rho_{c}-4\right)}\right).$
(3.46)

##  4 Conclusion and Discussion

In this paper, we want to emphasize that in the holographic dictionary (1) of
the T$\overline{\text{T}}$ -deformed CFTs the gravity action should also
include an additional boundary term. This appearance of this boundary term
inherits from the fact that the leading order T$\overline{\text{T}}$
deformation is a double trace deformation. We confirm this observation in some
explicit examples including the BTZ, conical spacetime and the vacuum state of
a holographic CFT defined in a sphere background.

This observation suggests that the RT formula may be modified to correctly
compute the holographic entanglement entropy of the T$\overline{\text{T}}$
deformed theories. We will address that in future work.

## Acknowledgments

I thank Huajia Wang for the valuable discussion and collaboration on related
topics. I also want to thank many of the members of KITS for interesting
related discussions. JT is supported by the National Youth Fund No.12105289
and funds from the UCAS program of special research associate.

##  Appendix A Convention and Notation

We are interested in 2d Euclidean spacetime and we define the holomorphic and
anti-holomorphic coordinates as

$\displaystyle z=x+\text{i}y,\quad\bar{z}=x-\text{i}y.$ (A.1)

The partition function is defined via the path integral

$\displaystyle Z=\int\mathcal{D}[\phi(x,y)]e^{-S[\phi(x,y)]},$ (A.2)

where $\phi(x,y)$ denotes all the dynamical fields and $S[\phi]$ is the
action. Assuming that the background metric is
$ds^{2}=g_{\alpha\beta}dx^{\alpha}dx^{\beta}$ then the energy-momentum tensor
is defined as

$\displaystyle T^{\alpha\beta}=-\frac{2}{\sqrt{g}}\frac{\delta S}{\delta
g_{\alpha\beta}}.$ (A.3)

In the coordinate of $(z,\bar{z})$, the energy-momentum tensor is

$\displaystyle
T_{zz}=\frac{1}{4}\left(T_{11}-T_{22}-\text{i}T_{12}-\text{i}T_{21}\right),$
(A.4) $\displaystyle
T_{\bar{z}\bar{z}}=\frac{1}{4}\left(T_{11}-T_{22}+\text{i}T_{12}+\text{i}T_{21}\right),$
(A.5) $\displaystyle
T_{z\bar{z}}=T_{\bar{z}z}=\frac{1}{4}\left(T_{11}+T_{22}\right)\equiv\Theta.$
(A.6)

For later convenience, we also introduce the renormalized energy-momentum
tensor

$\displaystyle T=-2\pi T_{zz},\quad\bar{T}=-2\pi T_{\bar{z}\bar{z}}.$ (A.7)

The T$\overline{\text{T}}$ composite operator is defined as

$\displaystyle\text{T$\overline{\text{T}}$
}\equiv\frac{1}{8}\left(T_{\alpha\beta}T^{\alpha\beta}-(T^{\alpha}_{\alpha})^{2}\right)=T_{zz}\bar{T}_{\bar{z}\bar{z}}-\Theta^{2}.$
(A.8)

We will also assume T$\overline{\text{T}}$ satisfies the factorization
property

$\displaystyle\langle\text{T$\overline{\text{T}}$
}\rangle=\frac{1}{8}\left(\langle T^{\alpha\beta}\rangle\langle
T_{\alpha\beta}\rangle-\langle T^{\alpha}_{\alpha}\rangle^{2}\right),$ (A.9)

which is true for field theories living on infinite Euclidean planes and
cylinders or in holographic CFTs. Then the deformed theory can also be defined
through the flow equation [9, 29]:

$\displaystyle\langle
T^{\alpha}_{\alpha}\rangle=\frac{c}{24\pi}R+\frac{\mu}{4}\left(\langle
T^{\alpha\beta}\rangle\langle T_{\alpha\beta}\rangle-\langle
T^{\alpha}_{\alpha}\rangle^{2}\right)$ (A.10)

together with the conservation equation $\nabla_{\alpha}\langle
T^{\alpha\beta}\rangle=0$.

##  Appendix B Sphere partition functions

In this appendix we re-derive the sphere partition function in our convention
following [13]. We consider the metric
$ds^{2}=e^{\sigma}(d\theta^{2}+\sin^{2}\theta d\phi^{2}),\quad\sigma=2\log r$.
Considering a small Weyl transformation

$\displaystyle\sigma\rightarrow\sigma+\delta\sigma,\quad
e^{\sigma}\rightarrow(1+\delta\sigma)e^{\sigma},$ (C.1) $\displaystyle
g_{\alpha\beta}\rightarrow(1+\delta\sigma)g_{\alpha\beta}$ (C.2)

the action changes as

$\displaystyle\delta S=-\frac{1}{2}\int\sqrt{g}\delta\sigma
T^{\alpha}_{\alpha}d^{2}x\quad\rightarrow\quad\frac{\delta
S}{\delta\sigma}=\frac{\delta S}{\delta r}\frac{\delta
r}{\delta\sigma}=-\frac{1}{2}\int\sqrt{g}T^{\alpha}_{\alpha}d^{2}x$ (C.3)

therefore

$\displaystyle\frac{d}{dr}\log Z=\frac{1}{r}\int
d^{2}x\sqrt{g}T_{\alpha}^{\alpha}.$ (C.4)

More generally if we include the boundary then

$\displaystyle\delta\log
Z=\frac{1}{2}\int_{M}d^{2}x\sqrt{g}T_{\alpha}^{\alpha}\delta\sigma+\frac{c}{24\pi}\int_{\partial
M}K\delta\sigma dl$ (C.5)

where $K$ is the geodesic curvature of the boundary. For the sphere, there are
no boundaries so we do not need to include the boundary term. Next, we want to
determine $T_{\alpha}^{\alpha}$ from the trace relation (A.10). The crucial
observation is that by symmetry the stress tensor takes the form
$T_{\alpha\beta}=\alpha g_{\alpha\beta}$. Substituting into the trace relation
gives

$\displaystyle\alpha=\frac{\sqrt{\frac{c\mu}{6\pi r^{2}}+4}-2}{\mu}.$ (C.6)

thus

$\displaystyle\frac{d\log Z}{dr}=\frac{8\pi r\left(\sqrt{\frac{c\mu}{6\pi
r^{2}}+4}-2\right)}{\mu}=-\frac{dS_{\text{QFT}}^{\mu}}{dr}.$ (C.7)

Integrating both sides and imposing the initial condition
$S_{\text{QFT}}^{\mu}(r=0)=0$ gives

$\displaystyle S_{\text{QFT}}^{\mu}$ $\displaystyle=$
$\displaystyle-\frac{i\pi
c\mu+4\sqrt{6\pi}r^{2}\sqrt{\frac{c\mu}{r^{2}}+24\pi}+2c\mu\tanh^{-1}\left(\sqrt{\frac{c\mu}{24\pi
r^{2}}+1}\right)-48\pi r^{2}}{6\mu}$ (C.8) $\displaystyle=$
$\displaystyle-4\sqrt{\frac{2\pi c}{3\mu}}r+\frac{8\pi
r^{2}}{\mu}+\mathcal{O}(r^{3})$ (C.9)

or

$\displaystyle
S_{\text{QFT}}^{\mu}=-\frac{c}{6}+\frac{c}{6}\log\frac{c\mu}{96\pi
r^{2}}-\frac{c^{2}\mu}{576\pi r^{2}}+\mathcal{O}(\mu^{2})$ (C.10)

which does not have a $\mu=0$ limit.

## References

  * [1] F. A. Smirnov and A. B. Zamolodchikov, “On space of integrable quantum field theories,” Nucl. Phys. B 915, 363-383 (2017) doi:10.1016/j.nuclphysb.2016.12.014 [arXiv:1608.05499 [hep-th]].
  * [2] A. Cavaglià, S. Negro, I. M. Szécsényi and R. Tateo, “$T\bar{T}$-deformed 2D Quantum Field Theories,” JHEP 10, 112 (2016) doi:10.1007/JHEP10(2016)112 [arXiv:1608.05534 [hep-th]].
  * [3] M. Guica,“$T\bar{T}$ deformations and holography”, lecture notes.
  * [4] Y. Jiang, “A pedagogical review on solvable irrelevant deformations of 2D quantum field theory,” Commun. Theor. Phys. 73, no.5, 057201 (2021) doi:10.1088/1572-9494/abe4c9 [arXiv:1904.13376 [hep-th]].
  * [5] J. M. Maldacena, “The Large N limit of superconformal field theories and supergravity,” Adv. Theor. Math. Phys. 2, 231-252 (1998) doi:10.4310/ATMP.1998.v2.n2.a1 [arXiv:hep-th/9711200 [hep-th]].
  * [6] E. Witten, “Anti-de Sitter space and holography,” Adv. Theor. Math. Phys. 2, 253-291 (1998) doi:10.4310/ATMP.1998.v2.n2.a2 [arXiv:hep-th/9802150 [hep-th]].
  * [7] S. S. Gubser, I. R. Klebanov and A. M. Polyakov, “Gauge theory correlators from noncritical string theory,” Phys. Lett. B 428, 105-114 (1998) doi:10.1016/S0370-2693(98)00377-3 [arXiv:hep-th/9802109 [hep-th]].
  * [8] M. Guica and R. Monten, “$T\bar{T}$ and the mirage of a bulk cutoff,” SciPost Phys. 10, no.2, 024 (2021) doi:10.21468/SciPostPhys.10.2.024 [arXiv:1906.11251 [hep-th]].
  * [9] L. McGough, M. Mezei and H. Verlinde, “Moving the CFT into the bulk with $T\overline{T}$,” JHEP 04, 010 (2018) doi:10.1007/JHEP04(2018)010 [arXiv:1611.03470 [hep-th]].
  * [10] P. Kraus, J. Liu and D. Marolf, “Cutoff AdS3 versus the $T\overline{T}$ deformation,” JHEP 07, 027 (2018) doi:10.1007/JHEP07(2018)027 [arXiv:1801.02714 [hep-th]].
  * [11] L. Apolo, P. X. Hao, W. X. Lai and W. Song, “Glue-on AdS holography for $T\bar{T}$-deformed CFTs,” [arXiv:2303.04836 [hep-th]].
  * [12] S. Ryu and T. Takayanagi, “Holographic derivation of entanglement entropy from AdS/CFT,” Phys. Rev. Lett. 96, 181602 (2006) doi:10.1103/PhysRevLett.96.181602 [arXiv:hep-th/0603001 [hep-th]].
  * [13] W. Donnelly and V. Shyam, “Entanglement entropy and $T\overline{T}$ deformation,” Phys. Rev. Lett. 121, no.13, 131602 (2018) doi:10.1103/PhysRevLett.121.131602 [arXiv:1806.07444 [hep-th]].
  * [14] B. Chen, L. Chen and P. X. Hao, “Entanglement entropy in $T\overline{T}$-deformed CFT,” Phys. Rev. D 98, no.8, 086025 (2018) doi:10.1103/PhysRevD.98.086025 [arXiv:1807.08293 [hep-th]].
  * [15] M. He and Y. Sun, “Holographic entanglement entropy in $T\overline{T}$-deformed AdS3,” [arXiv:2301.04435 [hep-th]].
  * [16] I. R. Klebanov and E. Witten, “AdS / CFT correspondence and symmetry breaking,” Nucl. Phys. B 556, 89-114 (1999) doi:10.1016/S0550-3213(99)00387-9 [arXiv:hep-th/9905104 [hep-th]].
  * [17] E. Witten, “Multitrace operators, boundary conditions, and AdS / CFT correspondence,” [arXiv:hep-th/0112258 [hep-th]].
  * [18] Y. Jiang, “Expectation value of $\mathrm{T}\overline{\mathrm{T}}$ operator in curved spacetimes,” JHEP 02, 094 (2020) doi:10.1007/JHEP02(2020)094 [arXiv:1903.07561 [hep-th]].
  * [19] S. Grieninger, “Entanglement entropy and $T\overline{T}$ deformations beyond antipodal points from holography,” JHEP 11, 171 (2019) doi:10.1007/JHEP11(2019)171 [arXiv:1908.10372 [hep-th]].
  * [20] K. Skenderis and S. N. Solodukhin, “Quantum effective action from the AdS / CFT correspondence,” Phys. Lett. B 472, 316-322 (2000) doi:10.1016/S0370-2693(99)01467-7 [arXiv:hep-th/9910023 [hep-th]].
  * [21] A. Lewkowycz and J. Maldacena, “Generalized gravitational entropy,” JHEP 08, 090 (2013) doi:10.1007/JHEP08(2013)090 [arXiv:1304.4926 [hep-th]].
  * [22] S. Dubovsky, R. Flauger and V. Gorbenko, “Solving the Simplest Theory of Quantum Gravity,” JHEP 09, 133 (2012) doi:10.1007/JHEP09(2012)133 [arXiv:1205.6805 [hep-th]].
  * [23] S. Dubovsky, V. Gorbenko and M. Mirbabayi, “Asymptotic fragility, near AdS2 holography and $T\overline{T}$,” JHEP 09, 136 (2017) doi:10.1007/JHEP09(2017)136 [arXiv:1706.06604 [hep-th]].
  * [24] P. Calabrese and J. L. Cardy, “Entanglement entropy and quantum field theory,” J. Stat. Mech. 0406, P06002 (2004) doi:10.1088/1742-5468/2004/06/P06002 [arXiv:hep-th/0405152 [hep-th]].
  * [25] X. Jiang, P. Wang, H. Wu and H. Yang, “Timelike entanglement entropy and $T\bar{T}$ deformation,” [arXiv:2302.13872 [hep-th]].
  * [26] M. Banados, “Three-dimensional quantum geometry and black holes,” AIP Conf. Proc. 484, no.1, 147-169 (1999) doi:10.1063/1.59661 [arXiv:hep-th/9901148 [hep-th]].
  * [27] P. Caputa, P. Caputa, S. Datta, S. Datta, Y. Jiang, Y. Jiang, P. Kraus and P. Kraus, “Geometrizing $T\overline{T}$,” JHEP 03, 140 (2021) [erratum: JHEP 09, 110 (2022)] doi:10.1007/JHEP03(2021)140 [arXiv:2011.04664 [hep-th]].
  * [28] C. T. Asplund, A. Bernamonti, F. Galli and T. Hartman, “Holographic Entanglement Entropy from 2d CFT: Heavy States and Local Quenches,” JHEP 02, 171 (2015) doi:10.1007/JHEP02(2015)171 [arXiv:1410.1392 [hep-th]].
  * [29] V. Shyam, “Background independent holographic dual to $T\bar{T}$ deformed CFT with large central charge in 2 dimensions,” JHEP 10, 108 (2017) doi:10.1007/JHEP10(2017)108 [arXiv:1707.08118 [hep-th]].