Can identifier splitting improve open-vocabulary language model of code?
Statistical language models on source code have successfully assisted software engineering tasks. However, developers can create or pick arbitrary identifiers when writing source code. Freely chosen identifiers lead to the notorious out-of-vocabulary (OOV) problem that negatively affects model perfo...
Saved in:
Main Authors: | , , , , |
---|---|
Format: | text |
Language: | English |
Published: |
Institutional Knowledge at Singapore Management University
2022
|
Subjects: | |
Online Access: | https://ink.library.smu.edu.sg/sis_research/7698 https://ink.library.smu.edu.sg/context/sis_research/article/8701/viewcontent/can_identifier.pdf |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Institution: | Singapore Management University |
Language: | English |
id |
sg-smu-ink.sis_research-8701 |
---|---|
record_format |
dspace |
spelling |
sg-smu-ink.sis_research-87012024-05-31T09:51:43Z Can identifier splitting improve open-vocabulary language model of code? SHI, Jieke YANG, Zhou HE, Junda XU, Bowen LO, David Statistical language models on source code have successfully assisted software engineering tasks. However, developers can create or pick arbitrary identifiers when writing source code. Freely chosen identifiers lead to the notorious out-of-vocabulary (OOV) problem that negatively affects model performance. Recently, Karampatsis et al. showed that using the Byte Pair Encoding (BPE) algorithm to address the OOV problem can improve the language models’ predictive performance on source code. However, a drawback of BPE is that it cannot split the identifiers in a way that preserves the meaningful semantics. Prior researchers also show that splitting compound identifiers into sub-words that reflect the semantics can benefit software development tools. These two facts motivate us to explore whether identifier splitting techniques can be utilized to augment the BPE algorithm and boost the performance of open-vocabulary language models considered in Karampatsis et al.’s work. This paper proposes to split identifiers in both constructing vocabulary and processing model inputs procedures, thus exploiting three different settings of applying identifier splitting to language models for the code completion task. We contrast models’ performance under these settings and find that simply inserting identifier splitting into the pipeline hurts the model performance, while a hybrid strategy combining identifier splitting and the BPE algorithm can outperform the original open-vocabulary models on predicting identifiers by 3.68% of recall and 6.32% of Mean Reciprocal Rank. The results also show that the hybrid strategy can improve the entropy of language models by 2.02%. 2022-03-01T08:00:00Z text application/pdf https://ink.library.smu.edu.sg/sis_research/7698 info:doi/10.1109/SANER53432.2022.00130 https://ink.library.smu.edu.sg/context/sis_research/article/8701/viewcontent/can_identifier.pdf http://creativecommons.org/licenses/by-nc-nd/4.0/ Research Collection School Of Computing and Information Systems eng Institutional Knowledge at Singapore Management University Open vocabulary Identifier splitting Language model of code Software Engineering |
institution |
Singapore Management University |
building |
SMU Libraries |
continent |
Asia |
country |
Singapore Singapore |
content_provider |
SMU Libraries |
collection |
InK@SMU |
language |
English |
topic |
Open vocabulary Identifier splitting Language model of code Software Engineering |
spellingShingle |
Open vocabulary Identifier splitting Language model of code Software Engineering SHI, Jieke YANG, Zhou HE, Junda XU, Bowen LO, David Can identifier splitting improve open-vocabulary language model of code? |
description |
Statistical language models on source code have successfully assisted software engineering tasks. However, developers can create or pick arbitrary identifiers when writing source code. Freely chosen identifiers lead to the notorious out-of-vocabulary (OOV) problem that negatively affects model performance. Recently, Karampatsis et al. showed that using the Byte Pair Encoding (BPE) algorithm to address the OOV problem can improve the language models’ predictive performance on source code. However, a drawback of BPE is that it cannot split the identifiers in a way that preserves the meaningful semantics. Prior researchers also show that splitting compound identifiers into sub-words that reflect the semantics can benefit software development tools. These two facts motivate us to explore whether identifier splitting techniques can be utilized to augment the BPE algorithm and boost the performance of open-vocabulary language models considered in Karampatsis et al.’s work. This paper proposes to split identifiers in both constructing vocabulary and processing model inputs procedures, thus exploiting three different settings of applying identifier splitting to language models for the code completion task. We contrast models’ performance under these settings and find that simply inserting identifier splitting into the pipeline hurts the model performance, while a hybrid strategy combining identifier splitting and the BPE algorithm can outperform the original open-vocabulary models on predicting identifiers by 3.68% of recall and 6.32% of Mean Reciprocal Rank. The results also show that the hybrid strategy can improve the entropy of language models by 2.02%. |
format |
text |
author |
SHI, Jieke YANG, Zhou HE, Junda XU, Bowen LO, David |
author_facet |
SHI, Jieke YANG, Zhou HE, Junda XU, Bowen LO, David |
author_sort |
SHI, Jieke |
title |
Can identifier splitting improve open-vocabulary language model of code? |
title_short |
Can identifier splitting improve open-vocabulary language model of code? |
title_full |
Can identifier splitting improve open-vocabulary language model of code? |
title_fullStr |
Can identifier splitting improve open-vocabulary language model of code? |
title_full_unstemmed |
Can identifier splitting improve open-vocabulary language model of code? |
title_sort |
can identifier splitting improve open-vocabulary language model of code? |
publisher |
Institutional Knowledge at Singapore Management University |
publishDate |
2022 |
url |
https://ink.library.smu.edu.sg/sis_research/7698 https://ink.library.smu.edu.sg/context/sis_research/article/8701/viewcontent/can_identifier.pdf |
_version_ |
1814047563239653376 |