This study presents a novel category of Transformer architectures known as comb transformers, which effectively reduce the space complexity of the self-attention layer from a quadratic to a subquadratic level. This is achieved by processing sequence segments independently and incorporating X -word embeddings to merge cross-segment information. The reduction in attention memory requirements enables the deployment of deeper architectures, potentially leading to more competitive outcomes. Furthermore, we design an abstract syntax tree (AST)-based code representation to effectively exploit comb transformer properties. To explore the potential of our approach, we develop nine specific instances based on three popular architectural concepts: funnel, hourglass, and encoder-decoder. These architectures are subsequently trained on three code-related tasks: method name generation, code search, and code summarization. These tasks encompass a range of capabilities: short/long sequence generation and classification. In addition to the proposed comb transformers, we also evaluate several baseline architectures for comparative analysis. Our findings demonstrate that the comb transformers match the performance of the baselines and frequently perform better.

CombTransformers: Statement-Wise Transformers for Statement-Wise Representations / F. Bertolotti, W. Cazzola. - In: IEEE TRANSACTIONS ON SOFTWARE ENGINEERING. - ISSN 0098-5589. - 49:10(2023 Oct), pp. 4677-4690. [10.1109/TSE.2023.3310793]

CombTransformers: Statement-Wise Transformers for Statement-Wise Representations

F. Bertolotti
Primo
;
W. Cazzola
Ultimo
2023

Abstract

This study presents a novel category of Transformer architectures known as comb transformers, which effectively reduce the space complexity of the self-attention layer from a quadratic to a subquadratic level. This is achieved by processing sequence segments independently and incorporating X -word embeddings to merge cross-segment information. The reduction in attention memory requirements enables the deployment of deeper architectures, potentially leading to more competitive outcomes. Furthermore, we design an abstract syntax tree (AST)-based code representation to effectively exploit comb transformer properties. To explore the potential of our approach, we develop nine specific instances based on three popular architectural concepts: funnel, hourglass, and encoder-decoder. These architectures are subsequently trained on three code-related tasks: method name generation, code search, and code summarization. These tasks encompass a range of capabilities: short/long sequence generation and classification. In addition to the proposed comb transformers, we also evaluate several baseline architectures for comparative analysis. Our findings demonstrate that the comb transformers match the performance of the baselines and frequently perform better.
No
English
Codes, Transformers, Task analysis, Computer architecture, Artificial neural networks, Documentation, Training
Settore INF/01 - Informatica
Articolo
Esperti anonimi
Pubblicazione scientifica
   Typeful Language Adaptation for Dynamic, Interacting and Evolving Systems
   T-LADIES
   MINISTERO DELL'ISTRUZIONE E DEL MERITO
   2020TL3X8X_001
ott-2023
6-set-2023
IEEE / Institute of Electrical and Electronics Engineers Incorporated
49
10
4677
4690
14
Pubblicato
Periodico con rilevanza internazionale
orcid
crossref
Aderisco
info:eu-repo/semantics/article
CombTransformers: Statement-Wise Transformers for Statement-Wise Representations / F. Bertolotti, W. Cazzola. - In: IEEE TRANSACTIONS ON SOFTWARE ENGINEERING. - ISSN 0098-5589. - 49:10(2023 Oct), pp. 4677-4690. [10.1109/TSE.2023.3310793]
open
Prodotti della ricerca::01 - Articolo su periodico
2
262
Article (author)
Periodico con Impact Factor
F. Bertolotti, W. Cazzola
File in questo prodotto:
File Dimensione Formato  
CombTransformers_Statement-Wise_Transformers_for_Statement-Wise_Representations.pdf

accesso aperto

Descrizione: Article
Tipologia: Publisher's version/PDF
Dimensione 1.65 MB
Formato Adobe PDF
1.65 MB Adobe PDF Visualizza/Apri
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/1021883
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 1
  • ???jsp.display-item.citation.isi??? 1
social impact