paper-with-me

Papers

Understanding Long Programming Languages with Structure-Aware Sparse Attention

2022-05-27 · Tingting Liu, Chengyu Wang, Cen Chen, Ming Gao, Aoying Zhou

Programming-based Pre-trained Language Models (PPLMs) such as CodeBERT have achieved great success in many downstream code-related tasks. Since the memory and computational complexity of self-attention in the Transformer grow quadratically with the sequence length, PPLMs typically limit the code length to 512. However, codes in real-world applications are generally long, such as code searches, which cannot be processed efficiently by existing PPLMs. To solve this problem, in this paper, we present SASA, a Structure-Aware Sparse Attention mechanism, which reduces the complexity and improves performance for long code understanding tasks. The key components in SASA are top-$k$ sparse attention and Abstract Syntax Tree (AST)-based structure-aware attention. With top-$k$ sparse attention, the most crucial attention relation can be obtained with a lower computational cost. As the code structure represents the logic of the code statements, which is a complement to the code sequence characteristics, we further introduce AST structures into attention. Extensive experiments on CodeXGLUE tasks show that SASA achieves better performance than the competing baselines.

📄 PDF Abstract BibTeX arXiv:2205.13730

Code (1)

alibaba/EasyNLP 공식 구현 jax

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…

Similar Papers 제목 키워드 기반

Benchmarking Language Models for Code Syntax Understanding

2022-10-26 · Da Shen, Xinyun Chen, Chenguang Wang, Koushik Sen 외

Pre-trained language models have demonstrated impressive performance in both natural language processing and program understanding, which represent the input as a token sequence without explicitly modeling its structure.…

Benchmarking

Who Wins the Race? (R Vs Python) - An Exploratory Study on Energy Consumption of Machine Learning Algorithms

2025-08-24 · Rajrupa Chattaraj, Sridhar Chimalakonda, Vibhu Saujanya Sharma, Vikrant Kaulgud arxiv

The utilization of Machine Learning (ML) in contemporary software systems is extensive and continually expanding. However, its usage is energy-intensive, contributing to increased carbon emissions and demanding significa…

Language (Re)modelling: Towards Embodied Language Understanding

2020-05-01 · ACL 2020 6 · Ronen Tamari, Chen Shani, Tom Hope, Miriam R. L. Petruck 외

While natural language understanding (NLU) is advancing rapidly, today's technology differs from human-like language understanding in fundamental ways, notably in its inferior efficiency, interpretability, and generaliza…

Natural Language UnderstandingPosition

Scope is all you need: Transforming LLMs for HPC Code

2023-08-18 · Tal Kadosh, Niranjan Hasabnis, Vy A. Vo, Nadav Schneider 외

With easier access to powerful compute resources, there is a growing trend in the field of AI for software development to develop larger and larger language models (LLMs) to address a variety of programming tasks. Even L…

AllCode Completion

Perish or Flourish? A Holistic Evaluation of Large Language Models for Code Generation in Functional Programming

2026-01-05 · Nguyet-Anh H. Lang, Eric Lang, Thanh Le-Cong, Bach Le 외 arxiv

Functional programming provides strong foundations for developing reliable and secure software systems, yet its adoption remains not widespread due to the steep learning curve. Recent advances in Large Language Models (L…

Code Generation