Research Article
Open access
Published on 26 November 2024
Download pdf
Shu,C. (2024). Enhanced Personalized Text Generation Using User Embeddings and Attention Mechanisms. Applied and Computational Engineering,107,61-72.
Export citation

Enhanced Personalized Text Generation Using User Embeddings and Attention Mechanisms

Chang Shu *,1,
  • 1 Jacobs School of Engineering, University of California, San Diego, CA, USA

* Author to whom correspondence should be addressed.

https://doi.org/10.54254/2755-2721/107/20241355

Abstract

Personalized text generation plays an important role in modern applications such as content recommendation, conversational agents, and review generation, where adapting outputs to user-specific preferences enhances engagement. This research proposes an enhanced model architecture that leverages user-specific features, subreddit characteristics, and bidirectional LSTMs to improve personalization in text generation tasks. Building upon a baseline sequence-to-sequence model, the improved model incorporates user embeddings, self-attention mechanisms, and residual connections for richer context understanding. Additionally, features such as post count and average score are integrated to capture user behavior and preferences. The model was trained and tested on a large-scale Reddit dataset, with results showing significant improvements in both accuracy and the relevance of generated text. The final architecture achieved 83% validation accuracy. It produces more coherent and contextually appropriate outputs compared to the baseline. Future work will focus on refining feature engineering and enhancing the model’s ability to generate even more personalized and dynamic content, including multi-modal data such as images or user engagement over time.

Keywords

Personalized text generation, Natural Language Processing, Multi-Task Learning, User Embeddings, Attention Mechanism.

[1]. Li, L., Zhang, Y., & Chen, L. (2021). Personalized transformer for explainable recommendation. arXiv preprint arXiv:2105.11601.

[2]. Tan, Z., Zeng, Q., Tian, Y., Liu, Z., Yin, B., & Jiang, M. (2024). Democratizing large language models via personalized parameter-efficient fine-tuning. arXiv preprint arXiv:2402.04401.

[3]. Liu, Q., Qin, J., Ye, W., Mou, H., He, Y., & Wang, K. (2024). Adaptive Prompt Routing for Arbitrary Text Style Transfer with Pre-trained Language Models. Proceedings of the AAAI Conference on Artificial Intelligence, 38(17), 18689-18697.

[4]. Li, X., Lipton, Z. C., & Leqi, L. (2024). Personalized language modeling from personalized human feedback. arXiv preprint arXiv:2402.05133.

[5]. Lee, H. Y., Tseng, B. H., Wen, T. H., & Tsao, Y. (2016). Personalizing recurrent-neural-network-based language model by social network. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 25(3), 519-530.

[6]. Welch, C., Gu, C., Kummerfeld, J. K., Pérez-Rosas, V., & Mihalcea, R. (2022, May). Leveraging similar users for personalized language modeling with limited data. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) (pp. 1742-1752).

[7]. Wang, B., Chen, B., Ma, L., & Zhou, G. (2018). User-personalized review rating prediction method based on review text content and user-item rating matrix. Information, 10(1), 1.

[8]. Cao, X., Yu, J., & Zhuang, Y. (2022). Injecting user identity into pretrained language models for document-level sentiment classification. IEEE Access, 10, 30157-30167.

[9]. King, M., & Cook, P. (2020, May). Evaluating approaches to personalizing language models. In Proceedings of the Twelfth Language Resources and Evaluation Conference (pp. 2461-2469).

[10]. Huang, X., Paul, M. J., Burke, R., Dernoncourt, F., & Dredze, M. (2021). User factor adaptation for user embedding via multitask learning. arXiv preprint arXiv:2102.11103.

Cite this article

Shu,C. (2024). Enhanced Personalized Text Generation Using User Embeddings and Attention Mechanisms. Applied and Computational Engineering,107,61-72.

Data availability

The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.

Disclaimer/Publisher's Note

The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

About volume

Volume title: Proceedings of the 2nd International Conference on Machine Learning and Automation

Conference website: https://2024.confmla.org/
ISBN:978-1-83558-709-6(Print) / 978-1-83558-710-2(Online)
Conference date: 21 November 2024
Editor:Mustafa ISTANBULLU
Series: Applied and Computational Engineering
Volume number: Vol.107
ISSN:2755-2721(Print) / 2755-273X(Online)

© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license. Authors who publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See Open access policy for details).