Enhanced Personalized Text Generation Using User Embeddings and Attention Mechanisms
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.
References
- Li, L., Zhang, Y., & Chen, L. (2021). Personalized transformer for explainable recommendation. arXiv preprint arXiv:2105.11601.
- 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.
- 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.
- Li, X., Lipton, Z. C., & Leqi, L. (2024). Personalized language modeling from personalized human feedback. arXiv preprint arXiv:2402.05133.
- 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.
- 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).
- 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.
- Cao, X., Yu, J., & Zhuang, Y. (2022). Injecting user identity into pretrained language models for document-level sentiment classification. IEEE Access, 10, 30157-30167.
- 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).
- 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.