KQFuzz: 대규모 언어 모델을 활용한 양자 라이브러리 지식 기반 퍼징
KQFuzz: Knowledge-Guided Fuzzing for Quantum Libraries via Large Language Models
양자 컴퓨팅 기술이 지속적으로 발전함에 따라, 양자 라이브러리의 신뢰성과 정확성을 확보하는 것이 점점 더 중요해지고 있습니다. 이를 위해 많은 연구자들이 대규모 언어 모델(LLM)을 활용하여 양자 라이브러리에 대한 퍼징 기법을 제안하고 있으며, 이는 잠재적인 버그를 발견하는 데 도움을 줍니다. 그러나 이러한 방법들은 여전히 유연성 부족 및 낮은 효율성과 같은 한계를 가지고 있어 양자 컴퓨팅 분야의 발전을 저해합니다. 이러한 문제점을 해결하기 위해, 본 연구에서는 지식 기반 퍼징 도구인 KQFuzz를 제안합니다. KQFuzz는 포괄적인 코드베이스 지식을 활용하여 LLM 기반 테스트 생성을 지원하고, 이를 피트니스 기반 평가 및 이중 레벨 변이와 결합하여 복잡한 실행 경로를 탐색하고 잠재적인 버그를 유발합니다. 첫째, KQFuzz는 양자 프로그램에 특화된 새로운 프롬프트 체계를 도입하여 코드베이스 지식을 전략적으로 활용함으로써 고품질의 양자 시드 프로그램을 효율적으로 생성합니다. 또한, 생성된 시드 프로그램을 처리하기 위한 평가 및 변이 전략을 개발하여 효율적인 퍼징 실행을 지원하고 동시에 결과 테스트 케이스의 다양성을 더욱 풍부하게 합니다. 본 연구에서는 KQFuzz를 구현하고 Qiskit, PennyLane, Cirq와 같은 세 가지 인기 있는 양자 라이브러리에 대해 퍼징 실험을 수행했습니다. 실험 결과는 제안하는 방법이 다른 최첨단 기술에 비해 상당한 성능 향상을 보이며, 커버리지가 최대 18.44% 개선되었음을 보여줍니다. KQFuzz 개발 과정에서 13개의 버그를 발견했으며, 이 모든 버그가 확인되었고, 그 중 12개는 개발자들에 의해 수정되었습니다.
As quantum computing continually improves, ensuring the reliability and correctness of quantum libraries has become increasingly critical. To this end, many LLM-based fuzzing approaches towards quantum libraries have been proposed to uncover potential bugs. However, these methods still suffer from limitations such as insufficient flexibility and low efficiency, which hinder the progress of the quantum computing field. To address these challenges, we propose KQFuzz, a novel knowledge-guided fuzzer for quantum libraries. It leverages comprehensive codebase knowledge to ground LLM-based test generation, synergizing this with fitness-guided evaluation and two-level mutations to explore complex execution paths and trigger potential bugs. Firstly, KQFuzz introduces a novel prompting scheme tailored to quantum programs, which strategically incorporates knowledge of the codebase to efficiently generate high-quality quantum seed programs. Moreover, we develop evaluation and mutation strategies to handle the generated seed programs, facilitating efficient fuzzing execution while further enriching the diversity of the resulting test cases. We implement KQFuzz and conduct fuzzing on three popular quantum libraries, including Qiskit, PennyLane, and Cirq. Experimental results demonstrate that our approach significantly outperforms other state-of-the-art methods, with coverage improved by up to 18.44%. During the development of KQFuzz, we discovered 13 bugs, all of which have been confirmed and 12 have already been fixed by the developers.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.