On-the-fly Improving Performance of Deep Code Models via Input Denoising
- URL: http://arxiv.org/abs/2308.09969v1
- Date: Sat, 19 Aug 2023 09:55:19 GMT
- Title: On-the-fly Improving Performance of Deep Code Models via Input Denoising
- Abstract summary: We propose the first input denoising technique (i.e., CodeDenoise) for deep code models.
CodeDenoise localizes noisy identifiers in (likely) mispredicted inputs.
It does not need to retrain or reconstruct the model, but only needs to cleanse inputs on-the-fly to improve performance.
- Score: 15.166827643436346
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Deep learning has been widely adopted to tackle various code-based tasks by
building deep code models based on a large amount of code snippets. While these
deep code models have achieved great success, even state-of-the-art models
suffer from noise present in inputs leading to erroneous predictions. While it
is possible to enhance models through retraining/fine-tuning, this is not a
once-and-for-all approach and incurs significant overhead. In particular, these
techniques cannot on-the-fly improve performance of (deployed) models. There
are currently some techniques for input denoising in other domains (such as
image processing), but since code input is discrete and must strictly abide by
complex syntactic and semantic constraints, input denoising techniques in other
fields are almost not applicable. In this work, we propose the first input
denoising technique (i.e., CodeDenoise) for deep code models. Its key idea is
to localize noisy identifiers in (likely) mispredicted inputs, and denoise such
inputs by cleansing the located identifiers. It does not need to retrain or
reconstruct the model, but only needs to cleanse inputs on-the-fly to improve
performance. Our experiments on 18 deep code models (i.e., three pre-trained
models with six code-based datasets) demonstrate the effectiveness and
efficiency of CodeDenoise. For example, on average, CodeDenoise successfully
denoises 21.91% of mispredicted inputs and improves the original models by
2.04% in terms of the model accuracy across all the subjects in an average of
0.48 second spent on each input, substantially outperforming the widely-used
fine-tuning strategy.
Related papers
- Noise Hypernetworks: Amortizing Test-Time Compute in Diffusion Models [57.49136894315871]
New paradigm of test-time scaling has yielded remarkable breakthroughs in reasoning models and generative vision models.<n>We propose one solution to the problem of integrating test-time scaling knowledge into a model during post-training.<n>We replace reward guided test-time noise optimization in diffusion models with a Noise Hypernetwork that modulates initial input noise.
arXiv Detail & Related papers (2025-08-13T17:33:37Z) - Think While You Generate: Discrete Diffusion with Planned Denoising [10.797958380377509]
We introduce Discrete Diffusion with Planned Denoising (DDPD), a novel framework that separates the generation process into two models: a planner and a denoiser.
DDPD outperforms traditional denoiser-only mask diffusion methods, achieving superior results on language modeling benchmarks.
Notably, in language modeling, DDPD significantly reduces the performance gap between diffusion-based and autoregressive methods in terms of generative perplexity.
arXiv Detail & Related papers (2024-10-08T18:03:34Z) - Pivotal Auto-Encoder via Self-Normalizing ReLU [20.76999663290342]
We formalize single hidden layer sparse auto-encoders as a transform learning problem.
We propose an optimization problem that leads to a predictive model invariant to the noise level at test time.
Our experimental results demonstrate that the trained models yield a significant improvement in stability against varying types of noise.
arXiv Detail & Related papers (2024-06-23T09:06:52Z) - Advancing the Robustness of Large Language Models through Self-Denoised Smoothing [50.54276872204319]
Large language models (LLMs) have achieved significant success, but their vulnerability to adversarial perturbations has raised considerable concerns.
We propose to leverage the multitasking nature of LLMs to first denoise the noisy inputs and then to make predictions based on these denoised versions.
Unlike previous denoised smoothing techniques in computer vision, which require training a separate model to enhance the robustness of LLMs, our method offers significantly better efficiency and flexibility.
arXiv Detail & Related papers (2024-04-18T15:47:00Z) - Certified PEFTSmoothing: Parameter-Efficient Fine-Tuning with Randomized Smoothing [6.86204821852287]
Randomized smoothing is the primary certified robustness method for accessing the robustness of deep learning models to adversarial perturbations in the l2-norm.
A notable constraint limiting widespread adoption is the necessity to retrain base models entirely from scratch to attain a robust version.
This is because the base model fails to learn the noise-augmented data distribution to give an accurate vote.
Inspired by recent large model training procedures, we explore an alternative way named PEFTSmoothing to adapt the base model to learn the noise-augmented data.
arXiv Detail & Related papers (2024-04-08T09:38:22Z) - Learning with Noisy Foundation Models [95.50968225050012]
This paper is the first work to comprehensively understand and analyze the nature of noise in pre-training datasets.
We propose a tuning method (NMTune) to affine the feature space to mitigate the malignant effect of noise and improve generalization.
arXiv Detail & Related papers (2024-03-11T16:22:41Z) - Code Representation Learning At Scale [75.04686476303436]
We fuel code representation learning with a vast amount of code data via a two-stage pretraining scheme.
We first train the encoders via a mix that leverages both randomness in masking language modeling and the structure aspect of programming language.
We then enhance the representations via contrastive learning with hard negative and hard positive constructed in an unsupervised manner.
arXiv Detail & Related papers (2024-02-02T22:19:15Z) - Fine tuning Pre trained Models for Robustness Under Noisy Labels [34.68018860186995]
The presence of noisy labels in a training dataset can significantly impact the performance of machine learning models.
We introduce a novel algorithm called TURN, which robustly and efficiently transfers the prior knowledge of pre-trained models.
arXiv Detail & Related papers (2023-10-24T20:28:59Z) - MetaDiff: Meta-Learning with Conditional Diffusion for Few-Shot Learning [19.57633448737394]
Gradient-based meta-learning approaches effectively address the challenge by learning how to learn novel tasks.
We present a novel task-conditional diffusion-based meta-learning, called MetaDiff, that effectively models the optimization process of model weights.
Experiment results show that our MetaDiff outperforms the state-of-the-art gradient-based meta-learning family in few-shot learning tasks.
arXiv Detail & Related papers (2023-07-31T06:19:48Z) - Discrete Key-Value Bottleneck [95.61236311369821]
Deep neural networks perform well on classification tasks where data streams are i.i.d. and labeled data is abundant.
One powerful approach that has addressed this challenge involves pre-training of large encoders on volumes of readily available data, followed by task-specific tuning.
Given a new task, however, updating the weights of these encoders is challenging as a large number of weights needs to be fine-tuned, and as a result, they forget information about the previous tasks.
We propose a model architecture to address this issue, building upon a discrete bottleneck containing pairs of separate and learnable key-value codes.
arXiv Detail & Related papers (2022-07-22T17:52:30Z) - Improving Pre-trained Language Model Fine-tuning with Noise Stability
Regularization [94.4409074435894]
We propose a novel and effective fine-tuning framework, named Layerwise Noise Stability Regularization (LNSR)
Specifically, we propose to inject the standard Gaussian noise and regularize hidden representations of the fine-tuned model.
We demonstrate the advantages of the proposed method over other state-of-the-art algorithms including L2-SP, Mixout and SMART.
arXiv Detail & Related papers (2022-06-12T04:42:49Z) - Bridging Pre-trained Models and Downstream Tasks for Source Code
Understanding [13.65914588243695]
We propose an approach to bridge pre-trained models and code-related tasks.
We exploit semantic-preserving transformation to enrich downstream data diversity.
We introduce curriculum learning to organize the transformed data in an easy-to-hard manner to fine-tune existing pre-trained models.
arXiv Detail & Related papers (2021-12-04T07:21:28Z) - Effective Model Sparsification by Scheduled Grow-and-Prune Methods [73.03533268740605]
We propose a novel scheduled grow-and-prune (GaP) methodology without pre-training the dense models.
Experiments have shown that such models can match or beat the quality of highly optimized dense models at 80% sparsity on a variety of tasks.
arXiv Detail & Related papers (2021-06-18T01:03:13Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.