Manuscript Offprint
arXiv:2610.27135Mind Your Boundaries: Boundary-Aware Model Obfuscation against Cross-node Attack
Abstract
With the advancement of powerful AI chips, on-device machine learning is gaining traction for its low latency and privacy protection. However, when edge devices are compromised, attackers can obtain white-box access to the deployed models by reversing the apps directly to obtain the knowledge of peer devices, which is known as Cross-Node Attacks, like performing efficient adversarial attacks. Most existing defenses target known vulnerabilities, yet white-box access still enables attackers to uncover more unknown weaknesses. This creates a critical risk for edge-device deployments, where one compromised device can endanger all models distributed from the same source. Motivated by findings that the model robustness is primarily influenced by the curvature of the decision boundary, we investigate how model parameters shape its curvature. In this paper, we propose a novel method, BMO, that obfuscates model parameters to diversify the decision boundary further resisting cross-node attack while preserving its benign accuracy. Specifically, we explore decomposing model parameters into boundary-position and boundary-curvature components based on null-space constraints, then models with differentiated decision boundaries are instantiated by injecting noise into the boundary-curvature component. Across all four major types of adversarial attacks with four widely-deployed on-device models, BMO achieves an average success rate of 68.68% in defense, far exceeding the most competitive baseline, which attains only 22.32% in defending against cross-node attacks. Moreover, BMO achieves comparable performance in benign accuracy compared with baselines.
1. Introduction
In recent decades, deep learning (DL) models have been extensively employed across various cutting-edge fields (e.g., image classification, speech recognition and natural language processing), achieving remarkable and transformative progress [10]. More recently, powered by the highly

Figure 1. An Illustration of Cross-node Attack. End users install applications with integrated on-device models from app stores to enjoy the provided services. Meanwhile, an adversary can exploit these applications by unpacking them to access the model in white-box settings. Then, the peer devices installed the same model are totally exposed to adversary leading a large-scale compromising.
efficient AI chips and model compression technologies, on-device DL models have been developed and widely assembled into edge devices, such as mobiles [38], to deliver low-latency inference and preserve user privacy to avoid potential leakage [32]. Such edge-based deployments underpin a growing trend of real-time, privacy-sensitive services for end users across various application scenarios.
Despite their benefits, recent studies have revealed that edge devices often operate in untrusted environments. In such settings, an adversary who compromises a single device can extract its installed on-device models [54], gaining white-box access. Once obtained, the models distributed from the same source as the compromised model are totally exposed to the adversary, which enables efficient attacks, such as crafting effective adversarial samples targeting compromised models that show strong transferability among the peer devices [40]. Therefore, in this work, we term this threat as the Cross-Node Attack, exploiting full model internals under white-box conditions, unlike the well-known transfer-based adversarial attack refers to conducting efficient adversarial attacks under black-box scenarios. As presented in Figure 1, such attacks typically involve two phases [53]: ① extracting the on-device model from a compromised node, and ② conducting an efficient attack by leveraging the stolen parameters.
Existing studies show potential in defending the aforementioned cross-node attack, including model enhancement and model asset protection. Model enhancement (e.g., adversarial training [44], input random [3]) aims to either improve its inherent capability by learning malicious samples or detecting samples passively with known anomalous patterns. Unfortunately, both of them are dedicated to known adversarial attacks [23]. In contrast, model asset protection (e.g., model verification [52], obfuscation [51]) investigates how to improve the costs of model extraction, further avoiding the white-box access to the victim models. However, recent studies reveal that such defenses offer no protection once the model is loaded into RAM on compromised nodes, where the parameters remain accessible and can be easily reversed or extracted through memory dumping or dynamic analysis [6]. Consequently, neither model enhancement nor asset protection truly suffices against cross-node attacks that obtain persistent white-box access and uncover unknown vulnerabilities, thereby rendering these approaches unreliable as practical defenses in this scenario [37].
Motivated by the evidence that decision-boundary curvature is central to model robustness, we examine how model parameters shape this curvature [13, 31, 48]. Our preliminary experiment results show that existing defenses overlook the protection of boundary curvature, leaving models susceptible to cross-node attack. Once a curvature is exposed in one model, others with the same curvature can be compromised easily. To address this, we propose Boundary-aware Model Obfuscation (BMO), which obfuscates decision-boundary curvature to address cross-node attacks while preserving model functionality well. Specifically, inspired by Null-Space Constrained [36], BMO begins by decomposing the pre-trained weights into (i) magnitude components, responsible for the prediction of the normal samples off the decision boundary, and (ii) direction components, which shape the model's decision boundary. We then inject controllable noises solely into the direction component to yield models whose decision-boundary curvature differs substantially, whereas the magnitude components ensure clean-input predictions remain intact. This obfuscation requires only a single one-shot computation with negligible cost, unlike baselines that incur additional training or computational overhead. Consequently, BMO substantially reduces the effectiveness of transferring a successful attack from the compromised node to other peer nodes, preventing the further propagation of malicious behavior within the network.
We evaluate BMO across all 4 major types of adversarial attacks and 4 widely deployed on-device models. Our experimental result indicates that BMO effectively resists attacks generated by diverse adversarial techniques, reaching an average 68.68% success rate in cross-node defense while preserving 97.54% benign accuracy ( ), substantially outperforming the best baseline, which attains only 22.32%. In addition, BMO remains robust under model compression (e.g., quantization), sustaining a 59.63% cross-node defense success rate with 97.54% benign accuracy ( ). To summarize, our key contributions are as follows:
• We first reveal on-device models are vulnerable to cross-node attack, further present the characterization, detailing attacker capabilities, from extraction to adversarial payload generation, and quantifying transferability risks.
• We introduce a novel defense paradigm for edge systems, BMO, which is a newly designed weight obfuscation strategy to generate device-specific models with distinct decision boundaries, significantly reducing the possibility in compromising other peer devices.
• We introduce a novel defense that decomposes model weights into magnitude (preserving clean accuracy) and direction (shaping decision boundaries) components, where controlled noise are injected into the direction only to effectively create device-specific boundary shifts.
• We integrate BMO into both convolutional and transformer pipelines with minimal overhead, and across four strong attacks and four network architectures demonstrate our method exceeding the strongest baseline by 44% in effectively defending against cross-node attack, while maintaining less than a 1% drop in benign accuracy.
However, in cross-node scenarios, adversarial attacks pose a more serious threat and are more difficult to prevent since the identical model is deployed across devices, compromising a single untrusted node grants adversaries comprehensive knowledge of the same model and its defenses on other nodes. Unlike black-box attacks, where adversaries only approximate the victim, the cross-node adversary can craft perturbations with complete access to the in-ternal gradients of the targeted model, significantly increasing the overall attack potency in realistic scenarios [26].
Model defense. Primarily, there are two popular categories of model defense mechanisms employed on edge devices, i.e., model asset protection and model enhancement. The model asset protection [34] includes model structure obfuscation, modifying network architectures [51] or replacing them with semantically equivalent code [52]. However, recent works show that once the model is loaded into RAM on a compromised node, its parameters remain exposed and can be easily extracted via memory dumping or dynamic analysis [6]. Consequently, these defenses fail to provide protection in cross-node settings. The model enhancement provides defense against adversarial attacks through adversarial training [15], randomized architectures [20, 47], and interaction-level perturbations [2]. Unfortunately, despite promising developments, they give only a “false sense of security”, as Athalye et al. [2] demonstrate, adaptive adversaries can invert or average out such defenses.
Instead of focusing on enhancing model robustness or raising the cost of model white-boxing, our approach addresses this critical gap by strategically and efficiently employing a novel weight obfuscation to generate highly distinct models with low overlap of decision boundaries.
3. Threat Model
We consider a realistic scenario (Figure 1) in which the model owner packages a single trained model into an application and distributes the same binary to all users. Such deployments typically rely only on authentication for access control, without any per-user parameter differences [50]. We adhere to established scenarios from previous studies on extraction techniques [51, 52] and adversarial attacks [5, 30] against edge AI applications. The application package file (e.g., Apk file for Android, and IPA for iOS) can be decompiled by the off-the-shelf reverse engineering tools (e.g., Apktool, and IDA Pro) to get the original DL model files, which provides the potential for the adversaries to extract the internal information of models via various model extracting techniques. For example, the model M could be extracted by calling the system APIs of the development format directly [52]. Then, the adversary A opens the white-box access to the target on-device models, and the mobile device is compromised further. Different from transfer-based adversarial attacks, the cross-node attacks occur in the white-box condition, where the attackers have full information about the target models, which makes defense more challenging.
3.1. Attacker's Goal
After obtaining full knowledge of the on-device model deployed on the compromised nodes, the adversary could launch large-scale and powerful adversarial attacks (e.g., evasion attack) targeting peer nodes that embed the same DL applications. This is formulated as follows:
Here, controls the perturbation budget and the is the perturbation. Since the adversary does not directly access at inference time, they optimize via the extracted model , relying on the transferability property. is the loss function used to mislead the model, and is the target output. The adversary expects that the adversarial input will also mislead despite not directly optimizing against it.
3.2. Attacker's Knowledge and Capability
In a more practical scenario, we assume a “weak attacker” that the adversaries can access the DL apps through compromised nodes but lack any information about the source DL model. Additionally, since the adversaries may infer the original parameters by collecting massive edge models to fit the decision boundaries of the original model, we assume that a “strong attacker” can gain full knowledge of the original model boundaries. Both of the attackers can independently generate adversarial inputs with white- and black-box attack methods as well.
3.3. Defender's Capability and Goal
As the owners of the models, vendors obviously do not have the ability to retrain a model for every software download, but they can still modify the models' architecture and training data at training time to enhance their robustness or obfuscate the models by modifying their parameters before distributing them to individual edge devices.
The defenders aim to ensure that adversarial samples generated on one node are incapable of compromising DL models on other nodes, while maintaining predictive performance for benign samples. Therefore, for defense, the goals of the vendor are as follows:
4. Methodology
4.1. Model Weight Obfuscation
Our key insight in defending cross-node attack is inspired by the Null-Space Constrained [36] and is grounded in a fine-grained analysis of model weights. Specifically, we decompose the weight matrix into two complementary components: magnitude components that determine the global position of the decision boundary and govern the model's predictions for normal samples lying off the boundary, and direction components that control the local curvature of the boundary and encode features responsible for adversarial vulnerability. This formulation allows us to simultaneously achieve two objectives: ① maintain benign accuracy before and after model perturbation, and maximize the geometric discrepancy of decision boundaries, thereby reducing the risk of cross-node attack. We further validate this hypothesis in Section 5 via extensive and carefully designed experiments on multiple architectures and attack algorithms.
Building on this analysis, as shown in Figure 2, we propose Boundary-aware Model Obfuscation, BMO, which begins by splitting weights into a Magnitude matrix as performance-aware components and a Direction matrix as boundary-aware components. Subsequently, we introduce controllable perturbations, such as Gaussian or differential privacy noise, to the direction component while maintaining the magnitude component constant. Notably, this obfuscation is performed only once at deployment and requires no retraining or additional procedures, thereby incurring negligible additional cost.
This approach injects controlled randomness into the subspace orthogonal to the model's original capabilities, enabling the construction of diverse decision boundaries while preserving its core performance, in line with the null-space intuition. The boundary diversity suggests that adversarial examples crafted on a compromised model are unlikely to be reproducible on other nodes, whose models exhibit different curvature features induced by independent direction perturbations. Consequently, the attacker's knowledge about the compromised model cannot be reused on other nodes, effectively reducing the feasibility of cross-node attacks. This approach enhances the robustness of distributed models or applications, particularly in federated or decentralized settings, where weight-sharing and model replication are common.
Orthogonal decomposition of weights. Building upon these hypotheses, the foundation of our method lies in decomposing weights into direction and magnitude components, isolating perturbation-sensitive elements while retaining performance-aware parameters. Formally, for layer with weight , we calculate the Euclidean norm of each vector :
Collecting into a diagonal matrix and stacking the unit vectors into a matrix :
(4)
where prevents division by zero. Similar to Dora [28], captures the original weight magnitudes and captures the directional structure, effectively separating magnitude from direction. We also demonstrated this hypothesis through the ablation studies in Figure 6(d).
Adaptive noise injection. After the decomposition of weights, we introduce noise into the disentangled weight components, generating multiple models with distinct decision boundaries, reducing decision boundary overlap across model instances. The goal of our weight obfuscation is to ensure functional consistency on benign inputs while inducing diversity among models, such that adversarial examples crafted on one model instance fail to transfer to others, effectively mitigating cross-node attacks. Concretely, we inject noise (e.g., Gaussian or Differential Privacy noise) into the direction component, which governs the shape of decision boundaries. Meanwhile, by preserving the magnitude matrix , we maintain the scale of activations, thereby retaining classification accuracy on benign samples. In , large value updates influence the decision boundary, so perturbing these directions significantly impacts its shape [28]. To minimize the effectiveness of adversarial attacks while minimizing performance loss, we inject noise into the top-p parameters of direction components. The selective randomization undermines an attacker's ability to fit a static surrogate or compute reliable gradients, while maintaining nearly identical performance on benign data. For each directional matrix , we identify critical elements using a sparsity-aware threshold where parameters exceeding this threshold are perturbed:
where controls the proportion of perturbed elements (e.g., perturbs the top 10% of elements by absolute value). We then sample independent Gaussian noise scaled by :
where matches the standard deviation of .
Weight Reconstruction. We renormalize perturbed direction matrices and combine them with magnitude matrices to reconstruct the weights as Equation (6). Strict normalization avoids the magnitude component being affected by noise. For each row, we perturb only the direction component and then renormalize it. Specifically, let
and denote by the matrix whose rows are . The obfuscated weights are then reconstructed as
This reparameterization magnitudes are preserved and only the normalized directions are perturbed.
4.2. Gradient-based Decision Boundary Analysis
BMO perturbs the direction components of pre-trained weights while preserving their magnitude components, introducing controlled randomness into the model's deci-

Figure 2. An Overview of BMO. BMO decomposes model weights into Magnitude components related to the prediction of the normal sample, and Direction components related to the shape of the decision boundary. It then obfuscates the model decision boundary by altering the direction components to reduce the effectiveness of cross-node adversarial samples, while maintaining the magnitude components to preserve predictive performance.
sion boundary, which is a critical target in most adversarial attacks [19]. This process mimics finetuning on various independent datasets [21], promoting boundary diversity across model instances, while preserving benign performance. Prior work [14] highlights the role of decision boundaries in optimize the gradient descent directions, showing that the gradient at any point situated on decision boundaries is orthogonal to the tangent space. By altering the decision boundaries, BMO disrupts the optimization paths used in adversarial attacks [28], leading to divergence in adversarial perturbations across models. As a result, the direction of gradient descent used to optimize adversarial examples diverges across different model instances. Even when starting from the same input, it leads to significant differences in the generated adversarial examples, thereby reducing their transferability. According to Equation (1), adversaries typically craft perturbations via:
where includes all across the network, denotes the loss function (e.g., cross-entropy) and is the target label. Therefore adversarial attacks gain and the derivative following:
and since is normalized per row, any noise perturbs the angular direction of gradients.
To further analyze the impact on gradient alignment, consider a small adversarial perturbation with sign aligned to . After applying BMO, the perturbed gradient becomes:
The perturbation term introduces an angular deviation from the direction of the clean gradient. The perturbed gradient significantly misleads the adversary's optimization trajectory, thereby preventing the effective location of the decision boundary or even the gradient direction of the target model when using the extracted models.
Meanwhile, since the magnitude matrix remains unchanged, the inference capacity of the model during normal training are preserved. Therefore, our novel defense allows us to degrade gradient quality only for adversarial agents while maintaining the performance on benign data.
5. Experiments
5.1. Setups
Datasets and models. To comprehensively assess the generalization of BMO, we evaluated it across three widely deployed model types on edge devices, i.e., fully connected neural networks [35], convolutional neural networks [25], and vision transformers [17]. Specifically, we employ the MLP, AlexNet, ResNet [18], and ViT [12] as typical models. Furthermore, experiments are conducted systematically and rigorously on three widely recognized datasets, i.e., MNIST [9], CIFAR-10 [22], and ImageNet [8].
Adversarial attacks. We conducted experiments on both white-box and black-box attack methods. For white-box attacks, we evaluated our method against the one-step FGSM attack [15], the multi-step PGD attack [30], and the optimization-based C&W attack [4]. For black-box attacks,

(a) Effectiveness with Attack Intensities.

(b) Knowledge and Targets of Attackers.

(c) Impact of Attack Methods.
Figure 3. Main Results of BMO. We comprehensively evaluate the effectiveness of BMO under defense conditions by thoroughly moderating the three elements that determine the effectiveness of an attack, i.e., the intensities, algorithms, knowledge, and the attack targets.
we employed the most commonly used HSJA attack [5] and transfer-based attack, MI-FGSM [11] for comparative evaluation. We consider an attack successful only when the input is misclassified into the specified target category [24].
Baselines. We compare our method against three prevalent on-device model defense strategies: stochastic neural networks (SSNN [49] and PNI [46]), adversarial training (A.T.) [30], and model architecture obfuscation (M.A.O.) [51]. We also compare the robustness and overall effectiveness of injecting noise directly into the raw weights [41] with BMO to clearly illustrate the superiority of our orthogonal decomposition strategy.
Evaluation metrics. We quantify cross-node robustness using the attack success rate (C-ASR) and its complementary defense measure (Anti-ASR), where Anti-ASR = 100% - C-ASR. Due to space constraints, we present only the key experiments in the main paper, while extended evaluation details are included in the supplementary material.
5.2. Main Results
We quantitatively evaluate our proposed method for effectively defending against cross-node attacks, aiming to reduce the ASR of adversarial samples generated on compromised edge devices. Our main experiments thoroughly evaluate the effectiveness of BMO in defending against diverse cross-node attacks under various attack strengths, algorithms and knowledge of the adversaries.
Comparison with baselines. To validate the effectiveness of our defense in practical adversarial environments, we first compare BMO with representative baselines. This experiment aims to examine whether the proposed weight-obfuscation mechanism provides more consistent robustness than existing defenses when nodes that deploy the same models are compromised. Specifically, we include adversarial training, the raw weight modification approach [41], SSNN [47], PNI [20], and model architecture obfuscation [51] under various perturbation levels. The perturbation budget is constrained to 0.1 to preserve perceptual consistency between the original and perturbed samples. This upper bound ensures that the injected perturbations remain visually imperceptible to human observers, maintaining the semantic integrity of the image content. A larger perturbation magnitude would introduce excessive pixel-level noise, which not only significantly degrades image fidelity but also alters high-level semantics, leading to unfair comparisons across models and methods [45].
As shown in Figure 3(a), BMO consistently outperforms all defenses across the entire perturbation range. It maintains an Anti-ASR above 65% for where a threshold for stealthy attacks, and remains around 55% at . In contrast, adversarial training collapses completely with 0% Anti-ASR, confirming its inability to handle cross-node perturbations. Among weight-obfuscation defenses, BMO achieves the highest resilience, surpassing raw weight modification by an average of 54.74% (up to 63.33%), while SSNN and PNI quickly degrade once exceeds 0.05.
In summary, BMO maintains over 45% superiority on average, demonstrating that its parameter-space regularization provides a more durable barrier against adversarial perturbations. These results collectively confirm that BMO’s defense strength clearly stems not from memorizing specific perturbations, but from structurally enhancing decision-boundary smoothness across nodes.
Effect of adversary’s knowledge on cross-node attack. To comprehensively evaluate the impact of adversarial knowledge on C-ASR of cross-node attacks, we conduct experiments under three knowledge conditions: ① Adversaries access the model on a specific node to attack other nodes; ② Adversaries possess full knowledge of the raw model to attack obfuscated models on the edge nodes; ③ Adversaries have full knowledge of a model on a specific node but aim to attack the raw model. These configurations simulate real-world scenarios where adversaries may have varying levels of knowledge about the deployed defenses.

Figure 4. Impact of model obfuscation on performance.
and different access to raw models or specific nodes.
Figure 3(b)&4 illustrate the significant impact of attackers' knowledge on defending against adversarial attack in cross-node scenarios. When attackers exploit the original model with stolen model parameters, Anti-ASR remains alarmingly much lower, even at maximum defense intensity ( ), growing only to 45.99%. However, when the attacker only has access to a specific node, for raw model, Anti-ASR achieves 64.63% at , and further surges to 91.64% at ; for other edge models, the data is 75.96% and 89.33% respectively. Our experiment results highlight the importance of protecting the raw model as expected, as its leakage can significantly increase the overall threat of cross-node attacks across all nodes.
Effectiveness against popular adversarial attacks. As shown in Figure 2, without protection, adversarial attacks on one node can be replicated on others, leading to widespread compromise. In order to evaluate our defenses against various attacks, we use three representative white-box adversarial attack algorithms: FGSM [15], PGD [30], C&W [4], the decision-based black-box method HSJA [5] and the transfer-based method MI-FGSM [11]. These attacks were chosen to cover a broad spectrum of adversarial strategies under varying obfuscation budgets ( ).
As illustrated in Figure 3(c), across all settings, BMO consistently improves the Anti-ASR of the cross-node attack as increases, indicating higher defense strength. For FGSM and PGD, Anti-attack success rates increase to 81.29% and 72.01%, respectively, showing strong defense against gradient-based attacks. C&W and HSJA are also substantially suppressed, with final Anti-ASR of 76.60% and 88.62%. For the optimal obfuscation range ( ) where perturbations are moderate, the overall Anti-ASR of BMO on four attacks is 60.98%. Additionally, the results show that our method achieves an Anti-ASR of 69.67% on the transfer-based attack MI-FGSM, which clearly indicates that BMO is effective on other adversarial attacks beyond cross-node attacks, such as transfer-based black-box attacks. These results confirm that BMO provides a consistent and robust defense, effectively mitigating both white-box and black-box attacks.

Figure 5. Robustness against model quantization.
Robustness against model quantization. Quantization is commonly used on edge devices to reduce model size and inference latency by representing weights and activations with lower-precision formats. However, quantized models can exhibit substantially different adversarial vulnerabilities from their full-precision counterparts. To assess whether our protection remains effective after 16-bit quantization, we systematically evaluate the quantized models against cross-node attacks with four algorithms: FGSM [15], PGD [30], C&W [4], and HSJA [5].
Both models maintain comparable accuracy on benign samples, with the quantized model experiencing a decrease of less than 0.01%. This suggests that 16-bit quantization does not significantly compromise the accuracy of obfuscated models. More importantly, as shown in Figure 5, when , the Anti-ASR of the quantized model is only 3-6% lower than that of the full-precision model. For instance, at , the quantized model achieves 55.30% Anti-ASR, compared to 58.34% for the original model. Notably, when increases further (e.g., ), the quantized model consistently maintains clean accuracy over 94.82% and achieves higher Anti-ASR than the original model. The high robustness of BMO to model compression and deployment enables it to be readily suited for use in real-world edge computing scenarios.
5.3. Ablation Studies
In this section, we conduct ablation studies to verify the effectiveness of each hyperparameter of BMO, including obfuscation position, layer types and layer indexing. Additionally, we evaluate the defensive capability of perturbing magnitude components compared with direction components in our decomposition framework.
Impact of obfuscation position selection. The selection of which positions to perturb is critical for balancing robustness and efficiency in edge deployment. By strategically targeting only the most important directional components (controlled by parameter p), our method achieves strong defense with minimal modifications. As shown in Figure 6(c), the steepest drop occurs at very small p: for FGSM attacks, perturbing merely 10% of weight directions (p = 0.1) re-

(a) Model Architecture
(b) Layer Indexing
(c) Obfuscation Position
(d) Weight Component
Figure 6. Ablation Studies of BMO. Lower C-ASR and higher Anti-ASR indicate better defense performance against cross-node attacks, while higher Performance denotes better model performance on the target dataset.
duces the attack success rate from 100% to 50.96%, achieving more than half of the maximum possible protection. The marginal improvement becomes negligible beyond p = 0.5, where the C-ASR drops to 36.17% and only decreases by an additional 4.49% when perturbing all weights (p = 1.0). This pattern holds consistently across all attack methods, with average C-ASR reductions of 49.20% from p = 0 to p = 0.1, 12.54% from p = 0.1 to p = 0.5, and only 3.54% from p = 0.5 to p = 1.0. This marginal benefit implies that perturbing a small proportion of high-impact directions is sufficient to achieve most of the robustness benefit while maintaining strong resistance across attack types.
Effect of model architecture. Real-world deep learning systems typically employ diverse neural architectures, each exhibiting distinct vulnerability to adversarial attacks. Our experiments on three cornerstone architectures (MLPs, CNNs, and ViTs) validate the method's generalizability. Figure 6(a) reveals that, for CNNs, the defense reduces C-ASR to 11.35%, demonstrating its exceptional effectiveness that likely stems from the convolutional filters' localized sensitivity. MLPs exhibit more gentle but still significant improvements, with C-ASR declining steadily to 21.30%, proving BMO's robustness and effectiveness in fully-connected networks where vulnerabilities are more evenly distributed. ViTs present the most challenging case, maintaining a 33.70% C-ASR even at full defense strength, but over 65% relative improvement still proves BMO's applicability even to sophisticated architectures. The results further demonstrate that BMO offers a foundational and broadly applicable defense for DL models.
Role of layer indexing. To investigate the relationship between layer depth and obfuscation effectiveness, we obfuscate weights at different layers on a 10-layer MLP model and measure their effect on resistance to cross-node attacks. As shown in Figure 6(b), shallow layers exhibit strong but relatively stable response to perturbations, with C-ASR ranging from 76.84% to 63.21%; middle layers function primarily as “pass-through” regions for adversarial gradients, showing minimal impact on final defense performance, showing relatively higher average C-ASR values from 93.51% to 80.04%; deep layers play a crucial role, also show hyper-sensitive response with a small change, with an average C-ASR of 63.91%, as they directly influence final predictions. This depth stratification suggests that adversarial attacks primarily originate in shallow layers but also manifest in deep layers, thereby indicating the critical importance of careful strategic layer selection.
Weight component. To further evaluate the impact of weight decomposition in our defense, we inject noise into the magnitude components instead of the direction components. As illustrated in Figure 6(d), across 10 perturbation strengths, injecting noise into the magnitude component makes accuracy on clean data drop slightly, from 98.15% to 96.13%, but yields significantly weaker robustness under cross-node attacks by an average of 12.54% and up to 19.51% in the best case. In contrast, perturbing the direction component produces dramatic Anti-ASR improvement by an average of 44.98% and up to 81.89%, at a maximum loss in clean accuracy with a 6.55% drop. This indicates that magnitude perturbations cannot effectively obfuscate the model's decision boundary, while the direction matrix governs the geometry of the model's decision boundaries, making it critical for our overall defense strategy.
6. Conclusion
We initiate the study of safety risks in edge systems under cross-node attacks, where adversaries exploit a compromised node to launch white-box attacks on others. To counter this threat, we propose BMO, a weight-obfuscation defense that produces device-specific models with distinct decision boundaries, thereby reducing adversarial transferability across nodes. We conduct extensive evaluations of BMO on three popular on-device model architectures using five popular adversarial attack methods. The results show that BMO significantly outperforms the strongest baseline in defending against cross-node attacks. Our research further highlights the effectiveness of BMO as a practical and scalable defense against cross-node attacks.
References
[1] Naveed Akhtar and Ajmal Mian. Threat of adversarial attacks on deep learning in computer vision: A survey. IEEE Access, 6:14410–14430, 2018.
[2] Anish Athalye, Nicholas Carlini, and David Wagner. Obfuscated gradients give a false sense of security: Circumventing defenses to adversarial examples. In International conference on machine learning, pages 274–283. PMLR, 2018.
[3] Junyoung Byun, Hyojun Go, and Changick Kim. On the effectiveness of small input noise for defending against query-based black-box attacks. In Proceedings of the IEEE/CVF winter conference on applications of computer vision, pages 3051–3060, 2022.
[4] Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 ieee symposium on security and privacy (sp), pages 39–57. IEEE, 2017.
[5] Jianbo Chen, Michael I Jordan, and Martin J Wainwright. Hopskipjumpattack: A query-efficient decision-based attack. In 2020 ieee symposium on security and privacy (sp), pages 1277–1294. IEEE, 2020.
[6] Simin Chen, Hamed Khanpour, Cong Liu, and Wei Yang. Learn to reverse dnns from ai programs automatically. In Proceedings of the Thirty-First International Joint Conference on Artificial Intelligence, IJCAI-22, pages 666–672. International Joint Conferences on Artificial Intelligence Organization, 2022. Main Track.
[7] Francesco Croce and Matthias Hein. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks. In International conference on machine learning, pages 2206–2216. PMLR, 2020.
[8] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pages 248–255. Ieee, 2009.
[9] Li Deng. The mnist database of handwritten digit images for machine learning research. IEEE Signal Processing Magazine, 29(6):141–142, 2012.
[10] Aaron Yi Ding, Ella Peltonen, Tobias Meuser, Atakan Aral, Christian Becker, Schahram Dustdar, Thomas Hiessl, Dieter Kranzlmüller, Madhusanka Liyanage, Setareh Maghsudi, et al. Roadmap for edge ai: A dagstuhl perspective, 2022.
[11] Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 9185–9193, 2018.
[12] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR), 2021.
[13] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. Robustness of classifiers: from adversarial
to random noise. Advances in neural information processing systems, 29, 2016.
[14] Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, Pascal Frossard, and Stefano Soatto. Empirical study of the topology and geometry of deep networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3762–3770, 2018.
[15] Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
[16] Jihun Hamm and Akshay Mehra. Machine vs machine: Minimax-optimal defense against adversarial examples. arXiv preprint arXiv:1711.04368, 2017.
[17] Kai Han, Yunhe Wang, Hanting Chen, Xinghao Chen, Jianyuan Guo, Zhenhua Liu, Yehui Tang, An Xiao, Chunjing Xu, Yixing Xu, et al. A survey on vision transformer. IEEE transactions on pattern analysis and machine intelligence, 45(1):87–110, 2022.
[18] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
[19] Warren He, Bo Li, and Dawn Song. Decision boundary analysis of adversarial examples. In International Conference on Learning Representations, 2018.
[20] Zhezhi He, Adnan Siraj Rakin, and Deliang Fan. Parametric noise injection: Trainable randomness to improve deep neural network robustness against adversarial attack. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 588–597, 2019.
[21] Sanghyun Hong, Nicholas Carlini, and Alexey Kurakin. Publishing efficient on-device models increases adversarial vulnerability. In 2023 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML), pages 271–290. IEEE, 2023.
[22] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
[23] Siddheshwar Kumar, Shashank Srivastava, and Shashwati Banerjea. Fortifying vision models: A comprehensive survey of defences against adversarial examples. Applied Soft Computing, page 113874, 2025.
[24] Maosen Li, Cheng Deng, Tengjiao Li, Junchi Yan, Xinbo Gao, and Heng Huang. Towards transferable targeted attack. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 641–649, 2020.
[25] Zewen Li, Fan Liu, Wenjie Yang, Shouheng Peng, and Jun Zhou. A survey of convolutional neural networks: analysis, applications, and prospects. IEEE transactions on neural networks and learning systems, 33(12):6999–7019, 2021.
[26] Zhiting Li, Shibai Yin, Tai-Xiang Jiang, Yexun Hu, Jia-Mian Wu, Guowei Yang, and Guisong Liu. Enhancing the adversarial robustness via manifold projection. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 451–459, 2025.
[27] Hongshuo Liang, Erlu He, Yangyang Zhao, Zhe Jia, and Hao Li. Adversarial attack and defense: A survey. Electronics, 11(8):1283, 2022.
[28] Shih-Yang Liu, Chien-Yi Wang, Hongxu Yin, Pavlo Molchanov, Yu-Chiang Frank Wang, Kwang-Ting Cheng, and Min-Hung Chen. Dora: Weight-decomposed low-rank adaptation. In Forty-first International Conference on Machine Learning, 2024.
[29] Giulio Lovisotto, Henry Turner, Ivo Sluganovic, Martin Strohmeier, and Ivan Martinovic. {SLAP}: Improving physical adversarial examples with {Short-Lived} adversarial perturbations. In 30th USENIX Security Symposium (USENIX Security 21), pages 1865–1882, 2021.
[30] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In International Conference on Learning Representations, 2018.
[31] Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, Pascal Frossard, and Stefano Soatto. Robustness of classifiers to universal perturbations: A geometric perspective. In ICLR, pages 8562–8571, 2018.
[32] MG Sarwar Murshed, Christopher Murphy, Daqing Hou, Nazar Khan, Ganesh Ananthanarayanan, and Faraz Hussain. Machine learning at the network edge: A survey. ACM Computing Surveys (CSUR), 54(8):1–37, 2021.
[33] Daryna Oliynyk, Rudolf Mayer, and Andreas Rauber. I know what you trained last summer: A survey on stealing machine learning models and defences. ACM Computing Surveys, 55(14s):1–41, 2023.
[34] Théo Ryffel, Edouard Dufour-Sans, Romain Gay, Francis Bach, and David Pointcheval. Partially encrypted machine learning using functional encryption. arXiv preprint arXiv:1905.10214, 2019.
[35] Leonardo FS Scabini and Odemir M Bruno. Structure and performance of fully connected neural networks: Emerging complex network properties. Physica A: Statistical Mechanics and its Applications, 615:128585, 2023.
[36] Johannes Schwab, Stephan Antholzer, and Markus Haltmeier. Deep null space learning for inverse problems: convergence analysis and rates. Inverse Problems, 35(2): 025008, 2019.
[37] Meng Shen, Changyue Li, Qi Li, Hao Lu, Liehuang Zhu, and Ke Xu. Transferability of white-box perturbations: query-efficient adversarial attacks against commercial dnn services. In Proceedings of USENIX Security Symposium (USENIX Security), pages 2991–3008, 2024.
[38] Raghubir Singh and Sukhpal Singh Gill. Edge ai: a survey. Internet of Things and Cyber-Physical Systems, 3:71–92, 2023.
[39] Dawn Song, Kevin Eykholt, Ivan Evtimov, Earlence Fernandes, Bo Li, Amir Rahmati, Florian Tramer, Atul Prakash, and Tadayoshi Kohno. Physical adversarial examples for object detectors. In 12th USENIX workshop on offensive technologies (WOOT 18), 2018.
[40] Yulian Sun, Vedant Bonde, Li Duan, and Yong Li. Obfuscation for deep neural networks against model extraction: Attack taxonomy and defense optimization. In International
Conference on Applied Cryptography and Network Security, pages 391–414. Springer, 2025.
[41] Kálmán Szentannai, Jalal Al-Afandi, and András Horváth. Preventing neural network weight stealing via network obfuscation. In Intelligent Computing: Proceedings of the 2020 Computing Conference, Volume 3, pages 1–11. Springer, 2020.
[42] Vijay Veerabadran, Josh Goldman, Shreya Shankar, Brian Cheung, Nicolas Papernot, Alexey Kurakin, Ian Goodfellow, Jonathon Shlens, Jascha Sohl-Dickstein, Michael C Mozer, et al. Subtle adversarial image manipulations influence both human and machine perception. Nature communications, 14(1):4933, 2023.
[43] Xiaosen Wang, Zeliang Zhang, Kangheng Tong, Dihong Gong, Kun He, Zhifeng Li, and Wei Liu. Triangle attack: A query-efficient decision-based adversarial attack. In European conference on computer vision, pages 156–174. Springer, 2022.
[44] Zeyu Wang, Xianhang Li, Hongru Zhu, and Cihang Xie. Revisiting adversarial training at scale. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 24675–24685, 2024.
[45] Yatie Xiao and Chi-Man Pun. Improving adversarial attacks on deep neural networks via constricted gradient-based perturbations. Information Sciences, 571:104–132.
[46] Cihang Xie, Yuxin Wu, Laurens van der Maaten, Alan L. Yuille, and Kaiming He. Feature denoising for improving adversarial robustness. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2019.
[47] Hao Yang, Min Wang, Zhengfei Yu, and Yun Zhou. A simple stochastic neural network for improving adversarial robustness. In 2023 IEEE International Conference on Multimedia and Expo (ICME), pages 2297–2302. IEEE, 2023.
[48] Yaoqing Yang, Rajiv Khanna, Yaodong Yu, Amir Gholami, Kurt Keutzer, Joseph E Gonzalez, Kannan Ramchandran, and Michael W Mahoney. Boundary thickness and robustness in learning models. Advances in Neural Information Processing Systems, 33:6223–6234, 2020.
[49] Tianyuan Yu, Yongxin Yang, Da Li, Timothy Hospedales, and Tao Xiang. Simple and effective stochastic neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 3252–3260, 2021.
[50] Liekang Zeng, Shengyuan Ye, Xu Chen, and Yang Yang. Implementation of big ai models for wireless networks with collaborative edge computing. IEEE Wireless Communications, 31(3):50–58, 2024.
[51] Mingyi Zhou, Xiang Gao, Jing Wu, John Grundy, Xiao Chen, Chunyang Chen, and Li Li. Modelobfuscator: Obfuscating model information to protect deployed ml-based systems. In Proceedings of the 32nd ACM SIGSOFT International Symposium on Software Testing and Analysis, pages 1005–1017, 2023.
[52] Mingyi Zhou, Xiang Gao, Pei Liu, John Grundy, Chunyang Chen, Xiao Chen, and Li Li. Model-less is the best model: Generating pure code implementations to replace on-device dl models. In Proceedings of the 33rd ACM SIGSOFT Inter-national Symposium on Software Testing and Analysis, pages 174–185, 2024.
[53] Mingyi Zhou, Xiang Gao, Jing Wu, Kui Liu, Hailong Sun, and Li Li. Investigating white-box attacks for on-device models. In Proceedings of the IEEE/ACM 46th International Conference on Software Engineering, pages 1–12, 2024.
[54] Tong Zhou, Yukui Luo, Shaolei Ren, and Xiaolin Xu. Nnsplitter: an active defense solution for dnn model via automated weight obfuscation. In International Conference on Machine Learning, pages 42614–42624. PMLR, 2023.
Mind Your Boundaries: Boundary-Aware Model Obfuscation against Cross-node Attack
Supplementary Material

Figure 7. Mean Anti-ASR under increasing perturbation budgets across six representative edge-device models.
A. Evaluation on Diverse DNN Architectures
Existing studies [33, 38] have shown that four major model families form the dominant architectures deployed on edge devices, namely MLPs, CNNs, Vision Transformers, and lightweight mobile architectures. Thus, we employ these six representative models from each family to comprehensively evaluate the stability of BMO across diverse edge-device architectures, including MLP, ResNet, DeiT_small, DeiT_tiny, MobileNet and MobilViT.
Additionally, we conduct extensive experiments under a wide range of perturbation budgets. Prior work has shown that strong adversarial perturbations inevitably reduce the stealthiness of the attack, and perturbations greater than can even be visually distinguishable to human observers [42]. Such visible distortions fall outside standard threat models for evaluating practical adversarial robustness. Therefore, our experiments investigate the performance in the realistic and imperceptible region of .
As shown in Figure 7, our method consistently maintains a strong low-budget robustness: when the attack budget is , all the model achieves more than 30% average Anti-ASR on 4 datasets and 13 adversarial attacks, and the best-performing architectures exceed 78%. As increases, all models exhibit the expected degradation, but the decay rate varies by architectural family. Transformer-based models (i.e., DeiT-Tiny/Small) exhibit the most stable robustness profiles, maintaining roughly 45–55% Anti-ASR even at , while CNN-based architectures and MobileViT-S show moderately lower, but still meaningful, robustness under the same budget. Lightweight models such as MLP and MobileNetV2 also retain non-trivial Anti-ASR, though their effectiveness begins to decrease earlier as increases. Importantly, the overall decline across all models is gradual rather than abrupt, indicating that the defense remains consistently effective across heterogeneous architectures. These results suggest that while the absolute robustness levels vary with architectural design, our method provides reliable and architecture-agnostic protection, delivering consistent defensive benefits across the diverse model families commonly deployed on edge devices.
B. Performance Across Different Datasets
To evaluate the capability of our method in tackling diverse datasets, we conduct experiments across four popular datasets widely applied in image classification benchmarks, including MNIST [9], CIFAR-10 [22], CIFAR-100 [22], and ImageNet [8]. These datasets cover different input dimensionalities, label granularities, and distributional complexities, providing a comprehensive evaluation of our BMO in generalizing diverse datasets. To explore the performance of BMO under diverse datasets, we employ the most powerful adversarial attack APGD [7] in evaluation. This ensures a consistent and rigorous robustness comparison across these datasets, while evaluation in surviving multiple adversarial attacks is presented in Appendix C.
As shown in Table 1, we report each model's robustness against APGD under an attack budget of and a defense constraint of . This setting follows prior works indicating that perturbations at remain imperceptible while still inducing strong adversarial effects, and constraining ensures that the defense maintains acceptable predictive performance for on-device deployment. Across all settings, BMO maintains consistently strong Anti-ASR, exhibiting no reliance on model-specific inductive biases and remaining stable across tasks ranging from low-dimensional digit recognition (MNIST) to high-resolution natural image classification (ImageNet). Despite substantial distributional differences across datasets, including variations in label granularity, visual diversity, and input dimensionality, its robustness degradation remains smooth, bounded, and predictable. These results indicate that BMO generalizes across both architectural paradigms and dataset regimes well, providing a reliable and transferable resilience that extends beyond specific model or task configurations.
Table 1. Cross-Dataset and Cross-Architecture Robustness (Anti-ASR) Across Six Edge-Device Models
| Anti-ASR () | Model | |||||
|---|---|---|---|---|---|---|
| MLP | ResNet | DeiT_tiny | DeiT_small | MobileViT_s | MobileNet_v2 | |
| MNIST | 86.70/2.43 | 69.21/2.96 | 72.20/2.08 | 76.39/3.04 | 61.71/2.80 | 89.76/2.99 |
| CIFAR10 | - | 40.06/2.78 | 35.16/2.06 | 47.04/2.85 | 61.22/2.75 | 61.01/2.86 |
| CIFAR100 | - | 52.72/2.66 | 46.34/3.15 | 56.23/3.19 | 45.52/2.78 | 58.73/2.93 |
| ImageNet | - | 40.55/3.13 | 50.53/3.25 | 62.04/2.99 | 38.72/2.85 | 53.49/2.99 |

(a) Query-based

(b) Optimization-based

(c) Gradient-based

(d) AutoML-based
Figure 8. Effectiveness Against Different Attack Families.
C. Robustness against Popular Adversarial Attacks
To assess the performance of BMO under diverse adversarial techniques, we evaluate its robustness against four major types of adversarial attacks, following the taxonomy widely adopted in recent studies [1, 16, 43]. In evaluation, our results shown in Figure 8(a)–(d) reveal that BMO exhibits stable robustness against optimization-based and query-based attacks across a wide range of perturbation budgets, while also providing reliable protection against gradient-based and autoML-based attacks with imperceptible perturbation ().
As shown in Figure 8(a)&(b), BMO exhibits the powerful robustness against optimization-based and query-based adversarial attacks, showing only minimal sensitivity to increasing perturbation budgets. This stability arises because these attacks rely heavily on local decision-boundary geometry or iterative query refinement. The representation-level randomness introduced by BMO disrupts these fine-grained geometric cues, making it difficult for such attacks to reuse boundary features from exploited nodes. As a result, their effectiveness remains limited even when the perturbation magnitude increases. Empirically, BMO maintains approximately 65–70% Anti-ASR under C&W and DeepFool across all budgets and achieves over 85% Anti-ASR under FAB, confirming its resistance to attacks that depend on precise boundary manipulations. Query-based attacks follow a similar trend: BMO sustains 70–75% Anti-ASR under Square Attack and preserves exceptionally high robustness under HSJA and BoundaryAttack ( 90% at and 80% at ), demonstrating the notably limited effectiveness of black-box boundary-search methods under our method.
In contrast, gradient-based and autoML-based attacks exert stronger challenges on BMO as the perturbation budget grows. Unlike boundary dependent methods, these attacks optimize class-level gradients or adaptively adjust their optimization trajectory, allowing them to bypass the local boundary geometry that BMO obfuscated. Consequently, once the perturbation becomes sufficiently large, the adversarial perturbations disrupt the decision boundary entirely, weakening BMO's defensive effect. Nevertheless, BMO remains highly effective within the imperceptible adversarial perturbation regime ( ), consistently mitigating stealthy adversarial attacks that fall within realistic threat models. In this range, as shown in Figure 8(c)&(d), BMO substantially suppresses the effectiveness of gradient-based and autoML-based attacks, as the limited perturbation budget confines their adversarial examples to regions close to the decision boundary. Under such restricted budgets, the obfuscation-induced perturbation of the boundary makes the gradient information extracted from compromised nodes highly inconsistent across models. Consequently, adversarial inputs crafted from these gradients fail to transfer to other nodes, further limiting the effectiveness of gradient-based and autoML-based attacks in this regime. These results indicate that BMO provides reliable protection against stealthy adversarial examples, which constitute the primary security concern in real-world deployments.
When the perturbation budget increases beyond this limitation ( ), the injected noise begins to visibly distort the image, and adversarial examples cross and move far beyond the decision boundary, falling outside standard threat models. In these over-perturbed settings, the injected adversarial noise introduces clear visual artifacts and severely distorts the input. Such severe distortions drive the adversarial examples far beyond the decision boundary, thereby diminishing the influence of BMO. This reduction arises from the strong adversarial artifacts introduced by the large perturbation, where the attacks themselves lose stealth and fail to keep aligned with the intended threat models.
Together, these observations show that BMO delivers strong and consistently stable robustness against optimization- and query-based attacks across a wide range of perturbation budgets, while retaining reliable defensive capability against gradient- and autoML-based attacks within imperceptible perturbation levels. This demonstrates the broad applicability of our method across fundamentally different adversarial regimes.