Specializing Neural Networks for Cryptographic Code Completion Applications

被引:2
|
作者
Xiao, Ya [1 ]
Song, Wenjia [1 ]
Qi, Jingyuan [1 ]
Viswanath, Bimal [1 ]
McDaniel, Patrick [2 ]
Yao, Danfeng [1 ]
机构
[1] Virginia Tech, Dept Comp Sci, Blacksburg, VA 24060 USA
[2] Univ Wisconsin Madison, Sch Comp Data & Informat Sci, Madison, WI 53715 USA
基金
美国国家科学基金会;
关键词
Codes; Neural networks; Cryptography; Task analysis; Operating systems; Context modeling; Mathematical models; API completion; neural networks; program dependencies;
D O I
10.1109/TSE.2023.3265362
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Similarities between natural languages and programming languages have prompted researchers to apply neural network models to software problems, such as code generation and repair. However, program-specific characteristics pose unique prediction challenges that require the design of new and specialized neural network solutions. In this work, we identify new prediction challenges in application programming interface (API) completion tasks and find that existing solutions are unable to capture complex program dependencies in program semantics and structures. We design a new neural network model Multi-HyLSTM to overcome the newly identified challenges and comprehend complex dependencies between API calls. Our neural network is empowered with a specialized dataflow analysis to extract multiple global API dependence paths for neural network predictions. We evaluate Multi-HyLSTM on 64,478 Android Apps and predict 774,460 Java cryptographic API calls that are usually challenging for developers to use correctly. Our Multi-HyLSTM achieves an excellent top-1 API completion accuracy at 98.99%. Moreover, we show the effectiveness of our design choices through an ablation study and have released our dataset.
引用
收藏
页码:3524 / 3535
页数:12
相关论文
共 50 条
  • [1] Code Completion with Neural Attention and Pointer Networks
    Li, Jian
    Wang, Yue
    Lyu, Michael R.
    King, Irwin
    PROCEEDINGS OF THE TWENTY-SEVENTH INTERNATIONAL JOINT CONFERENCE ON ARTIFICIAL INTELLIGENCE, 2018, : 4159 - 4165
  • [2] Intelligent Code Completion with Bayesian Networks
    Proksch, Sebastian
    Lerch, Johannes
    Mezini, Mira
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2015, 25 (01)
  • [3] Specializing CGRAs for Light-Weight Convolutional Neural Networks
    Lee, Jungi
    Lee, Jongeun
    IEEE TRANSACTIONS ON COMPUTER-AIDED DESIGN OF INTEGRATED CIRCUITS AND SYSTEMS, 2022, 41 (10) : 3387 - 3399
  • [4] Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems
    Sun, Zhensu
    Du, Xiaoning
    Song, Fu
    Wang, Shangwen
    Ni, Mingze
    Li, Li
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS, ICSE-COMPANION, 2023, : 324 - 325
  • [5] Don't Complete It! Preventing Unhelpful Code Completion for Productive and Sustainable Neural Code Completion Systems
    Sun, Zhensu
    Du, Xiaoning
    Song, Fu
    Wang, Shangwen
    Ni, Mingze
    Li, Li
    Lo, David
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2025, 34 (01)
  • [6] DELPHI: A Cryptographic Inference Service for Neural Networks
    Mishra, Pratyush
    Lehmkuhl, Ryan
    Srinivasan, Akshayaram
    Zheng, Wenting
    Popa, Raluca Ada
    PROCEEDINGS OF THE 29TH USENIX SECURITY SYMPOSIUM, 2020, : 2505 - 2522
  • [7] Cryptographic Turbo Code for Image Transmission over Mobile Networks
    Sawant, Vidya
    Bhise, Archana
    2016 INTERNATIONAL CONFERENCE ON ADVANCES IN COMPUTING, COMMUNICATIONS AND INFORMATICS (ICACCI), 2016, : 844 - 850
  • [8] A methodology for refined evaluation of neural code completion approaches
    Le, Kim Tuyen
    Rashidi, Gabriel
    Andrzejak, Artur
    DATA MINING AND KNOWLEDGE DISCOVERY, 2023, 37 (01) : 167 - 204
  • [9] A methodology for refined evaluation of neural code completion approaches
    Kim Tuyen Le
    Gabriel Rashidi
    Artur Andrzejak
    Data Mining and Knowledge Discovery, 2023, 37 : 167 - 204
  • [10] Fast and Memory-Efficient Neural Code Completion
    Svyatkovskiy, Alexey
    Lee, Sebastian
    Hadjitofi, Anna
    Riechert, Maik
    Franco, Juliana Vicente
    Allamanis, Miltiadis
    2021 IEEE/ACM 18TH INTERNATIONAL CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2021), 2021, : 329 - 340