Exploring Conditional Variational Mechanism to P inyin Input Method for Addressing One-to-Many Mappings in Low-Resource Scenarios (2024)

Abstract: Pinyin input method engine (IME) refers to the transformation tool from pinyin sequence to Chinese characters, which is widely used on mobile phone applications. Due to the homophones, Pinyin IME suffers from the one-to-many mapping problem in the process of pinyin sequences to Chinese characters. To solve the above issue, this paper makes the first exploration to leverage an effective conditional variational mechanism (CVM) for pinyin IME. However, to ensure the stable and smooth operation of Pinyin IME under low-resource conditions (e.g., on offline mobile devices), we should balance diversity, accuracy, and efficiency with CVM, which is still challenging. To this end, we employ a novel strategy that simplifies the complexity of semantic encoding by facilitating the interaction between pinyin and the Chinese character information during the construction of continuous latent variables. Concurrently, the accuracy of the outcomes is enhanced by capitalizing on the discrete latent variables. Experimental results demonstrate the superior performance of our method.

## introduction input method engines (imes) 1 are important tools to connect users with mobile applications, drawing dramatic attentions @xcite @xcite @xcite @xcite @xcite @xcite . in china, there are two common pinyin imes 2 for cellphones: the 9-key imes and the 26-key imes, which are used by more than 97% of chinese people @xcite . as shown in figure 1 , the 26-key keyboard *work done at wechat ai, tencent inc. due to the chinese homophones, the process of converting pinyin sequences to chinese character sequences inevitably presents a one-to-many mapping challenge for pinyin ime. in the perfect pinyin mode of a 26-key ime, 500 pinyin combinations need to correspond to nearly 10,000 chinese characters @xcite . for instance, inputting the pinyin sequence "bei zi" can map to various chinese characters with completely different meanings, such as "被子" (blanket), "杯 子" (cup), and "辈子" (lifetime). in the case of the abbreviated pinyin mode, entering the initial letters "b z" for "bei zi" can result in not only the aforementioned characters but also others like "不 止" (more than), "不在" (not present), and "步骤" (steps). as for 9-key imes, each key can represent 3 to 4 pinyin syllables, which means that inputting "23494" offers 323 possible pinyin combinations except "beizi". while some pinyin combinations that do not adhere to standard rules can be pruned, this undoubtedly expands the solution space. one effective method to alleviate the one-tomany problem is to generate more candidates for users to autonomously choose the one they need. existing methods typically employ beam search to generate additional candidates. however, holtzman et al. @xcite found that unlike beam search, which selects the token with the highest probability, humans tend to choose more surprising and diverse tokens. furthermore, beam search requires sorting multiple candidates during the generation process, and in some low-resource scenarios (such as on offline mobile devices), it is challenging to ensure stable and rapid generation due to the lack of sufficient memory and computational resources. to alleviate the aforementioned problems, we take inspirations from conditional variational mechanism, which models the one-to-many cases through the latent variable space and generate various results by sampling different latent variables @xcite @xcite @xcite . therefore, instead of prioritizing the arrangement of the highest-scoring candidate result, our primary study of interest is to recall more eligible candidates within the same inference time. to this end, we propose a conditional variational ime model (cv-ime) with a novel hybrid latent variables strategy. please refer to § 2.2 for details. our contributions are as follow: to the best of our knowledge, this is the first exploration and investigation of the impact of cvm on the performance of pinyin ime in low-resource scenarios, specifically on offline mobile platforms. furthermore, we propose a novel hybrid latent variable that designed to balance the performance and efficiency of our cv-ime model. ## conclusion this paper introduces the conditional variational mechanism into the ime model, presenting the cv-ime model. by incorporating hybrid latent variables, cv-ime enhances diversity while maintaining the quality of generated results. in comparison to existing ime models, the experimental results demonstrate that cv-ime can recall more diverse and accurate results within similar time constraints, exhibiting significant advantages in low-resource scenarios, such as offline mobile devices.