arXiv(opens in a new tab)Computer ScienceJul 2023

Manuscript Offprint

arXiv:2307.12810

HeteFedRec: Federated Recommender Systems with Model Heterogeneity

Wei Yuan, Liang Qu, Li-zhen Cui, Yongxin Tong, Xiaofang Zhou, Hongzhi Yin

Abstract

Owing to the nature of privacy protection, federated recommender systems (FedRecs) have garnered increasing interest in the realm of on-device recommender systems. However, most existing FedRecs only allow participating clients to collaboratively train a recommendation model of the same public parameter size. Training a model of the same size for all clients can lead to suboptimal performance since clients possess varying resources. For example, clients with limited training data may prefer to train a smaller recommendation model to avoid excessive data consumption, while clients with sufficient data would benefit from a larger model to achieve higher recommendation accuracy. To address the above challenge, this paper introduces HeteFedRec, a novel FedRec framework that enables the assignment of personalized model sizes to participants. Specifically, we present a heterogeneous recommendation model aggregation strategy, including a unified dual-task learning mechanism and a dimensional decorrelation regularization, to allow knowledge aggregation among recommender models of different sizes. Additionally, a relation-based ensemble knowledge distillation method is proposed to effectively distil knowledge from heterogeneous item embeddings. Extensive experiments conducted on three real-world recommendation datasets demonstrate the effectiveness and efficiency of HeteFedRec in training federated recommender systems under heterogeneous settings.

I Introduction

Recently, there has been a significant surge in demand for recommender systems in various online services [1, 2, 3, 4, 5, 6, 7], since they can effectively alleviate information overload by actively discovering users’ potential interests. Conventional recommender systems are trained in a central server with collected user private data, which takes risks of data leakage and raises privacy concerns [8]. With the growing awareness of user privacy protection and some recently released regulations, such as GDPR in the EU, CCPA in the USA, and PIPL in China, it is becoming harder and even infeasible for online platforms to learn recommendation models on centrally collected user data [9].

Federated learning [10], as a privacy-preserving paradigm, has achieved remarkable success across various scenarios [11]. In order to tackle privacy concerns, researchers have sought to harness federated learning for the development of privacy-aware recommender systems namely federated recommender systems (FedRecs), where clients can collaboratively train a global recommendation model on their local devices without sharing their personal data with any other participants.

Ammand et al. [12] proposed the pioneering federated recommendation framework. In this framework, a recommender system is divided into public and private parameters. Users and a central server collaboratively learn a recommendation model by transmitting and aggregating the public parameters using specific aggregation strategies. Due to the advantage of privacy protection, several extended versions [13, 9, 14, 15, 16] have been developed based on this fundamental framework to enhance the performance of FedRec.

Fig. 1: The distribution of users’ item interaction numbers.

Figure

Fig. 2: Conventional Federated Recommender Systems v.s. Heterogeneous Federated Recommender Systems. Heterogeneous federated recommender systems assign public parameters with customized sizes considering clients’ data amounts.

Although many achievements have been made recently, almost all existing FedRecs operate under the setting where clients collaboratively learn a global recommendation model of the same size since their aggregation strategies (e.g., FedAvg [10]) can only process homogeneous public parameters, as shown in Fig. 2. This setting conflicts with the real applications where clients often possess heterogeneous resources, such as varying amounts of training data. Fig. 1 depicts the user-item interaction number distribution on three recommendation datasets derived from real-world platforms. The standard deviation of interaction numbers is about 154.2154.2, 79.879.8, and 105.2105.2 for MovieLens-1M (ML) [17], Anime, and Douban datasets, while the average of interaction amounts is 132.8132.8, 96.196.1, and 143.7143.7, respectively, indicating the substantial difference of data size among clients. Under this circumstance, training a global recommendation model of the same size on all clients would fall short of achieving the true global optimum [18]. Clients with limited data would struggle to support the training of the large global model, and their model updates might even have a negative impact on the performance of the global model, as their local models can only be updated for few times by gradient decent [19] on insufficient data. Conversely, clients with abundant data would prefer to train a larger model to obtain more appropriate recommendations. Given these limitations, there is an urgent need for a federated recommendation framework that enables the collaborative training of heterogeneous models, tailored to the specific resource scale available to each client.

In federated learning, several endeavours have been undertaken to achieve model heterogeneity [20]. These methods can generally be classified into two categories. The first [21, 22, 23] involves leveraging knowledge distillation [24] to exchange knowledge over heterogeneous models via a public reference dataset. Another solution entails designing new aggregation strategies based on the model architecture, such as channel-wise aggregation [25, 26] and layer-wise aggregation [27]. Some works mix elements from both of these solutions to achieve their goals [28, 29]. However, all existing heterogeneous federated learning methods cannot be directly used in FedRecs due to the inherent disparities between general federated learning and FedRecs as displayed in Fig 3.

  • Difference in Data Structures. In FedRecs, a data sample is formed as (user,item,rating)(user,item,rating) which is associated with specific users. Consequently, constructing a public reference dataset to facilitate knowledge distillation while ensuring privacy protection becomes impractical.
  • Difference in Model Architecture. In FedRecs, the item embedding table plays a dominant role in determining the size of the recommendation model. The distinction between small and large models primarily lies in the dimensions of the item embedding. However, the model size in federated learning is mainly related to the depth of layers and the widths of channels.

In this paper, we propose a novel federated recommendation framework named HeteFedRec, which aims to facilitate collaborative learning across clients with heterogeneous models. Since item embeddings significantly influence the entire recommendation model and user embeddings are typically private parameters not shared among clients, HeteFedRec primarily focuses on heterogeneous item embeddings. The conventional idea is to employ the padding method to aggregate item embeddings of different sizes. However, this aggregation strategy suffers from a severe mismatch problem because parameters at the same position but in different embedding tables may represent different latent factors and meanings. To address this issue, we propose unified dual-task learning, ensuring that submatrices of large embedding tables and small embedding tables share the same objective/task. Furthermore, we design a novel decorrelation regularization to prevent large item embeddings from degrading to smaller ones. Lastly, a relation-based ensemble distillation is proposed to effectively merge knowledge from embeddings of different sizes based on the intuitive idea that the ensembled spatial information derived from various types of item embeddings contains more reliable and useful knowledge. To showcase the effectiveness, efficiency, and generalization of HeteFedRec, we conduct extensive experiments on three recommendation datasets using two commonly used base recommendation models.

The main contributions of this paper are as follows:

  • To the best of our knowledge, we are the first to explore model heterogeneity in federated recommender systems.
  • We propose a heterogeneous model aggregation strategy tailored for FedRecs, which leverages a unified dual-task learning mechanism with dimensional decorrelation regularization to facilitate knowledge sharing among recommender models of different sizes. Furthermore, a relation-based distillation method is proposed to distill knowledge from heterogeneous item embedding tables.
  • Extensive experiments on three real-world recommendation datasets demonstrate that our proposed methods are effective and efficient and outperform all baselines.

Fig. 3: The difference between federated recommender systems and federated learning in model architecture and data structure.

References (76)