Discrete Few-Shot Learning for Pan Privacy

Roei Gelbhart, Benjamin I. P. RubinsteinarXiv 2020

Introduction

Few-shot learning (FSL) is a critical capability for biometric security systems, enabling models to recognize individuals from minimal examples, such as a single fingerprint or face scan. However, traditional FSL models rely on continuous embedding vectors—mathematical representations that are inherently "leaky." If a database of these embeddings is compromised, attackers can use generative adversarial networks (GANs) to reconstruct the original biometric data from the stored vectors.

This paper proposes a "pan-private" approach to FSL. Pan privacy ensures that a system remains secure even if its internal state is fully exposed to an attacker. To achieve this, the authors introduce a method to store cryptographic hashes of biometric data rather than the raw embeddings, overcoming the challenge that standard hashing is typically incompatible with the inherent noise in biometric captures.

Methodology: Discrete Prototypical Networks

The proposed solution consists of two primary components: the Discrete Prototypical Network (DPN) and Random Coordinate Projection Hashing (RCPH).

Discrete Prototypical Network (DPN)

The DPN is a modification of the standard Prototypical Network architecture. Instead of mapping inputs to a continuous feature space, the network is trained to produce outputs that converge toward the vertices of a high-dimensional hypercube—specifically, a 1024-bit binary vector. By utilizing sigmoid activation functions and specialized regularization, the model minimizes the "discretization gap," ensuring that raw network outputs are easily rounded to stable 0s and 1s. Interestingly, the authors leverage the "vanishing gradient" problem of sigmoid functions as a feature, using it to "lock" bits into place as they approach 0 or 1.

The architecture of the Discrete Prototypical Network, showing the progression from input images to a 1024-bit feature vector.

Random Coordinate Projection Hashing (RCPH)

Because biometric inputs are never perfectly identical, the resulting bitstrings may contain minor errors. Standard cryptographic hashes (like SHA-256) would fail on these near-matches. RCPH addresses this by randomly selecting subsets of bits (projections) and hashing only those subsets. By performing $M$ such projections, the probability of finding a matching hash for the correct class becomes high, while the likelihood of a random match for an incorrect class remains negligible.

Experimental Setup and Results

The authors evaluated the system using the Omniglot dataset, a benchmark for few-shot learning containing 1,623 handwritten characters from 50 alphabets.

Performance and Security Trade-offs

The parameter $p$ (the fraction of bits matched in a projection) serves as a tunable security threshold. A lower $p$ increases robustness to noise and improves accuracy but reduces the computational difficulty for a brute-force attacker. Conversely, a higher $p$ enhances security at the cost of potential "fail rates" where the system cannot confidently identify a match.

Heatmap illustrating the relationship between P values (matching threshold), M values (number of iterations), and system accuracy.

Key findings include:

  • Accuracy: On a 1-shot, 5-way task, the private DPN+RCPH system achieved 94.5% accuracy with $M = 10^6$ iterations, compared to a non-private baseline of 98.8%.
  • 5-Shot Scaling: Performance improved significantly with more examples, reaching 97.6% accuracy for 5-shot tasks, nearly matching the 99.7% baseline.
  • Efficiency: Despite the high number of iterations, the hashing process is computationally efficient on modern hardware, typically completing in well under a second for a login attempt.

Discussion and Future Work

The research demonstrates that privacy-preserving biometrics do not necessitate a massive sacrifice in performance. By using one-way hashes instead of locality-sensitive hashing (LSH), the authors ensure that the stored data provides zero information about the original embedding unless an exact match is found, preventing reconstruction attacks.

Future work will focus on scaling this approach to more complex biometric data, such as high-resolution facial images or iris scans, and refining the selection of the optimal $p$ value to balance security with user experience in real-world deployments.

Summary updated

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Omniglot · 1-shot, 5-wayDiscrete Prototypical Networks (DPN)Accuracy (Acc.)97.8%split: test · few-shot · ways=5 · shots=1
Source quote
L239: \textbf{DPN\tnote{*}} │ 97.8% │ 99.4%
Omniglot · 5-shot, 5-wayDiscrete Prototypical Networks (DPN)Accuracy (Acc.)99.4%split: test · few-shot · ways=5 · shots=5
Source quote
L239: \textbf{DPN\tnote{*}} │ 97.8% │ 99.4%
Omniglot · 1-shot, 5-wayDPN+RCPHAccuracy (Acc.)94.5%few-shot · m=10^6 · ways=5 · shots=1 · component=RCPH
Source quote
L244: \textbf{DPN+RCPH, m=10^6\tnote{**}} │ 94.5% │ 3.0% │ 42616 │ 0.12 │ 97.6% │ 1.3% │ 17152 │ 0.12
Omniglot · 5-shot, 5-wayDPN+RCPHAccuracy (Acc.)97.6%few-shot · m=10^6 · ways=5 · shots=5 · component=RCPH
Source quote
L244: \textbf{DPN+RCPH, m=10^6\tnote{**}} │ 94.5% │ 3.0% │ 42616 │ 0.12 │ 97.6% │ 1.3% │ 17152 │ 0.12
Reported baseline / comparator measurements (2)
BenchmarkMethodMetricScoreProtocol / Evidence
Omniglot · 1-shot, 5-wayPrototypical Networks baselineAccuracy (Acc.)98.8%split: test · few-shot · ways=5 · shots=1
Source quote
L237: \textbf{Prototypical Networks\tnote{*}\cite{snell2017prototypical}} │ 98.8% │ 99.7%
Omniglot · 5-shot, 5-wayPrototypical Networks baselineAccuracy (Acc.)99.7%split: test · few-shot · ways=5 · shots=5
Source quote
L237: \textbf{Prototypical Networks\tnote{*}\cite{snell2017prototypical}} │ 98.8% │ 99.7%
BibTeX
@misc{gelbhart2020discrete,
  author = {Roei Gelbhart and Benjamin I. P. Rubinstein},
  title = {{Discrete Few-Shot Learning for Pan Privacy}},
  year = {2020},
  eprint = {2006.13120},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.13120},
}
Figure