CodeBERT 모델의 전이 학습 기반 코드 공통 취약점 탐색
Detecting Common Weakness Enumeration(CWE) Based on the Transfer Learning of CodeBERT Model
0
조회
0
다운로드
0
인용
0
참고문헌
키워드
초록
소프트웨어 공학 영역에 인공지능의 접목은 큰 화두 중 하나이다. 전 세계적으로 1) 인공지능을 통한 소프트웨어 공학, 2) 소프트웨어 공학을통한 인공지능 두 가지 방향으로 활발히 연구되고 있다. 그 중 소프트웨어 공학에 인공지능을 접목하여 나쁜 코드 영역을 식별하고 해당 부분을리팩토링하는 연구가 진행되고 있다. 해당 연구에서 인공지능이 나쁜 코드 요소의 패턴을 잘 학습하기 위해서는 학습하려는 나쁜 코드 요소가라벨링 된 데이터셋이 필요하다. 문제는 데이터셋이 부족할뿐더러, 자체적으로 수집한 데이터셋의 정확도는 신뢰할 수 없다. 이를 해결하기 위해코드 데이터 수집 시 전체 코드가 아닌 높은 복잡도를 가진 코드 모듈 영역을 대상으로만 나쁜 코드 데이터를 수집한다. 이후 수집한 데이터셋을CodeBERT 모델의 전이 학습하여 코드 공통 취약점을 탐색하는 방법을 제안한다. 해당 데이터셋을 통해 CodeBERT 모델이 코드의 공통 취약점패턴을 더 잘 학습할 수 있다. 이를 통해 전통적인 방법보다 인공지능 모델을 이용해 코드를 분석하고 공통 취약점 패턴을 더 정확하게 식별할수 있을 것으로 기대한다.
Abstract
Recently the incorporation of artificial intelligence approaches in the field of software engineering has been one of the big topics. In the world, there are actively studying in two directions: 1) software engineering for artificial intelligence and 2) artificial intelligencefor software engineering. We attempt to apply artificial intelligence to software engineering to identify and refactor bad code moduleareas. To learn the patterns of bad code elements well, we must have many datasets with bad code elements labeled correctly for artificialintelligence in this task. The current problems have insufficient datasets for learning and can not guarantee the accuracy of the datasetsthat we collected. To solve this problem, when collecting code data, bad code data is collected only for code module areas withhigh-complexity, not the entire code. We propose a method for exploring common weakness enumeration by learning the collected datasetbased on transfer learning of the CodeBERT model. The CodeBERT model learns the corresponding dataset more about common weaknesspatterns in code. With this approach, we expect to identify common weakness patterns more accurately better than one in traditionalsoftware engineering.
참고문헌 (21)
- A. D. Carleton, "The AI effect : Working at the Intersection of AI and SE", IEEE Software, 37(4), pp.26~35 (2020)
- 강건희, "Open Source 기반 툴 체인화를 통한 코드 정적 분석 연구", 정보과학회 컴퓨팅의 실제 논문지, 21(2), pp.148~153 (2015), 한국정보과학회
- H. Kwon, "Extracting use case design mechanisms via programming based on reverse engineering", International Journal of Applied Engineering Research, 10(90), pp.503~505 (2015)
- B. K. Park, "Code visualization for performance improvement of Java code for controlling smart traffic system in the smart city", Applied Sciences, 10(8) (2020)
- 정세준, "Automatic UML Design Extraction with Software Visualization based on Reverse Engineering", The International Journal of Advanced Smart Convergence, 10(3), pp.89~96 (2021), 한국인터넷방송통신학회[DOI]
- 이원영, "코드 가시화 툴체인 기반 UML 설계 추출 및 검증 사례", 인터넷정보학회논문지, 23(2), pp.79~86 (2022), 한국인터넷정보학회
- 박찬솔, "정적 코드 내부 정보의 테이블 정규화를 통한품질 메트릭 지표들의 가시화를 위한 추출 메커니즘", 정보처리학회 논문지, 12(5), pp.199~206 (2023), 한국정보처리학회
- T. Sharma, "A survey on machine learning techniques for source code analysis", arXiv preprint arXiv : 2110. 09610, ~ (2021)
- Halstead, "Elements of software science(Operating and programming systems series)" (1977), Elsevier Science Inc
- S. R. Chidamber, "A metrics suite for object oriented design", IEEE Transactions on Software Engineering, 20(6), pp.476~493 (1994)
- T. J. McCabe, "A complexity measure", IEEE Transactions on Software Engineering, 4, pp.308~320 (1976)
- M. Fowler, "Refactoring" (2018), Addison-Wesley Professional
- J. Devlin, "Bert : Pre-training of deep bidirectional transformers for language understanding", arXiv preprint arXiv : 1810. 04805, ~ (2018)
- A. Vaswani, "Attention is all you need", Advances in Neural Information Processing Systems, 30 (2017)
- Z. Feng, "Codebert : A pre-trained model for programming and natural languages", arXiv preprint arXiv : 2002. 08155, ~ (2020)
- "Common Weakness Enumeration"[URL]
- "PMD"[URL]
- C. S. Park, "Applied practice on identifying bad codes through supervised learning with bad code patterns", Proceedings of the 25th Korea Conference on Software Engineering, 25(1), pp.119~120 (2023)
- C. S. Park, "Tool Chain Mechanism with Identifying and Collecting High Quality Data for Learning Bad Code based on Code Visualization", 2023 Conference of KISM, 12(1), pp.52~53 (2023)
- N. Medeiros, "Software Metrics as Indicators of Security Vulnerabilities", 2017IEEE 28th International Symposium on Software Reliability Engineering (ISSRE), pp.216~227 (2017)
- "Juliet Java 1.3" (2017)[URL]
