[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -1,92 +1,235 @@
|
||||
---
|
||||
id: wiki-2026-0508-ieee-p36521
|
||||
title: IEEE P36521
|
||||
title: IEEE P3652.1 (Federated ML Standard)
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-AUTO-IEEE-001]
|
||||
aliases: [IEEE 3652.1-2020, IEEE Federated ML Standard, P3652.1]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.94
|
||||
tags: [auto-reinforced, ieee, p3652.1, ai-ethics, standard, governance, security, transparency]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [federated-learning, ieee, standards, privacy, ml]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: python
|
||||
framework: flower-pysyft
|
||||
---
|
||||
|
||||
# [[IEEE-P36521|IEEE-P36521]]
|
||||
# IEEE P3652.1 (Federated ML Standard)
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> "AI의 KS 마크: 인공지능 시스템이 얼마나 안전하고(Security), 투명하며(Transparency), 신뢰할 수 있는지(Trustworthiness)를 평가하기 위해 IEEE가 제정한 공식적인 아키텍처 및 배포 표준 가이드라인."
|
||||
## 매 한 줄
|
||||
> **"매 federated learning 의 첫 공식 표준 — 누가 누구와 무엇을 어떻게 공유하는지를 정의한다"**. IEEE 3652.1-2020 (Guide for Architectural Framework and Application of Federated Machine Learning) 은 WeBank/Tencent/Microsoft 등이 주도해 horizontal/vertical/federated transfer learning 의 분류, 참여자 역할, 보안 요구사항을 표준화한 첫 공식 문서로, 현재 GDPR/HIPAA/금융권 cross-silo 학습의 reference 가 되었다.
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
IEEE P3652.1은 "인공지능 및 기계 학습 모델의 개발, 배포 및 관리"에 관한 표준입니다.
|
||||
## 매 핵심
|
||||
|
||||
1. **핵심 영역**:
|
||||
* **Data Inte[[Grit|Grit]]y**: 모델 학습에 사용된 데이터의 무결성 정책 확인. ([[Ensuring-Data-Privacy|Ensuring-Data-Privacy]]와 연결)
|
||||
* **Algorithmic Bias**: 알고리즘에 내재된 편향성 정책 정책 감지 및 완화. (Ethics와 연결)
|
||||
* **Model Explainability**: AI 의 의사결정 정책 과정을 인간이 이해 정책할 수 있게 설명 가능한지 여부. ([[Reasoning|Reasoning]]와 연결)
|
||||
2. **왜 중요한가?**:
|
||||
* 중구난방인 AI 개발 프로세스에 공인된 '품질 보증 표준'을 제시하여, 기업 간 협력 및 규제 대응의 공통 언어 정책을 제공하기 때문임. ([[Strategic-Planning|Strategic-Planning]]와 연결)
|
||||
### 매 3 가지 federated learning 분류 (3652.1)
|
||||
- **Horizontal FL (HFL)**: 같은 feature space, 다른 sample (예: 여러 병원의 동일 항목 환자 데이터).
|
||||
- **Vertical FL (VFL)**: 같은 sample 일부, 다른 feature (예: 은행 + 이커머스가 공통 고객의 다른 속성).
|
||||
- **Federated Transfer Learning (FTL)**: feature/sample 둘 다 부분 겹침 — transfer learning 결합.
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌**: 과거에는 "성능만 좋으면 된다"는 결과 중심 정책 정책이었으나, IEEE 표준 정책은 과정의 투명성 정책과 사후 추적 가능성(Auditability) 정책을 성능만큼이나 중요하게 다룸(RL Update).
|
||||
- **정책 변화(RL Update)**: 최근에는 생성형 AI(Generative AI)의 폭발적 성장에 따라, LLM 의 저작권 정책 및 가치 정렬 정책([[Alignment|Alignment]]) 정책을 포함하는 방향으로 표준 범위 정책이 지속적으로 확장 중임. (HHH와 연결)
|
||||
### 매 참여자 역할
|
||||
- **Data Owner / Client**: 로컬 데이터 보유, 로컬 학습 수행.
|
||||
- **Coordinator / Aggregator**: 모델 파라미터/그래디언트 집계 (FedAvg 등).
|
||||
- **Auditor**: privacy/compliance 검증.
|
||||
- **Model Consumer**: 최종 모델 사용자.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- [[Ensuring-Data-Privacy|Ensuring-Data-Privacy]], Ethics, [[Reasoning|Reasoning]], [[Strategic-Planning|Strategic-Planning]], [[HHH|HHH]], [[Reliability|Reliability]], Safety
|
||||
- **Full Title**: Guide for Architectural Framework and Application of Federated Machine Learning.
|
||||
---
|
||||
### 매 보안/프라이버시 요구사항
|
||||
- secure aggregation (cryptographic) 권장.
|
||||
- differential privacy 옵션.
|
||||
- 통신 채널 암호화 (TLS 1.3+).
|
||||
- model inversion / membership inference 위험 평가.
|
||||
- audit log + reproducibility.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 응용
|
||||
1. Cross-hospital 의료 영상 모델 (HFL).
|
||||
2. 은행 + 통신사 신용평가 (VFL).
|
||||
3. 모바일 키보드 next-word prediction (Gboard, HFL on-device).
|
||||
4. 광고 conversion modeling (clean room + FL).
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
### 1. Flower (FL framework) — HFL 클라이언트
|
||||
```python
|
||||
import flwr as fl
|
||||
import torch
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
class HospitalClient(fl.client.NumPyClient):
|
||||
def __init__(self, model, train_loader, val_loader):
|
||||
self.model, self.train, self.val = model, train_loader, val_loader
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
def get_parameters(self, config):
|
||||
return [v.cpu().numpy() for v in self.model.state_dict().values()]
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
def set_parameters(self, params):
|
||||
sd = {k: torch.tensor(v) for k, v in zip(self.model.state_dict(), params)}
|
||||
self.model.load_state_dict(sd, strict=True)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
def fit(self, params, config):
|
||||
self.set_parameters(params)
|
||||
train_one_epoch(self.model, self.train)
|
||||
return self.get_parameters({}), len(self.train.dataset), {}
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
def evaluate(self, params, config):
|
||||
self.set_parameters(params)
|
||||
loss, acc = eval_model(self.model, self.val)
|
||||
return float(loss), len(self.val.dataset), {"acc": acc}
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
fl.client.start_numpy_client(server_address="agg.example:8443", client=HospitalClient(...))
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### 2. FedAvg aggregator (Flower server)
|
||||
```python
|
||||
import flwr as fl
|
||||
strategy = fl.server.strategy.FedAvg(
|
||||
min_fit_clients=5, min_available_clients=5,
|
||||
fraction_fit=1.0, fraction_evaluate=1.0,
|
||||
)
|
||||
fl.server.start_server(
|
||||
server_address="0.0.0.0:8443",
|
||||
config=fl.server.ServerConfig(num_rounds=20),
|
||||
strategy=strategy,
|
||||
)
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### 3. Secure aggregation (PySyft / Flower SecAgg+)
|
||||
```python
|
||||
from flwr.common import SecAggPlusWorkflow
|
||||
workflow = SecAggPlusWorkflow(
|
||||
num_shares=3, reconstruction_threshold=2, max_weight=16384,
|
||||
)
|
||||
# server: clients 가 mask 적용 후 전송 — server 는 합계만 복원, 개별 불가
|
||||
```
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### 4. Differential Privacy (Opacus)
|
||||
```python
|
||||
from opacus import PrivacyEngine
|
||||
engine = PrivacyEngine()
|
||||
model, optimizer, train_loader = engine.make_private_with_epsilon(
|
||||
module=model, optimizer=optimizer, data_loader=train_loader,
|
||||
target_epsilon=3.0, target_delta=1e-5, epochs=10, max_grad_norm=1.0,
|
||||
)
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### 5. VFL — split learning skeleton (PyTorch)
|
||||
```python
|
||||
# Bank: bottom model on transactions
|
||||
class BottomBank(nn.Module):
|
||||
def forward(self, x): return self.net(x) # -> embed_bank
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
# Telco: bottom model on call patterns
|
||||
class BottomTelco(nn.Module): ... # -> embed_telco
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
# Aggregator (top): concat + classify
|
||||
class Top(nn.Module):
|
||||
def forward(self, eb, et): return self.head(torch.cat([eb, et], dim=-1))
|
||||
# 학습: client 는 embed 만 송신, gradient 만 수신
|
||||
```
|
||||
|
||||
### 6. Audit log (3652.1 Annex B 권장)
|
||||
```json
|
||||
{
|
||||
"round": 7,
|
||||
"ts": "2026-05-10T09:00:00Z",
|
||||
"participants": ["hosp-a", "hosp-b", "hosp-c"],
|
||||
"aggregation": "FedAvg",
|
||||
"secagg": "SecAgg+",
|
||||
"dp": { "epsilon": 3.0, "delta": 1e-5 },
|
||||
"model_hash": "sha256:...",
|
||||
"signed_by": "ed25519:..."
|
||||
}
|
||||
```
|
||||
|
||||
### 7. Cross-silo deployment (Kubernetes manifest 일부)
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata: { name: fl-client-hospA, namespace: hospital-a }
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: client
|
||||
image: registry/fl-client:1.4
|
||||
env:
|
||||
- { name: AGGREGATOR_URL, value: "https://agg.consortium.example:8443" }
|
||||
- { name: TLS_CA, valueFrom: { secretKeyRef: { name: ca, key: ca.crt } } }
|
||||
- { name: SITE_ID, value: "hosp-a" }
|
||||
volumeMounts:
|
||||
- { name: data, mountPath: /data, readOnly: true }
|
||||
```
|
||||
|
||||
### 8. Membership inference attack 검증
|
||||
```python
|
||||
# attacker tries to infer if a sample was in training set
|
||||
def attack_score(model, x):
|
||||
with torch.no_grad():
|
||||
return model(x).softmax(-1).max().item()
|
||||
# 학습 / 비학습 sample 의 score 분포 차이 → AUC 0.5 에 가까울수록 안전
|
||||
```
|
||||
|
||||
### 9. participant onboarding checklist
|
||||
```yaml
|
||||
participant: hospital-c
|
||||
checklist:
|
||||
- data_governance_signed: true
|
||||
- dpa_signed: true
|
||||
- tls_cert_valid_until: 2027-01-01
|
||||
- schema_version: v3
|
||||
- feature_alignment_test: passed
|
||||
- privacy_budget_allocated: { epsilon: 5.0, delta: 1e-5 }
|
||||
```
|
||||
|
||||
### 10. FATE (WeBank reference impl) job (KubeFATE)
|
||||
```yaml
|
||||
# horizontal_lr.yaml
|
||||
component_parameters:
|
||||
common:
|
||||
homo_lr_0:
|
||||
penalty: L2
|
||||
max_iter: 30
|
||||
learning_rate: 0.1
|
||||
role:
|
||||
guest: { "0": { reader_0: { table: { name: hosp_a, namespace: hetero } } } }
|
||||
host: { "0": { reader_0: { table: { name: hosp_b, namespace: hetero } } } }
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| 같은 schema, 여러 사이트 | HFL (FedAvg) |
|
||||
| 같은 user, 다른 feature | VFL (split learning) |
|
||||
| 일부 겹침 | FTL |
|
||||
| 모바일 device 수만 명 | Cross-device FL (Flower / TFF) |
|
||||
| 규제 산업 cross-org | 3652.1 + SecAgg + DP + audit log |
|
||||
|
||||
**기본값**: Cross-silo (수십 사이트) 는 Flower + SecAgg+ + DP(eps≤8) + 3652.1 audit log.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Federated-Learning]] · [[IEEE-Standards]]
|
||||
- 변형: [[Cross-Device-FL]] · [[Cross-Silo-FL]]
|
||||
- 응용: [[Healthcare-FL]] · [[Finance-FL]]
|
||||
- Adjacent: [[Differential-Privacy]] · [[Secure-Aggregation]] · [[GDPR]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: 3652.1 의 분류 (HFL/VFL/FTL) 매핑, audit log schema 초안, threat model checklist.
|
||||
**언제 X**: 실제 cryptographic protocol 구현 — 검증된 lib (Flower, FATE) 사용, LLM 자작 금지.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **secagg 없는 raw gradient 송신**: gradient inversion 으로 raw data 복원 가능.
|
||||
- **DP 없이 over-fitting model 공개**: membership inference 위험.
|
||||
- **audit log 미보존**: 규제 incident 시 책임 분리 불가.
|
||||
- **schema drift 무시**: client 마다 다른 feature order → silent corruption.
|
||||
- **drop-out client 처리 누락**: SecAgg 가 reconstruction_threshold 미달 시 round 실패.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (IEEE 3652.1-2020 official PDF, Flower docs 1.x, FATE docs 2026).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — 3652.1 분류 + Flower/FATE 패턴 + SecAgg/DP |
|
||||
|
||||
Reference in New Issue
Block a user