Embedding Code Contexts for Cryptographic API Suggestion:New Methodologies and Comparisons
Not on the map. Why?
Abstract (arXiv)
Despite recent research efforts, the vision of automatic code generation through API recommendation has not been realized. Accuracy and expressiveness challenges of API recommendation needs to be systematically addressed. We present a new neural network-based approach, Multi-HyLSTM for API recommendation --targeting cryptography-related code. Multi-HyLSTM leverages program analysis to guide the API embedding and recommendation. By analyzing the data dependence paths of API methods, we train embedding and specialize a multi-path neural network architecture for API recommendation tasks that accurately predict the next API method call. We address two previously unreported programming language-specific challenges, differentiating functionally similar APIs and capturing low-frequency long-range influences. Our results confirm the effectiveness of our design choices, including program-analysis-guided embedding, multi-path code suggestion architecture, and low-frequency long-range-enhanced sequence learning, with high accuracy on top-1 recommendations. We achieve a top-1 accuracy of 91.41% compared with 77.44% from the state-of-the-art tool SLANG. In an analysis of 245 test cases, compared with the commercial tool Codota, we achieve a top-1 recommendation accuracy of 88.98%, which is significantly better than Codota's accuracy of 64.90%. We publish our data and code as a large Java cryptographic code dataset.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 23 of its 55 references that are in the map. First posted on arXiv 15 Mar 2021.
Builds on
23 of 55 references.
References · 23
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,346
- 2013Distributed Representations of Words and Phrases and their Compositionalitycited by 3,462
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2020IntelliCode Compose: Code Generation Using Transformercited by 225
- 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 220
- 2018SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repaircited by 144
- 2020You Autocomplete Me: Poisoning Vulnerabilities in Neural Code Completioncited by 112
- 2017Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detectioncited by 65
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2019Pythia: AI-assisted Code Completion Systemcited by 54
11 more
- 2016Deep API Learningcited by 41
- 2015On the "Naturalness" of Buggy Codecited by 35
- 2018Automated software vulnerability detection with machine learningcited by 34
- 2020Generating Accurate Assert Statements for Unit Test Cases using Pretrained Transformerscited by 30
- 2016Automated Correction for Syntax Errors in Programming Assignments using Recurrent Neural Networkscited by 13
- 2018CryptoGuard: High Precision Detection of Cryptographic Vulnerabilities in Massive-sized Java Projectscited by 8
- 2018Code Vectors: Understanding Programs Through Embedded Abstracted Symbolic Tracescited by 7
- 2019SAR: Learning Cross-Language API Mappings with Little Knowledgecited by 5
- 2017Secure Coding Practices in Java: Challenges and Vulnerabilitiescited by 4
- 2015Learning API Usages from Bytecode: A Statistical Approachcited by 3
- 2019How Reliable is the Crowdsourced Knowledge of Security Implementation?cited by 2
Built on by
Not cited yet.