Generative Input: Towards Next-Generation Input Methods Paradigm

Keyu Ding, Yongcan Wang, Zihang Xu, Zhenzhen Jia, Enhong Chen

Abstract

Traditional Chinese Input Method Editors (IMEs) typically treat Pinyin-to-Character (P2C) conversion as a sequence labeling task, assuming "perfect" phonetic input. However, real-world mobile typing is often noisy, abbreviated, and requires more than simple character mapping. We introduce GeneInput, a novel paradigm that shifts IMEs to a unified generative framework. By utilizing a 2.6B parameter Large Language Model (LLM) with a two-stage "soft alignment" decoding strategy and a reinforcement learning system (RLHF-IME) powered by anonymized user clicks, GeneInput achieves state-of-the-art performance, significantly outperforming traditional commercial engines and general-purpose models like GPT-4 on specialized tasks.

Introduction: The Limitations of Traditional IMEs

Most Chinese input methods rely on P2C conversion treated as a rigid sequence labeling task. This approach assumes users provide clean Pinyin, but real-world usage is messy: users frequently make typos ("fat-finger" errors), use heavy abbreviations (e.g., "w r y y c l" for "wo ai zi ran yu yan chu li"), and alternate between 9-key and 26-key layouts.

Furthermore, modern user expectations have evolved. Beyond simple character conversion, there is a growing demand for "Intelligent Association" (predicting subsequent sentences) and "Conversational Assistance" (style transfer or rewriting). Existing IMEs often handle these via fragmented, separate modules that cannot easily learn from user feedback. GeneInput addresses these challenges by unifying all input scenarios into a single generative model.

Methodology: The GeneInput Framework

GeneInput is built upon a 2.6B parameter LLM (the "Spark" model) and introduces several architectural innovations to bridge the gap between keystrokes and characters.

Comparison of traditional IME architecture vs. the proposed unified LLM-based architecture.

Unified Prompting and Two-Stage Decoding

Instead of task-specific models, GeneInput uses unified prompting to handle P2C conversion, sentence completion, and text beautification. A critical component is the "Pyseg" (Pinyin segmentation) bridge. Directly mapping raw keystrokes to characters is often too ambiguous for an LLM. By first predicting an intermediate phonetic segmentation, the model establishes a "chain-of-thought" anchor that improves accuracy.

Soft Alignment and RLHF-IME

To handle typos, GeneInput employs a Soft Alignment Constraint. Unlike traditional "hard" rules that fail when input doesn't match a dictionary, soft alignment uses edit distance as a penalty, allowing the model to suggest the most probable intended characters even from noisy input.

The system is further refined via RLHF-IME. Unlike standard RLHF which requires expensive manual ranking, the authors used three months of anonymized user selection data. By treating a user's click on a candidate as a preference signal, the model can be optimized "online" based on actual human behavior.

Datasets and Evaluation

The model was trained and tested on a combination of public and proprietary data:

  • Public Benchmarks: The People's Daily (PD) and TouchPal (TP) datasets.
  • XF-datasets: A massive collection from iFLYTEK including millions of samples for Supervised Fine-Tuning (SFT) and Reward Modeling (RM).
  • FK2C Test Set: A specialized 57,000-sample set designed to test robustness against abbreviations and noise.

Key Results

GeneInput demonstrates a significant performance leap over both commercial and research baselines. On the public PD dataset, it achieved a Precision@1 (P@1) of 88.4%, substantially higher than Google IME (70.9%) and Pinyin-GPT (73.2%).

Performance comparison of GeneInput against baselines on PD and TP datasets.

In robustness tests, GeneInput maintained a P@1 of 75.2% in noisy scenarios, while Google IME's performance dropped to 55.2%. Notably, in "Conversational Assistance" tasks, GeneInput (after RLHF) achieved a Mean Opinion Score (MOS) of 4.52, outperforming GPT-4 (4.35). Ablation studies confirmed that the "soft alignment" constraint is vital, as its removal led to a 6.5-point drop in accuracy.

Conclusion and Future Work

GeneInput represents a shift toward a more flexible, intelligent IME paradigm. While the results are promising, challenges remain regarding the computational cost of running a 2.6B parameter model on mobile devices. Future work will focus on model compression, reducing latency for a "lag-free" experience, and enhancing personalization while maintaining strict user privacy.

Summary updated

BibTeX
@inproceedings{ding2024generative,
  author = {Keyu Ding and Yongcan Wang and Zihang Xu and Zhenzhen Jia and Enhong Chen},
  title = {{Generative Input: Towards Next-Generation Input Methods Paradigm}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.218},
}
Figure