Everything is Connected: From Model Learnability to Guessing Entropy

Lichao Wu, Leo Weissbart, Marina Krcek, Huimin Li, Guilherme Perin, Lejla Batina, Stjepan Picek

TL;DR

Standard metrics like Guessing Entropy (GE) can be deceptive in side-channel analysis, sometimes suggesting an attack is failing when the model has actually learned the underlying physics. This paper introduces a new metric, the Profiling Model Fitting Metric ($L_m$), which uses the correlation between predicted key ranks and "ideal" leakage distributions to reliably assess a model's generalization ability even when attack data is scarce.

What Problem Does This Paper Address?

In Profiling Side-channel Analysis (SCA), an attacker uses a "copy" of a target device to train a machine learning model (like a CNN) to recognize secret-key-dependent leakages in power consumption or electromagnetic emissions. The gold standard for evaluating these attacks is Guessing Entropy (GE)—the average rank of the correct key among all possibilities.

However, GE is finicky. The authors identify a phenomenon called Deceptive Guessing Entropy, where adding more attack traces actually makes the correct key rank worse or keeps it stuck in a random distribution. This often leads researchers to wrongly conclude a model hasn't learned anything. The gap lies in the fact that standard GE calculations (Simple GE) often lack the randomization needed to show true convergence, while more robust versions (Generalized GE) require a massive number of attack traces that might not be available in the real world.

Methods

The authors propose a shift from looking only at the final result (did we get the key?) to looking at how the model is making its decisions. They introduce two primary novel components:

  1. Leakage Distribution Difference (LDD): This is a theoretical "Ideal Key Rank." By calculating the squared Euclidean distance between the leakage of the correct key and all other key hypotheses (based on models like Hamming Weight), the authors create a map of how "close" every wrong key is to the right one.
  2. Profiling Model Fitting Metric ($L_m$): This is the core contribution. It calculates the Pearson correlation between the LDD (the ideal) and the model’s actual key guessing vector.

By comparing the model's output to this "ideal" map, $L_m$ can determine if a model is actually fitting the physical leakage or just chasing noise. Unlike GE, which requires the correct key to reach rank 1 to be "successful," $L_m$ can show that a model is on the right track even if it currently ranks the correct key at position 50.

Datasets

The study validates its approach using several high-profile side-channel benchmarks:

  • ASCAD Dataset: The industry standard for masked AES implementations, tested in both synchronized and desynchronized versions.
  • CHES CTF Dataset: A 2018 challenge dataset featuring masked AES on a 32-bit STM microcontroller.
  • DPAcontest v4: A masked software implementation.
  • AES_HD: An unprotected hardware implementation used to demonstrate Hamming Distance leakage.
  • Simulated Datasets: Used to establish "perfectly fitted" baseline models where noise levels could be strictly controlled.

Key Insights and Ideas

  • GE is not a binary success/failure metric: A model might have a high (bad) GE but a high (good) $L_m$. This means the model has learned the leakage patterns, but it simply needs more attack traces to overcome the remaining noise.
  • The "Deceptive" Trap: Simple Guessing Entropy (SGE) can be highly biased. If you only have a few traces, SGE might point to a wrong key consistently. The $L_m$ metric acts as a "sanity check" to see if those results are statistically meaningful.
  • Generalization vs. Performance: The paper distinguishes between a model's ability to "break" a specific set of traces (performance) and its ability to understand the leakage mechanism (generalization). $L_m$ is a much more stable indicator of the latter.
  • Efficiency: $L_m$ can provide a reliable estimate of model quality with significantly fewer traces (e.g., 100 traces) than it takes for Generalized Guessing Entropy to converge.

Key Results

  • Correlation as a Canary: In experiments with 4-layer and 6-layer MLPs on the ASCAD dataset, $L_m$ values above 0.4 consistently predicted strong eventual attack performance, even when GE was still high.
  • Overfitting Detection: The $L_m$ metric successfully identified when a model began to overfit. For example, on the Identity leakage model, $L_m$ peaked at 60 epochs and then declined, mirroring the point where the model's generalization ability began to degrade.
  • Robustness: The authors demonstrated that $L_m$ remains a reliable indicator across different noise levels and model complexities (MLP vs. CNN), providing a "unified view" of model learnability that GE lacks.

Limitations and Future Work

The authors acknowledge that while $L_m$ is a powerful diagnostic tool, it is not a replacement for GE. Specifically:

  • No Direct Attack Count: $L_m$ tells you if a model is good, but it doesn't directly tell you exactly how many traces you need to reach a GE of 1.
  • Profiling Only: This metric is designed for profiling attacks where a leakage model (like Hamming Weight) is assumed. It may not apply directly to non-profiled attacks.

Future Directions: The team plans to investigate using $L_m$ as an early stopping criterion during neural network training. Instead of stopping when validation loss plateaus, a trainer could stop when $L_m$ is maximized, potentially capturing the model at its peak generalization point before it begins to overfit on the training set's specific noise.

Summary updated

BibTeX
@article{wu2020everything,
  author = {Lichao Wu and Leo Weissbart and Marina Krcek and Huimin Li and Guilherme Perin and Lejla Batina and Stjepan Picek},
  title = {{Everything is Connected: From Model Learnability to Guessing Entropy}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2020},
  url = {https://openreview.net/forum?id=HRBOimqrfY},
}
Figure