Efficient Constituency Tree based Encoding for Natural Language to Bash Translation

21179

Authors

nan

Abstract

AbstractBash is a Unix command language used for interacting with the Operating System. Recent works on natural language to Bash translation have made significant advances, but none of the previous methods utilize the problem’s inherent structure. We identify this structure andpropose a Segmented Invocation Transformer (SIT) that utilizes the information from the constituency parse tree of the natural language text. Our method is motivated by the alignment between segments in the natural language text and Bash command components. Incorporating the structure in the modelling improves the performance of the model. Since such systems must be universally accessible, we benchmark the inference times on a CPU rather than a GPU. We observe a 1.8x improvement in the inference time and a 5x reduction in model parameters. Attribution analysis using Integrated Gradients reveals that the proposed method can capture the problem structure.

Keywords

nan

Full Content

Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 3159 - 3168 July 10-15, 2022 ©2022 Association for Computational Linguistics Efficient Constituency Tree based Encoding for Natural Language to Bash Translation Shikhar Bharadwaj and Shirish Shevade Department of Computer Science and Automation, Indian Institute of Science, Bangalore, KA 560012, India {shikharb,shirish}@iisc.ac.in Abstract Bash is a Unix command language used for interacting with the Operating System. Recent works on natural language to Bash translation have made significant advances, but none of the previous methods utilize the problem’s in- herent structure. We identify this structure and propose a Segmented Invocation Transformer (SIT) that utilizes the information from the con- stituency parse tree of the natural language text. Our method is motivated by the alignment be- tween segments in the natural language text and Bash command components. Incorporating the structure in the modelling improves the perfor- mance of the model. Since such systems must be universally accessible, we benchmark the in- ference times on a CPU rather than a GPU. We observe a 1.8x improvement in the inference time and a 5x reduction in model parameters. Attribution analysis using Integrated Gradients reveals that the proposed method can capture the problem structure. 1 Introduction Semantic parsing is one of the central tasks for nat- ural language understanding (NLU). It is defined as the task of generating meaning representations from natural language utterances (Kamath and Das, 2019). Previous works (Yin and Neubig, 2017, Yaghmazadeh et al., 2017, Kim et al., 2020, Agar- wal et al., 2021 ) have used high level languages such as Python, SQL and Bash as meaning repre- sentations. This work focuses on generating Bash commands from natural language descriptions of command-line tasks. Besides being an essential task for NLU, seman- tic parsing into a high-level language also has real- world applications such as helping developers write programs and making programming universally ac- cessible. The command-line interface has been regarded as an invaluable tool due to its expressive- ness, efficiency and extensibility (Agarwal et al., 2021). However, it has a learning curve and re- quires domain knowledge. An interface with the computer using natural language, on the other hand, remedies these issues. One need not remember the syntax of hundreds of Bash utilities, and in- stead, one can specify the task in natural language. Such an interface that uses natural language such as English for specifying command-line tasks makes computing accessible to people with little domain knowledge. Therefore, developing a system to gen- erate Bash commands from English is worth one’s efforts. Previous works on this semantic parsing task (Lin et al., 2018, Gros, 2019, Agarwal et al., 2020, Agarwal et al., 2021, Bharadwaj and Shevade, 2021) use various encoder-decoder style architectures. These methods consider the natural language component as a sequence of tokens without utilizing the inherent structure for this problem. The method proposed in this work utilizes the information from the constituency parse tree of the natural language to …

Content truncated to 500 words

Labeled Text

AbstractBash is a Unix command language used for interacting with the Operating System. Recent works on natural language to Bash translation have made significant advances, but none of the previous methods utilize the problem’s inherent structure. We identify this structure andpropose a Segmented Invocation Transformer (SIT) that utilizes the information from the constituency parse tree of the natural language text. Our method is motivated by the alignment between segments in the natural language text and Bash command components. Incorporating the structure in the modelling improves the performance of the model. Since such systems must be universally accessible, we benchmark the inference times on a CPU rather than a GPU. We observe a 1.8x improvement in the inference time and a 5x reduction in model parameters. Attribution analysis using Integrated Gradients reveals that the proposed method can capture the problem structure.

Publication Details

Paper ID:
21179
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan