Multi-level Alignment Pretraining for Multi-lingual Semantic Parsing
4069Authors
nan
Abstract
AbstractIn this paper, we present a multi-level alignment pretraining method in a unified architecture formulti-lingual semantic parsing. In this architecture, we use an adversarial training method toalign the space of different languages and use sentence level and word level parallel corpus assupervision information to align the semantic of different languages. Finally, we jointly train themulti-level alignment and semantic parsing tasks. We conduct experiments on a publicly avail-able multi-lingual semantic parsing dataset ATIS and a newly constructed dataset. Experimentalresults show that our model outperforms state-of-the-art methods on both datasets.
Keywords
Full Content
Proceedings of the 28th International Conference on Computational Linguistics, pages 316–327 Barcelona, Spain (Online), December 8-13, 2020 316 Pointing to Subwords for Generating Function Names in Source Code Shogo Fujita1, Hidetaka Kamigaito1, Hiroya Takamura1,2 and Manabu Okumura1 1Tokyo Institute of Technology 2National Institute of Advanced Industrial Science and Technology (AIST) {fujisyo,kamigaito,oku}@lr.pi.titech.ac.jp takamura@pi.titech.ac.jp Abstract We tackle the task of automatically generating a function name from source code. Existing generators face difficulties in generating low-frequency or out-of-vocabulary subwords. In this paper, we propose two strategies for copying low-frequency or out-of-vocabulary subwords in inputs. Our best performing model showed an improvement over the conventional method in terms of our modified F1 and accuracy on the Java-small and Java-large datasets. 1 Introduction Programmers often share source code on sharing services such as GitHub.1 Since they can freely define function names in the source code, the names are not necessarily reminiscent of the actual behavior of the functions. For example, the function in Figure 1 returns the index of elem whose elem.key is the same as target key. However, the function name would be inappropriate as it implies that the function returns the value of the object. Such a function name adversely affects readability and sometimes causes bugs, especially in collaborative environments. A proper function name such as indexOfTarget in this case, instead of getTargetValue, can help programmers understand the code efficiently and avoid possible bugs (Takang et al., 1996; Binkley et al., 2013). Automatically generating such function names has been studied as a generation task in natural language processing (Iyer et al., 2016). Figure 1: Example of a function and its inappropriate name. (Java) Recently, various neural network-based approaches have been proposed to solve this problem by gen- erating a function name from given source code (Allamanis et al., 2016; Alon et al., 2018; Fernandes et al., 2018). In these approaches, a function name is treated as a sequence of subwords (get, Target and Value in Figure 1). Since these approaches heavily rely on a subword-based predefined dictio- nary to generate a function name, it is difficult to generate a function name containing low-frequency or unknown subwords. To solve this problem, we propose a method for outputting low-frequency or unknown words using a copy mechanism corresponding to a tree structure, and a method for replacing a specific word with a special token. We extend code2seq (Alon et al., 2019a) by using these methods. Code2seq converts source code into an tree-structured representation, called Abstract Syntax Tree (AST), before encoding. 1https://github.com This work is licensed under a Creative Commons Attribution 4.0 International Licence. Licence details: http:// creativecommons.org/licenses/by/4.0/. 317 target_key index IfStmt Block Stmt Unary Expr:pos increment Enc(subwords1) Enc(subwords2) Bi-LSTM Method Declaration Int parameter METHOD NAME BlockStmt Expression Stmt Expression Stmt Return Stmt Variable Declaration Expr Object Variable Declaration Field Access Expr Block Stmt AST Encoder Output(t-2) Output(t-1) index Of Output(t-1) target Decoder Unary Expr:pos increment index IfStmt Block Stmt Binary Expr:equals target_key Field Access Expr Binary Expr:equals index target_key target key Copy LSTM Copy-Dist Figure 2: …
Content truncated to 500 words
Labeled Text
AbstractIn this paper, we present a multi-level alignment pretraining method in a unified architecture formulti-lingual semantic parsing. In this architecture, we use an adversarial training method toalign the space of different languages and use sentence level and word level parallel corpus assupervision information to align the semantic of different languages. Finally, we jointly train themulti-level alignment and semantic parsing tasks. We conduct experiments on a publicly avail-able multi-lingual semantic parsing dataset ATIS and a newly constructed dataset. Experimentalresults show that our model outperforms state-of-the-art methods on both datasets.
Publication Details
- Paper ID:
- 4069
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan