A deployed neural network gives away its design through timing. An attacker who can profile a GPU sees how long each layer takes and how much memory it touches, and from that trace can often recover layer types and sizes. Stolen architectures are the usual first step toward copying a model or attacking it. The main existing defense, DNN-Alias, inserts extra identity and dummy layers until every layer looks alike. That costs about 1.4× latency. It also adds exactly the memory traffic and small-kernel overhead that make real hardware slow.
This proposal starts from a well-documented fact of hardware-aware design: theoretical operation counts (FLOPs) predict measured latency poorly. On some devices, operators that look very different on paper take nearly the same time to run. HW-NAS-Bench reports a Kendall rank correlation of only 0.18 between FLOPs and latency on the Google Edge TPU. We treat these collisions as a free source of confidentiality. We measure how many architectures in a search space would produce the same timing trace as the deployed one, and then use architecture search to pick accurate, fast networks whose traces sit inside large crowds of look-alikes. No dummy layers are added.
Core Claim
Against a layer-level timing attacker, confidentiality can be measured by an anonymity count: the number of architectures in the search space whose per-layer timing trace on the target device matches the deployed one within measurement noise. In layer-wise search spaces with per-block latency tables, this count can be computed exactly, and searching to make it large gives better accuracy–latency–confidentiality trade-offs than adding obfuscation layers after the fact.
The count is defined as follows. Let $\tau_d(b,\ell)$ be the measured latency of block choice $b$ at layer position $\ell$ on device $d$, and let $\epsilon_d$ be the device's timing noise. For a deployed architecture $a=(b_1,\dots,b_L)$, the count is
$$ N_d(a) = \prod_{\ell=1}^{L} \big|\{\, b : |\tau_d(b,\ell)-\tau_d(b_\ell,\ell)| \le \epsilon_d \,\}\big| . $$
The product form follows from the additive per-block latency model that HW-NAS-Bench already uses for the FBNet space. Because of it, the count can be computed for a space of $10^{21}$ networks without enumerating them. $\log_2 N_d(a)$ is then the number of bits the attacker still lacks after seeing the trace.
Three consequences are testable. First, an attacker who profiles several devices can intersect the collision sets across devices, so confidentiality is a property of a deployment set, not of a single chip. Second, the count shrinks if the attacker also sees memory traffic; HW-NAS-Bench's energy measurements give a second channel for testing this. Third, the count should be discounted by how plausible each look-alike is. An attacker will not guess an architecture with near-random accuracy, so the effective count weights look-alikes by an accuracy prior.
Relation to Prior Work
Two papers show that execution footprints leak architecture on GPUs. DeepPeep identifies compact-network families from throughput, energy, memory footprint and cuBLAS kernel choice. Its hand-built defense, a uniform group size in MobileNet-V1, happened to be faster than the original. That result motivates this proposal: it suggests confidentiality and speed need not conflict. DNN-Alias is the closest existing work. It runs a genetic algorithm over function-preserving mutations (branching, skipping, identity 1×1 layers) to minimize the spread of per-layer runtimes on one RTX 2080 Ti. We differ in three ways:
- we choose the architecture itself rather than padding a fixed one;
- we measure confidentiality as a count over a search space rather than as runtime variance;
- we evaluate across the six HW-NAS-Bench platforms rather than one GPU.
The SoK on hardware reverse engineering motivates the cross-device focus. It finds that 64% of studies consider serial CPUs, and that defenses rarely report power, performance and area costs.
On the efficiency side, three papers supply methods:
- HW-NAS-Bench supplies the per-block latency tables that make the count exact.
- NASFLAT shows that latency predictors reach Spearman ρ > 0.9 from as few as 20 target-device measurements. We read this as a threat: the same predictor lets an attacker build $\tau_d$ for a new device cheaply. So we assume the attacker knows the tables.
- Once for All supplies a super-network for obtaining accuracies of FBNet-like subnetworks without training each one.
Two further papers constrain the design. NAS-Bench-201 shows that differentiable search collapses toward skip connections and that simple random search is hard to beat. Black-box SCA NAS likewise finds that random search beats Bayesian optimization in a side-channel setting. We therefore use black-box search.
Other privacy work in NAS protects something different. Cell-NAS privacy studies membership inference, which is about training data. PP-NAS protects the search process itself using secure multi-party computation. Neither addresses what the deployed network's timing reveals.
Research Program
Measurement study. We first map how latency collisions are distributed. For each HW-NAS-Bench device and each layer position of the FBNet space, we cluster block choices by measured latency at several noise levels. Noise levels are calibrated from repeated profiling runs on the devices we own, a Jetson-class GPU and a Raspberry Pi 4. We compute the count $N_d$ for random, FLOPs-optimal and latency-optimal architectures, and the cross-device intersections. This shows whether aliasing is abundant on systolic-style hardware such as the Edge TPU and scarce on others, as the 0.18 correlation suggests.
Search. We then run constrained search: maximize accuracy subject to a latency budget $T$ and $\log_2 N_d(a) \ge k$ bits. We use regularized evolution and random search. Accuracy comes from an OFA-style super-network in the FBNet/MobileNet-like space and from exact lookups in NAS-Bench-201.
Hardware validation. Finally, we check the model against real hardware. We deploy selected networks on real devices with vendor compilers, which fuse operators. We then train a trace-to-architecture attacker, a sequence classifier in the style of DNN-Alias and DeepPeep, on profiler traces covering timing, memory reads and memory writes. We report its layer error rate. This tests whether the table-based count predicts real attack failure, and whether compiler fusion breaks the additive model. The count is only useful if it predicts real attacker error, so this validation is where the idea is decided.
Baselines
Naive reference. The accuracy-optimal architecture under the same latency budget, found by the same search with no confidentiality term. This is ordinary hardware-aware NAS. It measures how much leakage search leaves by default and how much accuracy the constraint costs.
Strongest existing method. DNN-Alias layer balancing applied to that naive architecture, at its published 20% and 60% overhead budgets and re-run on our devices with the same attacker. It is the strongest competitor because it directly targets per-layer timing and memory variance. The reported result is an average layer error rate of 2.0 at about 1.4× average latency overhead on an RTX 2080 Ti, with transfer-attack success falling from 98% to 0.2% (DNN-Alias). To keep the comparison fair, both methods use the same device, the same attacker trained on the same number of traces, and an equal wall-clock search budget. Beating it means matching or exceeding its layer error rate at lower measured latency, or at equal latency with no loss in accuracy.
Heuristic reference. Architectures restricted to one block type per stage, analogous to DeepPeep's uniform-group defense. This checks whether homogeneity alone explains any gains.
Key ablation. Run the identical search, but compute the count from FLOPs instead of measured latency. If FLOPs-based anonymous networks fail against the real attacker while latency-based ones succeed, the FLOPs–latency gap is the working ingredient.
Why not just…?
Why not just pad every layer to the slowest layer's time? Constant-time padding makes timing uniform by construction. It is a real threat to this proposal on devices where layer latencies are already similar. However, it costs roughly $L\cdot\max_\ell \tau - \sum_\ell \tau$ per inference, and it does not equalize memory traffic, the channel DNN-Alias identifies as dominant. We implement padding on each device and report its latency and attacker error. If padding plus the naive architecture dominates our search on most devices, we will conclude the search is only worthwhile where padding is expensive.
Why not just use DNN-Alias on a NAS-found model? This is the main baseline. Our claim is that obfuscation layers add memory access cost of the kind ShuffleNet V2 shows dominates runtime, while choosing among naturally colliding blocks adds none. The head-to-head comparison at matched budgets settles this directly.
Why not just run inside a trusted execution environment? Enclaves hide traces but cost up to about 10× latency, per the SoK, and are unavailable on most edge accelerators in HW-NAS-Bench. We cite this as an outer bound rather than rerunning it.
Proposed Experiments
Collision maps. We compute $\log_2 N_d$ for FBNet architectures on all six HW-NAS-Bench devices, and for pairwise and full intersections, at three noise levels.
Trade-off frontiers. Using NAS-Bench-201 accuracies on CIFAR-10, CIFAR-100 and ImageNet-16-120, we trace accuracy against latency against bits. The known reference is the top NAS-Bench-201 accuracy of 94.37% on CIFAR-10. For NAS-Bench-201 per-cell traces, the file reports no per-layer latency tables on Lacuna, so we measure them ourselves on the owned devices.
Hardware validation. On the owned devices, with compiler fusion enabled, we compare our networks against the naive architecture, DNN-Alias, padding and the uniform-block reference, using the retrained attacker. Metrics are layer error rate, top-1 accuracy (ImageNet-1K via the super-network) and measured latency.
Decisive checks. Two results decide the idea. First, $\log_2 N_d$ must rank-correlate with real attacker layer error across held-out architectures. Second, the latency-based search must beat both DNN-Alias and the FLOPs-based ablation in attacker error at equal measured latency. If fusion collapses layer boundaries so that the per-layer count stops predicting attack success, we report that as a negative result about additive leakage models.
References
- DNN-Alias: Deep Neural Network Protection Against Side-Channel Attacks via Layer Balancing
- HW-NAS-Bench: Hardware-Aware Neural Architecture Search Benchmark
- DeepPeep: Exploiting Design Ramifications to Decipher the Architecture of Compact DNNs
- SoK: Model Reverse Engineering Threats for Neural Network Hardware
- On Latency Predictors for Neural Architecture Search
- Once-for-All: Train One Network and Specialize it for Efficient Deployment
- NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search
- Automated Side-Channel Attacks using Black-Box Neural Architecture Search
- On the Privacy Risks of Cell-Based NAS Architectures
- Towards Privacy-Preserving Neural Architecture Search
- ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design