Pith. sign in

REVIEW 1 cited by

CSA-Trans: Code Structure Aware Transformer for AST

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2404.05767 v1 pith:ZQ4TFMHD submitted 2024-04-07 cs.SE cs.AI

classification cs.SEcs.AI
keywords codeattentionnodecsa-transstructuretransformerawaregenerate
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

When applying the Transformer architecture to source code, designing a good self-attention mechanism is critical as it affects how node relationship is extracted from the Abstract Syntax Trees (ASTs) of the source code. We present Code Structure Aware Transformer (CSA-Trans), which uses Code Structure Embedder (CSE) to generate specific PE for each node in AST. CSE generates node Positional Encoding (PE) using disentangled attention. To further extend the self-attention capability, we adopt Stochastic Block Model (SBM) attention. Our evaluation shows that our PE captures the relationships between AST nodes better than other graph-related PE techniques. We also show through quantitative and qualitative analysis that SBM attention is able to generate more node specific attention coefficients. We demonstrate that CSA-Trans outperforms 14 baselines in code summarization tasks for both Python and Java, while being 41.92% faster and 25.31% memory efficient in Java dataset compared to AST-Trans and SG-Trans respectively.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Seamlessly Integrating Tree-Based Positional Embeddings into Transformer Models for Source Code Representation

    cs.LG 2025-07 conditional novelty 4.0 of 10

    Adding depth and sibling-index embeddings from abstract syntax trees to CodeBERTa yields small gains on masked language modeling and clone detection, mainly with a weighted-sum integration.

Pith tools