NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Shop-R1: Rewarding LLMs to Simulate Human Behavior in Online Shopping via Reinforcement Learning

Yimeng Zhang, Tian Wang, Jiri Gesi, Ziyi Wang, Yuxuan Lu, Jiacheng Lin, Simon Sinong Zhan, Vianne R. Gao, Ruochen Jiao, Junze Liu, Kun Qian, Yuxin Tang, Ran Xue, Houyu Zhang, qingjun cui, Yufan Guo, Dakuo Wang

Overview

Shop-R1 is a novel reinforcement learning (RL) framework designed to help Large Language Models (LLMs) simulate complex human shopping behaviors in web environments. By decomposing the task into a "think-then-act" pipeline and employing a hierarchical reward system with difficulty-aware scaling, Shop-R1 achieves a remarkable 65% relative improvement in action accuracy over standard supervised fine-tuning methods.

The Challenge of Simulating Human Web Behavior

Simulating how humans navigate the web—specifically in high-stakes, dynamic environments like e-commerce—remains a major challenge for AI agents. While LLMs excel at following explicit instructions, they often struggle to replicate the nuanced, non-deterministic reasoning that a human performs before clicking a button or typing a search query.

Current approaches typically rely on Supervised Fine-Tuning (SFT) using synthetic rationales (e.g., prompting a stronger model to "guess" human intent). However, this creates a performance ceiling: the student model's reasoning is inherently bounded by the teacher's synthetic data. Furthermore, applying Reinforcement Learning directly to web navigation is notoriously difficult due to sparse rewards (most actions do not lead to an immediate "win") and reward hacking (where the model learns to take the easiest path, such as immediately closing the browser, to collect small, certain rewards).

Methods: The Shop-R1 Framework

To overcome these limitations, the authors introduce Shop-R1, which treats behavior simulation as a two-stage process: Rationale Generation followed by Action Prediction.

Shop-R1 Framework Architecture

To train this pipeline, the framework utilizes Group Relative Policy Optimization (GRPO) with a hybrid reward design:

  1. Self-Certainty Reward (for Rationales): Because there is no absolute "ground truth" for human thought processes, the authors leverage an internal model signal. They reward the model based on the KL divergence between its output distribution and a uniform distribution. Essentially, if the model is "certain" and decisive in its reasoning, it receives a higher reward.
  2. Hierarchical Action Reward: Instead of a simple binary "right or wrong" signal, the reward is granularly broken down into:
  3. Format Reward: Is the output valid, parseable JSON?
  4. Action Type Reward: Did the model correctly choose the high-level action (e.g., "click," "type," or "terminate")?
  5. Sub-action Attribute/Value Reward: Did it identify the correct fine-grained details, such as the specific button name or search string?
  6. Difficulty-Aware Reward Scaling (DARS): This mechanism acts as the "secret sauce" to prevent reward hacking. Predicting a specific, long-tail search query is significantly harder than simply clicking "exit." DARS scales the reward magnitude based on the complexity of the action, ensuring the model is incentivized to tackle difficult UI interactions rather than spamming the "terminate" action.

Datasets

The framework was trained and evaluated using robust, real-world data:

  • SHOP-CART: A large-scale dataset consisting of 52,137 real-world shopping sessions from a global e-commerce platform. It includes over 176,000 training examples of (HTML context, action history) pairs.
  • OPeRA: A public dataset of real human web-shopping sessions used to verify the framework's ability to generalize across different web environments.

Key Insights

  • Reasoning as a Bottleneck: The paper confirms that a model's ability to simulate behavior is strictly limited by its reasoning capabilities. By rewarding the certainty of reasoning rather than just matching a synthetic "teacher" rationale, the model discovers more robust paths to the correct action.
  • Anti-Laziness via DARS: In RL, models are naturally "lazy." If terminating a session yields the same reward as finding a specific product, the model will default to quitting. DARS forces the model to value complex interactions, which is essential for realistic simulation.
  • The Importance of Context: Including the full session history (the simplified HTML of every page visited) is critical. Removing this "structural memory" causes a 50% drop in exact match accuracy, proving that behavior simulation is deeply tied to how users react to changing UI layouts over time.

Key Results

The implementation of Shop-R1 yielded significant performance improvements across multiple model scales.

Performance Comparison Across Model Sizes
  • Massive Accuracy Gains: As detailed in the results table, Shop-R1 achieved an exact match accuracy of 27.72% on the 3B parameter model, representing a 65% relative improvement over the SFT baseline (16.76%).
  • Scaling Success: The framework demonstrated consistent improvements across different model sizes (from 0.5B to 3B parameters). Notably, larger models showed a much stronger ability to handle "long-text" actions like complex search queries.
  • Robustness to Temperature: Additional experiments showed the model remains stable across various sampling temperatures (0.6 to 0.8), suggesting that the RL process successfully anchored the model's intent classification.

Limitations and Future Work

  • Offline vs. Online: The current study evaluates models in an "offline" setting, predicting the next step in a recorded log. Future work aims to move toward "closed-loop" environments where the LLM interacts with a live, dynamic website in real-time.
  • Persona Modeling: While the model simulates general "human-like" behavior, it does not yet account for specific user personas (e.g., a "bargain hunter" vs. a "brand loyalist").
  • Computational Overhead: Providing the model with simplified HTML for every step in a long session creates a massive context window, which is computationally expensive. Future research may explore more efficient ways to compress web context.

Summary updated

BibTeX
@inproceedings{zhang2026shop,
  author = {Yimeng Zhang and Tian Wang and Jiri Gesi and Ziyi Wang and Yuxuan Lu and Jiacheng Lin and Simon Sinong Zhan and Vianne R. Gao and Ruochen Jiao and Junze Liu and Kun Qian and Yuxin Tang and Ran Xue and Houyu Zhang and qingjun cui and Yufan Guo and Dakuo Wang},
  title = {{Shop-R1: Rewarding LLMs to Simulate Human Behavior in Online Shopping via Reinforcement Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=fkIePp9YEO},
}
Figure