Untitled

 avatar
unknown
plain_text
9 months ago
7.8 kB
16
Indexable
# Membership Inference Attacks in Federated Learning: Chi tiết kỹ thuật

## 🎯 Membership Inference Attack (MIA) - Định nghĩa chính xác

### Công thức toán học

MIA được định nghĩa như một bài toán phân loại nhị phân:

```
m = A(x, F(θ)) = {
  0, nếu x ∉ Dtr (non-member)
  1, nếu x ∈ Dtr (member)
}
```

Trong đó:
- **A**: Attack algorithm
- **x**: Query example cần kiểm tra
- **F(θ)**: Target model với parameters θ
- **Dtr**: Training dataset

### Source-level MIA (đặc thù cho FL)

```
m = A(x, F(θ)) = {
  0, nếu x ∉ Dtr
  C, nếu x ∈ Dc (dataset của client c)
}
```

---

## ⚔️ CHI TIẾT CÁC KỸ THUẬT TẤN CÔNG

## 1. UPDATE-BASED ATTACKS

### 1.1 Model Gradient-based Attacks

#### A. Original Gradient Attacks (Nasr et al., 2019)

**Cơ chế hoạt động:**

Thu thập 4 loại features từ quá trình training:

1. **Gradients**: ∇θℓ(F(x; θ), y)
2. **Hidden layer outputs**: Activations tại các layers
3. **Loss values**: ℓ(F(x; θ), y)
4. **Ground truth labels**: y

**Active Attack - Gradient Ascent:**

```
θ ← θ + η * ∂L(x, θ)/∂θ
```

- Thay vì giảm loss (gradient descent), tăng loss để tạo khoảng cách lớn hơn giữa member và non-member
- Nếu x là member: SGD của honest participant sẽ giảm loss → gap rõ ràng
- Nếu x là non-member: Loss vẫn cao do không được update

**Isolation Attack (khi server là attacker):**

- Server cố lập victim participant
- Tạo local view riêng của target model
- Expose nhiều private information hơn

**Hạn chế:**
- Cần lượng lớn feature vectors (high memory/computation)
- Yêu cầu access vào partial member data của victim

#### B. Gradient Difference Attacks

##### B1. Embedding Layer Attack (Melis et al., 2019)

- **Insight**: Non-zero gradients trong embedding layer reveal training samples
- **Công thức**:

```
Δθ^t_c = θ^t_g - θ^(t-1)_g = Σ_c Δθ^t_c
```

- **Detection**: Model update từ participants khác = Δθ^t - Δθ^t_adv
- **Hiệu quả**: 93% AUC với small batch size
- **Hạn chế**:
  - Chỉ áp dụng cho networks có embedding layers
  - FPR tăng cao khi batch size lớn

##### B2. Gradient Orthogonality Attack (Li et al., 2023)

**Gradient-diff attack:**

```
||Δθ^(t+1)_c||^2 > - ||Δθ^(t+1)_c - Σ_y∈Y ∇θℓ(F(x; θ^t_g), y)||^2 > 0
```

Nếu điều kiện trên đúng → x ∈ Dc

**Cosine attack:**

```
Σ_y∈Y sgn(cosim(∇θℓ(F(x; θ^t_g), y), Δθ^(t+1)_c)) ≥ γ
```

- cosim(): cosine similarity
- γ: threshold dựa trên non-member data
- Phát hiện sự khác biệt trong phân phối cosine similarity

---

### 1.2 Single Model-based Attacks

#### A. Shadow Training Enhanced Attacks

**Cơ bản (Pustozerova et al., 2020):**

1. Attacker xây dựng shadow models
2. Thu thập attack features từ shadow data
3. Train binary classifier để distinguish members/non-members

**GAN-Enhanced (Zhang et al., 2020):**

```
1. Sử dụng global model làm discriminator của GAN
2. Generate synthetic data: G(z) → x_synthetic
3. Update discriminator trong quá trình FL
4. Train attack model trên augmented dataset
```

**Source-level với Non-overlapping Labels:**

- Giả định: Labels không overlap giữa clients
- So sánh prediction results với label distribution
- Client có smallest loss → source của sample

**FedRecs Attack (Yuan et al., 2023):**

- Đặc biệt cho recommender systems
- Chỉ positive items (items đã interact) leak information
- **Process:**
  1. Train shadow recommender với random ratings
  2. Iteratively select closest items
  3. Retrain cho đến đạt preset number

#### B. Structure Modifying Attacks

**ReLU-based Attack (Pichler et al., 2022):**

- Exploit tính chất: ReLU derivative = 0 khi output < 0
- Malicious server embeds module với ReLU activations
- Configure parameters để chỉ training members activate
- Membership detection: So sánh parameter changes với threshold

**Poisoned Neuron Attack (Nguyen et al., 2022):**

- Server embeds malicious parameters vào specific neuron
- Neuron chỉ activated bởi member samples
- Infer membership qua neuron's gradient

---

## 2. TREND-BASED ATTACKS

### 2.1 Model Output-based Attacks

#### A. Prediction Trajectory Attacks

**Basic Approach (Zari et al., 2021):**

- Thu thập prediction scores sequence: {F_y(x; θ^t_c)}^T_{t=1}
- T = số rounds
- Train fully convolutional network để classify sequences
- Input: Chỉ 1 giá trị trị/round (efficient hơn Nasr et al.)

**CS-MIA (Gu et al., 2022):**

**Modified Prediction Entropy metric:**

```
H_m = -Σ_i p_i * log(p_i) / log(k)
```

với k = số classes

**Active strategies:**

1. Fine-tune với auxiliary data
2. Deliberate client selection (thay vì random)
3. Force victim leak more information

**PMIA - Poisoning MIA (Zhang et al., 2023):**

**Optimization problem:**

```
max L_victim(θ) subject to Byzantine-robust constraints
```

- Use "cover" dataset để hide adversary's update
- Detection: Incorrect → Correct prediction pattern

**Adversarial Robustness Evolution (Liu et al., 2023):**

- Track temporal evolution của adversarial robustness
- Observation: Training vs test data có convergence patterns khác nhau
- Work với prediction labels only (black-box)

#### B. Loss Trajectory Attacks

**Loss-across-round Attack (Suri et al., 2022):**

```
L_t = Σ_(x,y)∈Ds ℓ_t(x, y)
L = Σ^r_{t=1} I[L_t < L_t-1]
```

- Đếm số rounds loss giảm
- So sánh L với threshold
- Subject-level privacy (cross-silo FL)

**SIA - Source Inference Attack (Hu et al., 2021):**

- Server perspective attack
- Principle: P(x ∈ Dtr) phụ thuộc vào loss của x
- **Method**: arg min_c ℓ(F(x; θ_c), y)
- Client với smallest loss → source của sample
- Exploit non-IID distribution

---

### 2.2 Model Parameter-based Attacks

**Bias Trajectory Attack (Zhang et al., 2023):**

- **Observation**: Non-members cause larger parameter shifts
- **Focus**: Final layer bias values
- **Feature amplification**: Exponential function
- **Process:**

```
Δb_t = b_t - b_(t-1)
Feature = exp(|Δb_t|)
```

- Minimal overhead, effective features

---

## 📊 EVALUATION METRICS CHO MIA

### Metrics phổ biến:

1. **Attack Accuracy**: (TP + TN) / (TP + TN + FP + FN)
2. **Precision**: TP / (TP + FP)
3. **Recall (TPR)**: TP / (TP + FN)
4. **AUC**: Area Under ROC Curve
5. **F1-Score**: 2 * (Precision * Recall) / (Precision + Recall)

### Advanced Metrics:

1. **Membership Advantage**: TPR - FPR
   - Theoretical bound under (ε,δ)-DP: e^ε - 1
   - Tighter bound: 1 - e^(-ε)(1 - δ)

2. **TPR @ low FPR**: TPR khi FPR ≤ 0.01 hoặc 0.001
   - Quan trọng cho real-world applications

3. **Likelihood-based metrics**: P(x ∈ Dtr | F(θ))

---

## 🧪 KẾT QUẢ THỰC NGHIỆM QUAN TRỌNG

### Attack Performance Comparison:

| Attack Method | Dataset | Attack Accuracy | Setting |
|--------------|---------|-----------------|---------|
| Original Gradient (Nasr) | CIFAR-100 | 75% | White-box active |
| Gradient Difference (Li) | Purchase-100 | 68% | Passive |
| CS-MIA (Gu) | MNIST | 92% | Active server |
| Shadow Training (Zhang) | CIFAR-10 | 71% | GAN-enhanced |
| Loss Trajectory (Hu) | Adult | 85% | Non-IID data |
| Bias Trajectory (Zhang) | Fashion-MNIST | 73% | Low overhead |

### Factors ảnh hưởng Attack Success:

1. **Non-IID data**: Tăng 15-30% attack accuracy
2. **Số lượng clients ít**: <30 clients → higher risk
3. **Model complexity**: Deeper models → more vulnerable
4. **Training epochs**: More epochs → more leakage
5. **Batch size**: Smaller batch → easier detection
Editor is loading...
Leave a Comment