解码器-only LLMs如何感知用户?重新思考注意力掩码在用户表示学习中的应用
How Do Decoder-Only LLMs Perceive Users? Rethinking Attention Masking for User Representation Learning
AI总结:
本研究提出梯度引导的软掩码方法,用于改进解码器-only LLMs在用户表示学习中的训练动态和双向表示质量。
摘要:
解码器-only大型语言模型越来越多地被用作行为编码器进行用户表示学习,但注意力掩码对用户嵌入质量的影响仍鲜有研究。在本工作中,我们在一个统一的对比学习框架中对因果、混合和双向注意力掩码进行了系统研究,该框架基于大规模真实世界的支付宝数据训练,整合了长期异质用户行为。为了在从因果到双向注意力转换时提高训练动态,我们提出了梯度引导的软掩码,这是一种在线性调度器之前应用的梯度引导预热,该调度器在优化过程中逐渐打开未来注意力。在9个工业用户认知基准测试中评估,我们的方法在预测、偏好和营销敏感性任务上 consistently 展现出更稳定的训练和更高质量的双向表示,同时保持与解码器预训练的兼容性。总体而言,我们的发现强调了掩码设计和训练转换在适应解码器-only LLMs进行有效用户表示学习中的重要性。我们的代码可在 https://github.com/JhCircle/Deepfind-GGSM 上获得。
英文摘要:
Decoder-only large language models are increasingly used as behavioral encoders for user representation learning, yet the impact of attention masking on the quality of user embeddings remains underexplored. In this work, we conduct a systematic study of causal, hybrid, and bidirectional attention masks within a unified contrastive learning framework trained on large-scale real-world Alipay data that integrates long-horizon heterogeneous user behaviors. To improve training dynamics when transitioning from causal to bidirectional attention, we propose Gradient-Guided Soft Masking, a gradient-based pre-warmup applied before a linear scheduler that gradually opens future attention during optimization. Evaluated on 9 industrial user cognition benchmarks covering prediction, preference, and marketing sensitivity tasks, our approach consistently yields more stable training and higher-quality bidirectional representations compared with causal, hybrid, and scheduler-only baselines, while remaining compatible with decoder pretraining. Overall, our findings highlight the importance of masking design and training transition in adapting decoder-only LLMs for effective user representation learning. Our code is available at https://github.com/JhCircle/Deepfind-GGSM.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。