Manuscript Offprint

arXiv:2610.27152

Model Exposure on One Device Endangers Others: Rethinking Edge Neural Network Security across Devices

Yuyang Zhang, Kangjie Chen, Yihui Jin, Run Wang

Abstract

Neural networks (NNs) are increasingly deployed on edge devices such as mobile and IoT platforms, offering low latency and improved privacy compared to cloud-based deployment. However, on-device models embedded in mobile applications can be unpacked and exposed to adversaries, enabling cross-node attacks in centrally distributed ecosystems, where adversarial examples crafted on one compromised device transfer effectively to other nodes sharing the same models. To address this threat, we propose VeilNN, a defense framework that reduces adversarial transferability across on-device models via model obfuscation. The core idea of VeilNN is to introduce controlled model diversity while preserving original task functionality. Specifically, VeilNN applies stealthy and irreversible obfuscation at both the architectural and parameter levels through network cell obfuscation and layer assembling, and is applicable to diverse NN architectures, including MLPs, CNNs, and Vision Transformers. Extensive experiments demonstrate that VeilNN effectively defends against cross-node attacks, achieving an average defense success of 49.19% and up to 81.19% across four adversarial attack types, with more than 33.16% improvement over existing defenses.

1 Introduction

In the past decades, deep learning (DL) models have been widely applied in many cutting-edge fields (e.g., image classification, speech recognition, natural language processing) and achieved impressive progress [Lin et al., 2020]. These DL models are commonly deployed in cloud servers (traditional AI systems) to provide services to our users [Sun et al., 2021; Oliynyk et al., 2023]. In the very recent few years, AI chips that are dedicated to edge devices have been developed and widely assembled in mobile and IoT devices for empowering their capability in tackling heavy computing on edge devices [Ignatov et al., 2019]. Thus, we are witnessing massive applications with on-device models for providing many fruitful services to end users [Xu et al., 2019]. Those on-device models are gaining popularity due to their low latency.

Figure

Figure 1: Threat of adversarial attacks in cross-node scenarios. Unlike single-node scenarios, which evaluate adversarial robustness solely on the targeted device and overlook threats to other identical nodes, cross-node scenarios allow an attacker to compromise one node, gain white-box access, and craft adversarial examples that successfully transfer to other devices running the same deep-learning-driven applications.

in prediction and needless user data transmission, thus this paradigm becomes more efficient and safe [Wang et al., 2025; Huang and Chen, 2022].

Unfortunately, numerous studies have revealed that a large quantity of edge devices are untrustable, where the applications deployed could be easily reversed by adopting the popular unpacking techniques [Sun et al., 2021] and the embedded on-device models could be easily stolen by the popular model stealing techniques [Oliynyk et al., 2023]. Thus, the on-device models are exposed to the adversary in the white-box setting which is more vulnerable to various adversarial attacks, such as evasion attacks and bit-flip attacks [Dong et al., 2023], etc. In a more practical and real scenario, the on-device models are distributed in a centralized manner via the app store (e.g., Google Play) [Hu et al., 2023] and suffer the cross-node attack. Figure 1 shows the adversarial attacks in cross-node scenarios against on-device models from the same mobile application. The attacker aims at compromising a target on-device model by unpacking the app directly or reversing the model weights to conduct a white-box adversarial attack and leverage the knowledge (e.g., model architecture, trainable weight, defense strategies) of the compromised node could be leveraged to attack the other on-device models sharing the same models or applications in black-box settings. For example, Huang et al. [Huang and Chen, 2022] found that the adversarial examples crafted from the compromised node could be easily applied to fool the on-device models (safe nodes) from the same mobile application. Although these target nodes are not compromised themselves, the uniformity of model deployment allows the attack to succeed in a black-box manner. This contrasts with single-node attacks, which only evaluate whether adversarial examples succeed on the targeted device, while overlooking the broader threat posed to other identical nodes. As a result, defense methods that appear effective in single-node settings fail entirely under cross-node scenarios.

Prior studies have shown that models with similar architectures and partially aligned parameters exhibit strong adversarial attack transferability [Sun et al., 2021; Wang et al., 2024]. Such transferability is a key enabler of black-box attacks. However, in cross-node scenarios, the deployed models are identical in both architecture and parameters across devices. This complete homogeneity further amplifies the vulnerability, as adversaries can generate highly effective attacks using white-box access to any compromised node [Zhou et al., 2024b]. This makes safeguarding the model's architecture and weights from being exposed crucial for defending against the adversarial attack in cross-node scenarios.

A straightforward approach to mitigating transferability is to design a special model in a different architecture and retrain the model with different hyperparameters. However, re-designing and retraining the model is computationally expensive, and the illogical structure and training parameters can negatively impact the model's performance [Gheisari et al., 2023]. To mitigate the threat posed by model architecture leaks, existing studies introduce structural variations across different nodes. Existing model modification techniques [Zhou et al., 2023; Zhou et al., 2024a] attempt to achieve this by injecting redundant components into the architecture. However, these techniques do not fundamentally disrupt the consistency of model behavior, different models still produce similar outputs for the same input, leaving them vulnerable to transferable attacks. Another defense strategy is to introduce perturbations into the model input [Grana, 2020; Guiga and Roscoe, 2020], hidden layers [Yu et al., 2021; Yang et al., 2023] or perturbing the model output directly [Lee et al., 2019; Kariyappa and Qureshi, 2020; Zhang et al., 2023]. Yet, our experiments (Section 6) demonstrate that perturbation-based approaches provide only limited protection. The lack of explicit guidelines for counteracting adversarial attacks results in a probabilistic success rate of the adversarial samples against the model. Upon repeated execution of the attack, the success rate gravitates towards 100% rapidly. Therefore, existing methods fail to effectively address the threat of cross-node attacks for on-device models, necessitating a more robust defense mechanism.

In this paper, to protect the on-device models against cross-node attack, for the first time, we propose a novel approach VeilNN 1^{1} to obscure both the architecture and the weights of the models, thereby mitigating this threat. Specifically, to obfuscate the trainable parameters and weaken the transferability between models, we present the network cell obfuscation by injecting a set of grouped linear-correlated cells into the network without affecting the outputs of adjacent cells. Then the weights of the sampled cells are perturbed in a modification manner to achieve stealthy and irreversible obfuscation. To obfuscate the model architecture and evade the model architecture recovery, we propose the network layer obfuscation by injecting, decomposing, and fusing layers to bring the largest variations to the topology of the network and keep the performance in legitimate sample prediction. Our pioneer work is inspired by the widely adopted code obfuscation to defend against malicious code injection and copyright protection [Sebastian et al., 2016].

To conduct a comprehensive evaluation of our VeilNN, the experiments are evaluated on several popular types of NNs with 5 powerful adversarial attacks. Experimental results demonstrate that VeilNN weakens the transferability significantly between obfuscated models originating from the same raw model. Our contributions are as follows:

• We propose VeilNN, the first obfuscation-based defense mechanism designed to counter cross-node attacks by significantly reducing attack transferability. VeilNN introduces stealthy and irreversible variations into the model’s architecture and parameters, making adversarial exploitation and model stealing attacks infeasible.

• We develop two complementary techniques: network cell obfuscation and network layer assembling. The former injects grouped linear-correlated cells and perturbs their weights to obfuscate model parameters, while the latter modifies network topology via layer decomposition, injection, and fusion, ensuring architectural uniqueness and preventing model recovery.

• We extensively evaluate VeilNN on three popular NNs under five adversarial attack methods and three model extraction attacks. Our results demonstrate that VeilNN achieves up to 81.19% and an average of 49.19% reduction in cross-node attack success rates, outperforming existing defenses by over 33.16% in most settings.

References (44)

  • Towards evaluating the robustness of neural networks
  • Hopskipjumpattack: A query-efficient decision-based attack
  • Fast neighborhood subgraph pairwise distance kernel
  • Imagenet: A large-scale hierarchical image database
  • The mnist database of handwritten digit images for machine learning research
  • One-bit flip is all you need: When bit-flip attack meets model training
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Transferattack
  • Applications, architectures, models, tools, and frameworks: A comprehensive survey
  • Explaining and harnessing adversarial examples
  • Perturbing inputs to prevent model stealing
  • Neural network security: Hiding cnn parameters with guided grad-cam
  • Deep residual learning for image recognition
  • A first look at on-device models in ios apps
  • Smart app attack: Hacking deep learning models in android apps
  • Ai benchmark: All about deep learning on smartphones in 2019
  • Defending against model stealing attacks with adaptive misinformation
  • Imagenet classification with deep convolutional neural networks
  • Defending against neural network model stealing attacks using deceptive perturbations
  • Learning transferable adversarial examples via ghost networks
  • Adversarial attacks in computer vision: a survey
  • Adversarial attack and defense: A survey
  • Tiny deep learning on iot devices
  • Dora: Weight-decomposed low-rank adaptation
  • Towards Deep Learning Models Resistant to Adversarial Attacks
  • A systematic review of adversarial machine learning attacks, defensive controls, and technologies
  • Neural network intelligence
  • Mlp architectures for vision-and-language modeling: An empirical study (opens arXiv in a new tab)
  • I know what you trained last summer: A survey on stealing machine learning models and defences
  • Singular value decomposition for the efficient design of neural networks
  • A study & review on code obfuscation
  • Grakel: A graph kernel library in python
  • Physical adversarial examples for object detectors
  • Mind your weight (s): A large-scale study on insufficient machine learning model protection in mobile apps
  • Preventing neural network weight stealing via network obfuscation
  • Revisiting adversarial training at scale
  • Empowering edge intelligence: A comprehensive survey on on-device ai models
  • A first look at deep learning apps on smartphones
  • A simple stochastic neural network for improving adversarial robustness
  • Simple and effective stochastic neural networks
  • Apmsa: adversarial perturbation against model stealing attacks
  • Modelobfuscator: Obfuscating model information to protect deployed ml-based systems
  • Modelless is the best model: Generating pure code implementations to replace on-device dl models
  • Investigating white-box attacks for on-device models