Conference acronym ’XX, June 03–05, 2018, Woodstock, NY Wei Yuan, Hongzhi Yin, Fangzhao Wu, Shijie Zhang, Tieke He, and Hao Wang
and resistance to malicious attacks in an open setting where any
user/device can participate in the training process of FedRec. Re-
cent studies [
33
,
46
] have shown that current FedRecs are still not
“safe” enough when facing malicious users’ attacks. After detecting
such attacks, the ability to eciently erase such malicious users’
inuence without retraining from scratch is essential for FedRecs.
Although some recent works [
5
,
21
] tried to apply machine un-
learning to recommender systems because of data privacy concerns,
all of them focus on the traditional centralized recommenders. Their
methods require accessing the whole training data during unlearn-
ing, which is prohibitive in FedRecs. Some works [
24
–
26
,
41
] ex-
plored unlearning in federated learning, however, they are tailored
for classication tasks in Computer Vision (CV) area. To erase the
contributions of target clients, the most naive yet eective method
is to retrain the recommender model from scratch after removing
the target clients, which is infeasible in the real-world recommen-
dation setting due to its huge time and resource costs. Another
alternative is to continue the training after removing the target
clients. However, such a method cannot guarantee whether and
when these target users’ inuence on the global parameters (e.g.
item embeddings) will be erased. As a result, how to eectively
and eciently erase target clients’ contributions is not trivial in
FedRecs.
Inspired by the log-based rollback mechanism of transactions
in database management systems (DBMS), we propose to record
each client’s historical model updates. Once we need to erase some
users’ contributions, we will roll back and reconstruct the other
clients’ models according to their training logs (i.e. their histori-
cal model updates). To achieve that, the most intuitive way is to
keep all clients’ historical model updates at the central server. This
method can work when the number of clients is small, such as in
the federated classication setting in which there are only tens of
clients [
24
]. However, in FedRec, the number of clients is several
orders of magnitude larger than the classication settings. As the
storage costs at the central server increase linearly with the number
of clients, this naive method is unsustainable and impractical for
FedRec. Therefore, we propose to retain historical model updates
at each client’s local device, and storage costs at each client device
decouple with the number of clients. Still, it is non-trivial to store
each client’s historical model updates on the resource-constrained
device, and it is infeasible to simply store all updates.
In this paper, we propose FRU (Federated Recommendation
Unlearning), a simple yet eective federated recommendation un-
learning method. FRU is model-agnostic and can be applied to
most federated recommendation systems. The basic idea of FRU is
to erase a target client’s inuence by revising FedRec’s historical
updates and leveraging the revised updates to speed up FedRec
reconstruction. Compared with completely retraining (reconstruct-
ing) the FedRec from scratch, FRU requires less running time and
achieves even better model performance. FRU stores each client’s
historical updates locally on decentralized personal devices to avoid
high central server storage overhead. To eciently utilize the lim-
ited storage space on each client’s device, we design two novel
components: a user-item mixed semi-hard negative sampling com-
ponent and an importance-based update selection component. The
user-item mixed negative sampling exploits high-quality negative
samples to train FedRec, reaching comparable model performance
with fewer negative samples than the traditional sampling method.
Consequently, it reduces the size of item embedding updates at
each client. The importance-based update selection component dy-
namically chooses important updates to store on each client device
at each training epoch, instead of storing all parameter updates.
After achieving unlearning in FedRec, evaluating the eective-
ness of unlearning is neither easy because there are a large num-
ber of users in recommendation datasets, and many of them have
common items and similar preferences (actually, it is the base of
CF-based recommendation methods). Deleting a small portion of
normal users/clients will not signicantly change the performance
of FedRec. In light of this, we propose an attack method to destroy
the FedRec with a group of compromised clients/users (also called
malicious users). An eective unlearning method should recover the
destroyed FedRec quickly and achieve comparable or even better
performance than training without malicious users.
To demonstrate the eectiveness of our proposed approach, we
choose two commonly used recommenders [
45
], Neural Collab-
orative Filtering (NCF) [
17
] and LightGCN [
16
], with the most
basic federated learning protocol [
1
] as our base models. Then, we
conduct extensive experiments with these base models on two real-
world recommendation datasets, MovieLens-100k and Steam-200k.
The experimental results show that FRU can erase the inuence of
removed malicious users, with at least
7
x speedup compared with
the naive retraining from scratch.
The main contributions of this paper are summarized as follows:
•
To the best of our knowledge, this is the rst work to investi-
gate machine unlearning in federated recommender systems,
enabling FedRecs to eectively erase the inuence of specic
users/clients and eciently nish recovering.
•
We propose FRU, an unlearning method tailored for FedRecs.
It stores each client’s historical changes locally on their de-
vices. To improve the storage space eciency on resource-
constrained devices, we propose a novel negative sampling
method and an importance-based update selection mech-
anism. Then, FRU rolls back FedRecs to erase the target
users’/clients’ inuence and fast recover FedRecs by calibrat-
ing the historical model updates.
•
We design an attack method to intuitively evaluate the un-
learning eectiveness. The experimental results demonstrate
the eectiveness and eciency of FRU on two real-world
datasets. Comprehensive ablation studies reveal the eec-
tiveness and importance of each technical component in
FRU.
2 PRELIMINARIES
2.1 Federated Recommendation
Let
V
and
U
denote the sets of items and users (clients), respec-
tively. The sizes of items and users are
|V|
and
|U|
. Each user
𝑢𝑖
owns a local training dataset
D𝑖
, which contains user-item interac-
tions
(𝑢𝑖, 𝑣 𝑗, 𝑟𝑖 𝑗 )
.
𝑟𝑖 𝑗 =1
represents
𝑢𝑖
has interacted with item
𝑣𝑗
,
and
𝑟𝑖 𝑗 =0
means no interactions exist between
𝑢𝑖
and
𝑣𝑗
(i.e. neg-
ative samples). We denote the set of all negative instances for
𝑢𝑖
as
V
𝑛𝑒𝑔 (𝑖)
. The federated recommender is trained to predict the score
of
^
𝑟𝑖 𝑗
between
𝑢𝑖
and all non-interacted items. And then, according
to the predicted scores
^
𝑟𝑖 𝑗 ∈ [0,1]
, the federated recommender