邊緣計(jì)算網(wǎng)絡(luò)中區(qū)塊鏈賦能的異步聯(lián)邦學(xué)習(xí)算法
doi: 10.11999/JEIT221517
-
重慶郵電大學(xué)通信與信息工程學(xué)院 重慶 400065
Asynchronous Federated Learning via Blockchain in Edge Computing Networks
-
College of Communication and Information Technology, Chongqing University of Posts and Telecommunications, Chongqing 400065, China
-
摘要: 由于數(shù)據(jù)量激增而引起的信息爆炸使得傳統(tǒng)集中式云計(jì)算不堪重負(fù),邊緣計(jì)算網(wǎng)絡(luò)(ECN)被提出以減輕云服務(wù)器的負(fù)擔(dān)。此外,在ECN中啟用聯(lián)邦學(xué)習(xí)(FL),可以實(shí)現(xiàn)數(shù)據(jù)本地化處理,從而有效解決協(xié)同學(xué)習(xí)中邊緣節(jié)點(diǎn)(ENs)的數(shù)據(jù)安全問題。然而在傳統(tǒng)FL架構(gòu)中,中央服務(wù)器容易受到單點(diǎn)攻擊,導(dǎo)致系統(tǒng)性能下降,甚至任務(wù)失敗。本文在ECN場景下,提出基于區(qū)塊鏈技術(shù)的異步FL算法(AFLChain),該算法基于ENs算力動(dòng)態(tài)分配訓(xùn)練任務(wù),以提高學(xué)習(xí)效率。此外,基于ENs算力、模型訓(xùn)練進(jìn)度以及歷史信譽(yù)值,引入熵權(quán)信譽(yù)機(jī)制評估ENs積極性并對其分級,淘汰低質(zhì)EN以進(jìn)一步提高AFLChain的性能。最后,提出基于次梯度的最優(yōu)資源分配(SORA)算法,通過聯(lián)合優(yōu)化傳輸功率和計(jì)算資源分配以最小化整體網(wǎng)絡(luò)延遲。仿真結(jié)果展示了AFLChain的模型訓(xùn)練效率以及SORA算法的收斂情況,證明了所提算法的有效性。
-
關(guān)鍵詞:
- 異步聯(lián)邦學(xué)習(xí) /
- 區(qū)塊鏈 /
- 資源分配 /
- 邊緣計(jì)算網(wǎng)絡(luò)
Abstract: Because of the information explosion caused by the surge of data, traditional centralized cloud computing is overwhelmed, Edge Computing Network (ECN) is proposed to alleviate the burden on cloud servers. In contrast, by permitting Federated Learning (FL) in the ECN, data localization processing could be realized to successfully address the data security problem of Edge Nodes (ENs) in collaborative learning. However, traditional FL exposes the central server to single-point attacks, resulting in system performance degradation or even task failure. In this paper, we propose Asynchronous Federated Learning based on Blockchain technology (AFLChain) in the ECN that can dynamically assign learning tasks to ENs based on their computing capabilities to boost learning efficiency. In addition, based on the computing capability of ENs, model training progress and historical reputation, the entropy weight reputation mechanism is implemented to assess and rank the enthusiasm of ENs, eliminating low quality ENs to further improve the performance of the AFLChain. Finally, the Subgradient based Optimal Resource Allocation (SORA) algorithm is proposed to reduce network latency by optimizing transmission power and computing resource allocation simultaneously. The simulation results demonstrate the model training efficiency of the AFLChain and the convergence of the SORA algorithm and the efficacy of the proposed algorithms. -
圖 3 異步FL概述
① SN下載全局模型;② SNs本地訓(xùn)練;③ SNs獲取下一動(dòng)作;④ 領(lǐng)導(dǎo)者收集SNs模型并上傳至區(qū)塊鏈;⑤⑥ PN下載SNs模型進(jìn)行聚合;⑦ PN上傳全局模型至區(qū)塊鏈
算法1 狀態(tài)數(shù)據(jù)庫決策流程 輸入:SN $k$狀態(tài)信息,狀態(tài)表
${[(k,{h_\kappa },{r_\kappa },T_\kappa ^{{\text{cmp}}},T_k^{{\text{qry}}},{T_\kappa },{a_\kappa })]_{\forall k \in [1,K]}}$輸出:下一動(dòng)作${a_k}$ 更新狀態(tài)表中SN $k$的狀態(tài)信息 通過式(8)找到最低算力SN 情況1:SN $k$剛進(jìn)入一輪本地訓(xùn)練,或SN $\xi $還未完成訓(xùn)練。 if ${r_k} = 1$ or ${h_k} > {h_\xi }$ ${r_k} \leftarrow {r_k} + 1$ 返回${a_k} = 1$ end if ${ {{t} }_c}{\text{ = CurrentTime} }$ 情況2:SN $\xi $已完成訓(xùn)練,或剩余等待時(shí)間不夠完成一輪訓(xùn)練。 if $k = \xi $ or ${a_\xi } = 0$ or 式(10)不成立 更新狀態(tài)表動(dòng)作信息 返回${a_k} = 0$ end if 情況3:剩余等待時(shí)間足以SN $k$完成一輪本地訓(xùn)練。 ${r_k} \leftarrow {r_k} + 1$ 返回${a_k} = 1$ 下載: 導(dǎo)出CSV
算法2 基于次梯度的最優(yōu)資源分配算法(SORA) 輸入:拉格朗日乘子更新步長$ ({\epsilon}_{1},{\epsilon}_{2}) $,拉格朗日乘子初始值
$(\pi _1^0,\pi _2^0)$,最大容忍閾值$ {\epsilon}_{3} $,$t = 0$,迭代因子上限${t_{\max }}$輸出:最優(yōu)資源分配$(f{_k^{ {\text{cmp} }* } },f{_k^{b*}},{p_k}^*)$ while $t < {t_{\max }}$ do 由式(36)和式(42) 分別得到$f{_k^{ {\text{cmp} }* }}$和$f{_k^{b*}}$ 由式(39)和式(40) 分別更新拉格朗日乘子${\pi _1}$和${\pi _2}$
if $ \left|{\pi }_{1}^{t+1}-{\pi }_{1}^{t}\right| < {\epsilon}_{3} $ and $ \left|{\pi }_{2}^{t+1}-{\pi }_{2}^{t}\right| < {\epsilon}_{3} $break else $t = t + 1$ end if end while 由式(44)得到${p_k}^*$ 下載: 導(dǎo)出CSV
表 1 仿真參數(shù)設(shè)置
參數(shù) 描述 數(shù)值 $K$ SN個(gè)數(shù) 30 $H$ epoch數(shù)量 30 $B$ 帶寬 1 MHz $ {\delta _b} $ 塊大小 8 MB $ {n_0} $ 噪聲功率 –174 dBm/Hz $\lambda $ 全局學(xué)習(xí)率 1 $ \eta $ 本地學(xué)習(xí)率 0.001 $ b $ 數(shù)據(jù)抽樣大小 32 $ D $ 訓(xùn)練樣本大小 3 MB $ {c_k} $ SN $ k $完成訓(xùn)練所需頻率 20 cycles/bit $ f_k^{\max } $ SN $ k $最大算力 0.2~1 GHz $ {p_k} $ SN $ k $傳輸功率 40 W ${\text{t} }{ {\text{h} }_{\rm{upper}}}$ 信譽(yù)值上分位點(diǎn) 50 ${\text{t} }{ {\text{h} }_{\rm{low}}}$ 信譽(yù)值下分位點(diǎn) 18 下載: 導(dǎo)出CSV
-
[1] ZHANG Jing and TAO Dacheng. Empowering things with intelligence: A survey of the progress, challenges, and opportunities in artificial intelligence of things[J]. IEEE Internet of Things Journal, 2021, 8(10): 7789–7817. doi: 10.1109/JIOT.2020.3039359 [2] JIANG Chunxiao, ZHANG Haijun, REN Yong, et al. Machine learning paradigms for next-generation wireless networks[J]. IEEE Wireless Communications, 2017, 24(2): 98–105. doi: 10.1109/MWC.2016.1500356WC [3] LIM W Y B, LUONG N C, HOANG D T, et al. Federated learning in mobile edge networks: A comprehensive survey[J]. IEEE Communications Surveys & Tutorials, 2020, 22(3): 2031–2063. doi: 10.1109/COMST.2020.2986024 [4] LI Tian, SAHU A K, TALWALKAR A, et al. Federated learning: Challenges, methods, and future directions[J]. IEEE Signal Processing Magazine, 2020, 37(3): 50–60. doi: 10.1109/MSP.2020.2975749 [5] IEEE Std 3652.1-2020 IEEE guide for architectural framework and application of federated machine learning[S]. IEEE, 2021. [6] SHEN Xin, LI Zhuo, and CHEN Xin. Node selection strategy design based on reputation mechanism for hierarchical federated learning[C]. 2022 18th International Conference on Mobility, Sensing and Networking (MSN), Guangzhou, China, 2022: 718–722. [7] LIU Jianchun, XU Hongli, WANG Lun, et al. Adaptive asynchronous federated learning in resource-constrained edge computing[J]. IEEE Transactions on Mobile Computing, 2023, 22(2): 674–690. doi: 10.1109/TMC.2021.3096846 [8] LI Zonghang, ZHOU Huaman, ZHOU Tianyao, et al. ESync: Accelerating intra-domain federated learning in heterogeneous data centers[J]. IEEE Transactions on Services Computing, 2022, 15(4): 2261–2274. doi: 10.1109/TSC.2020.3044043 [9] CHEN Yang, SUN Xiaoyan, and JIN Yaochu. Communication-efficient federated deep learning with layerwise asynchronous model update and temporally weighted aggregation[J]. IEEE Transactions on Neural Networks and Learning Systems, 2020, 31(10): 4229–4238. doi: 10.1109/TNNLS.2019.2953131 [10] CAO Mingrui, ZHANG Long, and CAO Bin. Toward on-device federated learning: A direct acyclic graph-based blockchain approach[J]. IEEE Transactions on Neural Networks and Learning Systems, 2023, 34(4): 2028–2042. doi: 10.1109/TNNLS.2021.3105810 [11] FENG Lei, YANG Zhixiang, GUO Shaoyong, et al. Two-layered blockchain architecture for federated learning over the mobile edge network[J]. IEEE Network, 2022, 36(1): 45–51. doi: 10.1109/MNET.011.2000339 [12] QIN Zhenquan, YE Jin, MENG Jie, et al. Privacy-preserving blockchain-based federated learning for marine internet of things[J]. IEEE Transactions on Computational Social Systems, 2022, 9(1): 159–173. doi: 10.1109/TCSS.2021.3100258 [13] XU Chenhao, QU Youyang, LUAN T H, et al. An efficient and reliable asynchronous federated learning scheme for smart public transportation[J]. IEEE Transactions on Vehicular Technology, 2023, 72(5): 6584–6598. doi: 10.1109/TVT.2022.3232603 [14] LI Qinbin, HE Bingsheng, and SONG D. Model-contrastive federated learning[C]. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Nashville, USA, 2021: 10708–10717. [15] 范盛金. 一元三次方程的新求根公式與新判別法[J]. 海南師范學(xué)院學(xué)報(bào)(自然科學(xué)版), 1989, 2(2): 91–98.FAN Shengjin. A new extracting formula and a new distinguishing means on the one variable cubic equation[J]. Natural Science Journal of Hainan Normal College, 1989, 2(2): 91–98. -