On Distribution Shift in Learning-based Bug Detectors

被引:0
|
作者
He, Jingxuan [1 ]
Beurer-Kellner, Luca [1 ]
Vechev, Martin [1 ]
机构
[1] Swiss Fed Inst Technol, Dept Comp Sci, Zurich, Switzerland
关键词
D O I
暂无
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Deep learning has recently achieved initial success in program analysis tasks such as bug detection. Lacking real bugs, most existing works construct training and test data by injecting synthetic bugs into correct programs. Despite achieving high test accuracy (e.g., >90%), the resulting bug detectors are found to be surprisingly unusable in practice, i.e., <10% precision when used to scan real software repositories. In this work, we argue that this massive performance difference is caused by a distribution shift, i.e., a fundamental mismatch between the real bug distribution and the synthetic bug distribution used to train and evaluate the detectors. To address this key challenge, we propose to train a bug detector in two phases, first on a synthetic bug distribution to adapt the model to the bug detection domain, and then on a real bug distribution to drive the model towards the real distribution. During these two phases, we leverage a multi-task hierarchy, focal loss, and contrastive learning to further boost performance. We evaluate our approach extensively on three widely studied bug types, for which we construct new datasets carefully designed to capture the real bug distribution. The results demonstrate that our approach is practically effective and successfully mitigates the distribution shift: our learned detectors are highly performant on both our test set and the latest version of open source repositories. Our code, datasets, and models are publicly available at https://github.com/eth-sri/learning-real-bug-detector.
引用
收藏
页数:22
相关论文
共 50 条
  • [41] Model Focus Improves Performance of Deep Learning-Based Synthetic Face Detectors
    Piland, Jacob C.
    Czajka, Adam
    Sweet, Christopher
    IEEE ACCESS, 2023, 11 : 63430 - 63441
  • [42] Aircraft detection in satellite imagery using deep learning-based object detectors
    Azam, Basim
    Khan, Muhammad Jaleed
    Bhatti, Farrukh Aziz
    Maud, Abdur Rahman M.
    Hussain, Syed Fawad
    Hashmi, Ali Javed
    Khurshid, Khurram
    MICROPROCESSORS AND MICROSYSTEMS, 2022, 94
  • [43] Beyond the Hype: An Evaluation of Commercially Available Machine Learning-based Malware Detectors
    Bridges, Robert A.
    Oesch, Sean
    Iannacone, Michael D.
    Huffer, Kelly M. T.
    Jewell, Brian
    Nichols, Jeff A.
    Weber, Brian
    Verma, Miki E.
    Scofield, Daniel
    Miles, Craig
    Plummer, Thomas
    Daniell, Mark
    Tall, Anne M.
    Beaver, Justin M.
    Smith, Jared M.
    DIGITAL THREATS: RESEARCH AND PRACTICE, 2023, 4 (02):
  • [44] Immunology - Bug detectors
    Kaisho, T
    Akira, S
    NATURE, 2001, 414 (6865) : 701 - +
  • [45] BiN: A Two-Level Learning-Based Bug Search for Cross-Architecture Binary
    Wu, Hao
    Shu, Hui
    Kang, Fei
    Xiong, Xiaobing
    IEEE ACCESS, 2019, 7 : 169548 - 169564
  • [46] Deep Learning-Based Codebook Designs for Generalized Space Shift Keying Systems
    Huang, Di
    Jiang, Xue-Qin
    Lee, Inkyu
    Hai, Han
    IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, 2022, 71 (01) : 1038 - 1042
  • [47] Vmin Shift Prediction Using Machine Learning-Based Methodology for Automotive Products
    Yang, Y. L.
    Tsao, P. C.
    Lin, C. W.
    Chen, H. Q.
    Huang, B. J.
    Hsieh, Hank
    Chen, Kerwin
    Lee, Ross
    Koh, Khim
    Ting, Y. J.
    Hsu, B. C.
    Huang, Y. S.
    Lai, Citi
    Lee, M. Z.
    Lee, T. H.
    2024 IEEE INTERNATIONAL RELIABILITY PHYSICS SYMPOSIUM, IRPS 2024, 2024,
  • [48] Statistical Learning-Based Spatial Downscaling Models for Precipitation Distribution
    Wu, Yichen
    Zhang, Zhihua
    Crabbe, M. James C.
    Das, Lipon Chandra
    ADVANCES IN METEOROLOGY, 2022, 2022
  • [49] Ensemble Learning-Based Reactive Power Optimization for Distribution Networks
    Zhu, Ruijin
    Tang, Bo
    Wei, Wenhai
    ENERGIES, 2022, 15 (06)
  • [50] Deep learning-based fault location of DC distribution networks
    Luo Guomin
    Tan Yingjie
    Yao Changyuan
    Liu Yinglin
    He Jinghan
    JOURNAL OF ENGINEERING-JOE, 2019, (16): : 3301 - 3305