Deep Learning Type Inference

被引:116
|
作者
Hellendoorn, Vincent J. [1 ]
Bird, Christian [2 ]
Barr, Earl T. [3 ]
Allamanis, Miltiadis [4 ]
机构
[1] Univ Calif Davis, Davis, CA 95616 USA
[2] Microsoft Res, Redmond, WA USA
[3] UCL, London, England
[4] Microsoft Res Cambridge, Cambridge, England
基金
美国国家科学基金会; 英国工程与自然科学研究理事会;
关键词
Type Inference; Deep Learning; Naturalness;
D O I
10.1145/3236024.3236051
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Dynamically typed languages such as JavaScript and Python are increasingly popular, yet static typing has not been totally eclipsed: Python now supports type annotations and languages like Type-Script offer a middle-ground for JavaScript: a strict superset of JavaScript, to which it transpiles, coupled with a type system that permits partially typed programs. However, static typing has a cost: adding annotations, reading the added syntax, and wrestling with the type system to fix type errors. Type inference can ease the transition to more statically typed code and unlock the benefits of richer compile-time information, but is limited in languages like JavaScript as it cannot soundly handle duck-typing or runtime evaluation via eval. We propose DEEPTYPER, a deep learning model that understands which types naturally occur in certain contexts and relations and can provide type suggestions, which can often be verified by the type checker, even if it could not infer the type initially. DEEPTYPER, leverages an automatically aligned corpus of tokens and types to accurately predict thousands of variable and function type annotations. Furthermore, we demonstrate that context is key in accurately assigning these types and introduce a technique to reduce overfitting on local cues while highlighting the need for further improvements. Finally, we show that our model can interact with a compiler to provide more than 4,000 additional type annotations with over 95% precision that could not be inferred without the aid of DEEPTYPER.
引用
收藏
页码:152 / 162
页数:11
相关论文
共 50 条
  • [41] Multimodal Deep Learning with Boosted Trees for Edge Inference
    Chong, Penny
    Wynter, Laura
    Chaudhury, Bharathi
    2023 23RD IEEE INTERNATIONAL CONFERENCE ON DATA MINING WORKSHOPS, ICDMW 2023, 2023, : 99 - 108
  • [42] Efficient Deep Learning Algorithm with Accelerating Inference Strategy
    Wang, Junjie
    Zhang, Xiaolong
    ADVANCED DATA MINING AND APPLICATIONS, ADMA 2014, 2014, 8933 : 394 - 405
  • [43] Deep Learning Inference on Edge: A Preliminary Device Comparison
    Gonzalez, Manuel L.
    Ruiz, Jorge
    Andres, Lidia
    Lozada, Randy
    Skibinsky, Erik S.
    Fernandez, Jorge
    Sedano, Javier
    Garcia-Vico, Angel M.
    INTELLIGENT DATA ENGINEERING AND AUTOMATED LEARNING - IDEAL 2024, PT I, 2025, 15346 : 265 - 276
  • [44] Asteroseismic inference of subgiant evolutionary parameters with deep learning
    Hon, Marc
    Bellinger, Earl P.
    Hekker, Saskia
    Stello, Dennis
    Kuszlewicz, James S.
    MONTHLY NOTICES OF THE ROYAL ASTRONOMICAL SOCIETY, 2020, 499 (02) : 2445 - 2461
  • [45] Efficient Architecture Paradigm for Deep Learning Inference as a Service
    Yu, Jin
    Ke, Xiaopeng
    Xu, Fengyuan
    Huang, Hao
    2020 IEEE 39TH INTERNATIONAL PERFORMANCE COMPUTING AND COMMUNICATIONS CONFERENCE (IPCCC), 2020,
  • [46] A Deep Learning Approach to Sensor Fusion Inference at the Edge
    Becnel, T.
    Gaillardon, P-E
    PROCEEDINGS OF THE 2021 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE & EXHIBITION (DATE 2021), 2021, : 1420 - 1425
  • [47] Performance Evaluation of Deep Learning Compilers for Edge Inference
    Verma, Gaurav
    Gupta, Yashi
    Malik, Abid M.
    Chapman, Barbara
    2021 IEEE INTERNATIONAL PARALLEL AND DISTRIBUTED PROCESSING SYMPOSIUM WORKSHOPS (IPDPSW), 2021, : 858 - 865
  • [48] Efficient Deep Learning Inference based on Model Compression
    Zhang, Qing
    Zhang, Mengru
    Wang, Mengdi
    Sui, Wanchen
    Meng, Chen
    Yang, Jun
    Kong, Weidan
    Cui, Xiaoyuan
    Lin, Wei
    PROCEEDINGS 2018 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION WORKSHOPS (CVPRW), 2018, : 1776 - 1783
  • [49] Deep Learning in Gene Regulatory Network Inference: A Survey
    Dong, Jiayi
    Li, Jiahao
    Wang, Fei
    IEEE-ACM TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, 2024, 21 (06) : 2089 - 2101
  • [50] Evaluating Deep Learning Techniques for Natural Language Inference
    Eleftheriadis, Petros
    Perikos, Isidoros
    Hatzilygeroudis, Ioannis
    APPLIED SCIENCES-BASEL, 2023, 13 (04):