Modern recommender systems must adapt to dynamic, need-specific objectives for diverse recommendation scenarios, yet most traditional recommenders are optimized for a single static target and struggle to reconfigure behavior on demand. Recent advances in reinforcement-learning-based post-training have unlocked strong instruction-following and reasoning capabilities in LLMs, suggesting a principled route for aligning them to complex recommendation goals. Motivated by this, we study closed-set autoregressive ranking, where an LLM generates a permutation over a fixed candidate set conditioned on user context and an explicit need instruction. However, applying RL to this setting faces two key obstacles: (i) sequence-level rewards yield coarse credit assignment that fails to provide fine-grained training signals, and (ii) interaction feedback is sparse and noisy, which together lead to inefficient and unstable updates. We propose FlexRec, a post-training RL framework that addresses both issues with (1) a causally grounded item-level reward based on counterfactual swaps within the remaining candidate pool, and (2) critic-guided, uncertainty-aware scaling that explicitly models reward uncertainty and down-weights low-confidence rewards to stabilize learning under sparse supervision. Across diverse recommendation scenarios and objectives, FlexRec achieves substantial gains: it improves NDCG@5 by up to 59% and Recall@5 by up to 109.4% in need-specific ranking, and further achieves up to 24.1% Recall@5 improvement under generalization settings, outperforming strong traditional recommenders and LLM-based baselines.
Figures & tables
Figure 1: Overall framework of FlexRec. Given a candidate set and an explicit user need, an LLM recommender generates ranked rollouts. An item-level reward is computed by evaluating the marginal contribution of individual item placements via counterfactual swaps (top right). A critic predicts both the expected interaction reward and its uncertainty for unobserved interactions. These estimates are used to form uncertainty-aware advantages, down-weighting unreliable signals during optimization (bottom).
KuaiRec
MovieLens-1M
Maximizing Interest
N@5
N@10
N@30
R@5
MRR@5
N@5
N@10
N@30
P@5
MRR@5
Traditional Rerankers
BERT4Rec ( Sun et al., 2019 )
0.415
0.479
0.706
0.182
0.578
0.502
0.560
0.796
0.128
0.231
STAR ( Lee et al., 2025 )
0.384
0.457
0.697
0.170
0.541
0.500
0.562
0.797
0.129
0.234
Zero-Shot LLMs
GPT-4o
0.376
0.451
0.695
0.154
0.505
0.508
0.564
0.800
0.139
0.244
Table 1: Performance on Maximizing Interest across KuaiRec and MovieLens-1M. FlexRec achieves superior single-need ranking performance compared with baselines.
Figure 2: Performance across all three needs on KuaiRec. FlexRec is trained jointly on all needs. Joint training yields consistently stronger performance across needs, supporting FlexRec as an all-purpose recommender conditioned by need instructions.
Figure 3: Validation NDCG@5 and NDCG@10 during training under different reward designs, showing that FlexRec’s swap-based item-level reward outperforms sequence-level GRPO.
Figure 4: Validation NDCG@5 and NDCG@10 during training under different reward signals (UA denotes uncertainty-aware update), showing that a learned critic with uncertainty-aware GRPO achieves the strongest and most stable learning.
Product Search
N@5
N@10
N@30
P@5
R@5
Traditional Rerankers
BERT4Rec ( Sun et al., 2019 )
—
—
—
—
—
STAR ( Lee et al., 2025 )
0.412
0.466
0.634
0.220
0.533
Zero-Shot LLMs
GPT-4o
0.502
0.530
0.675
0.264
0.647
Qwen2.5-3B-Instruct
0.449
0.493
0.650
0.235
0.585
Table 3: Performance on Amazon Product Search (BERT4Rec not applicable to non-sequential setting), showing that FlexRec is effective not only for sequential recommendation but also for non-sequential ranking tasks such as product search.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
KuaiRec
ML-1M
Method
MSE ↓
MAE ↓
Pearson (Mean) ↑
Pearson (Var) ↑
MSE ↓
MAE ↓
Pearson (Mean) ↑
Pearson (Var) ↑
Critic
0.328
0.400
0.374∗
0.300∗
0.317
0.271
0.510∗
0.132∗
Appendix
Table 4: Critic performance on engagement prediction (watch ratio for KuaiRec and rating for ML-1M). We report mean prediction accuracy and uncertainty quality measured by the correlation between predicted variance and squared prediction error. An asterisk indicates statistical significance ( p<0.05 ).
Component
Specification
User history encoder
MLP with ReLU activations
Candidate encoder
Fixed item embeddings
Hidden dimension
256
Interaction features
u^,c^,u^⊙c^,u^⊤c^
Output heads
Mean head + log-variance head
Normalization
LayerNorm
Appendix
Table 5: Architecture of the critic model used to estimate engagement mean and uncertainty. where u^ represents (learnt) user embedding and c^ represents (fixed) candidate item embedding.
KuaiRec
MovieLens-1M
Generalization Setting
Train: Max-Interest → Test: Trend Promotion
Train: Max-Interest → Test: Trend Promotion
Models
N@5
N@10
N@30
R@5
MRR@5
N@5
N@10
N@30
R@5
MRR@5
Traditional Rerankers
BERT4Rec ( Sun et al., 2019 )
0.479
0.520
0.774
0.123
0.085
0.542
0.601
0.820
0.181
0.212
STAR ( Lee et al., 2025 )
0.579
0.624
0.821
0.164
0.095
0.604
0.655
0.844
0.228
0.280
Zero-Shot LLMs
Appendix
Table 6: Need generalization results (train: Maximizing Interest , test: Trend Promotion ) indicate that FlexRec transfers strong ranking abilities effectively across needs.
Alg.
Reward Formulation
N@5
N@10
N@30
R@5
MRR@5
GRPO
Independent contribution
0.380
0.455
0.695
0.167
0.533
Swap-based contribution (non-causal)
0.461
0.514
0.731
0.214
0.716
CausalSwap reward (ours)
0.607
0.636
0.790
0.336
0.851
PPO
Independent contribution
0.390
0.462
0.698
0.175
0.546
Swap-based contribution (non-causal)
0.383
0.455
0.695
0.169
0.534
CausalSwap reward (ours)
0.621
0.661
0.803
0.338
0.850
Appendix
Table 7: Ablation of reward formulations for GRPO and PPO on the KuaiRec Maximizing Interest task under the dense-interaction setting.
Reward Signal
N@5
N@10
N@30
R@5
MRR@5
CF-based
User-KNN CF
0.410
0.484
0.707
0.194
0.570
Item-KNN CF
0.417
0.480
0.707
0.208
0.603
Critic-based
Raw critic
0.566
0.591
0.775
0.280
0.831
FlexRec: Uncertainty-aware Critic
0.595
0.623
0.786
0.319
0.825
Appendix
Table 8: Ablation of reward signals. Critic-based rewards outperform CF heuristics, and variance-aware updates further improve performance.
Maximizing Interest (KuaiRec)
N@5
N@10
N@30
R@5
MRR@5
Baselines
BERT4Rec
0.415
0.479
0.706
0.182
0.578
STAR (retriever)
0.384
0.457
0.697
0.170
0.541
GPT-4o
0.376
0.451
0.695
0.154
0.505
Qwen2.5-3B
0.375
0.451
0.693
0.160
0.515
Post-Trained LLMs (Dense)
Appendix
Table 9: Performance on the Maximizing Interest need on dense version of KuaiRec.
With the rise of LLMs, there is an increasing need for intelligent recommendation assistants that can handle complex queries and provide personalized, reasoning-driven recommendations. LLM-based recommenders show potential but face challenges in multi-step reasoning, underscoring the need for reasoning-augmented systems. To address this gap, we propose ReRec, a novel reinforcement fine-tuning (RFT) framework designed to improve LLM reasoning in complex recommendation tasks. Our framework introduces three key components: (1) Dual-Graph Enhanced Reward Shaping, integrating recommendation metrics like NDCG@K with Query Alignment and Preference Alignment Scores to provide fine-grained reward signals for LLM optimization; (2) Reasoning-aware Advantage Estimation, which decomposes LLM outputs into reasoning segments and penalizes incorrect steps to enhance reasoning of recommendation; and (3) Online Curriculum Scheduler, dynamically assess query difficulty and organize training curriculum to ensure stable learning during RFT. Experiments demonstrate that ReRec outperforms state-of-the-art baselines and preserves core abilities like instruction-following and general knowledge. Our codes are available at https://github.com/jiani-huang/ReRec.
A recommendation request on Reddit draws several replies, each naming different titles. When an LLM recommender is trained on such threads with reinforcement learning (RL), which replies should a generated list be rewarded against? The state-of-the-art recipe, Rank-GRPO, picks one reply per training example, so the advantage mostly records which reply was drawn (85% of its variance) rather than how good the list is. We argue that RL should train on the request, not on each answer, and propose ReMaRk: it scores every list once against the union of all replies' titles and samples each request equally. This makes RL cheaper. On seven backbones and three datasets, ReMaRk reaches the validation recall of 2,000 per-reply RL steps in 25 to 53% of the steps and leads at that budget; trained until neither improves, it is never significantly behind Rank-GRPO and in four of seven pairs reaches Rank-GRPO's best with fewer GPU-hours. The same reward helps on ProtoQA, where about 100 people answer each question, which points to a simple rule for RL with several valid human answers: reward them jointly.
Recent studies increasingly explore Large Language Models (LLMs) as a new paradigm for recommendation systems due to their scalability and world knowledge. However, existing work has three key limitations: (1) most efforts focus on retrieval and ranking, while the reranking phase, critical for refining final recommendations, is largely overlooked; (2) LLMs are typically used in zero-shot or supervised fine-tuning settings, leaving their reasoning abilities, especially those enhanced through reinforcement learning (RL) and high-quality reasoning data, underexploited; (3) items are commonly represented by non-semantic IDs, creating major scalability challenges in industrial systems with billions of identifiers. To address these gaps, we propose the Generative Reasoning Reranker (GR2), an end-to-end framework with a three-stage training pipeline tailored for reranking. First, a pretrained LLM is mid-trained on semantic IDs encoded from non-semantic IDs via a tokenizer achieving ≥99% uniqueness. Next, a stronger larger-scale LLM generates high-quality reasoning traces through carefully designed prompting and rejection sampling, which are used for supervised fine-tuning to impart foundational reasoning skills. Finally, we apply Decoupled Clip and Dynamic sAmpling Policy Optimization (DAPO), enabling scalable RL supervision with verifiable rewards designed specifically for reranking. Experiments on two real-world datasets demonstrate GR2's effectiveness: it surpasses the state-of-the-art OneRec-Think by 2.4% in Recall@5 and 1.3% in NDCG@5. Ablations confirm that advanced reasoning traces yield substantial gains across metrics. We further find that RL reward design is crucial in reranking: LLMs tend to exploit reward hacking by preserving item order, motivating conditional verifiable rewards to mitigate this behavior and optimize reranking performance.