跳到主要导航 跳到搜索 跳到主要内容

UF-CDDFM: A unified framework for code defect detection using multi-modal inputs and few-shot learning

  • Xianglu Zhou
  • , Tianxiang Cui
  • , Xiaoyan Zhu
  • , Jiayin Wang
  • , Xin Lai
  • Xi'an Jiaotong University
  • University of Nottingham Ningbo China

科研成果: 期刊稿件 › 文章 › 同行评审

摘要

Context: The detection of code defects is foundational to modern software development and maintenance, playing a critical role in ensuring software quality and security. However, as software systems grow in scale and complexity, the limitations of traditional static analysis and conventional machine learning techniques have become increasingly evident. These methods rely heavily on intricate, manual feature engineering and fail to capture dynamic runtime behavior, resulting in suboptimal accuracy and elevated error rates. Objective: To address these deficiencies, we propose UF-CDDFM, a unified framework for code defect detection that integrates multi-modal inputs, active learning, and state-of-the-art few-shot learning techniques. We aim to improve detection performance, reduce feature selection complexity and sample bias through active learning, and maintain practical efficiency in real-world development contexts. Methods: UF-CDDFM employs parallel encoding of source code, code annotations, and abstract syntax trees (ASTs) using large language models (LLMs) alongside multilayer perceptrons (MLPs) to derive robust, high-fidelity representations of code. To streamline feature selection and mitigate sample bias, an active learning component is introduced for automated identification of high-quality features. Addressing the pervasive challenge of data scarcity, we incorporate two complementary few-shot learning strategies-MAML for small-scale datasets and LEO for larger-scale settings to enhance overall generalization capability. Results: Empirical evaluations demonstrate that UF-CDDFM consistently outperforms existing methods, establishing new state-of-the-art detection rates: 72.04% for defect detection and 95.23% for clone detection. Crucially, these gains are achieved within resource-constrained computational environments, which highlights the practicality of the method. Conclusion: By fusing multi-modal code representations, active learning, and adaptive few-shot learning techniques, UF-CDDFM delivers significant improvements in detection accuracy and computational efficiency. This work offers a new paradigm for robust, scalable, and practical code defect and clone detection in modern software engineering.

源语言英语
期刊论文编号107942
期刊Information and Software Technology
卷190
DOI
出版状态已出版 - 2月 2026

学术指纹

探究 'UF-CDDFM: A unified framework for code defect detection using multi-modal inputs and few-shot learning' 的科研主题。它们共同构成独一无二的学术指纹。

引用此