Taming the Long Tail: Efficient Item-wise Sharpness-Aware Minimization for LLM-based Recommender Systems
Authors: Jiaming Zhang, Yuyuan Li, Xiaohua Feng, Li Zhang, Longfei Li, Jun Zhou, Chaochao Chen
Organizations: Zhejiang University Hangzhou, Zhejiang, China · Hangzhou Dianzi University Hangzhou, Zhejiang, China · Ant Group Hangzhou, Zhejiang, China
Large Language Model-based Recommender Systems (LRSs) have recently emerged as a new paradigm in sequential recommendation by directly adopting LLMs as backbones. While LRSs demonstrate strong knowledge utilization and instruction-following abilities, they have not been systematically studied under the long-standing long-tail problem. In this paper, we conduct an empirical study and reveal that LRSs face two distinct types of long-tail: i) prior long-tail, inherited implicitly from pretraining corpora, and ii) data long-tail, originating from skewed recommendation datasets. Our analysis shows that both contribute to the performance disparity between head and tail items, with the intersection of the two heads exhibiting an even stronger head effect. Nevertheless, the overall performance distribution in LRSs, especially on the tail, remains dominated by the data long-tail. To address this challenge, we propose Efficient Item-wise Sharpness-Aware Minimization (EISAM), a novel optimization framework that improves tail-item performance by adaptively regularizing the loss landscape at the item level. EISAM introduces an efficient penalty design that captures fine-grained item-specific sharpness while maintaining computational scalability for LLMs. In addition, we derive a generalization bound for EISAM. Our theoretical analysis shows that the bound decreases at a faster rate under our item-wise regularization, offering theoretical support for its effectiveness. Extensive experiments on three real-world datasets demonstrate that EISAM significantly boosts tail-item recommendation performance while preserving overall quality, establishing the first systematic solution to the long-tail problem in LRSs.
Figures & tables
Figure 1. Performance across data/prior groups.
Dataset
# Items
# Interactions
# Sequences
ML-1M
3,883
1,000,209
939,809
Steam
32,135
1,307,310
138,970
ADM
266,414
836,006
22,982
Table 1. Summary of datasets.
Figure 2. Weight distributions of different weighting functions on the ML-1M dataset, where the x-axis denotes item indices sorted by descending frequency.
Overall
Tail
Head
Dataset
Method
NDCG@10
HR@10
NDCG@10
HR@10
NDCG@10
HR@10
ML-1M
TALLRec
0.0197
0.0239
0.0071
0.0101
0.0318
0.0371
+RW
0.0149
0.0177
0.0087
0.0111
0.0208
0.0240
+SAM
0.0202
0.0241
0.0084
0.0108
0.0315
0.0368
+GroupSAM
0.0195
0.0235
0.0090
0.0129
0.0295
0.0336
+EISAM
0.0211(+4.46%)
0.0258(+7.05%)
0.0101(+12.22%)
0.0141(+9.30%)
0.0316
0.0370
Table 2. Performance comparison across datasets and base LRSs. The best results are highlighted in bold, and the second-best results are underlined. For the Overall and Tail metrics, we additionally report the relative improvements (%) of EISAM over the best baseline.
Figure 3. visualizations of the loss landscapes of LRS on tail items. Darker colors indicate lower loss values.
Methods
ML-1M
Steam
ADM
SAM
3182s (1.00 × )
3897s (1.00 × )
949s (1.00 × )
GroupSAM
12172s (3.82 × )
15844s (4.06 × )
3948s (4.16 × )
EISAM
3652s (1.14 × )
3969s (1.01 × )
967s (1.01 × )
Table 3. Average training time per epoch. Also show the relative factor in parentheses (w.r.t. SAM in the same column).
State Key Laboratory of Blockchain and Data Security, Zhejiang University. · College of Computer Science and Technology, Zhejiang University. · Zhejiang University Hangzhou, Zhejiang, China +3