Pith. sign in

REVIEW 2 cited by

CodeSAM: Source Code Representation Learning by Infusing Self-Attention with Multi-Code-View Graphs

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 2411.14611 v1 pith:7B4MHNKJ submitted 2024-11-21 cs.SE cs.LG

classification cs.SEcs.LG
keywords codecode-viewscodesamliketasksmodelssemanticsource
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Machine Learning (ML) for software engineering (SE) has gained prominence due to its ability to significantly enhance the performance of various SE applications. This progress is largely attributed to the development of generalizable source code representations that effectively capture the syntactic and semantic characteristics of code. In recent years, pre-trained transformer-based models, inspired by natural language processing (NLP), have shown remarkable success in SE tasks. However, source code contains structural and semantic properties embedded within its grammar, which can be extracted from structured code-views like the Abstract Syntax Tree (AST), Data-Flow Graph (DFG), and Control-Flow Graph (CFG). These code-views can complement NLP techniques, further improving SE tasks. Unfortunately, there are no flexible frameworks to infuse arbitrary code-views into existing transformer-based models effectively. Therefore, in this work, we propose CodeSAM, a novel scalable framework to infuse multiple code-views into transformer-based models by creating self-attention masks. We use CodeSAM to fine-tune a small language model (SLM) like CodeBERT on the downstream SE tasks of semantic code search, code clone detection, and program classification. Experimental results show that by using this technique, we improve downstream performance when compared to SLMs like GraphCodeBERT and CodeBERT on all three tasks by utilizing individual code-views or a combination of code-views during fine-tuning. We believe that these results are indicative that techniques like CodeSAM can help create compact yet performant code SLMs that fit in resource constrained settings.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

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

  1. Functional Consistency of LLM Code Embeddings: A Self-Evolving Data Synthesis Framework for Benchmarking

    cs.SE 2025-08 conditional novelty 6.0 of 10

    A data synthesis framework generates four syntax/semantics code pair types, and fine-tuning embedding models on the resulting datasets improves code clone detection, functional consistency, and retrieval.

  2. ATLAS: Multi-View Code Representation Tool for C and C++ Source Programs

    cs.SE 2025-12 conditional novelty 5.0 of 10

    ATLAS claims no-build aligned AST/CFG/DFG extraction for C/C++ at 96.8%/91.7% CFG correctness, and a 34.7-point LLM line-coverage lift when fed its CFG paths.

Pith tools