IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v18y2026i2p85-d1857559.html

CEVD: Cluster-Based Ensemble Learning for Cross-Project Vulnerability Detection

Author

Listed:
  • Yang Cao

    (School of Software, Northwestern Polytechnical University, Xi’an 710129, China)

  • Yunwei Dong

    (School of Software, Northwestern Polytechnical University, Xi’an 710129, China)

  • Jie Liu

    (School of Software, Northwestern Polytechnical University, Xi’an 710129, China)

Abstract

Deep learning has become an important approach for automated software vulnerability detection. However, due to domain shift, existing models often suffer from significant performance degradation when applied to unseen projects. To address this issue, prior studies have widely adopted Domain Adaptation (DA) techniques to improve cross-project generalization. Nevertheless, these methods typically rely on the implicit “project-as-domain” assumption and require access to target project data during training, which limits their applicability in practice. To overcome these limitations, this paper proposes a vulnerability detection framework that combines semantic clustering with ensemble-based Domain Generalization (DG), termed Cluster-based Ensemble Learning for Vulnerability Detection (CEVD). CEVD first performs unsupervised clustering on code semantic embeddings to automatically automatically identify latent semantic structures that transcend project boundaries, constructing pseudo-domains with intra-domain homogeneity. A soft domain labeling strategy is further introduced to model the membership of samples in multiple pseudo-domains, preserving semantic overlap across boundaries. Building upon this, CEVD employs an ensemble learning framework that jointly trains multiple expert models and a domain classifier. The predictions of these experts are dynamically fused based on the weights generated by the domain classifier, enabling effective vulnerability detection on unseen projects without requiring access to target data. Extensive experiments on real-world datasets demonstrate that CEVD consistently outperforms state-of-the-art baselines across different pre-trained backbone models. This work demonstrates the effectiveness of semantic structure mining in capturing latent domains and offers a practical solution for improving generalization in cross-project vulnerability detection.

Suggested Citation

  • Yang Cao & Yunwei Dong & Jie Liu, 2026. "CEVD: Cluster-Based Ensemble Learning for Cross-Project Vulnerability Detection," Future Internet, MDPI, vol. 18(2), pages 1-24, February.
  • Handle: RePEc:gam:jftint:v:18:y:2026:i:2:p:85-:d:1857559
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1999-5903/18/2/85/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1999-5903/18/2/85/
    Download Restriction: no
    ---><---

    More about this item

    Keywords

    ;
    ;
    ;
    ;
    ;

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:18:y:2026:i:2:p:85-:d:1857559. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    We have no bibliographic references for this item. You can help adding them by using this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.