Abstract
Neural network applications have become popular in both enterprise and personal settings. Network solutions are tuned meticulously for each task, and designs that can robustly resolve queries end up in high demand. As the commercial value of accurate and performant machine learning models increases, so too does the demand to protect neural architectures as confidential investments. We explore the vulnerability of neural networks deployed as black boxes across accelerated hardware through electromagnetic side channels. We examine the magnetic flux emanating from a graphics processing unit's power cable, as acquired by a cheap $3 induction sensor, and find that this signal betrays the detailed topology and hyperparameters of a black-box neural network model. The attack acquires the magnetic signal for one query with unknown input values, but known input dimensions. The network reconstruction is possible due to the modular layer sequence in which deep neural networks are evaluated. We find that each layer component's evaluation produces an identifiable magnetic signal signature, from which layer topology, width, function type, and sequence order can be inferred using a suitably trained classifier and a joint consistency optimization based on integer programming. We study the extent to which network specifications can be recovered, and consider metrics for comparing network similarity. We demonstrate the potential accuracy of this side channel attack in recovering the details for a broad range of network architectures, including random designs. We consider applications that may exploit this novel side channel exposure, such as adversarial transfer attacks. In response, we discuss countermeasures to protect against our method and other similar snooping techniques.
Introduction
In the modern AI landscape, a neural network’s architecture—its specific sequence of layers, kernel sizes, and connections—is often a closely guarded trade secret. Companies invest massive resources into finding the optimal structure for critical tasks like medical imaging or autonomous driving. While model weights are typically hidden behind APIs, the hardware they run on, such as GPUs, is a physical system that emits electromagnetic signals according to the laws of physics.
This research addresses whether an adversary with physical proximity to a GPU can reconstruct a model's architecture without software or data access. While previous side-channel attacks often required expensive equipment or targeted simpler microprocessors, this work demonstrates that complex, deep networks running on high-end GPUs are vulnerable to low-cost snooping using simple induction sensors.
Methodology
The attack utilizes a multi-step pipeline to transform raw magnetic noise into a structured network diagram:
1. Signal Acquisition
A $3 fluxgate sensor records the magnetic field near the GPU power cable. Different operations, such as a Convolution versus a ReLU activation, draw varying amounts of power, creating distinct magnetic signatures.
2. Synchronization and Topology Recovery
To align the magnetic signal with GPU operations, a "landmark" operation is injected before the inference query. The researchers then treat the magnetic signal as a sequence, using a Bidirectional Long Short-Term Memory (BiLSTM) network to classify signal segments into specific operational steps (e.g., Conv, BatchNorm, MaxPool). The bidirectional context allows the model to improve classification accuracy by looking at preceding and succeeding segments.
3. Hyperparameter Estimation and Optimization
Once layer types are identified, specialized DNNs estimate parameters like kernel size, stride, and padding based on signal duration and intensity. To correct potential errors, the authors employ Integer Programming (IP) to enforce architectural logic—ensuring, for instance, that the output dimensions of one layer match the input dimensions of the next. This mathematical consistency check significantly improves the final reconstruction fidelity.
Experimental Setup
The authors developed an automated dataset to train and validate their recovery models:
- Training Set: 500 networks, including random architectures and standard models (VGG, ResNet), totaling over 70,000 operational steps.
- Test Set: 64 independent networks, ranging from 30 to 50 layers deep.
- Evaluation: Reconstructed "surrogate" models were tested on standard benchmarks like CIFAR-10 and ImageNet to compare performance against the original victim models.
Results and Analysis
The study revealed several critical insights into GPU vulnerabilities:
- Hardware Amplification: The massive parallelism of modern GPUs actually amplifies the magnetic signal, making it easier to detect than on smaller chips.
- High Accuracy: The BiLSTM achieved a 96.8% accuracy in classifying individual network steps on an Nvidia Titan V. For 40 out of 64 test networks, the system recovered the topology with zero errors.
- Adversarial Transferability: Stolen architectures were used to launch adversarial transfer attacks. Inputs designed to fool the reconstructed model achieved nearly identical success rates (often exceeding 90%) in fooling the original victim model.
- Cross-Device Generalization: A model trained on one Nvidia GTX-1080 could successfully snoop on a different unit of the same model, proving the vulnerability is inherent to the hardware design.
Discussion and Future Work
The current methodology assumes a linear network progression and may struggle with complex branching or graph-based architectures. While the focus was on the inference phase, snooping on the training phase is theoretically possible but more complex due to back-propagation noise.
Potential countermeasures include "Jamming" (masking the signal with background tasks) or "Deceptive Steps" (adding dummy operations). However, these defenses often incur performance penalties, highlighting a fundamental trade-off between security and computational efficiency in high-performance hardware.
Summary updated