Student or educator? Sign up with your school email and get 6 months of Pro free.
Cited by 385

The DOI matches its Crossref record; 11 of the 11 references it cites were found in a registry or an index.

Improving automatic source code summarization via deep reinforcement learning

Open access
Wan, Yao, Zhao, Zhou, Yang, Min, Xu, Guandong, Ying, Haochao, Wu, Jian, Yu, Philip S.·2018·Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering

Abstract

Code summarization provides a high level natural language description of the function performed by code, as it can benefit the software maintenance, code categorization and retrieval. To the best of our knowledge, most state-of-the-art approaches follow an encoder-decoder framework which encodes the code into a hidden space and then decode it into natural language space, suffering from two major drawbacks: a) Their encoders only consider the sequential content of code, ignoring the tree structure which is also critical for the task of code summarization; b) Their decoders are typically trained to predict the next word by maximizing the likelihood of next ground-truth word with previous ground-truth word given. However, it is expected to generate the entire sequence from scratch at test time. This discrepancy can cause an exposure bias issue, making the learnt decoder suboptimal. In this paper, we incorporate an abstract syntax tree structure as well as sequential content of code snippets into a deep reinforcement learning framework (i.e., actor-critic network). The actor network provides the confidence of predicting the next word according to current state. On the other hand, the critic network evaluates the reward value of all possible extensions of the current state and can provide global guidance for explorations. We employ an advantage reward composed of BLEU metric to train both networks. Comprehensive experiments on a real-world dataset show the effectiveness of our proposed model when compared with some state-of-the-art methods.

Overview

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

Crossref · 10.1145/3238147.3238206

Cites

11 of 11 references verified0 citation errors · 0 not checkable

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cites

Show all 11 references

Research works printed but not linked: 39

  1. A. V Aho , R. Sethi , and J. D Ullman . 1986 . Compilers, Principles , Techniques. Addison Wesley 7 , 8 (1986), 9 . A. V Aho, R. Sethi, and J. D Ullman. 1986. Compilers, Principles, Techniques. Addison Wesley 7, 8 (1986), 9.
  2. M. Allamanis , H. Peng , and C. Sutton . 2016. A convolutional attention network for extreme summarization of source code . In International Conference on Machine Learning. 2091–2100 . M. Allamanis, H. Peng, and C. Sutton. 2016. A convolutional attention network for extreme summarization of source code. In International Conference on Machine Learning. 2091–2100.
  3. M. Allamanis , D. Tarlow , A. Gordon , and Y. Wei . 2015. Bimodal modelling of source code and natural language . In International Conference on Machine Learning. 2123–2132 . M. Allamanis, D. Tarlow, A. Gordon, and Y. Wei. 2015. Bimodal modelling of source code and natural language. In International Conference on Machine Learning. 2123–2132.
  4. D. Bahdanau K. Cho and Y. Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 (2014). D. Bahdanau K. Cho and Y. Bengio. 2014. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473 (2014). · arXiv
  5. A. V. M. Barone and R. Sennrich. 2017. A parallel corpus of Python functions and documentation strings for automated code documentation and code generation. arXiv preprint arXiv:1707.02275 (2017). A. V. M. Barone and R. Sennrich. 2017. A parallel corpus of Python functions and documentation strings for automated code documentation and code generation. arXiv preprint arXiv:1707.02275 (2017). · arXiv
  6. I. D. Baxter , A. Yahin , L. Moura , M. Sant’Anna , and L. Bier . 1998. Clone detection using abstract syntax trees . In Software Maintenance, 1998. Proceedings., International Conference on. IEEE, 368–377 . I. D. Baxter, A. Yahin, L. Moura, M. Sant’Anna, and L. Bier. 1998. Clone detection using abstract syntax trees. In Software Maintenance, 1998. Proceedings., International Conference on. IEEE, 368–377.
  7. H. K. Dam T. Tran and T. Pham. 2016. A deep language model for software code. arXiv preprint arXiv:1608.02715 (2016). H. K. Dam T. Tran and T. Pham. 2016. A deep language model for software code. arXiv preprint arXiv:1608.02715 (2016). · arXiv
  8. 10.1145/1085313.1085331 · DOI · Paper page
  9. J. Duchi , E. Hazan , and Y. Singer . 2011 . Adaptive subgradient methods for online learning and stochastic optimization . Journal of Machine Learning Research 12 , Jul (2011), 2121 – 2159 . J. Duchi, E. Hazan, and Y. Singer. 2011. Adaptive subgradient methods for online learning and stochastic optimization. Journal of Machine Learning Research 12, Jul (2011), 2121–2159.
  10. A. Eriguchi K. Hashimoto and Y. Tsuruoka. 2016. Tree-to-sequence attentional neural machine translation. arXiv preprint arXiv:1603.06075 (2016). A. Eriguchi K. Hashimoto and Y. Tsuruoka. 2016. Tree-to-sequence attentional neural machine translation. arXiv preprint arXiv:1603.06075 (2016). · DOI · Paper page
  11. 10.1145/2950290.2950334 · DOI · Paper page
  12. S. Iyer I. Konstas A. Cheung and L. Zettlemoyer. 2016. Summarizing Source Code using a Neural Attention Model.. In ACL (1). S. Iyer I. Konstas A. Cheung and L. Zettlemoyer. 2016. Summarizing Source Code using a Neural Attention Model.. In ACL (1). · DOI · Paper page
  13. 10.1023/B:LIDA.0000048322.42751.ca · DOI
  14. M. Kilickaya A. Erdem N. Ikizler-Cinbis and E. Erdem. 2016. Re-evaluating automatic metrics for image captioning. arXiv preprint arXiv:1612.07600 (2016). M. Kilickaya A. Erdem N. Ikizler-Cinbis and E. Erdem. 2016. Re-evaluating automatic metrics for image captioning. arXiv preprint arXiv:1612.07600 (2016). · DOI
  15. V. R. Konda and J. N. Tsitsiklis. 2000. Actor-critic algorithms. In Advances in neural information processing systems. 1008–1014. V. R. Konda and J. N. Tsitsiklis. 2000. Actor-critic algorithms. In Advances in neural information processing systems. 1008–1014.
  16. J. Li W. Monroe A. Ritter M. Galley J. Gao and D. Jurafsky. 2016. Deep reinforcement learning for dialogue generation. arXiv preprint arXiv:1606.01541 (2016). J. Li W. Monroe A. Ritter M. Galley J. Gao and D. Jurafsky. 2016. Deep reinforcement learning for dialogue generation. arXiv preprint arXiv:1606.01541 (2016). · DOI · Paper page
  17. Y. Li D. Tarlow M. Brockschmidt and R. Zemel. 2015. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493 (2015). Y. Li D. Tarlow M. Brockschmidt and R. Zemel. 2015. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493 (2015). · arXiv
  18. C. Y. Lin . 2004 . Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out (2004). C. Y. Lin. 2004. Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out (2004).
  19. C. Maddison and D. Tarlow . 2014. Structured generative models of natural source code . In International Conference on Machine Learning. 649–657 . C. Maddison and D. Tarlow. 2014. Structured generative models of natural source code. In International Conference on Machine Learning. 649–657.
  20. R. C Martin. 2009. Clean code: a handbook of agile software craftsmanship. Pearson Education. R. C Martin. 2009. Clean code: a handbook of agile software craftsmanship. Pearson Education.
  21. A. Mnih and Y. W. Teh. 2012. A fast and simple algorithm for training neural probabilistic language models. arXiv preprint arXiv:1206.6426 (2012). A. Mnih and Y. W. Teh. 2012. A fast and simple algorithm for training neural probabilistic language models. arXiv preprint arXiv:1206.6426 (2012). · arXiv
  22. V. Mnih K. Kavukcuoglu D. Silver A. A. Rusu J. Veness M. G. Bellemare A. Graves M. Riedmiller A. K. Fidjeland G. Ostrovski etal 2015. Human-level control through deep reinforcement learning. Nature 518 7540 (2015) 529–533. V. Mnih K. Kavukcuoglu D. Silver A. A. Rusu J. Veness M. G. Bellemare A. Graves M. Riedmiller A. K. Fidjeland G. Ostrovski et al. 2015. Human-level control through deep reinforcement learning. Nature 518 7540 (2015) 529–533. · DOI · Paper page
  23. L. Mou , G. Li , L. Zhang , T. Wang , and Z. Jin . 2016 . Convolutional Neural Networks over Tree Structures for Programming Language Processing .. In AAAI , Vol. 2. 4 . L. Mou, G. Li, L. Zhang, T. Wang, and Z. Jin. 2016. Convolutional Neural Networks over Tree Structures for Programming Language Processing.. In AAAI, Vol. 2. 4.
  24. 10.1109/ICSE-C.2017.118 · DOI
  25. 10.1109/TSC.2016.2560165 · DOI
  26. Y. Oda , H. Fudaba , G. Neubig , H. Hata , S. Sakti , T. Toda , and S. Nakamura . 2015. Learning to generate pseudo-code from source code using statistical machine translation (t) . In Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on. IEEE, 574–584 . Y. Oda, H. Fudaba, G. Neubig, H. Hata, S. Sakti, T. Toda, and S. Nakamura. 2015. Learning to generate pseudo-code from source code using statistical machine translation (t). In Automated Software Engineering (ASE), 2015 30th IEEE/ACM International Conference on. IEEE, 574–584.
  27. E. Parisotto A. Mohamed R. Singh L. Li D. Zhou and P. Kohli. 2016. Neurosymbolic program synthesis. arXiv preprint arXiv:1611.01855 (2016). E. Parisotto A. Mohamed R. Singh L. Li D. Zhou and P. Kohli. 2016. Neurosymbolic program synthesis. arXiv preprint arXiv:1611.01855 (2016). · arXiv
  28. C. Piech J. Huang A. Nguyen M. Phulsuksombati M. Sahami and L. Guibas. 2015. Learning program embeddings to propagate feedback on student code. arXiv preprint arXiv:1505.05969 (2015). C. Piech J. Huang A. Nguyen M. Phulsuksombati M. Sahami and L. Guibas. 2015. Learning program embeddings to propagate feedback on student code. arXiv preprint arXiv:1505.05969 (2015). · arXiv
  29. Z. Ren , X. Wang , N. Zhang , X. Lv , and L. J. Li . 2017 . Deep Reinforcement Learning-Based Image Captioning with Embedding Reward. In Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on. IEEE, 1151–1159 . Z. Ren, X. Wang, N. Zhang, X. Lv, and L. J. Li. 2017. Deep Reinforcement Learning-Based Image Captioning with Embedding Reward. In Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on. IEEE, 1151–1159.
  30. 10.1109/5.880083 · DOI · Paper page
  31. J. Schulman P. Moritz S. Levine M. Jordan and P. Abbeel. 2015. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438 (2015). J. Schulman P. Moritz S. Levine M. Jordan and P. Abbeel. 2015. Highdimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438 (2015). · arXiv
  32. I. Sutskever O. Vinyals and Q. V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems. 3104– 3112. I. Sutskever O. Vinyals and Q. V. Le. 2014. Sequence to sequence learning with neural networks. In Advances in neural information processing systems. 3104– 3112.
  33. R. S Sutton and A. G Barto . 1998. Introduction to reinforcement learning . Vol. 135 . MIT press Cambridge . R. S Sutton and A. G Barto. 1998. Introduction to reinforcement learning. Vol. 135. MIT press Cambridge.
  34. R. S Sutton D. A McAllester S. P Singh and Y. Mansour. 2000. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems. 1057–1063. R. S Sutton D. A McAllester S. P Singh and Y. Mansour. 2000. Policy gradient methods for reinforcement learning with function approximation. In Advances in neural information processing systems. 1057–1063.
  35. K. S. Tai R. Socher and C. D. Manning. 2015. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075 (2015). K. S. Tai R. Socher and C. D. Manning. 2015. Improved semantic representations from tree-structured long short-term memory networks. arXiv preprint arXiv:1503.00075 (2015). · arXiv
  36. R. Vedantam , C. Lawrence Zitnick , and D. Parikh . 2015. Cider: Consensus-based image description evaluation . In Proceedings of the IEEE conference on computer vision and pattern recognition. 4566–4575 . R. Vedantam, C. Lawrence Zitnick, and D. Parikh. 2015. Cider: Consensus-based image description evaluation. In Proceedings of the IEEE conference on computer vision and pattern recognition. 4566–4575.
  37. H. H. Wei and M. Li. 2017. Supervised Deep Features for Software Functional Clone Detection by Exploiting Lexical and Syntactical Information in Source Code. (2017). H. H. Wei and M. Li. 2017. Supervised Deep Features for Software Functional Clone Detection by Exploiting Lexical and Syntactical Information in Source Code. (2017). · DOI · Paper page
  38. R. J Williams . 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning . In Reinforcement Learning . Springer , 5–32. R. J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. In Reinforcement Learning. Springer, 5–32.
  39. 10.1145/2901739.2901767 · DOI

Cited by

Metadata

Authors
Wan, Y., Zhao, Z., Yang, M., Xu, G., Ying, H., Wu, J., & Yu, P. S.
Venue
Proceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering
Publisher
ACM
Published
2018-09-03
Pages
397-407
OpenAlex
W2888557792
Cited by
385
References
11
FWCI
27.51
Type
conference paper
Language
en
Open access
green

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.