SCP Federated Training Protocol Specification v0.1(Detailed Version with Contribution Types)
Privacy-preserving Distributed Federated Training Protocol(完整详细规范,含6种贡献类型)
版本:v0.1
状态:Production Protocol Specification(Mainnet-ready Detailed Version)
发布日期:2026-02
适用范围:SCP Compute Plane(Vault / Coordinator / Registry Control Plane)
一、协议目的(Purpose)
SCP Federated Training Protocol(FTP)定义了在 SCP 网络中执行隐私保护分布式模型训练的完整机制。
FTP 的目标是:
- 支持在 Vault 本地执行模型训练
- 原始数据永不离开 Vault
- 支持多种训练贡献类型(gradient、weight_update 等)
- 支持可验证训练(Proof-of-Training)
- 支持 extensible schema
- 支持所有 AI 模型类型
FTP 是 SCP Compute Plane 的核心协议。
二、Training Contribution 抽象模型(Training Contribution Abstraction)
SCP 不限制 Vault 必须返回 gradient。
Vault 返回统一抽象结构:
TrainingContribution
定义:
{
"job_id": "...",
"vault_id": "...",
"epoch": 1,
"contribution_type": "...",
"contribution": {...},
"proof": {...}
}字段说明:
job_id:训练任务 ID
vault_id:Vault ID
epoch:训练 epoch
contribution_type:贡献类型
contribution:贡献 payload
proof:训练证明
三、支持的 6 种 Training Contribution 类型(核心新增章节)
SCP v0.1 明确定义支持以下 6 种 contribution_type:
| 类型 | 返回内容 | 适用场景 | 是否常用 |
|---|---|---|---|
| Gradient | 梯度 ∇L | 深度学习、NN、Transformer | ⭐⭐⭐⭐⭐ |
| Weight Update | 权重增量 ΔW | FedAvg、传统 FL | ⭐⭐⭐⭐⭐ |
| Full Model Weights | 完整模型参数 | 小模型、LoRA | ⭐⭐⭐ |
| Embedding Update | embedding 向量 | 推荐系统、RAG | ⭐⭐⭐⭐ |
| Sufficient Statistics | 统计量 | 线性模型、逻辑回归 | ⭐⭐⭐⭐ |
| Custom Contribution | 自定义 | RL、强化学习等 | ⭐⭐ |
3.1 Gradient Contribution
类型:gradient
描述:Vault 返回 loss function 的梯度。
适用模型:Neural Networks、Transformers、Deep Learning models
示例:
{
"contribution_type": "gradient",
"contribution": [0.0023, -0.0008, 0.0011]
}Coordinator 聚合:
global_gradient = average(all gradients)
3.2 Weight Update Contribution
类型:weight_update
描述:Vault 返回模型权重更新 ΔW。
适用模型:Federated Averaging(FedAvg)、Neural networks
示例:
{
"contribution_type": "weight_update",
"contribution": [0.0003, -0.0001, 0.0005]
}Coordinator 聚合:
global_weights = average(weight_updates)
3.3 Sufficient Statistics Contribution
类型:statistics
描述:Vault 返回 sufficient statistics,而不是 gradient。
适用模型:Linear Regression、Logistic Regression、Gaussian models
示例:
{
"contribution_type": "statistics",
"contribution": {
"xtx": [[12.3, 4.5], [4.5, 9.8]],
"xty": [3.4, 5.6],
"count": 120
}
}Coordinator 可直接计算模型参数。
3.4 Embedding Update Contribution
类型:embedding_update
描述:Vault 返回 embedding 向量更新。
适用模型:Recommendation systems、Embedding models、Vector models
示例:
{
"contribution_type": "embedding_update",
"contribution": {
"embedding_delta": [...]
}
}3.5 Adapter Update Contribution
类型:adapter_update
描述:Vault 返回 adapter / LoRA 参数更新。
适用模型:LLM fine-tuning、Adapter-based models
示例:
{
"contribution_type": "adapter_update",
"contribution": {
"lora_A": [...],
"lora_B": [...]
}
}3.6 Custom Contribution
类型:custom
描述:Vault 返回自定义训练贡献。
适用场景:Reinforcement Learning、Specialized models
示例:
{
"contribution_type": "custom",
"contribution": {...}
}四、Contribution Aggregation Rules(聚合规则)
Coordinator 根据 contribution_type 使用不同 aggregation:
gradient → average gradient
weight_update → average weight updates
statistics → aggregate sufficient statistics
embedding_update → merge embeddings
adapter_update → merge adapter weights
custom → use custom aggregation
五、Proof-of-Training(训练证明)
Vault 必须提供 proof:
{
"contribution_hash": "...",
"vault_signature": "..."
}Coordinator 验证 proof。
六、安全模型(Security Model)
Vault:never exposes raw data
Coordinator:cannot access Vault data
Registry:stores metadata only
七、隐私模型(Privacy Model)
FTP 保证:
local training only
secure aggregation
proof verification
八、Summary(总结)
SCP Federated Training Protocol v0.1 支持:
6 种 training contribution 类型
privacy-preserving training
verifiable training
scalable federated training
FTP enables decentralized AI training for all model types.