paper-with-me

홈 › Papers

Typilus: Neural Type Hints

2020-04-06 · Miltiadis Allamanis, Earl T. Barr, Soline Ducousso, Zheng Gao

Type inference over partial contexts in dynamically typed languages is challenging. In this work, we present a graph neural network model that predicts types by probabilistically reasoning over a program's structure, names, and patterns. The network uses deep similarity learning to learn a TypeSpace -- a continuous relaxation of the discrete space of types -- and how to embed the type properties of a symbol (i.e. identifier) into it. Importantly, our model can employ one-shot learning to predict an open vocabulary of types, including rare and user-defined ones. We realise our approach in Typilus for Python that combines the TypeSpace with an optional type checker. We show that Typilus accurately predicts types. Typilus confidently predicts types for 70% of all annotatable symbols; when it predicts a type, that type optionally type checks 95% of the time. Typilus can also find incorrect type annotations; two important and popular open source libraries, fairseq and allennlp, accepted our pull requests that fixed the annotation errors Typilus discovered.

📄 PDF Abstract BibTeX arXiv:2004.10657

Code (3)

typilus/typilus 공식 구현
JetBrains-Research/python-ml-type-hints
microsoft/ptgnn pytorch

Tasks

Graph Neural NetworkOne-Shot LearningVocal Bursts Type Prediction

Methods 이 논문이 사용한 방법론

Graph Neural Network 설명 없음

Similar Papers 제목 키워드 기반

Type4Py: Practical Deep Similarity Learning-Based Type Inference for Python

2021-01-12 · Amir M. Mir, Evaldas Latoskinas, Sebastian Proksch, Georgios Gousios

Dynamic languages, such as Python and Javascript, trade static typing for developer flexibility and productivity. Lack of static typing can cause run-time exceptions and is a major factor for weak IDE support. To allevia…

Type predictionVocal Bursts Type Prediction

Exploring How Multiple Levels of GPT-Generated Programming Hints Support or Disappoint Novices

2024-04-02 · Ruiwei Xiao, Xinying Hou, John Stamper

Recent studies have integrated large language models (LLMs) into diverse educational contexts, including providing adaptive programming hints, a type of feedback focuses on helping students move forward during problem-so…

PRUNING WITH HINTS: AN EFFICIENT FRAMEWORK FOR MODEL ACCELERATION

2019-05-01 · ICLR 2019 5 · Wei Gao, Yi Wei, Quanquan Li, Hongwei Qin 외

In this paper, we propose an efficient framework to accelerate convolutional neural networks. We utilize two types of acceleration methods: pruning and hints. Pruning can reduce model size by removing channels of layers.…

Pose Estimation

Ask Questions with Double Hints: Visual Question Generation with Answer-awareness and Region-reference

2024-07-06 · Kai Shen, Lingfei Wu, Siliang Tang, Fangli Xu 외

The visual question generation (VQG) task aims to generate human-like questions from an image and potentially other side information (e.g. answer type). Previous works on VQG fall in two aspects: i) They suffer from one …

Graph-to-SequenceImplicit RelationsQuestion GenerationQuestion-Generation

Learning to Generate Visual Questions with Noisy Supervision

2021-12-01 · NeurIPS 2021 12 · Shen Kai, Lingfei Wu, Siliang Tang, Yueting Zhuang 외

The task of visual question generation (VQG) aims to generate human-like neural questions from an image and potentially other side information (e.g., answer type or the answer itself). Existing works often suffer from th…

Question GenerationQuestion-GenerationWeakly-supervised Learning