code2seq: Generating Sequences from Structured Representations of Code
The ability to generate natural language sequences from source code snippets has a variety of applications such as code summarization, documentation, and retrieval. Sequence-to-sequence (seq2seq) models, adopted from neural machine translation (NMT), have achieved state-of-the-art performance on these tasks by treating source code as a sequence of tokens. We present ${\rm {\scriptsize CODE2SEQ}}$: an alternative approach that leverages the syntactic structure of programming languages to better encode source code. Our model represents a code snippet as the set of compositional paths in its abstract syntax tree (AST) and uses attention to select the relevant paths while decoding. We demonstrate the effectiveness of our approach for two tasks, two programming languages, and four datasets of up to $16$M examples. Our model significantly outperforms previous models that were specifically designed for programming languages, as well as state-of-the-art NMT models. An interactive online demo of our model is available at http://code2seq.org. Our code, data and trained models are available at http://github.com/tech-srl/code2seq.
Code (6)
Tasks
Code SummarizationNMTRetrievalSource Code SummarizationTranslationSimilar Papers 제목 키워드 기반
Prompting for Numerical Sequences: A Case Study on Market Comment Generation
Large language models (LLMs) have been applied to a wide range of data-to-text generation tasks, including tables, graphs, and time-series numerical data-to-text settings. While research on generating prompts for structu…
Comment GenerationData-to-Text GenerationText GenerationTime SeriesCAT: Beyond Efficient Transformer for Content-Aware Anomaly Detection in Event Sequences
It is critical and important to detect anomalies in event sequences,which becomes widely available in many application domains.In-deed,various efforts have been made to capture abnormal patterns from event sequences thro…
Anomaly DetectionDecoderAligning Actions and Walking to LLM-Generated Textual Descriptions
Large Language Models (LLMs) have demonstrated remarkable capabilities in various domains, including data augmentation and synthetic data generation. This work explores the use of LLMs to generate rich textual descriptio…
Action RecognitionData AugmentationSynthetic Data GenerationMAGMA: Music Aligned Generative Motion Autodecoder
Mapping music to dance is a challenging problem that requires spatial and temporal coherence along with a continual synchronization with the music's progression. Taking inspiration from large language models, we introduc…
Audio CompressionDecoderMotion GenerationDiffusionPhase: Motion Diffusion in Frequency Domain
In this study, we introduce a learning-based method for generating high-quality human motion sequences from text descriptions (e.g., ``A person walks forward"). Existing techniques struggle with motion diversity and smoo…
DiversityMotion Generation