Large Language Models Can Connect the Dots: Exploring Model Optimization Bugs with Domain Knowledge-Aware Prompts

被引:0
|
作者
Guan, Hao [1 ,2 ]
Bai, Guangdong [1 ]
Liu, Yepang [3 ,4 ]
机构
[1] Univ Queensland, Brisbane, Qld, Australia
[2] Southern Univ Sci & Technol, Shenzhen, Peoples R China
[3] Southern Univ Sci & Technol, Res Inst Trustworthy Autonomous Syst, Shenzhen, Peoples R China
[4] Southern Univ Sci & Technol, Dept Comp Sci & Engn, Shenzhen, Peoples R China
基金
中国国家自然科学基金; 澳大利亚研究理事会;
关键词
Model Optimization; Library Testing; Large Language Model;
D O I
10.1145/3650212.3680383
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Model optimization, such as pruning and quantization, has become the de facto pre-deployment phase when deploying deep learning (DL) models on resource-constrained platforms. However, the complexity of DL models often leads to non-trivial bugs in model optimizers, known as model optimization bugs (MOBs). These MOBs are characterized by involving complex data types and layer structures inherent to DL models, causing significant hurdles in detecting them through traditional static analysis and dynamic testing techniques. In this work, we leverage Large Language Models (LLMs) with prompting techniques to generate test cases for MOB detection. We explore how LLMs can draw an understanding of the MOB domain from scattered bug instances and generalize to detect new ones, a paradigm we term as concentration and diffusion. We extract MOB domain knowledge from the artifacts of known MOBs, such as their issue reports and fixes, and design knowledge-aware prompts to guide LLMs in generating effective test cases. The domain knowledge of code structure and error description provides precise in-depth depictions of the problem domain, i.e., the concentration, and heuristic directions to generate innovative test cases, i.e., the diffusion. Our approach is implemented as a tool named YANHui and benchmarked against existing few-shot LLM-based fuzzing techniques. Test cases generated by YANHui demonstrate enhanced capability to find relevant API and data combinations for exposing MOBs, leading to an 11.4% increase in generating syntactically valid code and a 22.3% increase in generating on-target code specific to model optimization. YANHui detects 17 MOBs, and among them, five are deep MOBs that are difficult to reveal without our prompting technique.
引用
收藏
页码:1579 / 1591
页数:13
相关论文
共 4 条
  • [1] Knowledge-Aware Code Generation with Large Language Models
    Huang, Tao
    Sun, Zhihong
    Jin, Zhi
    Li, Ge
    Lyu, Chen
    PROCEEDINGS 2024 32ND IEEE/ACM INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION, ICPC 2024, 2024, : 52 - 63
  • [2] Evaluating the Adaptability of Large Language Models for Knowledge-aware Question and Answering
    Thakkar, Jay
    Kolekar, Suresh
    Gite, Shilpa
    Pradhan, Biswajeet
    Alamri, Abdullah
    INTERNATIONAL JOURNAL ON SMART SENSING AND INTELLIGENT SYSTEMS, 2024, 17 (01):
  • [3] Efficient Fine-Tuning Large Language Models for Knowledge-Aware Response Planning
    Minh Nguyen
    Kishan, K. C.
    Toan Nguyen
    Chadha, Ankit
    Thuy Vu
    MACHINE LEARNING AND KNOWLEDGE DISCOVERY IN DATABASES: RESEARCH TRACK, ECML PKDD 2023, PT II, 2023, 14170 : 593 - 611
  • [4] KG-CoT: Chain-of-Thought Prompting of Large Language Models over Knowledge Graphs for Knowledge-Aware Question Answering
    Zhao, Ruilin
    Zhao, Feng
    Wang, Long
    Wang, Xianzhi
    Xu, Guandong
    PROCEEDINGS OF THE THIRTY-THIRD INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, IJCAI 2024, 2024, : 6642 - 6650