Movatterモバイル変換


[0]ホーム

URL:


CN116011540A - A federated learning method and device based on social grouping - Google Patents

A federated learning method and device based on social grouping
Download PDF

Info

Publication number
CN116011540A
CN116011540ACN202211600821.XACN202211600821ACN116011540ACN 116011540 ACN116011540 ACN 116011540ACN 202211600821 ACN202211600821 ACN 202211600821ACN 116011540 ACN116011540 ACN 116011540A
Authority
CN
China
Prior art keywords
social
group
user
social group
users
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211600821.XA
Other languages
Chinese (zh)
Other versions
CN116011540B (en
Inventor
王云涛
苏洲
胡钦南
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian Jiaotong University
Original Assignee
Xian Jiaotong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian Jiaotong UniversityfiledCriticalXian Jiaotong University
Priority to CN202211600821.XApriorityCriticalpatent/CN116011540B/en
Publication of CN116011540ApublicationCriticalpatent/CN116011540A/en
Application grantedgrantedCritical
Publication of CN116011540BpublicationCriticalpatent/CN116011540B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a federal learning method and device based on social grouping, which are used for carrying out social trust evaluation based on direct social trust and indirect social trust; users participating in the federal learning task form a plurality of social groupings which are stable in Nash and mutually disjoint according to the social trust value; members of the social group are trained by using local data to obtain local model parameter update, and a Gaussian noise disturbance strategy is determined according to social trust values between the members of the social group and managers of the social group to obtain disturbed local model parameter update; the manager of the social group aggregates the local model parameter updates of all members in the social group to obtain social layer pre-aggregate model parameter updates, and the global aggregator aggregates the social layer pre-aggregate model parameter updates of all the social groups to obtain a global aggregate model. The invention can improve the availability of federal learning service while meeting the requirement of customized privacy protection, resist the attack of a riding car and realize the data sharing of the distributed Internet of things with high efficiency and privacy protection.

Description

Translated fromChinese
一种基于社交分组的联邦学习方法和装置A federated learning method and device based on social grouping

技术领域Technical Field

本发明属于信息安全领域,具体涉及一种基于社交分组的联邦学习方法和装置。The present invention belongs to the field of information security, and specifically relates to a federated learning method and device based on social grouping.

背景技术Background Art

随着智能手机、可穿戴设备、网联汽车等智能物联网设备的爆炸式增长,海量的物联网数据将会在分布式终端设备处产生、收集和处理。由于数据归属权益、资产认定以及用户隐私等问题,当前物联网大数据呈现出数据“孤岛”化、知识“碎片”化等特征。如何将分散的物联网数据进行有效聚合和共享,从而挖掘出数据中的价值,并借此提供个性化、智能化的各类物联网智慧应用与服务,已成为重要需求。然而,传统深度学习需要将海量的分散式物联网数据聚集到一个中心式云计算节点进行数据挖掘与知识提取,可能导致严重的隐私泄露和数据滥用。With the explosive growth of smart IoT devices such as smartphones, wearable devices, and connected cars, massive amounts of IoT data will be generated, collected, and processed at distributed terminal devices. Due to issues such as data ownership, asset identification, and user privacy, the current IoT big data presents characteristics such as data "islands" and knowledge "fragmentation". How to effectively aggregate and share decentralized IoT data to mine the value of the data and provide personalized, intelligent IoT applications and services has become an important demand. However, traditional deep learning requires aggregating massive amounts of decentralized IoT data to a central cloud computing node for data mining and knowledge extraction, which may lead to serious privacy leaks and data abuse.

联邦学习(Federated Learning)作为一种隐私保护的新型机器学习范式,是突破数据孤岛困境、实现大规模物联网数据安全高效共享、充分释放物联网大数据价值的关键技术。在联邦学习中,数据拥有者使用本地数据周期性地训练本地模型,并发送到聚合服务器进行全局聚合合成全局模型然后发送回数据拥有者以进行下一轮训练。由于数据拥有者只共享从本地数据中学习到的模型参数而非原始数据,从而实现原始数据不出域、数据可用不可见。然而,大量研究与实验发现,针对联邦学习中用户共享的本地模型参数(例如梯度),攻击者仍然可能通过发动模型反转和成员推理等高级攻击从中还原用户的隐私与敏感信息。由于差分隐私机制具备严格理论保证和低计算开销等优势,现有的安全对策主要基于差分隐私(Differential Privacy)技术实现。然而,较大的差分隐私噪声虽能提供强大的隐私保护能力,但会导致严重的模型性能下降,因此亟需在隐私和实用性之间进行权衡。另外,物联网用户通常具有差异化的隐私保护需求,且在联邦学习中普遍存在搭便车的用户,造成联邦学习模型质量的降低。当前联邦学习方案难以在满足定制化隐私保护的同时提供高可用且抵御搭便车攻击的联邦学习服务。Federated Learning, as a new machine learning paradigm with privacy protection, is a key technology to break through the dilemma of data silos, realize the safe and efficient sharing of large-scale IoT data, and fully release the value of IoT big data. In federated learning, data owners use local data to periodically train local models, send them to aggregation servers for global aggregation to synthesize global models, and then send them back to data owners for the next round of training. Since data owners only share model parameters learned from local data instead of original data, the original data does not go out of the domain and the data is available but invisible. However, a large number of studies and experiments have found that for local model parameters (such as gradients) shared by users in federated learning, attackers may still be able to restore users' privacy and sensitive information by launching advanced attacks such as model inversion and member inference. Due to the advantages of differential privacy mechanism such as strict theoretical guarantees and low computational overhead, existing security countermeasures are mainly based on differential privacy technology. However, although large differential privacy noise can provide strong privacy protection capabilities, it will lead to serious model performance degradation, so there is an urgent need to balance privacy and practicality. In addition, IoT users usually have differentiated privacy protection needs, and there are common free-riding users in federated learning, which reduces the quality of federated learning models. Current federated learning solutions are difficult to provide highly available federated learning services that are resistant to free-rider attacks while meeting customized privacy protection requirements.

发明内容Summary of the invention

针对现有技术中存在的问题,本发明提供了一种基于社交分组的联邦学习方法和装置,能在满足定制化隐私保护的同时提升联邦学习服务的可用性,抵御搭便车攻击,促进联邦学习奖励分配的公平性,实现高效和隐私保护的分布式物联网数据共享。In response to the problems existing in the prior art, the present invention provides a federated learning method and device based on social grouping, which can improve the availability of federated learning services while meeting customized privacy protection, resist free-rider attacks, promote the fairness of federated learning reward distribution, and realize efficient and privacy-protected distributed Internet of Things data sharing.

为了解决上述技术问题,本发明通过以下技术方案予以实现:In order to solve the above technical problems, the present invention is implemented by the following technical solutions:

一种基于社交分组的联邦学习方法,包括:A federated learning method based on social grouping, including:

对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值;For users who jointly participate in the federated learning task, a social relationship graph is constructed between the users, in which each user evaluates the social trust value of other users based on direct social trust and indirect social trust;

所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组;The users who jointly participate in the federated learning task form a plurality of Nash-stable and mutually disjoint social groups according to the social trust values;

每个所述社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户;All members in each of the social groups use local data for training to obtain local model parameter updates, and determine a Gaussian noise perturbation strategy based on the social trust value between the members and the administrator of the social group to obtain the perturbed local model parameter updates, where the administrator of the social group is the user with the largest centrality in the social group;

每个所述社交分组的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新;The manager of each social group updates the local model parameters of all members in the social group to perform model pre-aggregation in the social group to obtain social layer pre-aggregation model parameter updates;

每个所述社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,所述全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。Each of the social groups transmits the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.

进一步地,所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组,具体为:Furthermore, the users who jointly participate in the federated learning task form multiple Nash-stable and mutually non-intersecting social groups according to the social trust values, specifically:

对于每个社交分组,根据用户之间的社交信任值界定群体效用函数;For each social group, define the group utility function based on the social trust value between users;

对于每个社交分组,根据所述群体效用函数,设计公平分配规则得到所述社交分组内所有成员的个体效用函数;For each social group, according to the group utility function, a fair allocation rule is designed to obtain the individual utility functions of all members in the social group;

对于每个参与联邦学习任务的用户,根据所述个体效用函数构建可转移分组列表,并在满足社交分组离开规则的同时向所述可转移分组列表中的最优社交分组发送加入申请;For each user participating in the federated learning task, a transferable group list is constructed according to the individual utility function, and a joining application is sent to the optimal social group in the transferable group list while satisfying the social group leaving rule;

对于每个社交分组,当收到多个所述加入申请时,构建可接受用户列表,并在满足社交分组加入规则的同时接受所述可接受用户列表中的最优用户的加入申请,同时拒绝可接受用户列表中其他用户的加入申请;For each social group, when multiple joining applications are received, an acceptable user list is constructed, and while satisfying the social group joining rules, the joining application of the best user in the acceptable user list is accepted, while the joining applications of other users in the acceptable user list are rejected;

执行用户分离与合并操作,并更新当前社交分组的集合;Perform user separation and merging operations and update the current social grouping collection;

重复上述步骤,直到社交分组的状态不再发生变化,形成所述纳什稳定且互不相交的多个社交分组。The above steps are repeated until the state of the social grouping no longer changes, thereby forming a plurality of Nash-stable and mutually disjoint social groups.

进一步地,所述根据用户之间的社交信任值界定群体效用函数,具体为:Furthermore, the group utility function is defined according to the social trust value between users, specifically:

所述社交分组Φj的群体效用为收益与成本之差:The group utility of the social group Φj is the difference between the benefit and the cost:

Figure BDA0003997252710000031
Figure BDA0003997252710000031

式中,λp是对单位模型质量的奖励支付;qn是社交分组Φj中用户n的本地模型质量,qn与用户n和社交分组Φj管理者的社交关系以及用户n本地数据的非独立同分布程度相关;λc是大于0的比例系数;|Φj|表示社交分组Φj的大小,即社交分组内成员的数量;λcj|表示社交分组Φj内的通信成本;

Figure BDA0003997252710000032
表示用户n形成单项分组时的模型质量;Whereλp is the reward payment for unit model quality;qn is the local model quality of user n in social groupΦj , which is related to the social relationship between usern and the manager of social groupΦj and the degree of non-independent and identically distributed local data of user n;λc is a proportional coefficient greater than 0; |Φj | represents the size of social groupΦj , that is, the number of members in the social group;λc |Φj | represents the communication cost within social groupΦj ;
Figure BDA0003997252710000032
Indicates the model quality when user n forms a single group;

所述社交分组Φj中用户n的本地模型质量qn与模型损失值

Figure BDA0003997252710000033
负相关,具体为:The local model qualityqn and model loss value of user n in the social groupΦj
Figure BDA0003997252710000033
Negative correlation, specifically:

Figure BDA0003997252710000034
Figure BDA0003997252710000034

式中,κ1,κ2均为正的曲线拟合参数;κ2表示模型损失趋于0时渐进最大的本地模型质量;Where, κ1 and κ2 are both positive curve fitting parameters; κ2 represents the asymptotically maximum local model quality when the model loss approaches 0;

所述社交分组Φj中用户n的本地模型损失

Figure BDA0003997252710000041
与高斯噪声大小σn,j和数据的非独立同分布程度γ相关,具体为:The local model loss of user n in the social group Φj
Figure BDA0003997252710000041
It is related to the Gaussian noise size σn,j and the degree of non-independent and identically distributed data γ, specifically:

Figure BDA0003997252710000042
Figure BDA0003997252710000042

式中,μ1,…,μ5均为正的曲线拟合参数;分子部分μ1exp(-μ2·γ)反应了当数据的非独立同分布程度γ增加时本地模型边际损失值的减小;分母部分μs+exp(-μ4·σn,j)反应了模型噪声大小σn,j增加时本地模型质量的下降。Wherein, μ1 ,…,μ5 are all positive curve fitting parameters; the numerator μ1 exp(-μ2 ·γ) reflects the decrease in the marginal loss value of the local model when the non-independent and identically distributed degree γ of the data increases; the denominator μs +exp(-μ4 ·σn,j ) reflects the decrease in the quality of the local model when the model noise size σn,j increases.

进一步地,所述根据所述群体效用函数,设计公平分配规则得到所述社交分组内所有成员的个体效用函数,具体为:Furthermore, according to the group utility function, a fair distribution rule is designed to obtain the individual utility functions of all members in the social group, specifically:

所述社交分组Φj内每个成员用户n的个体效用为非合作情况下的效用与按贡献比例分配的额外效用之和:The individual utility of each member user n in the social group Φj is the sum of the utility in the non-cooperative case and the additional utility allocated according to the contribution ratio:

Figure BDA0003997252710000043
Figure BDA0003997252710000043

式中,

Figure BDA0003997252710000044
Figure BDA0003997252710000045
分别表示用户l和n的非合作效用,即用户l和n分别形成单项分组时的群体效用;
Figure BDA0003997252710000046
表示用户n在社交分组Φj中的贡献权重;
Figure BDA0003997252710000047
表示相比于非合作情况下,社交分组Φj内所有成员在合作时产生的额外效用。In the formula,
Figure BDA0003997252710000044
and
Figure BDA0003997252710000045
They represent the non-cooperative utility of users l and n, that is, the group utility when users l and n form a single group respectively;
Figure BDA0003997252710000046
represents the contribution weight of user n in social group Φj ;
Figure BDA0003997252710000047
It represents the additional utility generated by all members in the social group Φj when cooperating compared with the non-cooperative situation.

进一步地,所述根据所述个体效用函数构建可转移分组列表,具体为:Furthermore, the constructing of the transferable group list according to the individual utility function is specifically as follows:

根据所述个体效用函数,构建偏好次序;constructing a preference order based on the individual utility function;

根据所述偏好次序,构建可转移分组列表;constructing a transferable group list according to the preference order;

所述根据所述个体效用函数,构建偏好次序,具体为:The preference order is constructed according to the individual utility function, specifically:

用户n,n∈Φj对社交分组Φ′j,Φ′j≠Φj的偏好次序为:The preference order of user n, n∈Φj to social group Φ′j , Φ′j ≠Φj is:

Figure BDA0003997252710000051
Figure BDA0003997252710000051

式中,ψn(Φ′j∪{n})表示用户n在加入社交分组Φ′j后的个体效用;ψl(Φ′j)和ψl(Φ′j∪{n})分别表示用户l∈Φ′j在原有社交分组Φ′j和新社交分组Φ′j∪{n}中的个体效用;

Figure BDA0003997252710000052
表示历史上曾拒绝过用户n加入申请的社交分组的集合;Where, ψn (Φ′j ∪{n}) represents the individual utility of user n after joining the social group Φ′j ; ψl (Φ′j ) and ψl (Φ′j ∪{n}) represent the individual utility of user l∈Φ′j in the original social group Φ′j and the new social group Φ′j ∪{n}, respectively;
Figure BDA0003997252710000052
represents the set of social groups that have historically rejected user n's application to join;

所述根据所述偏好次序,构建可转移分组列表,具体为:The step of constructing a transferable group list according to the preference order is as follows:

在第t次迭代时,社交分组Φj中的用户n的可转移分组列表为:At the tth iteration, the transferable group list of user n in social group Φj is:

Figure BDA0003997252710000053
Figure BDA0003997252710000053

式中,Φ(t)表示在第t次迭代时所有社交分组的集合。Where Φ(t) represents the set of all social groups at the tth iteration.

进一步地,所述社交分组离开规则,具体为:Furthermore, the social group leaving rule is specifically:

如果所述社交分组Φj在第t次迭代时接受一个新用户的加入申请,则在该第t次迭代时原有的内部成员均不能离开所述社交分组ΦjIf the social group Φj accepts a new user's application for joining in the tth iteration, then in the tth iteration, all the original internal members cannot leave the social group Φj ;

所述可转移分组列表中的最优社交分组,具体为:The optimal social group in the transferable group list is specifically:

用户n,n∈Φj的可转移分组列表中的最优社交分组为

Figure BDA0003997252710000054
Figure BDA0003997252710000055
则用户n偏向于脱离原有社交分组并形成单项分组;否则,用户n偏向于脱离原有社交分组并加入社交分组
Figure BDA0003997252710000056
The optimal social grouping in the transferable grouping list of user n, n∈Φj is
Figure BDA0003997252710000054
like
Figure BDA0003997252710000055
If user n is inclined to leave the original social group and form a single group, otherwise, user n is inclined to leave the original social group and join a social group.
Figure BDA0003997252710000056

进一步地,所述社交分组加入规则,具体为:Furthermore, the social group joining rules are specifically as follows:

如果所述社交分组在第t次迭代时有内部成员离开,则在该第t次迭代时所述社交分组不能接受所有新用户的加入申请;If an internal member of the social group leaves during the t-th iteration, the social group cannot accept all new users' applications for joining during the t-th iteration;

所述可接受用户列表中的最优用户,具体为:The optimal user in the acceptable user list is specifically:

社交分组

Figure BDA0003997252710000057
的可接受用户列表中的最优用户为n*=arg maxρnj),
Figure BDA0003997252710000058
其中
Figure BDA0003997252710000059
为第t次迭代时社交分组Φj的可接受用户集合,即在第t次迭代时向社交分组Φj发送加入申请的用户的集合。Social Grouping
Figure BDA0003997252710000057
The optimal user in the acceptable user list is n* = arg maxρnj ),
Figure BDA0003997252710000058
in
Figure BDA0003997252710000059
is the set of acceptable users of the social group Φj at the t-th iteration, that is, the set of users who send joining applications to the social group Φj at the t-th iteration.

进一步地,所述根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,具体为:Furthermore, the Gaussian noise disturbance strategy is determined according to the social trust value between the administrator of the social group, specifically:

若用户n与社交分组Φj的管理者之间的社交信任值大于系统预设阈值,则直接将原始的本地模型参数更新传输给社交分组Φj的管理者;If the social trust value between user n and the manager of social group Φj is greater than the system preset threshold, the original local model parameter update is directly transmitted to the manager of social group Φj ;

若用户n与社交分组Φj的管理者之间的社交信任值低于系统预设阈值,则将加入高斯噪声扰动的本地模型参数更新传输给社交分组Φj的管理者;If the social trust value between user n and the manager of social group Φj is lower than the system preset threshold, the local model parameter update with Gaussian noise perturbation is transmitted to the manager of social group Φj ;

若用户n形成单项分组,则向本地模型参数更新中加入大小为σmax的最大高斯噪声扰动,且用户n为所述单项分组的管理者。If user n forms a single-item group, a maximum Gaussian noise perturbation of size σmax is added to the local model parameter update, and user n is the manager of the single-item group.

进一步地,所述加入高斯噪声扰动的本地模型参数更新,具体为:Furthermore, the local model parameter update with Gaussian noise disturbance is specifically as follows:

每个社交分组内的每个成员将与所述社交分组的管理者之间的社交信任值映射为隐私保护级别;Each member in each social group maps the social trust value between the member and the administrator of the social group to a privacy protection level;

每个社交分组内的每个成员根据所述隐私保护级别,计算高斯噪声的大小参数;Each member in each social group calculates a size parameter of Gaussian noise according to the privacy protection level;

每个社交分组内的每个成员根据所述高斯噪声的大小参数,对本地模型参数更新添加相应高斯噪声,得到扰动后的本地模型参数更新;Each member in each social group adds corresponding Gaussian noise to the local model parameter update according to the size parameter of the Gaussian noise to obtain the disturbed local model parameter update;

所述将与所述社交分组的管理者之间的社交信任值映射为隐私保护级别,具体为:The mapping of the social trust value between the administrator of the social group and the administrator of the social group to the privacy protection level is specifically:

Figure BDA0003997252710000061
Figure BDA0003997252710000061

式中,θ1,θ2为正的调节参数;∈n,j表示隐私预算,其值越小,隐私保护程度越大;αn,j表示用户n与社交分组Φj的管理者之间的社交信任值;Where θ1 , θ2 are positive adjustment parameters; ∈n,j represents the privacy budget, the smaller its value, the greater the degree of privacy protection; αn,j represents the social trust value between user n and the manager of social group Φj ;

所述每个社交分组内的每个成员根据所述隐私保护级别,计算高斯噪声的大小参数,具体为:Each member in each social group calculates the size parameter of Gaussian noise according to the privacy protection level, specifically:

Figure BDA0003997252710000062
Figure BDA0003997252710000062

式中,δ是小的概率值;σn,j是高斯噪声的方差值,其值越大,添加的噪声大小越大;Where δ is a small probability value; σn,j is the variance value of Gaussian noise. The larger its value, the larger the added noise.

σn,j∈[0,σmax],σmax表示高斯噪声方差的最大值。σn, j ∈ [0, σmax ], σmax represents the maximum value of the Gaussian noise variance.

一种基于社交分组的联邦学习装置,包括:A federated learning device based on social grouping, comprising:

构建模块,用于对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值;A construction module is used to construct a social relationship graph between users who jointly participate in the federated learning task, in which each user in the social relationship graph evaluates the social trust value of other users based on direct social trust and indirect social trust;

社交分组形成模块,用于所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组;A social grouping forming module, used for the users who jointly participate in the federated learning task to form a plurality of Nash-stable and mutually disjoint social groups according to the social trust values;

本地模型参数更新模块,用于每个所述社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户;A local model parameter updating module, which is used for all members in each of the social groups to perform training using local data to obtain local model parameter updates, and to determine a Gaussian noise perturbation strategy based on the social trust value between the members and the administrator of the social group to obtain the perturbed local model parameter updates, wherein the administrator of the social group is the user with the largest centrality in the social group;

预聚合模块,用于每个所述社交分组的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新;A pre-aggregation module, configured for the manager of each social group to update the local model parameters of all members in the social group to perform model pre-aggregation within the social group, and obtain a social layer pre-aggregation model parameter update;

传输模块,用于每个所述社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,所述全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。A transmission module is used for each of the social groups to transmit the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.

与现有技术相比,本发明至少具有以下有益效果:Compared with the prior art, the present invention has at least the following beneficial effects:

(1)相较于现有主流的中心式机器学习模式,本发明基于联邦学习模式,数据所有者的本地数据保留在终端设备,只需要周期性地将从本地数据训练得到的本地模型参数更新发送至全局聚合器执行全局模型聚合操作,实现了物联网终端设备的分布式数据共享与协同式模型训练,解决了现有物联网大规模数据共享中存在的显式隐私数据泄露的技术问题。(1) Compared with the existing mainstream centralized machine learning model, the present invention is based on the federated learning model. The local data of the data owner is retained in the terminal device, and only the local model parameter updates obtained from the local data training need to be periodically sent to the global aggregator to perform global model aggregation operations, thereby realizing distributed data sharing and collaborative model training of IoT terminal devices, and solving the technical problem of explicit privacy data leakage in the existing large-scale data sharing of the IoT.

(2)本发明提出了基于社交信任的定制化隐私保护方法,针对不同联邦学习服务下不同物联网用户的多样化隐私保护需求,通过直接社交信任评估与间接社交信任评估对用户之间的社交信任进行全面综合评估,通过提出社交信任-隐私保护程度的映射关系,实现联邦学习中个性化的隐私保护。(2) The present invention proposes a customized privacy protection method based on social trust. Aiming at the diverse privacy protection needs of different IoT users under different federated learning services, the present invention conducts a comprehensive and integrated evaluation of the social trust between users through direct social trust evaluation and indirect social trust evaluation. By proposing a mapping relationship between social trust and privacy protection degree, personalized privacy protection in federated learning is achieved.

(3)本发明提出了社交感知的高可用联邦学习方法,结合用户之间的社交属性、竞争与合作特性,通过在传统包含中心式聚合器与分布式终端设备的两层联邦学习架构中引入社交分组层,利用社交信任定义新型安全假设,并在社交分组内根据社交信任执行适量扰动添加与模型预聚合操作,提高了联邦学习模型的质量及性能。(3) The present invention proposes a socially-aware high-availability federated learning method that combines the social attributes, competition, and cooperation characteristics between users. By introducing a social grouping layer into the traditional two-layer federated learning architecture consisting of a centralized aggregator and distributed terminal devices, new security assumptions are defined using social trust, and appropriate disturbance addition and model pre-aggregation operations are performed within the social grouping based on social trust, thereby improving the quality and performance of the federated learning model.

(4)本发明提出了抗搭便车攻击的用户收益公平分配方法,在存在搭便车攻击的情况下,通过评估用户的本地数据大小、非独立同分布程度以及噪声大小,来对用户的本地模型质量进行评估和计算用户贡献,并根据用户贡献值公平地分配学习奖励,从而提供精准的用户参与激励,以抑制用户搭便车行为的同时激励用户的高质量模型训练。(4) The present invention proposes a user benefit fair distribution method that is resistant to free-rider attacks. In the presence of free-rider attacks, the user's local model quality is evaluated and the user contribution is calculated by evaluating the user's local data size, the degree of non-independent and identically distributed data, and the noise size. The learning reward is fairly distributed according to the user's contribution value, thereby providing accurate user participation incentives to suppress user free-riding behavior while encouraging users to train high-quality models.

(5)本发明提出了基于博弈合作的纳什稳定的动态社交分组形成方法,通过设计群体效用函数、个体效用函数以及用户与社交分组的双边动态匹配过程,得出高动态环境下用户与社交分组的最优策略,增强了联邦学习中社交分组的效率,并自适应于联邦学习中用户的动态退出与加入。(5) The present invention proposes a Nash-stable dynamic social grouping formation method based on game cooperation. By designing the group utility function, individual utility function, and the bilateral dynamic matching process between users and social groups, the optimal strategy for users and social groups in a highly dynamic environment is obtained, which enhances the efficiency of social grouping in federated learning and adapts to the dynamic exit and joining of users in federated learning.

为使本发明的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本发明具体实施方式中的技术方案,下面将对具体实施方式描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the specific implementation modes of the present invention, the drawings required for use in the description of the specific implementation modes will be briefly introduced below. Obviously, the drawings described below are some implementation modes of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

图1为本发明基于社交分组的联邦学习方法流程图;FIG1 is a flow chart of a federated learning method based on social grouping according to the present invention;

图2为社交感知的分组联邦学习架构图;Figure 2 is a diagram of the socially aware group federated learning architecture;

图3为纳什稳定的动态最优社交分组结构形成的流程图;Figure 3 is a flow chart showing the formation of Nash's stable dynamic optimal social grouping structure;

图4为最优分组中用户的噪声扰动策略决策的流程图;FIG4 is a flow chart of noise disturbance strategy decision making for users in the optimal grouping;

图5为联邦学习中分布式模型训练与分层模型聚合的流程图。Figure 5 is a flowchart of distributed model training and hierarchical model aggregation in federated learning.

具体实施方式DETAILED DESCRIPTION

为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合附图对本发明的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

作为本发明的某一具体实施方式,如图1所示,本发明一种基于社交分组的联邦学习方法,具体包括以下步骤:As a specific implementation of the present invention, as shown in FIG1 , a federated learning method based on social grouping of the present invention specifically includes the following steps:

步骤1、对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值。Step 1: For users who jointly participate in the federated learning task, a social relationship graph between users is constructed, in which each user in the social relationship graph evaluates the social trust value of other users based on direct social trust and indirect social trust.

也就是说,对于一组共同参与联邦学习任务的用户,根据用户之间的社交关系,每个用户对现有的以及可能的社交朋友评估社交信任值。That is, for a group of users who jointly participate in a federated learning task, each user evaluates the social trust value for existing and potential social friends based on the social relationships between the users.

具体地,社交感知的分组联邦学习架构如图2所示,包括终端层、社交网络以及云端层。云服务器作为联邦学习中的全局聚合服务器,被假定为一个诚实但好奇的实体,即,云服务器将诚实地在每个全局通信轮k中执行全局模型聚合操作,但会通过数据分析等手段推理用户本地模型更新中的隐私信息。终端层由N个共同参与联邦学习任务的物联网用户组成,其集合为

Figure BDA0003997252710000091
具有差异化社交属性的物联网用户通过社交网络相互连接,共同参与联邦学习任务的N个用户可以动态形成多个不相交的社交分组,其集合表示为Φ={Φ1,…,Φj,…,ΦJ}。Specifically, the social-aware group federated learning architecture is shown in Figure 2, which includes the terminal layer, social network, and cloud layer. The cloud server, as the global aggregation server in federated learning, is assumed to be an honest but curious entity, that is, the cloud server will honestly perform global model aggregation operations in each global communication round k, but will infer the privacy information in the user's local model update through data analysis and other means. The terminal layer consists of N IoT users who jointly participate in the federated learning task, and its set is
Figure BDA0003997252710000091
IoT users with differentiated social attributes are connected to each other through social networks. N users who jointly participate in the federated learning task can dynamically form multiple disjoint social groups, whose set is represented as Φ = {Φ1 , ..., Φj , ..., ΦJ }.

在联邦学习过程中的一个全局通信轮k中,首先,每个物联网用户

Figure BDA0003997252710000092
使用其智能终端设备(例如智能手机、和网联汽车)在本地私有数据上联合训练一个全局共享的人工智能模型,其中物联网用户只需根据下载的全局模型发送从本地数据训练得到的本地模型参数更新;然后每个社交分组Φj∈Φ的管理者φj对本分组内所有用户的本地模型参数更新执行社交层预聚合操作,并将预聚合结果传输至全局聚合器;接着,全局聚合器将所有社交分组的社交层预聚合模型参数进行聚合得到全局模型,并再发回给所有物联网用户进行下一轮训练;迭代上述过程,直到模型达到理想的性能指标或全局通信轮数达到最大值。In a global communication round k in the federated learning process, first, each IoT user
Figure BDA0003997252710000092
Use their smart terminal devices (such as smartphones and connected cars) to jointly train a globally shared artificial intelligence model on local private data, where IoT users only need to send local model parameter updates obtained from local data training based on the downloaded global model; then the manager φj of each social group Φj ∈ Φ performs social layer pre-aggregation operation on the local model parameter updates of all users in this group, and transmits the pre-aggregation result to the global aggregator; then, the global aggregator aggregates the social layer pre-aggregated model parameters of all social groups to obtain a global model, and sends it back to all IoT users for the next round of training; iterate the above process until the model reaches the ideal performance indicator or the number of global communication rounds reaches the maximum value.

作为优选的实施方式,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值,即根据用户之间的社交关系进行社交信任值评估,具体包括:As a preferred implementation, each user in the social relationship graph evaluates the social trust value of other users based on direct social trust and indirect social trust, that is, the social trust value evaluation is performed according to the social relationship between users, specifically including:

步骤1.1、根据用户之间的社交关系,评估用户之间的直接信任值;Step 1.1: Evaluate the direct trust value between users based on the social relationships between them;

具体地说,令

Figure BDA0003997252710000101
表示集合
Figure BDA0003997252710000102
中物联网用户之间的社交图谱。其中,
Figure BDA0003997252710000103
是物联网用户之间的边集合,en,m∈[0,1]表示或用户n和用户m(n≠m)之间的社交关系,即社交亲密度,其中en,m=em,n。en,m=1表示两个用户的社交关系最强,an,m=0表示两个用户是陌生人。令αn,m∈[0,1]表示两个用户n和用户m之间的社交信任值,其集合记为
Figure BDA0003997252710000104
社交信任值αn,m的值与用户n和用户m之间的直接社交交互、社交图谱拓扑关系和时间衰减效应有关。其中,直接社交信任en,m来自用户n和用户m的历史交互(例如分享微博、照片和视频)体验,每次交互持续时间和交互发生时间的影响:Specifically,
Figure BDA0003997252710000101
Representing a collection
Figure BDA0003997252710000102
The social graph among IoT users.
Figure BDA0003997252710000103
is the edge set between IoT users, en,m∈[0,1] represents the social relationship between user n and user m (n≠m), i.e., social intimacy, where en,m =em,n .en,m =1 means that the social relationship between the two users is the strongest, andan,m =0 means that the two users are strangers. Let αn,m∈ [0,1] represent the social trust value between two users n and user m, and its set is recorded as
Figure BDA0003997252710000104
The value of social trust value αn,m is related to the direct social interaction between user n and user m, the social graph topology relationship and the time decay effect. Among them, direct social trust en,m comes from the historical interaction experience (such as sharing microblogs, photos and videos) between user n and user m, the duration of each interaction and the time when the interaction occurs:

Figure BDA0003997252710000105
Figure BDA0003997252710000105

式中,

Figure BDA0003997252710000106
Figure BDA0003997252710000107
分别是用户n和用户m之间积极和消极交互的总数;ν>0是惩罚因素;
Figure BDA0003997252710000108
是第b次交互的持续时间;Dth是持续时间的阈值,若
Figure BDA0003997252710000109
Figure BDA00039972527100001010
否则,
Figure BDA00039972527100001011
保持原始值;
Figure BDA00039972527100001012
描述了指数时间衰减效应;tb是第b次交互的发生时间;
Figure BDA00039972527100001013
是衰减率。In the formula,
Figure BDA0003997252710000106
and
Figure BDA0003997252710000107
are the total number of positive and negative interactions between user n and user m, respectively; ν>0 is the penalty factor;
Figure BDA0003997252710000108
is the duration of the bth interaction; Dth is the threshold of duration, if
Figure BDA0003997252710000109
but
Figure BDA00039972527100001010
otherwise,
Figure BDA00039972527100001011
Keep the original value;
Figure BDA00039972527100001012
describes the exponential time decay effect; tb is the time when the bth interaction occurs;
Figure BDA00039972527100001013
is the decay rate.

步骤1.2、根据所述直接信任值,评估用户之间的间接信任值;Step 1.2, based on the direct trust value, evaluating the indirect trust value between users;

具体地说,由于物联网用户之间的直接交互次数较少,有必要结合社交图谱中的拓扑关系对于用户之间的社交信任进行全面评估。令Tpath表示社交图谱

Figure BDA00039972527100001014
中连接用户n和用户m的最短路径,其中|Tpath|称为社交距离。用户n和用户m的间接社交信任值τn,m可计算为路径Tpath上的用户n的社交朋友对用户m的聚合推荐信任,即Specifically, since the number of direct interactions between IoT users is relatively small, it is necessary to comprehensively evaluate the social trust between users by combining the topological relationships in the social graph. Let Tpath represent the social graph
Figure BDA00039972527100001014
The shortest path connecting user n and user m in , where |Tpath | is called the social distance. The indirect social trust value τn,m between user n and user m can be calculated as the aggregated recommendation trust of user n’s social friends on path Tpath to user m, that is

Figure BDA0003997252710000111
Figure BDA0003997252710000111

式中,

Figure BDA0003997252710000112
表示用户l和k在社交图谱
Figure BDA0003997252710000113
中的路径Tpath上相邻。In the formula,
Figure BDA0003997252710000112
Represents users l and k in the social graph
Figure BDA0003997252710000113
Adjacent on the path Tpath in.

步骤1.3、根据所述直接信任值与间接信任值,得到社交信任值;Step 1.3, obtaining a social trust value according to the direct trust value and the indirect trust value;

具体地说,用户n和用户m的社交信任值αn,m为直接社交信任值与间接社交信任值的加权平均值:Specifically, the social trust valueαn,m of user n and user m is the weighted average of the direct social trust value and the indirect social trust value:

αn,m=ωen,m+(1-ω)τn,mαn,m =ωen,m +(1-ω)τn,m

式中,w∈[0,1]是权重因子。其中αn,m∈[0,1]。记γn,j为用户n在社交集群Φj中的中心度,即用户n在集群Φj中的邻居数,其值为

Figure BDA0003997252710000114
其中fn,l={0,1},若en,l>0,则fn,l=1;否则,fn,l=0。Where w∈[0,1] is the weight factor. Whereαn,m∈ [0,1]. Let γn,j be the centrality of user n in social clusterΦj , that is, the number of neighbors of user n in clusterΦj , and its value is
Figure BDA0003997252710000114
Wherein fn,l = {0, 1}, ifen,l > 0, then fn,l = 1; otherwise, fn,l = 0.

步骤2、共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组,如图3所述,具体包括:Step 2: Users who jointly participate in the federated learning task form multiple Nash-stable and mutually disjoint social groups according to the social trust values, as shown in FIG3 , specifically including:

步骤2.1、初始化社交分组;Step 2.1, initialize social grouping;

具体地,在初始时刻(即t=0),设置社交分组状态为Φ(0),该初始状态取决于具体应用(例如上一次联邦学习任务的稳定分区结果)。Specifically, at the initial moment (ie, t=0), the social grouping state is set to Φ(0) , and the initial state depends on the specific application (eg, the stable partitioning result of the last federated learning task).

步骤2.2、在t≥1,对于每个社交分组,根据用户之间的社交信任值界定群体效用函数;Step 2.2, at t ≥ 1, for each social group, define the group utility function according to the social trust value between users;

具体地说,所述社交分组Φj的群体效用为收益与成本之差:Specifically, the group utility of the social group Φj is the difference between the benefit and the cost:

Figure BDA0003997252710000115
Figure BDA0003997252710000115

式中,λp是对单位模型质量的奖励支付;qn是社交分组Φj中用户n的本地模型质量,qn与用户n和社交分组Φj管理者的社交关系以及用户n本地数据的非独立同分布程度相关;λc是大于0的比例系数;|Φj|表示社交分组Φj的大小,即社交分组内成员的数量;λcj|表示社交分组Φj内的通信成本;

Figure BDA0003997252710000121
表示用户n形成单项分组(即Φj={n})时的模型质量;Whereλp is the reward payment for unit model quality;qn is the local model quality of user n in social groupΦj , which is related to the social relationship between usern and the manager of social groupΦj and the degree of non-independent and identically distributed local data of user n;λc is a proportional coefficient greater than 0; |Φj | represents the size of social groupΦj , that is, the number of members in the social group;λc |Φj | represents the communication cost within social groupΦj ;
Figure BDA0003997252710000121
represents the model quality when user n forms a single-item group (i.e., Φj = {n});

所述社交分组Φj中用户n的本地模型质量qn与模型损失值

Figure BDA0003997252710000122
负相关,具体为:The local model qualityqn and model loss value of user n in the social groupΦj
Figure BDA0003997252710000122
Negative correlation, specifically:

Figure BDA0003997252710000123
Figure BDA0003997252710000123

式中,κ1,κ2均为正的曲线拟合参数;κ2表示模型损失趋于0时渐进最大的本地模型质量;Where, κ1 and κ2 are both positive curve fitting parameters; κ2 represents the asymptotically maximum local model quality when the model loss approaches 0;

利用狄利克雷分布来表征物联网用户之间数据分布的异质性。对于一个Y类的分类任务,每个物联网用户的训练样本服从一个由向量a~Dir(γ)参数化的狄利克雷分布,该分布以下概率密度函数:Dirichlet distribution is used to characterize the heterogeneity of data distribution among IoT users. For a classification task of class Y, the training sample of each IoT user obeys a Dirichlet distribution parameterized by the vector a~Dir(γ), which has the following probability density function:

Figure BDA0003997252710000124
Figure BDA0003997252710000124

式中,分母

Figure BDA0003997252710000125
是归一化常数;γy>0,
Figure BDA0003997252710000126
是数据的非独立同分布程度,若γy→∞,
Figure BDA0003997252710000127
则所有用户的数据分布为独立同分布;若γy→0,
Figure BDA0003997252710000128
则每个用户仅随机持有一类数据样本。本发明中设置γy=γ,
Figure BDA0003997252710000129
In the formula, the denominator
Figure BDA0003997252710000125
is a normalization constant; γy >0,
Figure BDA0003997252710000126
is the degree to which the data are not independent and identically distributed. If γy →∞,
Figure BDA0003997252710000127
Then the data distribution of all users is independent and identically distributed; if γy →0,
Figure BDA0003997252710000128
Each user only randomly holds one type of data sample. In the present invention, γy =γ is set.
Figure BDA0003997252710000129

所述社交分组Φj中用户n的本地模型损失

Figure BDA00039972527100001210
与高斯噪声大小σn,j和数据的非独立同分布程度γ相关,具体为:The local model loss of user n in the social group Φj
Figure BDA00039972527100001210
It is related to the Gaussian noise size σn,j and the degree of non-independent and identically distributed data γ, specifically:

Figure BDA00039972527100001211
Figure BDA00039972527100001211

式中,μ1,…,μ5均为正的曲线拟合参数;分子部分μ1exp(-μ2·γ)反应了当数据的非独立同分布程度γ增加时本地模型边际损失值的减小;分母部分μ3+exp(-μ4·σn,j)反应了模型噪声大小σn,j增加时本地模型质量的下降。Wherein, μ1 ,…,μ5 are all positive curve fitting parameters; the numerator μ1 exp(-μ2 ·γ) reflects the decrease in the marginal loss value of the local model when the non-independent and identically distributed degree γ of the data increases; the denominator μ3 +exp(-μ4 ·σn,j ) reflects the decrease in the quality of the local model when the model noise size σn,j increases.

步骤2.3、对于每个社交分组,根据群体效用函数,设计公平分配规则得到所述社交分组内所有成员的个体效用函数;Step 2.3: For each social group, according to the group utility function, a fair distribution rule is designed to obtain the individual utility functions of all members in the social group;

具体地说,所述社交分组Φj内每个成员用户n的个体效用为按比例分配的额外效用与非合作效用之和:Specifically, the individual utility of each member user n in the social group Φj is the sum of the additional utility and the non-cooperative utility allocated in proportion:

Figure BDA0003997252710000131
Figure BDA0003997252710000131

式中,

Figure BDA0003997252710000132
Figure BDA0003997252710000133
分别表示用户l和n的非合作效用,即用户l和n分别形成单项分组时的群体效用;
Figure BDA0003997252710000134
表示用户n在社交分组Φj中的贡献权重;
Figure BDA0003997252710000135
表示相比于非合作情况,社交分组Φj内所有成员合作时产生的额外效用。In the formula,
Figure BDA0003997252710000132
and
Figure BDA0003997252710000133
They represent the non-cooperative utility of users l and n, that is, the group utility when users l and n form a single group respectively;
Figure BDA0003997252710000134
represents the contribution weight of user n in social group Φj ;
Figure BDA0003997252710000135
It represents the additional utility generated when all members in the social group Φj cooperate compared with the non-cooperative situation.

步骤2.4、对于每个参与联邦学习任务的用户,根据所述个体效用函数构建可转移分组列表,并在满足社交分组离开规则的同时向所述可转移分组列表中的最优社交分组发送加入申请;Step 2.4: For each user participating in the federated learning task, a transferable group list is constructed according to the individual utility function, and a joining application is sent to the optimal social group in the transferable group list while satisfying the social group leaving rule;

具体地说,本发明中所述个体效用函数构建可转移分组列表,并在满足社交分组离开规则的同时向所述可转移分组列表中的最优社交分组发送加入申请,具体包括:Specifically, the individual utility function in the present invention constructs a transferable group list, and sends a joining application to the optimal social group in the transferable group list while satisfying the social group leaving rule, specifically including:

步骤2.4.1、根据所述个体效用函数,构建偏好次序;Step 2.4.1, construct a preference order based on the individual utility function;

用户n,n∈Φj对社交分组Φ′j,Φ′j≠Φj的偏好次序为:The preference order of user n, n∈Φj to social group Φ′j , Φ′j ≠Φj is:

Figure BDA0003997252710000136
Figure BDA0003997252710000136

式中,ψn(Φ′j∪{n})表示用户n在加入社交分组Φ′j后的个体效用;ψl(Φ′j)和ψl(Φ′j∪{n})分别表示用户l∈Φ′j在原有社交分组Φ′j和新社交分组Φ′j∪{n}中的个体效用;

Figure BDA0003997252710000137
表示历史上曾拒绝过用户n加入申请的社交分组的集合;Where, ψn (Φ′j ∪{n}) represents the individual utility of user n after joining the social group Φ′j ; ψl (Φ′j ) and ψl (Φ′j ∪{n}) represent the individual utility of user l∈Φ′j in the original social group Φ′j and the new social group Φ′j ∪{n}, respectively;
Figure BDA0003997252710000137
represents the set of social groups that have historically rejected user n's application to join;

步骤2.4.2、根据偏好次序,构建可转移分组列表;Step 2.4.2: Construct a list of transferable groups according to the order of preference;

在第t次迭代时,社交分组Φj中的用户n的可转移分组列表为:At the tth iteration, the transferable group list of user n in social group Φj is:

Figure BDA0003997252710000138
Figure BDA0003997252710000138

式中,Φ(t)表示在第t次迭代时所有社交分组的集合;Where Φ(t) represents the set of all social groups at the tth iteration;

步骤2.4.3、设计社交分组离开规则;Step 2.4.3, design the rules for leaving social groups;

本发明中社交分组离开规则,具体为:The social group leaving rules in the present invention are specifically as follows:

如果所述社交分组在第t次迭代时接受一个新用户的加入申请,则在该第t次迭代时原有的内部成员均不能离开所述社交分组;If the social group accepts a new user's application for joining in the tth iteration, then in the tth iteration, all the original internal members cannot leave the social group;

步骤2.4.4、通过计算最优社交分组决定用户的最优转移策略;Step 2.4.4, determine the optimal transfer strategy of the user by calculating the optimal social grouping;

用户n,n∈Φj的可转移分组列表中的最优社交分组为

Figure BDA0003997252710000141
Figure BDA0003997252710000142
则用户n偏向于脱离原有社交分组并形成单项分组;否则,用户n偏向于脱离原有社交分组并加入社交分组
Figure BDA0003997252710000143
The optimal social grouping in the transferable grouping list of user n, n∈Φj is
Figure BDA0003997252710000141
like
Figure BDA0003997252710000142
If user n is inclined to leave the original social group and form a single group, otherwise, user n is inclined to leave the original social group and join a social group.
Figure BDA0003997252710000143

步骤2.5、对于每个社交分组,当收到多个所述加入申请时,构建可接受用户列表,并在满足社交分组加入规则的同时接受所述可接受用户列表中的最优用户的加入申请,同时拒绝可接受用户列表中其他用户的加入申请;Step 2.5: for each social group, when multiple joining applications are received, an acceptable user list is constructed, and the joining application of the best user in the acceptable user list is accepted while satisfying the social group joining rules, and the joining applications of other users in the acceptable user list are rejected;

步骤2.5.1、当收到多个所述加入申请时,构建可接受用户列表;Step 2.5.1, when multiple joining applications are received, construct an acceptable user list;

Figure BDA0003997252710000144
为第t次迭代时社交分组Φj的可接受用户集合,即在第t次迭代时向社交分组Φj发送加入申请的用户的集合;make
Figure BDA0003997252710000144
is the set of acceptable users of social group Φj at the t-th iteration, that is, the set of users who send joining applications to social group Φj at the t-th iteration;

步骤2.5.2、设计社交分组加入规则;Step 2.5.2, design social group joining rules;

本发明中社交分组加入规则,具体为:The social group joining rules in the present invention are specifically as follows:

如果所述社交分组在第t次迭代时有内部成员离开,则在该第t次迭代时所述社交分组不能接受所有新用户的加入申请;If an internal member of the social group leaves during the t-th iteration, the social group cannot accept all new users' applications for joining during the t-th iteration;

步骤2.5.3、通过计算最优用户决定社交分组的最优许可策略;Step 2.5.3, determining the optimal permission strategy for social grouping by calculating the optimal user;

社交分组Φj的可接受用户列表中的最优用户为n*=arg maxρnj),

Figure BDA0003997252710000145
The optimal user in the acceptable user list of social group Φj is n* = arg maxρnj ),
Figure BDA0003997252710000145

步骤2.6、执行用户分离与合并操作,并更新当前社交分组的集合;Step 2.6: Execute user separation and merging operations, and update the current social grouping set;

首先,将用户n*∈Φj转移到另一个社交分组Φ′j的分离和合并操作包括:分离操作(即

Figure BDA0003997252710000146
)和合并操作(即
Figure BDA0003997252710000148
)。其中,
Figure BDA0003997252710000147
和Φ′j+=Φ′j∪{n*};First, the split and merge operations of transferring user n* ∈Φj to another social group Φ′j include: split operation (i.e.
Figure BDA0003997252710000146
) and the merge operation (i.e.
Figure BDA0003997252710000148
).in,
Figure BDA0003997252710000147
and Φ′j+ = Φ′j ∪{n* };

其次,更新当前社交分组的集合Φ(t)→Φ(t+1)Secondly, update the set of current social groups Φ(t) →Φ(t+1) .

步骤2.7、重复上述步骤,直到社交分组的状态不再发生变化,即达成纳什稳定且互不相交的的社交分组Φ*Step 2.7: Repeat the above steps until the state of the social grouping no longer changes, that is, a Nash stable and disjoint social grouping Φ* is achieved.

步骤3、每个社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值决定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户,如图4所述,具体包括:Step 3: All members in each social group use local data for training to obtain local model parameter updates, and determine the Gaussian noise perturbation strategy based on the social trust value between the members and the manager of the social group to obtain the perturbed local model parameter updates. The manager of the social group is the user with the largest centrality in the social group, as shown in FIG4 , specifically including:

步骤3.1、利用本地数据进行训练得到本地模型参数更新;Step 3.1: Use local data for training to obtain local model parameter updates;

每个物联网用户n通过随机梯度下降算法在本地私有数据集

Figure BDA0003997252710000151
上训练上一个通信轮k-1中接收到的全局模型Θk-1并生成当前通信轮次的本地模型参数更新
Figure BDA0003997252710000152
Each IoT user n uses the stochastic gradient descent algorithm to generate a local private dataset
Figure BDA0003997252710000151
Train the global model Θk-1 received in the previous communication round k-1 and generate the local model parameter update for the current communication round
Figure BDA0003997252710000152

Figure BDA0003997252710000153
Figure BDA0003997252710000153

式中,η是学习率,

Figure BDA0003997252710000154
是用户n的本地数据样本上的损失函数。Where η is the learning rate,
Figure BDA0003997252710000154
is the loss function on the local data samples of user n.

步骤3.2、决定高斯噪声扰动策略;Step 3.2, determine the Gaussian noise perturbation strategy;

情况1:若社交分组Φj内的用户n与社交分组Φj的管理者φj之间的社交信任值大于系统预设阈值(即αn,j≥αth),则直接将原始的本地模型参数更新(即设置噪声大小为σn,j=0)传输给社交分组Φj的管理者;Case 1: If the social trust value between user n in social group Φj and the manager φj of social group Φj is greater than the system preset threshold (i.e., αn, j ≥ αth ), the original local model parameter update (i.e., setting the noise size to σn, j = 0) is directly transmitted to the manager of social group Φj ;

情况2:若社交分组Φj内的用户n与社交分组Φj的管理者φj之间的社交信任值低于系统预设阈值(即0<αn,j<αth),则将加入适量高斯噪声扰动

Figure BDA0003997252710000155
的本地模型参数更新传输给社交分组Φj的管理者,其中S表示L2范数的敏感度。具体包括:Case 2: If the social trust value between user n in social group Φj and the administrator φj of social group Φj is lower than the system preset threshold (i.e. 0<αn, j <αth ), an appropriate amount of Gaussian noise perturbation will be added
Figure BDA0003997252710000155
The local model parameter update is transmitted to the manager of the social group Φj , where S represents the sensitivity of the L2 norm. Specifically, it includes:

1)每个社交分组内的每个成员将与所述社交分组的管理者之间的社交信任值映射为隐私保护级别,具体为:1) Each member in each social group maps the social trust value between the member and the administrator of the social group to a privacy protection level, specifically:

Figure BDA0003997252710000156
Figure BDA0003997252710000156

式中,θ1,θ2为正的调节参数;∈n,j表示隐私预算,其值越小,隐私保护程度越大;αn,j表示用户n与社交分组Φj的管理者之间的社交信任值;Where θ1 , θ2 are positive adjustment parameters; ∈n, j represents the privacy budget, the smaller its value, the greater the degree of privacy protection; αn, j represents the social trust value between user n and the manager of social group Φj ;

2)根据隐私保护级别计算高斯噪声的大小参数,具体为:2) Calculate the size parameter of Gaussian noise according to the privacy protection level, specifically:

Figure BDA0003997252710000161
Figure BDA0003997252710000161

式中,δ是小的概率值;σn,j是高斯噪声的方差值,其值越大,添加的噪声大小越大;Where δ is a small probability value; σn,j is the variance value of Gaussian noise. The larger its value, the larger the added noise.

σn,j∈[0,σmax],σmax表示高斯噪声方差的最大值。σn, j ∈ [0, σmax ], σmax represents the maximum value of the Gaussian noise variance.

情况3:若用户n形成单项分组(即Φj={n}),则向本地模型参数更新中加入大小为σmax的最大高斯噪声扰动,且用户n为所述单项分组的管理者(即φj=n);Case 3: If user n forms a single-item group (ie, Φj ={n}), a maximum Gaussian noise perturbation of size σmax is added to the local model parameter update, and user n is the manager of the single-item group (ie, φj =n);

步骤3.3、计算扰动后的本地模型参数更新;Step 3.3, calculate the local model parameter update after the disturbance;

通过往本地模型参数更新中添加相应的高斯噪声扰动,用户n生成扰动后的本地模型参数更新:By adding the corresponding Gaussian noise perturbation to the local model parameter update, user n generates the perturbed local model parameter update:

Figure BDA0003997252710000162
Figure BDA0003997252710000162

步骤4、在完成用户侧本地模型参数更新及扰动后,执行联邦学习模型的分层聚合,如图5所述,具体包括:Step 4: After completing the update and perturbation of the local model parameters on the user side, perform hierarchical aggregation of the federated learning model, as shown in FIG5 , specifically including:

步骤4.1、每个社交分组内的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新。Step 4.1: The manager in each social group updates the local model parameters of all members in the social group to perform model pre-aggregation in the social group, and obtains social layer pre-aggregation model parameter updates.

具体地,每个社交分组Φj的管理者φj聚合社交分组内所有成员的本地模型更新,并生成社交层预聚合模型参数更新:Specifically, the manager φj of each social group Φj aggregates the local model updates of all members in the social group and generates social layer pre-aggregated model parameter updates:

Figure BDA0003997252710000163
Figure BDA0003997252710000163

式中,

Figure BDA0003997252710000164
是向φj发送原始本地模型参数更新的用户集合;
Figure BDA0003997252710000165
是向φj发送扰动的本地模型参数更新的用户集合;qn,j是社交分组Φj内用户n的本地模型参数更新的质量。In the formula,
Figure BDA0003997252710000164
is the set of users who send original local model parameter updates to φj ;
Figure BDA0003997252710000165
is the set of users who send perturbed local model parameter updates to φj ; qn,j is the quality of local model parameter updates for user n within social group Φj .

步骤4.2、每个社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。Step 4.2: Each social group transmits the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.

具体地,云端全局聚合器将所有社交分组上传的社交层预聚合模型参数更新进行聚合,生成当前的全局模型ΘkSpecifically, the cloud-side global aggregator aggregates the social layer pre-aggregation model parameter updates uploaded by all social groups to generate the current global model Θk :

Figure BDA0003997252710000171
Figure BDA0003997252710000171

式中,Φ*为纳什稳定的社交分组的集合。Where Φ* is the set of Nash-stable social groups.

步骤4.3、判断训练的全局模型Θk是否达成收敛,或当前全局通信轮次k是否达到最大迭代次数,若满足其中一个条件,则模型学习停止。Step 4.3: Determine whether the trained global model Θk has reached convergence, or whether the current global communication round k has reached the maximum number of iterations. If one of the conditions is met, the model learning stops.

本发明提供了一种基于社交分组的联邦学习方法,通过在联邦学习中考虑用户之间内在且持久的社交关联,相互信任的用户可以组成一个稳定的社交分组,并依据社交关系的强弱往原始本地模型参数中添加适量的差分隐私噪声,接着分组内所有用户的本地模型参数执行分组预聚合操作,从而防止因加入过多差分隐私噪声而导致的联邦学习模型性能急剧下降(即,提升可用性)。同时,其他团体和攻击者难以从该预聚合的模型参数信息中反向推理出其中每个用户的本地模型参数信息,从而实现分组内用户的隐私保护。本发明通过利用用户之间内在且持久的社交属性,设计可支持定制化隐私保护的新型高可用分组联邦学习范式,从而在满足定制化的用户隐私保护的同时,提升联邦学习模型的可用性。The present invention provides a federated learning method based on social grouping. By considering the intrinsic and persistent social associations between users in federated learning, users who trust each other can form a stable social group, and add an appropriate amount of differential privacy noise to the original local model parameters according to the strength of the social relationship. Then, the local model parameters of all users in the group perform a group pre-aggregation operation, thereby preventing the performance of the federated learning model from being sharply reduced due to the addition of too much differential privacy noise (i.e., improving availability). At the same time, it is difficult for other groups and attackers to reversely infer the local model parameter information of each user from the pre-aggregated model parameter information, thereby achieving privacy protection for users in the group. The present invention designs a new high-availability group federated learning paradigm that can support customized privacy protection by utilizing the intrinsic and persistent social attributes between users, thereby improving the availability of the federated learning model while satisfying customized user privacy protection.

本发明还提供了一种基于社交分组的联邦学习装置,包括:The present invention also provides a federated learning device based on social grouping, comprising:

构建模块,用于对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值;A construction module is used to construct a social relationship graph between users who jointly participate in the federated learning task, in which each user in the social relationship graph evaluates the social trust value of other users based on direct social trust and indirect social trust;

社交分组形成模块,用于所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组;A social grouping forming module, used for the users who jointly participate in the federated learning task to form a plurality of Nash-stable and mutually disjoint social groups according to the social trust values;

本地模型参数更新模块,用于每个所述社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户;A local model parameter updating module, which is used for all members in each of the social groups to perform training using local data to obtain local model parameter updates, and to determine a Gaussian noise perturbation strategy based on the social trust value between the members and the administrator of the social group to obtain the perturbed local model parameter updates, wherein the administrator of the social group is the user with the largest centrality in the social group;

预聚合模块,用于每个所述社交分组的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新;A pre-aggregation module, configured for the manager of each social group to update the local model parameters of all members in the social group to perform model pre-aggregation within the social group, and obtain a social layer pre-aggregation model parameter update;

传输模块,用于每个所述社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,所述全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。A transmission module is used for each of the social groups to transmit the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.

本发明在一个实施例中,提供了一种计算机设备,该计算机设备包括处理器以及存储器,所述存储器用于存储计算机程序,所述计算机程序包括程序指令,所述处理器用于执行所述计算机存储介质存储的程序指令。处理器可以是中央处理单元(CentralProcessing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital SignalProcessor、DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable GateArray,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等,其是终端的计算核心以及控制核心,其适于实现一条或一条以上指令,具体适于加载并执行一条或一条以上指令从而实现相应方法流程或相应功能;本发明实施例所述的处理器可以用于实现一种基于社交分组的联邦学习方法的操作。In one embodiment of the present invention, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used to implement the operation of a federated learning method based on social grouping.

本发明在一个实施例中,一种基于社交分组的联邦学习方法如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读存储介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。In one embodiment of the present invention, a method of federated learning based on social grouping can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data.

所述计算机存储介质可以是计算机能够存取的任何可用介质或数据存储设备,包括但不限于磁性存储器(例如软盘、硬盘、磁带、磁光盘(MO)等)、光学存储器(例如CD、DVD、BD、HVD等)、以及半导体存储器(例如ROM、EPROM、EEPROM、非易失性存储器(NANDFLASH)、固态硬盘(SSD))等。The computer storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

本申请是参照本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present application is described with reference to the flowchart and/or block diagram of the method, device (system) and computer program product of the embodiment of the present application. It should be understood that each process and/or box in the flowchart and/or block diagram, and the combination of the process and/or box in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one process or multiple processes in the flowchart and/or one box or multiple boxes in the block diagram.

这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and/or one or more boxes in the block diagram.

最后应说明的是:以上所述实施例,仅为本发明的具体实施方式,用以说明本发明的技术方案,而非对其限制,本发明的保护范围并不局限于此,尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本发明实施例技术方案的精神和范围,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims (10)

Translated fromChinese
1.一种基于社交分组的联邦学习方法,其特征在于,包括:1. A federated learning method based on social grouping, characterized by comprising:对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值;For users who jointly participate in the federated learning task, a social relationship graph is constructed between the users, in which each user evaluates the social trust value of other users based on direct social trust and indirect social trust;所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组;The users who jointly participate in the federated learning task form a plurality of Nash-stable and mutually disjoint social groups according to the social trust values;每个所述社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户;All members in each of the social groups use local data for training to obtain local model parameter updates, and determine a Gaussian noise perturbation strategy based on the social trust value between the members and the administrator of the social group to obtain the perturbed local model parameter updates, where the administrator of the social group is the user with the largest centrality in the social group;每个所述社交分组的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新;The manager of each social group updates the local model parameters of all members in the social group to perform model pre-aggregation in the social group to obtain social layer pre-aggregation model parameter updates;每个所述社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,所述全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。Each of the social groups transmits the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.2.根据权利要求1所述的一种基于社交分组的联邦学习方法,其特征在于,所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组,具体为:2. A social grouping-based federated learning method according to claim 1, characterized in that the users who jointly participate in the federated learning task form multiple Nash-stable and mutually disjoint social groups according to the social trust values, specifically:对于每个社交分组,根据用户之间的社交信任值界定群体效用函数;For each social group, define the group utility function based on the social trust value between users;对于每个社交分组,根据所述群体效用函数,设计公平分配规则得到所述社交分组内所有成员的个体效用函数;For each social group, according to the group utility function, a fair allocation rule is designed to obtain the individual utility functions of all members in the social group;对于每个参与联邦学习任务的用户,根据所述个体效用函数构建可转移分组列表,并在满足社交分组离开规则的同时向所述可转移分组列表中的最优社交分组发送加入申请;For each user participating in the federated learning task, a transferable group list is constructed according to the individual utility function, and a joining application is sent to the optimal social group in the transferable group list while satisfying the social group leaving rule;对于每个社交分组,当收到多个所述加入申请时,构建可接受用户列表,并在满足社交分组加入规则的同时接受所述可接受用户列表中的最优用户的加入申请,同时拒绝可接受用户列表中其他用户的加入申请;For each social group, when multiple joining applications are received, an acceptable user list is constructed, and while satisfying the social group joining rules, the joining application of the best user in the acceptable user list is accepted, while the joining applications of other users in the acceptable user list are rejected;执行用户分离与合并操作,并更新当前社交分组的集合;Perform user separation and merging operations and update the current social grouping collection;重复上述步骤,直到社交分组的状态不再发生变化,形成所述纳什稳定且互不相交的多个社交分组。The above steps are repeated until the state of the social grouping no longer changes, thereby forming a plurality of Nash-stable and mutually disjoint social groups.3.根据权利要求2所述的一种基于社交分组的联邦学习方法,其特征在于,所述根据用户之间的社交信任值界定群体效用函数,具体为:3. A social grouping-based federated learning method according to claim 2, characterized in that the group utility function is defined according to the social trust value between users, specifically:所述社交分组Φj的群体效用为收益与成本之差:The group utility of the social group Φj is the difference between the benefit and the cost:
Figure FDA0003997252700000021
Figure FDA0003997252700000021
式中,λp是对单位模型质量的奖励支付;qn是社交分组Φj中用户n的本地模型质量,qn与用户n和社交分组Φj管理者的社交关系以及用户n本地数据的非独立同分布程度相关;λc是大于0的比例系数;|Φj|表示社交分组Φj的大小,即社交分组内成员的数量;λcj|表示社交分组Φj内的通信成本;
Figure FDA0003997252700000022
表示用户n形成单项分组时的模型质量;
Whereλp is the reward payment for unit model quality;qn is the local model quality of user n in social groupΦj , which is related to the social relationship between usern and the manager of social groupΦj and the degree of non-independent and identically distributed local data of user n;λc is a proportional coefficient greater than 0; |Φj | represents the size of social groupΦj , that is, the number of members in the social group;λc |Φj | represents the communication cost within social groupΦj ;
Figure FDA0003997252700000022
Indicates the model quality when user n forms a single group;
所述社交分组Φj中用户n的本地模型质量qn与模型损失值
Figure FDA0003997252700000023
负相关,具体为:
The local model qualityqn and model loss value of user n in the social groupΦj
Figure FDA0003997252700000023
Negative correlation, specifically:
Figure FDA0003997252700000024
Figure FDA0003997252700000024
式中,κ1,κ2均为正的曲线拟合参数;κ2表示模型损失趋于0时渐进最大的本地模型质量;Where, κ1 and κ2 are both positive curve fitting parameters; κ2 represents the asymptotically maximum local model quality when the model loss approaches 0;所述社交分组Φj中用户n的本地模型损失
Figure FDA0003997252700000025
与高斯噪声大小σn,j和数据的非独立同分布程度γ相关,具体为:
The local model loss of user n in the social group Φj
Figure FDA0003997252700000025
It is related to the Gaussian noise size σn,j and the degree of non-independent and identically distributed data γ, specifically:
Figure FDA0003997252700000026
Figure FDA0003997252700000026
式中,μ1,…,μ5均为正的曲线拟合参数;分子部分μ1exp(-μ2·γ)反应了当数据的非独立同分布程度γ增加时本地模型边际损失值的减小;分母部分μ3+exp(-μ4·σn,j)反应了模型噪声大小σn,j增加时本地模型质量的下降。Wherein, μ1 ,…,μ5 are all positive curve fitting parameters; the numerator μ1 exp(-μ2 ·γ) reflects the decrease in the marginal loss value of the local model when the degree of non-independent and identically distributed data γ increases; the denominator μ3 +exp(-μ4 ·σn,j ) reflects the decrease in the quality of the local model when the model noise size σn,j increases.4.根据权利要求3所述的一种基于社交分组的联邦学习方法,其特征在于,所述根据所述群体效用函数,设计公平分配规则得到所述社交分组内所有成员的个体效用函数,具体为:4. A social grouping-based federated learning method according to claim 3, characterized in that, according to the group utility function, a fair distribution rule is designed to obtain the individual utility functions of all members in the social group, specifically:所述社交分组Φj内每个成员用户n的个体效用为非合作情况下的效用与按贡献比例分配的额外效用之和:The individual utility of each member user n in the social group Φj is the sum of the utility in the non-cooperative case and the additional utility allocated according to the contribution ratio:
Figure FDA0003997252700000031
Figure FDA0003997252700000031
式中,
Figure FDA0003997252700000032
Figure FDA0003997252700000033
分别表示用户l和n的非合作效用,即用户l和n分别形成单项分组时的群体效用;
Figure FDA0003997252700000034
表示用户n在社交分组Φj中的贡献权重;
Figure FDA0003997252700000035
表示相比于非合作情况下,社交分组Φj内所有成员在合作时产生的额外效用。
In the formula,
Figure FDA0003997252700000032
and
Figure FDA0003997252700000033
They represent the non-cooperative utility of users l and n, that is, the group utility when users l and n form a single group respectively;
Figure FDA0003997252700000034
represents the contribution weight of user n in social group Φj ;
Figure FDA0003997252700000035
It represents the additional utility generated by all members in the social group Φj when cooperating compared with the non-cooperative situation.
5.根据权利要求4所述的一种基于社交分组的联邦学习方法,其特征在于,所述根据所述个体效用函数构建可转移分组列表,具体为:5. A social grouping-based federated learning method according to claim 4, characterized in that the transferable grouping list is constructed according to the individual utility function, specifically:根据所述个体效用函数,构建偏好次序;constructing a preference order based on the individual utility function;根据所述偏好次序,构建可转移分组列表;constructing a transferable group list according to the preference order;所述根据所述个体效用函数,构建偏好次序,具体为:The preference order is constructed according to the individual utility function, specifically:用户n,n∈Φj对社交分组Φ′j,Φ′j≠Φj的偏好次序为:The preference order of user n, n∈Φj to social group Φ′j , Φ′j ≠Φj is:
Figure FDA0003997252700000036
Figure FDA0003997252700000036
式中,ψn(Φ′j∪{n})表示用户n在加入社交分组Φ′j后的个体效用;ψl(Φ′j)和ψl(Φ′j∪{n})分别表示用户l∈Φ′j在原有社交分组Φ′j和新社交分组Φ′j∪{n}中的个体效用;
Figure FDA0003997252700000037
表示历史上曾拒绝过用户n加入申请的社交分组的集合;
Where, ψn (Φ′j ∪{n}) represents the individual utility of user n after joining the social group Φ′j ; ψl (Φ′j ) and ψl (Φ′j ∪{n}) represent the individual utility of user l∈Φ′j in the original social group Φ′j and the new social group Φ′j ∪{n}, respectively;
Figure FDA0003997252700000037
represents the set of social groups that have historically rejected user n's application to join;
所述根据所述偏好次序,构建可转移分组列表,具体为:The step of constructing a transferable group list according to the preference order is as follows:在第t次迭代时,社交分组Φj中的用户n的可转移分组列表为:At the tth iteration, the transferable group list of user n in social group Φj is:
Figure FDA0003997252700000041
Figure FDA0003997252700000041
式中,Φ(t)表示在第t次迭代时所有社交分组的集合。Where Φ(t) represents the set of all social groups at the tth iteration.
6.根据权利要求5所述的一种基于社交分组的联邦学习方法,其特征在于,所述社交分组离开规则,具体为:6. A social grouping-based federated learning method according to claim 5, characterized in that the social grouping leaving rule is specifically:如果所述社交分组Φj在第t次迭代时接受一个新用户的加入申请,则在该第t次迭代时原有的内部成员均不能离开所述社交分组ΦjIf the social group Φj accepts a new user's application for joining in the tth iteration, then in the tth iteration, all the original internal members cannot leave the social group Φj ;所述可转移分组列表中的最优社交分组,具体为:The optimal social group in the transferable group list is specifically:用户n,n∈Φj的可转移分组列表中的最优社交分组为
Figure FDA0003997252700000042
Figure FDA0003997252700000043
则用户n偏向于脱离原有社交分组并形成单项分组;否则,用户n偏向于脱离原有社交分组并加入社交分组
Figure FDA0003997252700000044
The optimal social grouping in the transferable grouping list of user n, n∈Φj is
Figure FDA0003997252700000042
like
Figure FDA0003997252700000043
If user n is inclined to leave the original social group and form a single group, otherwise, user n is inclined to leave the original social group and join a social group.
Figure FDA0003997252700000044
7.根据权利要求6所述的一种基于社交分组的联邦学习方法,其特征在于,所述社交分组加入规则,具体为:7. A social grouping-based federated learning method according to claim 6, characterized in that the social grouping joining rule is specifically:如果所述社交分组在第t次迭代时有内部成员离开,则在该第t次迭代时所述社交分组不能接受所有新用户的加入申请;If an internal member of the social group leaves during the t-th iteration, the social group cannot accept all new users' applications for joining during the t-th iteration;所述可接受用户列表中的最优用户,具体为:The optimal user in the acceptable user list is specifically:社交分组
Figure FDA0003997252700000047
的可接受用户列表中的最优用户为
Figure FDA0003997252700000045
其中
Figure FDA0003997252700000046
为第t次迭代时社交分组Φj的可接受用户集合,即在第t次迭代时向社交分组Φj发送加入申请的用户的集合。
Social Grouping
Figure FDA0003997252700000047
The optimal user in the list of acceptable users is
Figure FDA0003997252700000045
in
Figure FDA0003997252700000046
is the set of acceptable users of the social group Φj at the t-th iteration, that is, the set of users who send joining applications to the social group Φj at the t-th iteration.
8.根据权利要求1所述的一种基于社交分组的联邦学习方法,其特征在于,所述根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,具体为:8. A social grouping-based federated learning method according to claim 1, characterized in that the Gaussian noise perturbation strategy is determined according to the social trust value between the administrator of the social group, specifically:若用户n与社交分组Φj的管理者之间的社交信任值大于系统预设阈值,则直接将原始的本地模型参数更新传输给社交分组Φj的管理者;If the social trust value between user n and the manager of social group Φj is greater than the system preset threshold, the original local model parameter update is directly transmitted to the manager of social group Φj ;若用户n与社交分组Φj的管理者之间的社交信任值低于系统预设阈值,则将加入高斯噪声扰动的本地模型参数更新传输给社交分组φj的管理者;If the social trust value between user n and the manager of social group Φj is lower than the system preset threshold, the local model parameter update with Gaussian noise perturbation is transmitted to the manager of social group φj ;若用户n形成单项分组,则向本地模型参数更新中加入大小为σmax的最大高斯噪声扰动,且用户n为所述单项分组的管理者。If user n forms a single-item group, a maximum Gaussian noise perturbation of size σmax is added to the local model parameter update, and user n is the manager of the single-item group.9.根据权利要求8所述的一种基于社交分组的联邦学习方法,其特征在于,所述加入高斯噪声扰动的本地模型参数更新,具体为:9. A social grouping-based federated learning method according to claim 8, characterized in that the local model parameter update with Gaussian noise disturbance is specifically:每个社交分组内的每个成员将与所述社交分组的管理者之间的社交信任值映射为隐私保护级别;Each member in each social group maps the social trust value between the member and the administrator of the social group to a privacy protection level;每个社交分组内的每个成员根据所述隐私保护级别,计算高斯噪声的大小参数;Each member in each social group calculates a size parameter of Gaussian noise according to the privacy protection level;每个社交分组内的每个成员根据所述高斯噪声的大小参数,对本地模型参数更新添加相应高斯噪声,得到扰动后的本地模型参数更新;Each member in each social group adds corresponding Gaussian noise to the local model parameter update according to the size parameter of the Gaussian noise to obtain the disturbed local model parameter update;所述将与所述社交分组的管理者之间的社交信任值映射为隐私保护级别,具体为:The mapping of the social trust value between the administrator of the social group and the administrator of the social group to the privacy protection level is specifically:
Figure FDA0003997252700000051
Figure FDA0003997252700000051
式中,θ1,θ2为正的调节参数;∈n,j表示隐私预算,其值越小,隐私保护程度越大;αn,j表示用户n与社交分组Φj的管理者之间的社交信任值;Where θ1 , θ2 are positive adjustment parameters; ∈n,j represents the privacy budget, the smaller its value, the greater the degree of privacy protection; αn,j represents the social trust value between user n and the manager of social group Φj ;所述每个社交分组内的每个成员根据所述隐私保护级别,计算高斯噪声的大小参数,具体为:Each member in each social group calculates the size parameter of Gaussian noise according to the privacy protection level, specifically:
Figure FDA0003997252700000052
Figure FDA0003997252700000052
式中,δ是小的概率值;σn,j是高斯噪声的方差值,其值越大,添加的噪声大小越大;Where δ is a small probability value; σn,j is the variance value of Gaussian noise. The larger its value, the larger the noise added.σn,j∈[0,σmax],σmax表示高斯噪声方差的最大值。σn, j ∈ [0, σmax ], σmax represents the maximum value of the Gaussian noise variance.
10.一种基于社交分组的联邦学习装置,其特征在于,包括:10. A federated learning device based on social grouping, comprising:构建模块,用于对于共同参与联邦学习任务的用户,构建用户之间的社交关系图谱,所述社交关系图谱中每个用户基于直接社交信任与间接社交信任对其他用户评估社交信任值;A construction module is used to construct a social relationship graph between users who jointly participate in a federated learning task, in which each user in the social relationship graph evaluates a social trust value of other users based on direct social trust and indirect social trust;社交分组形成模块,用于所述共同参与联邦学习任务的用户根据所述社交信任值形成纳什稳定且互不相交的多个社交分组;A social grouping forming module, used for the users who jointly participate in the federated learning task to form a plurality of Nash-stable and mutually disjoint social groups according to the social trust values;本地模型参数更新模块,用于每个所述社交分组内的所有成员利用本地数据进行训练得到本地模型参数更新,并根据与所述社交分组的管理者之间的社交信任值确定高斯噪声扰动策略,得到扰动后的本地模型参数更新,所述社交分组的管理者为所述社交分组内中心度最大的用户;A local model parameter updating module, which is used for all members in each of the social groups to perform training using local data to obtain local model parameter updates, and to determine a Gaussian noise perturbation strategy based on the social trust value between the members and the administrator of the social group to obtain the perturbed local model parameter updates, wherein the administrator of the social group is the user with the largest centrality in the social group;预聚合模块,用于每个所述社交分组的管理者将所述社交分组内的所有成员的所述本地模型参数更新进行社交分组内的模型预聚合,得到社交层预聚合模型参数更新;A pre-aggregation module, configured for the manager of each social group to update the local model parameters of all members in the social group to perform model pre-aggregation within the social group, and obtain a social layer pre-aggregation model parameter update;传输模块,用于每个所述社交分组将所述社交层预聚合模型参数更新传输至全局聚合器,得到全局聚合模型,所述全局聚合器将所述全局聚合模型传输给每个参与联邦学习任务的用户。A transmission module is used for each of the social groups to transmit the social layer pre-aggregation model parameter update to the global aggregator to obtain a global aggregation model, and the global aggregator transmits the global aggregation model to each user participating in the federated learning task.
CN202211600821.XA2022-12-132022-12-13Federal learning method and device based on social groupingActiveCN116011540B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211600821.XACN116011540B (en)2022-12-132022-12-13Federal learning method and device based on social grouping

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211600821.XACN116011540B (en)2022-12-132022-12-13Federal learning method and device based on social grouping

Publications (2)

Publication NumberPublication Date
CN116011540Atrue CN116011540A (en)2023-04-25
CN116011540B CN116011540B (en)2025-07-18

Family

ID=86018347

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211600821.XAActiveCN116011540B (en)2022-12-132022-12-13Federal learning method and device based on social grouping

Country Status (1)

CountryLink
CN (1)CN116011540B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116541883A (en)*2023-05-102023-08-04重庆大学 Trust-based differential privacy protection method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20200104337A1 (en)*2009-12-182020-04-02Graphika, Inc.Methods and systems for identifying markers of coordinated activity in social media movements
US20210150269A1 (en)*2019-11-182021-05-20International Business Machines CorporationAnonymizing data for preserving privacy during use for federated machine learning
CN113076422A (en)*2021-04-152021-07-06国家计算机网络与信息安全管理中心Multi-language social event detection method based on federal graph neural network
CN114510652A (en)*2022-04-202022-05-17宁波大学 A social collaborative filtering recommendation method based on federated learning
CN115374953A (en)*2022-07-072022-11-22西安电子科技大学 A Personalized Social Recommendation Method Based on Federated Matrix Factorization

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20200104337A1 (en)*2009-12-182020-04-02Graphika, Inc.Methods and systems for identifying markers of coordinated activity in social media movements
US20210150269A1 (en)*2019-11-182021-05-20International Business Machines CorporationAnonymizing data for preserving privacy during use for federated machine learning
CN113076422A (en)*2021-04-152021-07-06国家计算机网络与信息安全管理中心Multi-language social event detection method based on federal graph neural network
CN114510652A (en)*2022-04-202022-05-17宁波大学 A social collaborative filtering recommendation method based on federated learning
CN115374953A (en)*2022-07-072022-11-22西安电子科技大学 A Personalized Social Recommendation Method Based on Federated Matrix Factorization

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
骆茜荣: "基于道路分簇的多属性决策VDTN路由协议研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, 15 January 2019 (2019-01-15)*

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN116541883A (en)*2023-05-102023-08-04重庆大学 Trust-based differential privacy protection method, device, equipment and storage medium
CN116541883B (en)*2023-05-102023-11-17重庆大学 Trust-based differential privacy protection method, device, equipment and storage medium

Also Published As

Publication numberPublication date
CN116011540B (en)2025-07-18

Similar Documents

PublicationPublication DateTitle
CN113794675B (en)Distributed Internet of things intrusion detection method and system based on block chain and federal learning
Asheralieva et al.Reputation-based coalition formation for secure self-organized and scalable sharding in IoT blockchains with mobile-edge computing
Zou et al.Reputation-based regional federated learning for knowledge trading in blockchain-enhanced IoV
CN116306910B (en) A fair privacy calculation method based on federated node contributions
CN112770291A (en)Distributed intrusion detection method and system based on federal learning and trust evaluation
CN115102763A (en) Multi-domain DDoS attack detection method and device based on trusted federated learning
CN114510652A (en) A social collaborative filtering recommendation method based on federated learning
CN114662705B (en)Federal learning method, apparatus, electronic device, and computer-readable storage medium
CN116629350A (en)Improved horizontal synchronous federal learning aggregation acceleration method
Wang et al.Social-aware clustered federated learning with customized privacy preservation
Bing et al.Optimized DPoS consensus strategy: Credit-weighted comprehensive election
CN116541831B (en) A dual defense method based on blockchain and federated learning
CN117521849B (en) A vehicle federated learning method based on edge computing
CN104598739A (en)Index system constructing method for overall efficiency of network
CN117671652A (en)Distraction driving behavior joint identification method and system based on-chain federal learning
Cai et al.Bayesian game-driven incentive mechanism for blockchain-enabled secure federated learning in 6G wireless networks
You et al.Accuracy degrading: Toward participation-fair federated learning
Montazeri et al.Distributed mechanism design in continuous space for federated learning over vehicular networks
CN116011540A (en) A federated learning method and device based on social grouping
CN116647388A (en)Block chain-based data model detection method
Zhang et al.Joint accuracy and latency optimization for quantized federated learning in vehicular networks
Anwar et al.Scalable collaborative intrusion detection in autonomous vehicular networks: A hierarchical framework based on game theory
CN116186629B (en)Financial customer classification and prediction method and device based on personalized federal learning
Kushwaha et al.Energy-efficient and latency-aware blockchain-enabled federated learning for edge networks
CN118921184A (en)Intelligent purchasing supply chain network intrusion detection method and system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp