CLAIMay 30, 2022

Transformer with Tree-order Encoding for Neural Program Generation

arXiv:2206.13354v12 citationsh-index: 27Has Code
Originality Incremental advance
AI Analysis

This work addresses code generation for semantic parsing, but it is incremental as it builds on existing Transformer approaches without achieving new SOTA.

The paper tackled the problem of generating code using Transformers by extending positional encoding to incorporate hierarchical syntax information and using a grammar-based decoder, resulting in improved generation performance over sequential encodings, though it did not surpass state-of-the-art methods.

While a considerable amount of semantic parsing approaches have employed RNN architectures for code generation tasks, there have been only few attempts to investigate the applicability of Transformers for this task. Including hierarchical information of the underlying programming language syntax has proven to be effective for code generation. Since the positional encoding of the Transformer can only represent positions in a flat sequence, we have extended the encoding scheme to allow the attention mechanism to also attend over hierarchical positions in the input. Furthermore, we have realized a decoder based on a restrictive grammar graph model to improve the generation accuracy and ensure the well-formedness of the generated code. While we did not surpass the state of the art, our findings suggest that employing a tree-based positional encoding in combination with a shared natural-language subword vocabulary improves generation performance over sequential positional encodings.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes