Yongyi Ji
Author directory2026
Unveiling Sentiment Representations in Code-LLMs
Yongyi Ji | Fuxiang Chen | Jaegul Choo | Seung-Won Hwang | Lu Liu
Findings of the Association for Computational Linguistics: EMNLP 2026
Yongyi Ji | Fuxiang Chen | Jaegul Choo | Seung-Won Hwang | Lu Liu
Findings of the Association for Computational Linguistics: EMNLP 2026
This paper examines whether Code-LLMs encode latent sentiment representations and how these influence generation behavior. Using probing methods, we show that sentiment information is linearly separable in hidden states. Through activation steering, we demonstrate that manipulating sentiment-aligned directions systematically affects both output tone and downstream task performance. Notably, negative sentiment consistently reduces correctness, while positive effects are weaker and less consistent. Ablation and error analyses indicate these changes are not due to random perturbations but reflect meaningful behavioral shifts, including reduced confidence. These findings suggest that affective latent directions act as unintended control signals in Code-LLMs, with measurable impact on downstream task performance quality. Our study highlights the need to better understand and control such latent factors when deploying Code-LLMs.