Efficient Transfer Learning Schemes for Personalized Language Modeling using Recurrent Neural Network

Seunghyun Yoon, Hyeongu Yun, Yuna Kim, Gyu-tae Park, Kyomin Jung

Personalizing language models—the technology behind smartphone autocomplete and predictive text—is essential for capturing a user's unique vocabulary and stylistic quirks. However, two significant barriers exist: user privacy and the limited computational resources of mobile devices. Uploading sensitive personal messages to a central server is often undesirable, and training complex models like Long Short-Term Memory (LSTM) networks on-device can be prohibitively expensive.

This research proposes efficient transfer learning schemes to adapt a large, pre-trained "base" model to a specific user's style using minimal local data and computation.

Proposed Transfer Learning Schemes

The authors utilized an LSTM-RNN architecture and evaluated three distinct schemes for personalization:

  1. Scheme 1 (Full Re-training): The entire pre-trained model is fine-tuned using the personal dataset. This serves as the baseline.
  2. Scheme 2 (Surplus Personalization Layer): A new, small layer is inserted between the existing LSTM layers and the output. During personalization, only the parameters of this specific layer are updated, while the rest of the network remains frozen.
  3. Scheme 3 (Fixed Initial Layers): The initial layers of the model, which capture general linguistic structures, are frozen. Only the final layers are trained on the personal data.

The objective is to leverage the general linguistic knowledge of the base model while efficiently learning the "last mile" of a user's specific speaking style.

Experimental Results

The models were evaluated using various datasets, including the WMT’14 English corpus for base training and specific subsets from the "Friends" TV show (e.g., lines from Chandler or Rachel) to simulate individual user data.

Quantitative Performance and the Overfitting Trap

A critical finding was the tendency for smaller datasets to cause overfitting when the entire model is re-trained. As shown in the training curves, Scheme 1 quickly begins to lose its general linguistic capabilities, leading to an eventual increase in perplexity on the target task.

Perplexity vs. Epoch for different transfer learning schemes. Scheme 1 (black) shows clear signs of overfitting compared to the more stable Schemes 2 and 3.

In contrast, Schemes 2 and 3 acted as effective regularizers. By restricting the number of trainable parameters, these methods allowed the model to retain its general intelligence while successfully adapting to the new style. Scheme 2 achieved the best overall performance with a perplexity of 46.02, compared to 48.17 for the baseline.

Qualitative Style Adaptation

The shift in language style is most apparent in qualitative sentence completion tasks. When prompted with a neutral phrase, the personalized models generated text that mirrored the specific vocabulary and tone of the target corpus.

Qualitative comparison of sentence completions between the general language model and personalized models using different schemes.

For example, given the prompt "It is possible, however," the general model produced a formal response regarding "labour conclusions." In contrast, the models personalized on the "Friends" dataset shifted toward informal dialogue, such as "we all offered to break this time you have tools."

Conclusion

This study demonstrates that effective personalization does not require massive on-device computation or the sacrifice of privacy. By using targeted transfer learning—specifically by adding a dedicated personalization layer (Scheme 2)—models can capture individual speaking styles more effectively than full re-training. These findings pave the way for more responsive and private AI assistants on mobile hardware. Future work will focus on visualizing the specific neurons responsible for style and further reducing the amount of data required for successful adaptation.

Summary updated

Abstract

In this paper, we propose an efficient transfer leaning methods for training a personalized language model using a recurrent neural network with long short-term memory architecture. With our proposed fast transfer learning schemes, a general language model is updated to a personalized language model with a small amount of user data and a limited computing resource. These methods are especially useful for a mobile device environment while the data is prevented from transferring out of the device for privacy purposes. Through experiments on dialogue data in a drama, it is verified that our transfer learning methods have successfully generated the personalized language model, whose output is more similar to the personal language style in both qualitative and quantitative aspects.
BibTeX
@inproceedings{yoon2017efficient,
  author = {Seunghyun Yoon and Hyeongu Yun and Yuna Kim and Gyu-tae Park and Kyomin Jung},
  title = {{Efficient Transfer Learning Schemes for Personalized Language Modeling using Recurrent Neural Network}},
  booktitle = {Workshops @ AAAI},
  year = {2017},
  url = {https://openreview.net/forum?id=rkEBoaluZr},
}
Figure