---
title: Dispersion-Based Unlearning Approach
url: https://www.emergentmind.com/topics/dispersion-based-unlearning-approach
type: topic
---

# Dispersion-Based Unlearning Approach

A dispersion-based unlearning approach is a methodology for selectively erasing information associated with particular classes or identities from deep embedding-based retrieval systems. It operates by dispersing the embeddings of selected ("forget") identities over the hypersphere to prevent the formation of compact clusters, thereby rendering these identities unretrievable via standard similarity search while preserving model utility for all retained identities. This technique addresses privacy concerns and regulatory compliance in surveillance-oriented machine learning by providing a practical and effective means of face identity forgetting within state-of-the-art embedding architectures [2512.13317].

## 1. Problem Setting and Unlearning Objective

Given a pretrained face-embedding model $f_\omega: \mathbb{R}^{H\times W\times 3} \to \mathbb{R}^d$ that produces embeddings $x_i = f_\omega(I_i)$, the output vectors are $\ell_2$-normalized to the unit hypersphere: $\hat{x}_i = x_i / \|x_i\|_2$, so $\|\hat{x}_i\|_2 = 1$. Let the complete dataset $\mathcal{D} = \{(I_i, y_i)\}$ contain $K$ distinct identities. This set is partitioned into a "forget" set $\mathcal{D}_f$ corresponding to identities in $\mathcal{P}_u$ (to be forgotten) and a "retain" set $\mathcal{D}_r$ with the remaining identities.

The unlearning goal is formalized in retrieval terms:

- (A) For any forget-set query $I$ and any other face $I_p$ of the same identity vs. a negative $I_n$ of a different identity, post-unlearning parameters $\omega'$, retrieval flips: $\varphi_{\omega'}(I, I_p) < \varphi_{\omega'}(I, I_n)$, where $\varphi(\cdot, \cdot)$ denotes cosine similarity, i.e., $\varphi(\hat{x}_i, \hat{x}_j) = \hat{x}_i^\top \hat{x}_j$.
- (B) For all retained identities, the original retrieval orderings are preserved: $\varphi_{\omega'}(I, I_p) > \varphi_{\omega'}(I, I_n)$.

**Cluster Compactness Score (CS):**
For a set $\mathcal{P}$ of identities (forget or retain), compactness is:

$$
\mathrm{CS}(\mathcal{P}) = \frac{1}{|\mathcal{P}|}\sum_{p\in\mathcal{P}} \left(\frac{1}{n_p(n_p-1)} \sum_{i \neq j \in \text{class }p} \hat{x}_i^\top \hat{x}_j\right)
$$

Lower CS indicates a more dispersed (less compact) identity cluster.

## 2. Dispersion Losses and Mathematical Formulation

To directly erase identity structure, the dispersion approach employs mini-batches solely from $\mathcal{D}_f$.

- For data in a batch, for anchor $i$ define $P_i = \{j \in [1..B]\,|\, y_j = y_i,\,j \neq i\}$ and $\mathcal{N}_{\mathrm{pos}} = \{i\,|\,|P_i| > 0\}$.

**Uniform Dispersion Loss:**
$$
L_{\rm disp} =
\frac{1}{|\mathcal{N}_{\rm pos}|}
\sum_{i\in\mathcal{N}_{\rm pos}}
\frac{1}{|P_i|}
\sum_{j\in P_i}
\max(0, m + \hat x_i^\top \hat x_j)
$$
where $m > 0$ is a margin hyperparameter. The hinge penalty activates whenever two same-identity embeddings are too close (cosine similarity above $-m$), driving within-class pairs further apart.

**Hard-Dispersion Loss:**
$$
L_{\rm hard\_disp} =
\frac{1}{|\mathcal{N}_{\rm pos}|}
\sum_{i\in\mathcal{N}_{\rm pos}}
\max \left[ 0, m + \max_{j\in P_i} \hat x_i^\top \hat x_j \right]
$$
This loss targets the most similar positive for each anchor, more aggressively disrupting the tightest intra-class links.

**Combined Objective:**
In main experiments, only the dispersion loss is optimized:
$$
L_{\rm total} = \lambda_{\rm disp}\, L_{\rm disp} + \lambda_{\rm retain}\, L_{\rm retain}
$$
with $\lambda_{\rm disp}=1$, $\lambda_{\rm retain}=0$; typical settings: $m=0.2$, learning rate $1\times 10^{-4}$, $T=1000$ steps.

## 3. Dispersion-Unlearning Algorithm

The operational steps are as follows:

```python
Input:
   f_ω         -- pretrained face encoder
   𝒟_f         -- forget‐set images
   m           -- margin (e.g. 0.2)
   lr          -- learning rate (e.g. 1e–4)
   B           -- batch size (32 or 160)
   T           -- number of unlearning steps (1000)
   use_hard?   -- use hard-dispersion or uniform

for t in 1..T:
   Sample batch {(I_i, y_i)} from ℒ_f
   x_i = f_ω(I_i)
   ħx_i = x_i / ∥x_i∥₂
   For each batch, build P_i, 𝒩_pos
   If use_hard?:
      L = (1/|𝒩_pos|) ∑_i max(0, m + max_j∈P_i ħx_i⋅ħx_j)
   Else:
      L = (1/|𝒩_pos|) ∑_i (1/|P_i|) ∑_j∈P_i max(0, m + ħx_i⋅ħx_j)
   ω ← ω − lr · ∇_ω L
Return f_{ω’}
```

All gradients are restricted to $\mathcal{D}_f$; no training signal is backpropagated through $\mathcal{D}_r$, so the geometry of retained identities remains stable.

## 4. Selective Impact and Cluster Structure Preservation

Dispersion-based unlearning preserves retrieval utility for non-forgotten identities via several mechanisms:

- **Selective Gradients**: Sampling exclusively from $\mathcal{D}_f$ ensures parameter updates do not affect the representations of retained identities.
- **Hyperspherical Repulsion**: The margin $m$ in the hinge term bounds dispersion, preventing unwanted distortion of the embedding space or over-dispersal.
- **No Classifier Perturbation**: Classifier weights or decision boundaries, common targets in classification-based unlearning approaches, remain unaltered. Only the local structures of forget-set clusters are modified.

*This suggests* that the method minimally impacts the discriminative power of the model for classes outside the forget set.

## 5. Experimental Results and Baseline Comparisons

**Backbone and Training:**  
Architecture: IResNet-50, CosFace loss ($s=64$, $m=0.4$); pretraining on Glint360K with fine-tuning on CelebA; 512-D unit embeddings.

**Dispersion Hyperparameters:**  
Learning rate: $1\times 10^{-4}$; margin: $0.2$; batch size: $32$ (CelebA), $160$ (VGGFace2); unlearning steps: $1000$; $\lambda_{\rm retain}=0$.

**Baselines:**  
Random Labeling, Gradient Ascent, Lipschitz Unlearning, Contrastive Unlearning, Boundary Shrink (adapted to CosFace).

**Quantitative Performance:**  
- On CelebA forget-set:
  - Original model: mAP $=88.7$, R@1 $=98.17$
  - Best baseline (Boundary Shrink): mAP $\approx 60.2$, R@1 $\approx 96.5$
  - Dispersion Loss: mAP $\approx 17.8$, R@1 $\approx 67.4$
  - Hard-Dispersion: mAP $\approx 16.0$, R@1 $\approx 65.9$
- Retention (CFP-FP/VGGFace2):
  - Original: $91.0/97.5$, $89.1/98.8$
  - Dispersion: $89.2/97.3$, $87.5/98.8$
- Cluster Compactness (CelebA, forget set):
  - Original: $0.615$; Boundary Shrink: $0.255$; Dispersion: $0.089$; Hard-Dispersion: $0.086$
- VGGFace2 (extended, forget set):
  - Dispersion: mAP $\approx 4.7$, R@1 $\approx 79.0$; Hard-Dispersion: mAP $\approx 1.5$, R@1 $\approx 51.6$

These results demonstrate markedly superior forgetting (larger drops in mAP/R@1 and cluster compactness) relative to all baselines, with essentially unperturbed performance for retained classes [2512.13317].

## 6. Geometric Rationale and Superiority over Existing Approaches

The effectiveness of hyperspherical dispersion arises from several geometric and algorithmic properties:

1. **Direct Geometric Manipulation:**  
   Classification-based unlearning corrupts classifier weights or labels, but underlying embedding clusters often remain compact, allowing successful retrieval via nearest neighbor search. Dispersion loss destroys local cluster cohesion directly at the embedding level.

2. **Margin-Based Repulsion:**  
   The hinge margin on pairwise cosine values guarantees an angular separation of at least $\arccos(-m)$ between any two embeddings of the same forgotten identity, maximizing their dispersal within the available hyperspherical surface.

3. **Preservation of Embedding Structure:**  
   Embeddings maintain unit norm. The retention of the global hyperspherical structure means non-forgotten clusters remain unaffected, trading retrieval accuracy for forgotten identities in a tightly controlled manner.

4. **Algorithmic Simplicity and Robustness:**  
   The approach has a single, interpretable hyperparameter ($m$). It requires no per-class retraining or additional regularization and delivers stable, reproducible forgetting outcomes with minimal risk of unintended side effects.

In summary, dispersion losses—uniform and hard—provide an explicit and geometrically principled method to dissolve compact identity clusters on the face-embedding hypersphere, producing dramatic and targeted degradation in retrievability for forgotten identities, while leaving the retrieval performance for all other faces almost unchanged. This surpasses the efficacy and selectivity of all previously proposed approximate unlearning strategies for embedding-based face retrieval [2512.13317].

Source: https://www.emergentmind.com/topics/dispersion-based-unlearning-approach