FedAPT: 基于联邦提示微调的对抗防御方法

论文详情

FedAPT 在国际上率先将联邦提示微调与对抗训练相结合,提出了一种高效的多模态对抗防御范式。该方法通过提示词微调实现联邦学习中的鲁棒优化,显著提升了联邦学习在视觉–语言模型上的对抗鲁棒性与泛化能力。

选择数据集

联邦学习中,客户端只见本地数据,整体呈现 non-IID。我们用“标签不重叠”刻画异质性:把类别分给不同客户端,使其各自仅含少量且互不重叠的类;每端类别越少,异质性越高。

算法处理
                  flowchart TB
                    subgraph 客户端1
                      direction TB
                      Input1[文本输入] s0@--> TextEncoder1[文本编码器]
                      PromptGenerator1 s1@--> ImageEncoder1[图像编码器]
                      TextEncoder1 s2@<--> PromptGenerator1@{ shape: rounded, label: "Prompt生成器" }
                      TextEncoder1 s3@--> FramedCircle1@{ shape: framed-circle }
                      ImageEncoder1 s4@--> FramedCircle1
                      Image1@{ img: "http://127.0.0.1:8080/images/topic4/achievement4/pipeline-chart-image1.png", pos: "t", w: 60, h: 60, constraint: "on" }
                      Image1 s5@--> ImageEncoder1
                    end
                    subgraph 客户端N
                      direction TB
                      Input2[文本输入] sn0@--> TextEncoder2[文本编码器]
                      PromptGenerator2 sn1@--> ImageEncoder2[图像编码器]
                      TextEncoder2 sn2@<--> PromptGenerator2@{ shape: rounded, label: "Prompt生成器" }
                      TextEncoder2 sn3@--> FramedCircle2@{ shape: framed-circle }
                      ImageEncoder2 sn4@--> FramedCircle2
                      Image2@{ img: "http://127.0.0.1:8080/images/topic4/achievement4/pipeline-chart-image2.png", pos: "t", w: 60, h: 60, constraint: "on" }
                      Image2 sn5@--> ImageEncoder2
                    end
                    Server[服务器] e1@ <==> 客户端1
                    e1@{ curve: stepAfter, animation: slow }
                    Server e3@ <==> 客户端N
                    e3@{ curve: stepAfter, animation: slow }
                    s0@{ animation: slow } 
                    s1@{ curve: stepAfter, animation: slow } 
                    s2@{ curve: stepBefore, animation: slow } 
                    s3@{ curve: stepBefore, animation: slow }
                    s4@{ curve: stepBefore, animation: slow }
                    s5@{ curve: stepAfter, animation: slow }
                    sn0@{ animation: slow } 
                    sn1@{ curve: stepAfter, animation: slow } 
                    sn2@{ curve: stepBefore, animation: slow } 
                    sn3@{ curve: stepBefore, animation: slow }
                    sn4@{ curve: stepBefore, animation: slow }
                    sn5@{ curve: stepAfter, animation: slow }
                

该方法设计了类别感知的提示生成器,为客户端引入全局类别语义,并在文本与视觉提示之间建立跨模态桥梁,从而显著提升联邦学习的对抗鲁棒性,有效缓解数据异质性的影响。

鲁棒性展示
Imagenet 数据集鲁棒性
数据异质性中客户端的类别量为10
Caltech01 数据集鲁棒性
数据异质性中客户端的类别量为10