About | Contact Us | Register | Login
ProceedingsSeriesJournalsSearchEAI
Collaborative Computing: Networking, Applications and Worksharing. 19th EAI International Conference, CollaborateCom 2023, Corfu Island, Greece, October 4-6, 2023, Proceedings, Part II

Research Article

Improving Code Representation Learning via Multi-view Contrastive Graph Pooling for Abstract Syntax Tree

Cite
BibTeX Plain Text
  • @INPROCEEDINGS{10.1007/978-3-031-54528-3_14,
        author={Ruoting Wu and Yuxin Zhang and Liang Chen},
        title={Improving Code Representation Learning via Multi-view Contrastive Graph Pooling for Abstract Syntax Tree},
        proceedings={Collaborative Computing: Networking, Applications and Worksharing. 19th EAI International Conference, CollaborateCom 2023, Corfu Island, Greece, October 4-6, 2023, Proceedings, Part II},
        proceedings_a={COLLABORATECOM PART 2},
        year={2024},
        month={2},
        keywords={Code Representation Learning Graph Pooling Graph Neural Networks},
        doi={10.1007/978-3-031-54528-3_14}
    }
    
  • Ruoting Wu
    Yuxin Zhang
    Liang Chen
    Year: 2024
    Improving Code Representation Learning via Multi-view Contrastive Graph Pooling for Abstract Syntax Tree
    COLLABORATECOM PART 2
    Springer
    DOI: 10.1007/978-3-031-54528-3_14
Ruoting Wu1, Yuxin Zhang1, Liang Chen1,*
  • 1: School of Computer Science
*Contact email: chenliang6@mail.sysu.edu.cn

Abstract

As the field of code intelligence continues to grow, Code representation learning has emerged as a research hot spot. Given that code structure can be naturally represented as graphs, Graph Neural Networks (GNNs) have proven highly effective for learning graph representations of source code. Pooling, as an essential operation for GNN-based models, is limited in its ability to leverage the rich hierarchical information presented in tree-like graph, especially Abstract Syntax Trees. In order to learn the graph representation of code more effectively, we propose a novel pooling method called TreePool. TreePool directly splits tree-like graphs using depth filtering based on the tree structure to form a sequence of pooled graphs sorted by descending size of subgraphs. Then local-local contrastive learning between these neighboring subgraphs is conducted to preserve the information of the graph before pooling. Through TreePool, multiple views of representation are learned and fused to obtain the final code graph representation. We conduct TreePool on a supervised framework and experimental results demonstrate that the average improvements on two real-world datasets in terms of accuracy are 1.1% and 3.3%. It also exhibits excellent performance in an unsupervised framework. Our results show that TreePool can effectively learn meaningful Abstract Syntax Tree representation of code and exhibit good performance in code classification tasks.

Keywords
Code Representation Learning Graph Pooling Graph Neural Networks
Published
2024-02-23
Appears in
SpringerLink
http://dx.doi.org/10.1007/978-3-031-54528-3_14
Copyright © 2023–2025 ICST
EBSCOProQuestDBLPDOAJPortico
EAI Logo

About EAI

  • Who We Are
  • Leadership
  • Research Areas
  • Partners
  • Media Center

Community

  • Membership
  • Conference
  • Recognition
  • Sponsor Us

Publish with EAI

  • Publishing
  • Journals
  • Proceedings
  • Books
  • EUDL