AI Agent Harness是管控多Agent集群的统一工程化框架,相当于Agent的运行时操作系统,核心组成如下:
模块名称
核心功能
隐私风险关联
任务编排模块
拆解多Agent协作任务,分配给对应Agent执行
跨Agent数据流转的隐私泄露风险
数据路由模块
管控Agent之间、Agent与工具/数据源之间的数据传输
敏感数据跨域传输泄露风险
模型调度模块
调度Agent的微调、推理任务,管理模型资源
微调数据、Prompt、推理参数泄露风险
安全管控面
权限校验、合规审计、数据脱敏
隐私保护策略的执行控制点
观测运维模块
采集Agent的运行日志、用户反馈、效果指标
运维数据泄露用户隐私风险
我们可以用mermaid架构图直观展示Harness层的位置:
渲染错误: Mermaid 渲染失败: Parsing failed: Lexer error on line 2, column 27: unexpected character: ->[<- at offset: 44, skipped 5 characters. Lexer error on line 3, column 33: unexpected character: ->[<- at offset: 82, skipped 6 characters. Lexer error on line 4, column 37: unexpected character: ->[<- at offset: 139, skipped 6 characters. Lexer error on line 6, column 31: unexpected character: ->[<- at offset: 191, skipped 1 characters. Lexer error on line 6, column 48: unexpected character: ->层<- at offset: 208, skipped 2 characters. Lexer error on line 7, column 36: unexpected character: ->[<- at offset: 246, skipped 7 characters. Lexer error on line 8, column 38: unexpected character: ->[<- at offset: 308, skipped 6 characters. Lexer error on line 9, column 31: unexpected character: ->[<- at offset: 362, skipped 7 characters. Lexer error on line 10, column 35: unexpected character: ->[<- at offset: 421, skipped 6 characters. Lexer error on line 12, column 30: unexpected character: ->[<- at offset: 475, skipped 1 characters. Lexer error on line 12, column 36: unexpected character: ->执<- at offset: 481, skipped 4 characters. Lexer error on line 13, column 30: unexpected character: ->[<- at offset: 515, skipped 3 characters. Lexer error on line 13, column 40: unexpected character: ->]<- at offset: 525, skipped 1 characters. Lexer error on line 14, column 30: unexpected character: ->[<- at offset: 571, skipped 3 characters. Lexer error on line 14, column 40: unexpected character: ->]<- at offset: 581, skipped 1 characters. Lexer error on line 15, column 30: unexpected character: ->[<- at offset: 627, skipped 3 characters. Lexer error on line 15, column 40: unexpected character: ->]<- at offset: 637, skipped 1 characters. Lexer error on line 17, column 35: unexpected character: ->[<- at offset: 689, skipped 5 characters. Lexer error on line 18, column 37: unexpected character: ->[<- at offset: 731, skipped 8 characters. Lexer error on line 19, column 26: unexpected character: ->[<- at offset: 783, skipped 7 characters. Lexer error on line 20, column 27: unexpected character: ->[<- at offset: 835, skipped 7 characters. Parse error on line 6, column 32: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'AI' Parse error on line 6, column 35: Expecting token of type ':' but found `Agent`. Parse error on line 6, column 41: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Harness' Parse error on line 6, column 50: Expecting token of type ':' but found ` `. Parse error on line 12, column 31: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 12, column 40: Expecting token of type ':' but found ` `. Parse error on line 13, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 13, column 39: Expecting token of type ':' but found `A`. Parse error on line 13, column 42: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'in' Parse error on line 13, column 56: Expecting token of type ':' but found ` `. Parse error on line 14, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 14, column 39: Expecting token of type ':' but found `B`. Parse error on line 14, column 42: Expecting: one of these possible Token sequences: 1. [--] 2. [-] but found: 'in' Parse error on line 15, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 15, column 39: Expecting token of type ':' but found `C`. Parse error on line 15, column 42: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'in' Parse error on line 15, column 56: Expecting token of type ':' but found ` `. Parse error on line 22, column 14: Expecting token of type ':' but found `--`. Parse error on line 22, column 18: Expecting token of type 'ARROW_DIRECTION' but found `orchestrator`. Parse error on line 23, column 16: Expecting token of type ':' but found `--`. Parse error on line 23, column 20: Expecting token of type 'ARROW_DIRECTION' but found `orchestrator`. Parse error on line 24, column 18: Expecting token of type ':' but found `--`. Parse error on line 24, column 22: Expecting token of type 'ARROW_DIRECTION' but found `data_router`. Parse error on line 25, column 17: Expecting token of type ':' but found `--`. Parse error on line 25, column 21: Expecting token of type 'ARROW_DIRECTION' but found `agent1`. Parse error on line 26, column 17: Expecting token of type ':' but found `--`. Parse error on line 26, column 21: Expecting token of type 'ARROW_DIRECTION' but found `agent2`. Parse error on line 27, column 17: Expecting token of type ':' but found `--`. Parse error on line 27, column 21: Expecting token of type 'ARROW_DIRECTION' but found `agent3`. Parse error on line 28, column 14: Expecting token of type ':' but found `--`. Parse error on line 28, column 18: Expecting token of type 'ARROW_DIRECTION' but found `data_router`. Parse error on line 29, column 19: Expecting token of type ':' but found `--`. Parse error on line 29, column 23: Expecting token of type 'ARROW_DIRECTION' but found `agent1`. Parse error on line 30, column 19: Expecting token of type ':' but found `--`. Parse error on line 30, column 23: Expecting token of type 'ARROW_DIRECTION' but found `agent2`. Parse error on line 31, column 19: Expecting token of type ':' but found `--`. Parse error on line 31, column 23: Expecting token of type 'ARROW_DIRECTION' but found `agent3`. Parse error on line 32, column 12: Expecting token of type ':' but found `--`. Parse error on line 32, column 16: Expecting token of type 'ARROW_DIRECTION' but found `local_data`. Parse error on line 33, column 12: Expecting token of type ':' but found `--`. Parse error on line 33, column 16: Expecting token of type 'ARROW_DIRECTION' but found `llm`. Parse error on line 34, column 12: Expecting token of type ':' but found `--`. Parse error on line 34, column 16: Expecting token of type 'ARROW_DIRECTION' but found `tool`.
差分隐私的严格数学定义如下: ∀ S ⊆ R a n g e ( M ) , P r [ M ( D 1 ) ∈ S ] ≤ e ϵ P r [ M ( D 2 ) ∈ S ] + δ \forall S \subseteq Range(M), Pr[M(D_1) \in S] \leq e^\epsilon Pr[M(D_2) \in S] + \delta ∀S⊆Range(M),Pr[M(D1)∈S]≤eϵPr[M(D2)∈S]+δ
其中:
D 1 D_1 D1和 D 2 D_2 D2是只有一条记录不同的相邻数据集;
M M M是隐私保护机制;
ϵ \epsilon ϵ是隐私预算,值越小隐私保护强度越高,一般取值在0.1~10之间;
δ \delta δ是松弛项,允许极小概率的隐私泄露,一般取值小于 1 / N 1/N 1/N,N是数据集总样本数。
常用的差分隐私机制有两种:
拉普拉斯机制:适用于数值型输出,公式如下: M ( D ) = f ( D ) + L a p ( Δ f ϵ ) M(D) = f(D) + Lap(\frac{\Delta f}{\epsilon}) M(D)=f(D)+Lap(ϵΔf)
其中 Δ f \Delta f Δf是函数 f f f的敏感度,即相邻数据集的输出最大差值。
高斯机制:适用于梯度等浮点型参数,公式如下: M ( D ) = f ( D ) + N ( 0 , σ 2 ) , σ = Δ f 2 ln ( 1.25 / δ ) ϵ M(D) = f(D) + \mathcal{N}(0, \sigma^2), \sigma = \frac{\Delta f \sqrt{2\ln(1.25/\delta)}}{\epsilon} M(D)=f(D)+N(0,σ2),σ=ϵΔf2ln(1.25/δ)
渲染错误: Mermaid 渲染失败: Parsing failed: Lexer error on line 2, column 31: unexpected character: ->[<- at offset: 48, skipped 8 characters. Lexer error on line 3, column 38: unexpected character: ->[<- at offset: 94, skipped 9 characters. Lexer error on line 4, column 32: unexpected character: ->[<- at offset: 152, skipped 8 characters. Lexer error on line 5, column 39: unexpected character: ->[<- at offset: 216, skipped 7 characters. Lexer error on line 6, column 32: unexpected character: ->[<- at offset: 272, skipped 8 characters. Lexer error on line 7, column 27: unexpected character: ->[<- at offset: 324, skipped 8 characters. Lexer error on line 9, column 31: unexpected character: ->[<- at offset: 381, skipped 4 characters. Lexer error on line 9, column 36: unexpected character: ->]<- at offset: 386, skipped 1 characters. Lexer error on line 10, column 34: unexpected character: ->[<- at offset: 421, skipped 3 characters. Lexer error on line 10, column 44: unexpected character: ->节<- at offset: 431, skipped 3 characters. Lexer error on line 11, column 30: unexpected character: ->[<- at offset: 480, skipped 3 characters. Lexer error on line 11, column 38: unexpected character: ->]<- at offset: 488, skipped 1 characters. Lexer error on line 12, column 32: unexpected character: ->[<- at offset: 537, skipped 8 characters. Lexer error on line 14, column 31: unexpected character: ->[<- at offset: 593, skipped 4 characters. Lexer error on line 14, column 36: unexpected character: ->]<- at offset: 598, skipped 1 characters. Lexer error on line 15, column 34: unexpected character: ->[<- at offset: 633, skipped 3 characters. Lexer error on line 15, column 44: unexpected character: ->节<- at offset: 643, skipped 3 characters. Lexer error on line 16, column 30: unexpected character: ->[<- at offset: 692, skipped 3 characters. Lexer error on line 16, column 38: unexpected character: ->]<- at offset: 700, skipped 1 characters. Lexer error on line 17, column 32: unexpected character: ->[<- at offset: 749, skipped 8 characters. Lexer error on line 19, column 31: unexpected character: ->[<- at offset: 805, skipped 4 characters. Lexer error on line 19, column 36: unexpected character: ->]<- at offset: 810, skipped 1 characters. Lexer error on line 20, column 34: unexpected character: ->[<- at offset: 845, skipped 3 characters. Lexer error on line 20, column 44: unexpected character: ->节<- at offset: 855, skipped 3 characters. Lexer error on line 21, column 30: unexpected character: ->[<- at offset: 904, skipped 3 characters. Lexer error on line 21, column 38: unexpected character: ->]<- at offset: 912, skipped 1 characters. Lexer error on line 22, column 32: unexpected character: ->[<- at offset: 961, skipped 8 characters. Parse error on line 9, column 35: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'A' Parse error on line 9, column 37: Expecting token of type ':' but found ` `. Parse error on line 10, column 37: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Harness' Parse error on line 10, column 48: Expecting token of type ':' but found `in`. Parse error on line 11, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 11, column 40: Expecting token of type ':' but found `in`. Parse error on line 14, column 35: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'B' Parse error on line 15, column 37: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Harness' Parse error on line 15, column 48: Expecting token of type ':' but found `in`. Parse error on line 16, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 16, column 40: Expecting token of type ':' but found `in`. Parse error on line 19, column 35: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'C' Parse error on line 19, column 37: Expecting token of type ':' but found ` `. Parse error on line 20, column 37: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Harness' Parse error on line 20, column 48: Expecting token of type ':' but found `in`. Parse error on line 21, column 33: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: 'Agent' Parse error on line 21, column 40: Expecting token of type ':' but found `in`. Parse error on line 24, column 20: Expecting token of type ':' but found `--`. Parse error on line 24, column 24: Expecting token of type 'ARROW_DIRECTION' but found `harness1`. Parse error on line 25, column 20: Expecting token of type ':' but found `--`. Parse error on line 25, column 24: Expecting token of type 'ARROW_DIRECTION' but found `harness2`. Parse error on line 26, column 20: Expecting token of type ':' but found `--`. Parse error on line 26, column 24: Expecting token of type 'ARROW_DIRECTION' but found `harness3`. Parse error on line 27, column 16: Expecting token of type ':' but found `--`. Parse error on line 27, column 20: Expecting token of type 'ARROW_DIRECTION' but found `harness1`. Parse error on line 28, column 16: Expecting token of type ':' but found `--`. Parse error on line 28, column 20: Expecting token of type 'ARROW_DIRECTION' but found `harness2`. Parse error on line 29, column 16: Expecting token of type ':' but found `--`. Parse error on line 29, column 20: Expecting token of type 'ARROW_DIRECTION' but found `harness3`. Parse error on line 30, column 14: Expecting token of type ':' but found `--`. Parse error on line 30, column 18: Expecting token of type 'ARROW_DIRECTION' but found `aggregator`. Parse error on line 31, column 14: Expecting token of type ':' but found `--`. Parse error on line 31, column 18: Expecting token of type 'ARROW_DIRECTION' but found `aggregator`. Parse error on line 32, column 14: Expecting token of type ':' but found `--`. Parse error on line 32, column 18: Expecting token of type 'ARROW_DIRECTION' but found `aggregator`. Parse error on line 33, column 15: Expecting token of type ':' but found `--`. Parse error on line 33, column 19: Expecting token of type 'ARROW_DIRECTION' but found `aggregator`. Parse error on line 34, column 16: Expecting token of type ':' but found `--`. Parse error on line 34, column 20: Expecting token of type 'ARROW_DIRECTION' but found `audit`. Parse error on line 35, column 14: Expecting token of type ':' but found `--`. Parse error on line 35, column 18: Expecting token of type 'ARROW_DIRECTION' but found `agent1`. Parse error on line 35, column 25: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: '--' Parse error on line 35, column 34: Expecting token of type ':' but found ` `. Parse error on line 36, column 14: Expecting token of type ':' but found `--`. Parse error on line 36, column 18: Expecting token of type 'ARROW_DIRECTION' but found `agent2`. Parse error on line 36, column 25: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: '--' Parse error on line 36, column 34: Expecting token of type ':' but found ` `. Parse error on line 37, column 14: Expecting token of type ':' but found `--`. Parse error on line 37, column 18: Expecting token of type 'ARROW_DIRECTION' but found `agent3`. Parse error on line 37, column 25: Expecting: one of these possible Token sequences: 1. [NEWLINE] 2. [EOF] but found: '--' Parse error on line 37, column 34: Expecting token of type ':' but found ` `.
参数聚合是联邦学习的核心步骤,最常用的聚合算法是FedAvg(联邦平均),公式如下: w t + 1 = ∑ k = 1 K n k n w t + 1 k w_{t+1} = \sum_{k=1}^K \frac{n_k}{n} w_{t+1}^k wt+1=k=1∑Knnkwt+1k
其中:
所有评论(0)