CodeImprove: Program Adaptation for Deep Code Models
- URL: http://arxiv.org/abs/2501.15804v2
- Date: Mon, 16 Jun 2025 20:59:44 GMT
- Title: CodeImprove: Program Adaptation for Deep Code Models
- Abstract summary: Code models often suffer performance degradation due to various reasons.<n>We propose CodeImprove, which distinguishes out-of-scope from normal inputs and converts such out-of-scope inputs back to in-scope inputs.<n>Our experimental results show CodeImprove can enhance up to 8.78% of accuracy, and 51.28% of relative improvements in three code models on two SE tasks.
- Score: 3.560411187959367
- License: http://creativecommons.org/licenses/by-nc-nd/4.0/
- Abstract: Leveraging deep learning (DL)-based code analysis tools to solve software engineering tasks is becoming increasingly popular. Code models often suffer performance degradation due to various reasons (e.g., code data shifts). Retraining is often required to address these issues, but frequent model updates are costly in labeling and deployment. In this paper, we explore an alternative solution: Adapting the program inputs to the code models. This can be achieved by two steps: 1) input validation that focuses on identifying whether an input is an out-of-scope input program that are beyond a model's handling capability, and 2) input adaptation that adapts out-of-scope inputs to become in-scope inputs. Validating program input is challenging, as current techniques focus on continuous inputs such as image data and fail with discrete inputs like code data, which have unique characteristics and are processed differently by deep learning models. Adapting out-of-scope programs is also challenging due to their vast search spaces. Therefore, in this paper, we propose CodeImprove, which distinguishes out-of-scope from normal inputs and converts such out-of-scope inputs back to in-scope inputs through program transformation. In particular, we propose a validity score metric to identify out-of-scope inputs and leverage genetic algorithms to apply semantic preserving program transformation to convert out-of-scope inputs to in-scope inputs. Our experimental results show CodeImprove can enhance up to 8.78% of accuracy, and 51.28% of relative improvements in three code models on two SE tasks. Additionally, our input validation is promising in detecting out-of-scope inputs (AUC score of 0.924).
Related papers
- On-the-Fly Input Adaptation for Reliable Code Intelligence [11.136449698197174]
Code language models (CLMs) play a central role in software engineering across both generation and classification tasks.<n>Existing solutions address this by retraining the model, modifying its architecture, or re-engineering prompts.<n>This work proposes an alternative strategy based on on-the-fly input adaptation, which improves model behavior without altering its parameters.
arXiv Detail & Related papers (2026-05-19T04:55:49Z) - Scaling Agentic Verifier for Competitive Coding [66.11758166379092]
Large language models (LLMs) have demonstrated strong coding capabilities but still struggle to solve competitive programming problems correctly in a single attempt.<n>Execution-based re-ranking offers a promising test-time scaling strategy, yet existing methods are constrained by either difficult test case generation or inefficient random input sampling.<n>We propose Agentic Verifier, an execution-based agent that actively reasons about program behaviors and searches for highly discriminative test inputs.
arXiv Detail & Related papers (2026-02-04T06:30:40Z) - KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Coding [49.56049319037421]
KodCode is a synthetic dataset that addresses the persistent challenge of acquiring high-quality, verifiable training data.
It comprises question-solution-test triplets that are systematically validated via a self-verification procedure.
This pipeline yields a large-scale, robust and diverse coding dataset.
arXiv Detail & Related papers (2025-03-04T19:17:36Z) - A Framework for On the Fly Input Refinement for Deep Learning Models [0.0]
Deep learning models still exhibit notable mispredictions in real-world applications, even when trained on up-to-date data.
This research introduces an adaptive, on-the-fly input refinement framework aimed at improving model performance through input validation and transformation.
As a scalable and resource-efficient solution, this framework holds significant promise for high-stakes applications in software engineering, natural language processing, and computer vision.
arXiv Detail & Related papers (2025-02-08T05:41:01Z) - Efficient Encoder-Decoder Transformer Decoding for Decomposable Tasks [53.550782959908524]
We introduce a new configuration for encoder-decoder models that improves efficiency on structured output and decomposable tasks.
Our method, prompt-in-decoder (PiD), encodes the input once and decodes the output in parallel, boosting both training and inference efficiency.
arXiv Detail & Related papers (2024-03-19T19:27:23Z) - Generative Input: Towards Next-Generation Input Methods Paradigm [49.98958865125018]
We propose a novel Generative Input paradigm named GeneInput.
It uses prompts to handle all input scenarios and other intelligent auxiliary input functions, optimizing the model with user feedback to deliver personalized results.
The results demonstrate that we have achieved state-of-the-art performance for the first time in the Full-mode Key-sequence to Characters(FK2C) task.
arXiv Detail & Related papers (2023-11-02T12:01:29Z) - On-the-fly Improving Performance of Deep Code Models via Input Denoising [15.166827643436346]
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.
arXiv Detail & Related papers (2023-08-19T09:55:19Z) - Incrementally-Computable Neural Networks: Efficient Inference for
Dynamic Inputs [75.40636935415601]
Deep learning often faces the challenge of efficiently processing dynamic inputs, such as sensor data or user inputs.
We take an incremental computing approach, looking to reuse calculations as the inputs change.
We apply this approach to the transformers architecture, creating an efficient incremental inference algorithm with complexity proportional to the fraction of modified inputs.
arXiv Detail & Related papers (2023-07-27T16:30:27Z) - Data Lifecycle Management in Evolving Input Distributions for
Learning-based Aerospace Applications [23.84037777018747]
This paper presents a framework to incrementally retrain a model by selecting a subset of test inputs to label.
Algorithms within this framework are evaluated based on (1) model performance throughout mission lifetime and (2) cumulative costs associated with labeling and model retraining.
arXiv Detail & Related papers (2022-09-14T18:15:56Z) - 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) - Encoding Program as Image: Evaluating Visual Representation of Source
Code [2.1016374925364616]
We investigate Code2Snapshot, a novel representation of the source code based on the snapshots of input programs.
We compare its performance with state-of-the-art representations that utilize the rich syntactic and semantic features of input programs.
arXiv Detail & Related papers (2021-11-01T17:07:02Z) - Enforcing Consistency in Weakly Supervised Semantic Parsing [68.2211621631765]
We explore the use of consistency between the output programs for related inputs to reduce the impact of spurious programs.
We find that a more consistent formalism leads to improved model performance even without consistency-based training.
arXiv Detail & Related papers (2021-07-13T03:48:04Z) - Improving Compositionality of Neural Networks by Decoding
Representations to Inputs [83.97012077202882]
We bridge the benefits of traditional and deep learning programs by jointly training a generative model to constrain neural network activations to "decode" back to inputs.
We demonstrate applications of decodable representations to out-of-distribution detection, adversarial examples, calibration, and fairness.
arXiv Detail & Related papers (2021-06-01T20:07:16Z) - Behavioral Model Inference of Black-box Software using Deep Neural
Networks [1.6593369275241105]
Many software engineering tasks, such as testing, and anomaly detection can benefit from the ability to infer a behavioral model of the software.
Most existing inference approaches assume access to code to collect execution sequences.
We show how this approach can be used to accurately detect state changes, and how the inferred models can be successfully applied to transfer-learning scenarios.
arXiv Detail & Related papers (2021-01-13T09:23:37Z) - Controlled time series generation for automotive software-in-the-loop
testing using GANs [0.5352699766206808]
Testing automotive mechatronic systems partly uses the software-in-the-loop approach, where systematically covering inputs of the system-under-test remains a major challenge.
One approach is to craft input sequences which eases control and feedback of the test process but falls short of exposing the system to realistic scenarios.
The other is to replay sequences recorded from field operations which accounts for reality but requires collecting a well-labeled dataset of sufficient capacity for widespread use, which is expensive.
This work applies the well-known unsupervised learning framework of Generative Adrial Networks (GAN) to learn an unlabeled dataset of recorded in-vehicle
arXiv Detail & Related papers (2020-02-16T16:19:29Z)
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.