![](bg8.png)
performance in our experiments. We demonstrated
that the achieved performance is similar to recent
work by other researchers while being less compu-
tationally intensive.
REFERENCES
Allamanis, M., Barr, E. T., Devanbu, P., and Sutton, C.
(2018). A survey of machine learning for big code
and naturalness. ACM Computing Surveys (CSUR),
51(4):1–37.
Allamanis, M., Barr, E. T., Ducousso, S., and Gao, Z.
(2020). Typilus: neural type hints. In Proceedings
of the 41st acm sigplan conference on programming
language design and implementation, pages 91–105.
Boone, C., de Bruin, N., Langerak, A., and Stelmach, F.
(2019). Dltpy: Deep learning type inference of python
function signatures using natural language context.
arXiv preprint arXiv:1912.00680.
Busbridge, D., Sherburn, D., Cavallo, P., and Hammerla,
N. Y. (2019). Relational graph attention networks.
arXiv preprint arXiv:1904.05811.
Collobert, R., Weston, J., Bottou, L., Karlen, M.,
Kavukcuoglu, K., and Kuksa, P. (2011). Natural
language processing (almost) from scratch. Journal
of machine learning research, 12(ARTICLE):2493–
2537.
Efstathiou, V. and Spinellis, D. (2019). Semantic source
code models using identifier embeddings. In 2019
IEEE/ACM 16th International Conference on Mining
Software Repositories (MSR), pages 29–33. IEEE.
Feng, Z., Guo, D., Tang, D., Duan, N., Feng, X., Gong,
M., Shou, L., Qin, B., Liu, T., Jiang, D., et al. (2020).
Codebert: A pre-trained model for programming and
natural languages. arXiv preprint arXiv:2002.08155.
Hellendoorn, V. J., Bird, C., Barr, E. T., and Allamanis, M.
(2018). Deep learning type inference. In Proceedings
of the 2018 26th acm joint meeting on european soft-
ware engineering conference and symposium on the
foundations of software engineering, pages 152–162.
Husain, H., Wu, H.-H., Gazit, T., Allamanis, M., and
Brockschmidt, M. (2019). Codesearchnet challenge:
Evaluating the state of semantic code search. arXiv
preprint arXiv:1909.09436.
Kanade, A., Maniatis, P., Balakrishnan, G., and Shi, K.
(2020). Learning and evaluating contextual embed-
ding of source code. In International Conference on
Machine Learning, pages 5110–5121. PMLR.
Malik, R. S., Patra, J., and Pradel, M. (2019). Nl2type:
inferring javascript function types from natural lan-
guage information. In 2019 IEEE/ACM 41st Inter-
national Conference on Software Engineering (ICSE),
pages 304–315. IEEE.
Pradel, M., Gousios, G., Liu, J., and Chandra, S. (2019).
Typewriter: Neural type prediction with search-based
validation. arXiv preprint arXiv:1912.03768.
Raychev, V., Bielik, P., and Vechev, M. (2016). Probabilistic
model for code with decision trees. ACM SIGPLAN
Notices, 51(10):731–747.
Raychev, V., Vechev, M., and Krause, A. (2015). Predicting
program properties from” big code”. ACM SIGPLAN
Notices, 50(1):111–124.
ˇ
Reh
˚
u
ˇ
rek, R. and Sojka, P. (2010). Software Framework
for Topic Modelling with Large Corpora. In Proceed-
ings of the LREC 2010 Workshop on New Challenges
for NLP Frameworks, pages 45–50, Valletta, Malta.
ELRA.
Romanov, V. (2020). Evaluating importance of edge types
when using graph neural network for predicting return
types of python functions. In Companion Proceedings
of the 2020 ACM SIGPLAN International Conference
on Systems, Programming, Languages, and Applica-
tions: Software for Humanity, pages 25–27.
Romanov, V., Ivanov, V., and Succi, G. (2020). Repre-
senting programs with dependency and function call
graphs for learning hierarchical embeddings. In ICEIS
(2), pages 360–366.
Schlichtkrull, M., Kipf, T. N., Bloem, P., Van Den Berg, R.,
Titov, I., and Welling, M. (2018). Modeling relational
data with graph convolutional networks. In European
Semantic Web Conference, pages 593–607. Springer.
Wei, J., Goyal, M., Durrett, G., and Dillig, I. (2020). Lamb-
danet: Probabilistic type inference using graph neural
networks. arXiv preprint arXiv:2005.02161.
Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., and Philip,
S. Y. (2020). A comprehensive survey on graph neural
networks. IEEE transactions on neural networks and
learning systems.
APPENDIX
Source Code for Illustrations
The examples on the Figures 1 and 2 were generated
using a small example presented in the Listing 1.
Prediction Examples
Figure 5 demonstrates a prediction example where a
model misjudged the type of arguments self and re-
sults. In Figures 6 and 7 the results of successful type
prediction are demonstrated.
List of Indexed Packages
absl-py, boto, cymem, h5py, jsonpatch, mkl-fft,
openstacksdk, pbr, pycrypto, pytest, Scrapy, term-
color, Werkzeug, ansible, catalogue, debtcollector,
httplib2, jsonpointer, mkl-random, opt-einsum,
Pillow, PyDispatcher, pytest-runner, service-identity,
testtools, wrapt, appdirs, certifi, decorator, hyperlink,
jsonschema, mkl-service, osc-lib, plac, PyHamcrest,
python-dateutil, shade, thinc, zipp, asn1crypto,
Predicting Type Annotations for Python using Embeddings from Graph Neural Networks
555