mlsanityData to 14 Oct 2026

Implant Global and Local Hierarchy Information to Sequence based Code Representation Models

arXiv 2303.07826 ↗First posted 14 Mar 2023cs.SE cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

Source code representation with deep learning techniques is an important research field. There have been many studies that learn sequential or structural information for code representation. But sequence-based models and non-sequence-models both have their limitations. Researchers attempt to incorporate structural information to sequence-based models, but they only mine part of token-level hierarchical structure information. In this paper, we analyze how the complete hierarchical structure influences the tokens in code sequences and abstract this influence as a property of code tokens called hierarchical embedding. The hierarchical embedding is further divided into statement-level global hierarchy and token-level local hierarchy. Furthermore, we propose the Hierarchy Transformer (HiT), a simple but effective sequence model to incorporate the complete hierarchical embeddings of source code into a Transformer model. We demonstrate the effectiveness of hierarchical embedding on learning code structure with an experiment on variable scope detection task. Further evaluation shows that HiT outperforms SOTA baseline models and show stable training efficiency on three source code-related tasks involving classification and generation tasks across 8 different datasets.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 36 of its 49 references that are in the map. First posted on arXiv 14 Mar 2023.

Builds on

36 of 49 references.

References · 36

  1. 2017Attention Is All You Needcited by 60,361
  2. 2017Modeling Relational Data with Graph Convolutional Networkscited by 1,694
  3. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  4. 2015Pointer Networkscited by 895
  5. 2015Gated Graph Sequence Neural Networkscited by 796
  6. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  7. 2019CodeSearchNet Challenge: Evaluating the State of Semantic Code Searchcited by 654
  8. 2020On the Bottleneck of Graph Neural Networks and its Practical Implicationscited by 631
  9. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  10. 2020A Metric Learning Reality Checkcited by 321
  11. 2018code2vec: Learning Distributed Representations of Codecited by 250
  12. 2017A Survey of Machine Learning for Big Code and Naturalnesscited by 221
24 more
  1. 2017Learning to Represent Programs with Graphscited by 220
  2. 2021CodeNet: A Large-Scale AI for Code Dataset for Learning a Diversity of Coding Taskscited by 200
  3. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 179
  4. 2020A Transformer-based Approach for Source Code Summarizationcited by 133
  5. 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
  6. 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 91
  7. 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 77
  8. 2020Code Prediction by Feeding Trees to Transformerscited by 70
  9. 2020Detecting Code Clones with Graph Neural Networkand Flow-Augmented Abstract Syntax Treecited by 69
  10. 2021Language-Agnostic Representation Learning of Source Code from Structure and Contextcited by 63
  11. 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
  12. 2018Structured Neural Summarizationcited by 54
  13. 2023SkCoder: A Sketch-based Approach for Automatic Code Generationcited by 40
  14. 2022SPT-Code: Sequence-to-Sequence Pre-Training for Learning Source Code Representationscited by 36
  15. 2018Learning to Represent Editscited by 34
  16. 2020Exploring Software Naturalness through Neural Language Modelscited by 32
  17. 2018Aroma: Code Recommendation via Structural Code Searchcited by 29
  18. 2020Typilus: Neural Type Hintscited by 29
  19. 2020Learning Semantic Program Embeddings with Graph Interval Neural Networkcited by 20
  20. 2020TreeCaps: Tree-Based Capsule Networks for Source Code Processingcited by 16
  21. 2020Learning to Represent Programs with Heterogeneous Graphscited by 14
  22. 2020TAG : Type Auxiliary Guiding for Code Comment Generationcited by 8
  23. 2022Learning to Recommend Method Names with Global Contextcited by 6
  24. 2022Learning Program Representations with a Tree-Structured Transformercited by 6

Built on by

Cited by year

Citing papers per year: 2023: 1.

1 paper.