Mutual Learning-Based Framework for Enhancing Robustness of Code Models via Adversarial Training

  • Abstract
  • Literature Map
  • Similar Papers
Abstract
Translate article icon Translate Article Star icon

Deep code models (DCMs) have achieved impressive accomplishments and have been widely applied to various code-related tasks. However, existing studies show that some DCMs have poor robustness, and even small noise in the input data can lead to erroneous outputs. This phenomenon can seriously hinder the application of these DCMs in real-world scenarios. To address this limitation, we propose MARVEL, a mutual learning-based framework for enhancing the robustness of DCMs via adversarial training. Specifically, MARVEL initializes two identical DCMs, one of which receives Gaussian-distorted data and performs adversarial training, and the other receives the clean data. Then these two DCMs work together to not only fit the true labels but also fit each other's internal parameters. Our intuition is that the DCM can enhance robustness by training noisy data, while the DCM achieves accurate prediction performance by learn the clean data. Their mutual learning enables the DCM to balance both robustness and predictive performance.

Similar Papers
  • Research Article
  • Cite Count Icon 9
  • 10.1016/j.neucom.2022.10.034
Robustness-via-synthesis: Robust training with generative adversarial perturbations
  • Oct 21, 2022
  • Neurocomputing
  • İnci M Baytaş + 1 more

Robustness-via-synthesis: Robust training with generative adversarial perturbations

  • Research Article
  • Cite Count Icon 12
  • 10.1016/j.engappai.2022.105553
On enhancing prediction abilities of vision-based metallic surface defect classification through adversarial training
  • Nov 9, 2022
  • Engineering Applications of Artificial Intelligence
  • Vikanksh Nath + 2 more

On enhancing prediction abilities of vision-based metallic surface defect classification through adversarial training

  • Research Article
  • Cite Count Icon 8
  • 10.1145/3510833
Toward Adversary-aware Non-iterative Model Pruning through D ynamic N etwork R ewiring of DNNs
  • Sep 30, 2022
  • ACM Transactions on Embedded Computing Systems
  • Souvik Kundu + 4 more

We present a dynamic network rewiring (DNR) method to generate pruned deep neural network (DNN) models that both are robust against adversarially generated images and maintain high accuracy on clean images. In particular, the disclosed DNR training method is based on a unified constrained optimization formulation using a novel hybrid loss function that merges sparse learning with robust adversarial training. This training strategy dynamically adjusts inter-layer connectivity based on per-layer normalized momentum computed from the hybrid loss function. To further improve the robustness of the pruned models, we propose DNR++, an extension of the DNR method where we introduce the idea of sparse parametric Gaussian noise tensor that is added to the weight tensors to yield robust regularization. In contrast to existing robust pruning frameworks that require multiple training iterations, the proposed DNR and DNR++ achieve an overall target pruning ratio with only a single training iteration and can be tuned to support both irregular and structured channel pruning. To demonstrate the efficacy of the proposed method under the no-increased-training-time “free” adversarial training scenario, we finally present FDNR++, a simple yet effective training modification that can yield robust yet compressed models requiring training time comparable to that of an unpruned non-adversarial training. To evaluate the merits of our disclosed training methods, experiments were performed with two widely accepted models, namely VGG16 and ResNet18, on CIFAR-10 and CIFAR-100 as well as with VGG16 on Tiny-ImageNet. Compared to the baseline uncompressed models, our methods provide over 20× compression on all the datasets without any significant drop of either clean or adversarial classification performance. Moreover, extensive experiments show that our methods consistently find compressed models with better clean and adversarial image classification performance than what is achievable through state-of-the-art alternatives. We provide insightful observations to help make various model, parameter density, and prune-type selection choices and have open-sourced our saved models and test codes to ensure reproducibility of our results.

  • Book Chapter
  • Cite Count Icon 3
  • 10.1007/978-3-031-26351-4_41
COLLIDER: A Robust Training Framework for Backdoor Data
  • Jan 1, 2023
  • Hadi M Dolatabadi + 2 more

Deep neural network (DNN) classifiers are vulnerable to backdoor attacks. An adversary poisons some of the training data in such attacks by installing a trigger. The goal is to make the trained DNN output the attacker’s desired class whenever the trigger is activated while performing as usual for clean data. Various approaches have recently been proposed to detect malicious backdoored DNNs. However, a robust, end-to-end training approach, like adversarial training, is yet to be discovered for backdoor poisoned data. In this paper, we take the first step toward such methods by developing a robust training framework, Collider, that selects the most prominent samples by exploiting the underlying geometric structures of the data. Specifically, we effectively filter out candidate poisoned data at each training epoch by solving a geometrical coreset selection objective. We first argue how clean data samples exhibit (1) gradients similar to the clean majority of data and (2) low local intrinsic dimensionality (LID). Based on these criteria, we define a novel coreset selection objective to find such samples, which are used for training a DNN. We show the effectiveness of the proposed method for robust training of DNNs on various poisoned datasets, reducing the backdoor success rate significantly.KeywordsBackdoor attacksData poisoningCoreset selectionLocal intrinsic dimensionalityEfficient training

  • Book Chapter
  • Cite Count Icon 8
  • 10.1007/978-3-031-16452-1_8
Adversarially Robust Prototypical Few-Shot Segmentation with Neural-ODEs
  • Jan 1, 2022
  • Prashant Pandey + 4 more

Few-shot Learning (FSL) methods are being adopted in settings where data is not abundantly available. This is especially seen in medical domains where the annotations are expensive to obtain. Deep Neural Networks have been shown to be vulnerable to adversarial attacks. This is even more severe in the case of FSL due to the lack of a large number of training examples. In this paper, we provide a framework to make few-shot segmentation models adversarially robust in the medical domain where such attacks can severely impact the decisions made by clinicians who use them. We propose a novel robust few-shot segmentation framework, Prototypical Neural Ordinary Differential Equation (PNODE), that provides defense against gradient-based adversarial attacks. We show that our framework is more robust compared to traditional adversarial defense mechanisms such as adversarial training. Adversarial training involves increased training time and shows robustness to limited types of attacks depending on the type of adversarial examples seen during training. Our proposed framework generalises well to common adversarial attacks like FGSM, PGD and SMIA while having the model parameters comparable to the existing few-shot segmentation models. We show the effectiveness of our proposed approach on three publicly available multi-organ segmentation datasets in both in-domain and cross-domain settings by attacking the support and query sets without the need for ad-hoc adversarial training.KeywordsFew-shot segmentationNeural-ODEAdversarial robustness

  • Research Article
  • Cite Count Icon 4
  • 10.1016/j.sigpro.2023.109077
Secure vertical federated learning based on feature disentanglement
  • May 10, 2023
  • Signal Processing
  • Fangjiao Zhang + 5 more

Federated learning (FL) faces many security threats. Although multiple robust FL frameworks have been proposed to defend against these malicious attacks in horizontal federated learning (HFL), security issues in vertical federated learning (VFL) have not been adequately studied. Recent studies show that VFL is vulnerable to inference attacks (e.g., label inference attacks), which puts VFL at risk. To solve this problem, we propose a new VFL framework SVFL (Secure Vertical Federated Learning) to defend against privacy breaches inspired by feature disentanglement. Specifically, in SVFL, the bottom models are feature extractors to extract samples’ features in the high-dimensional space, and the top model sews samples’ features of the same sample ID. Then, disentangling the samples’ features into the class-relevant feature and class-irrelevant one via two classifiers: one is to recognize the class-relevant feature by regular training, and another is to recognize the class-irrelevant feature by adversarial training. Our experiments show that SVFL not only defends against label inference attacks, no matter how many samples features a malicious participant occupies, but also improves the global model’s accuracy. Therefore, SVFL provides a privacy security guarantee for the vertical federated learning system.

  • Research Article
  • Cite Count Icon 16
  • 10.1016/j.knosys.2022.108965
Deep-attack over the deep reinforcement learning
  • May 10, 2022
  • Knowledge-Based Systems
  • Yang Li + 2 more

Deep-attack over the deep reinforcement learning

  • Research Article
  • Cite Count Icon 1
  • 10.1038/s41598-025-25436-z
Hybrid framework for image forgery detection and robustness against adversarial attacks using vision transformer and SVM.
  • Nov 18, 2025
  • Scientific reports
  • Mohamed Abdelmaksoud + 3 more

People routinely capture photos and videos to document their daily experiences, with such visual media frequently regarded as reliable sources of evidence. The proliferation of social networking platforms, digital photography technologies, and image manipulation applications have introduced emerging concerns that demand investigation by academics, industry executives, and cybersecurity experts. These concerns specifically relate to identifying and mitigating fraudulent visual content across online platforms. The deliberate alteration of photographs and videos has become progressively prevalent, potentially resulting in severe emotional, bodily, and societal damage to affected persons. This research introduces a combined Deep Learning approach utilizing a pre-trained Vision Transformer (ViT) for feature extraction alongside Support Vector Machine (SVM) for dual-category image classification, differentiating authentic from manipulated photographs (Copy-move & Splicing). Additionally, we implemented adversarial training techniques to enhance model robustness against adversarial attacks. The introduced approach underwent comprehensive evaluation across multiple benchmarks, including CASIA v1.0, CASIA v2.0, MICC-F220, MICC-F2000, and MICC-F600. The methodology exhibits considerable potential regarding forgery detection performance following extensive validation. The proposed framework demonstrated competitive performance and improved robustness against image manipulations compared to existing methods in manipulation detection tasks.

  • Research Article
  • Cite Count Icon 3
  • 10.1609/aaai.v38i15.29574
Adversarial Purification with the Manifold Hypothesis
  • Mar 24, 2024
  • Proceedings of the AAAI Conference on Artificial Intelligence
  • Zhaoyuan Yang + 4 more

In this work, we formulate a novel framework for adversarial robustness using the manifold hypothesis. This framework provides sufficient conditions for defending against adversarial examples. We develop an adversarial purification method with this framework. Our method combines manifold learning with variational inference to provide adversarial robustness without the need for expensive adversarial training. Experimentally, our approach can provide adversarial robustness even if attackers are aware of the existence of the defense. In addition, our method can also serve as a test-time defense mechanism for variational autoencoders.

  • Research Article
  • Cite Count Icon 55
  • 10.1016/j.cie.2021.107630
Deep learning-based sewer defect classification for highly imbalanced dataset
  • Aug 20, 2021
  • Computers & Industrial Engineering
  • L Minh Dang + 5 more

Deep learning-based sewer defect classification for highly imbalanced dataset

  • Research Article
  • Cite Count Icon 41
  • 10.1186/s12967-023-03872-7
A machine learning framework develops a DNA replication stress model for predicting clinical outcomes and therapeutic vulnerability in primary prostate cancer
  • Jan 12, 2023
  • Journal of Translational Medicine
  • Rong-Hua Huang + 5 more

Recent studies have identified DNA replication stress as an important feature of advanced prostate cancer (PCa). The identification of biomarkers for DNA replication stress could therefore facilitate risk stratification and help inform treatment options for PCa. Here, we designed a robust machine learning-based framework to comprehensively explore the impact of DNA replication stress on prognosis and treatment in 5 PCa bulk transcriptomic cohorts with a total of 905 patients. Bootstrap resampling-based univariate Cox regression and Boruta algorithm were applied to select a subset of DNA replication stress genes that were more clinically relevant. Next, we benchmarked 7 survival-related machine-learning algorithms for PCa recurrence using nested cross-validation. Multi-omic and drug sensitivity data were also utilized to characterize PCa with various DNA replication stress. We found that the hyperparameter-tuned eXtreme Gradient Boosting model outperformed other tuned models and was therefore used to establish a robust replication stress signature (RSS). RSS demonstrated superior performance over most clinical features and other PCa signatures in predicting PCa recurrence across cohorts. Lower RSS was characterized by enriched metabolism pathways, high androgen activity, and a favorable prognosis. In contrast, higher RSS was significantly associated with TP53, RB1, and PTEN deletion, exhibited increased proliferation and DNA replication stress, and was more immune-suppressive with a higher chance of immunotherapy response. In silico screening identified 13 potential targets (e.g. TOP2A, CDK9, and RRM2) from 2249 druggable targets, and 2 therapeutic agents (irinotecan and topotecan) for RSS-high patients. Additionally, RSS-high patients were more responsive to taxane-based chemotherapy and Poly (ADP-ribose) polymerase inhibitors, whereas RSS-low patients were more sensitive to androgen deprivation therapy. In conclusion, a robust machine-learning framework was used to reveal the great potential of RSS for personalized risk stratification and therapeutic implications in PCa.

  • Conference Article
  • 10.1109/icdl49984.2021.9515646
Action-Insensitive Embodied Visual Navigation
  • Aug 23, 2021
  • Xinzhu Liu + 3 more

Embodied visual navigation is an important task that the agent learns to navigate to a specific target object based on egocentric visual observations, by performing specific actions in the environment. However, there exists a problem of mismatch between the training and testing action spaces through learning methods, and methods used to solve this problem have been scarcely developed. In this paper, we propose a novel problem of the action-insensitive embodied visual navigation task with different action spaces of the agent between the training and testing process. A robust adversary learning framework is built to learn a general and robust policy that can adapt properly to different action spaces. The proposed model in the first-stage adversary training learns a robust feature representation of the agent’s states and transfers the trained strategy to new action spaces with fewer training samples in the second-stage adaptation training. Experiments on 3D indoor scenes validate the effectiveness of the proposed approach.

  • Research Article
  • Cite Count Icon 5
  • 10.1109/tcds.2023.3238840
Visual Navigation Subject to Embodied Mismatch
  • Dec 1, 2023
  • IEEE Transactions on Cognitive and Developmental Systems
  • Xinzhu Liu + 4 more

In the embodied visual navigation task, the agent navigates to a target location based on the visual observation it collects during the interaction with the environment. And various approaches have been proposed to learn robust navigation strategies for this task. However, existing approaches assume that the action spaces in the training and testing phases are the same, which is usually not the case in reality. And thus it is difficult to directly apply these approaches on practical scenarios. In this paper, we consider the situation where the action spaces in the training and testing phases are different, and a novel task of visual navigation subject to embodied mismatch is proposed. To solve the proposed task, we establish a two-stage robust adversary learning framework which can learn a robust policy to adapt the learned model to a new action space. In the first stage, an adversary training mechanism is used to learn a robust feature representation of the state. In the second stage, an adaptation training is used to transfer the learned strategy to a new action space with fewer training samples. Experiments of three types of embodied visual navigation tasks are conducted in 3D indoor scenes demonstrating the effectiveness of the proposed approach.

  • Conference Article
  • Cite Count Icon 31
  • 10.1109/isbi48211.2021.9433761
Defending Against Adversarial Attacks On Medical Imaging Ai System, Classification Or Detection?
  • Apr 13, 2021
  • Xin Li + 2 more

Medical imaging AI systems such as disease classification and segmentation are increasingly inspired and transformed from computer vision based AI systems. Although an array of defense techniques have been developed and proved to be effective in computer vision, defending against adversarial attacks on medical images remains largely an uncharted territory due to their unique challenges: 1) label scarcity limits adversarial generalizability; 2) vastly similar and dominant fore- and background make it difficult for learning the discriminating features; and 3) crafted adversarial noises added to a highly standardized medical image can make it a hard sample for model to predict. In this paper, we propose a novel robust medical imaging AI framework based on Semi-Supervised Adversarial Training (SSAT) and Unsupervised Adversarial Detection (UAD), followed by a new measure for assessing systems adversarial risk. We systematically demonstrate the advantages of our robust medical imaging AI system over the existing adversarial defense techniques under diverse real-world settings of adversarial attacks using a benchmark OCT imaging data set.

  • Conference Article
  • Cite Count Icon 8
  • 10.1109/icdm50108.2020.00192
Robust Meta Network Embedding Against Adversarial Attacks
  • Nov 1, 2020
  • Yang Zhou + 5 more

Recent studies have shown that graph mining models are vulnerable to adversarial attacks. This paper proposes a robust meta network embedding framework, RoMNE, which improves the robustness of multiple network embedding on adversarial noisy networks while preserving the utility on original clean ones. First, we propose a generic meta learning based multiple network embedding model that can quickly adapt it to new embedding tasks on a variety of network data with only a small number of parameter and training updates. Second, Gumbel estimator and Gaussian smoothing techniques are introduced to implement differentiable approximation for optimizing non-differential objective of effective adversarial attacks. Last but not least, the adversarial attack and defense models are integrated into a dynamic adversarial training model. The competition of two models helps the latter be robust to adversarial attacks.

Save Icon
Up Arrow
Open/Close