SampleLLM: Optimizing Tabular Data Synthesis in Recommendations

Jingtong Gao, Zhaocheng Du, Xiaopeng Li, Yichao Wang, Xiangyang Li, Huifeng Guo, Ruiming Tang, Xiangyu Zhao

Introduction

Tabular data is fundamental to modern recommender systems (RS). However, real-world RS datasets often suffer from extreme sparsity and limited volume, hindering the training of effective predictive models. While Large Language Models (LLMs) have shown promise in synthetic data generation due to their semantic reasoning capabilities, they frequently struggle with "distribution disparity"—the tendency to generate samples that cluster around common patterns rather than capturing the full diversity of the original data.

The SampleLLM Framework

To address these challenges, we introduce SampleLLM, a two-stage framework designed to generate high-quality, statistically aligned synthetic tabular data. SampleLLM leverages the semantic strengths of LLMs while implementing a rigorous statistical correction phase to ensure the synthetic output mirrors the true data distribution.

The two-stage SampleLLM framework: Stage 1 focuses on diverse generation using LLMs, while Stage 2 performs distribution alignment via importance sampling.

Stage 1: Diverse Generation via LLMs

The first stage aims to maximize the diversity of LLM-generated samples. Unlike standard few-shot prompting that might use random exemplars, SampleLLM employs cluster sampling. By grouping the original dataset into clusters and selecting representatives from each, the LLM is exposed to the full breadth of the data distribution. Furthermore, Chain-of-Thought (CoT) prompting is utilized to guide the LLM in reasoning about feature relationships (e.g., the semantic link between specific movie genres and user preferences) before generating new synthetic rows.

Stage 2: Distribution Alignment via Importance Sampling

The second stage acts as a statistical guardrail. LLMs, while creative, often produce biased populations. SampleLLM corrects this through feature attribution-based importance sampling. By calculating feature interactions using a second-order Taylor expansion, the system assigns weights to synthetic samples. This process emphasizes samples that align with the underlying distribution of the original dataset and filters out those that contribute to distribution disparity. To maintain computational efficiency, a "semi-independence" assumption is applied, grouping strongly interacting features while treating others as independent.

Experimental Evaluation

SampleLLM was evaluated across five diverse datasets, including recommendation benchmarks (MovieLens-1M, Amazon, Douban) and general tabular tasks (HELOC, Covertype).

Performance Gains

In data augmentation scenarios where 10% synthetic data was added to the training set, SampleLLM consistently improved model performance in terms of AUC and Logloss. It outperformed established baselines such as TabDDPM (diffusion-based) and GReaT (LLM-based). Ablation studies confirm that both the Cluster Sampling (CS) and Importance Sampling (IS) components are critical to achieving these results.

Ablation study results showing the impact of Cluster Sampling (CS) and Importance Sampling (IS) on AUC and Logloss metrics.

Real-World Impact

The framework's efficacy was further validated through an online A/B test on the Huawei app advertising platform. By applying SampleLLM to "cold-start" scenarios involving new applications, the platform observed a 2% increase in Revenue Per Mille (RPM) and a 1.86% improvement in Effective Cost Per Mille (ECPM).

Conclusion

SampleLLM effectively bridges the gap between the semantic reasoning of LLMs and the statistical requirements of tabular data synthesis. By combining diverse generation with importance-based alignment, it provides a robust solution for data-scarce environments in recommender systems. Future work will explore extending this framework to more complex structures, such as graph-based and time-series data.

Summary updated

BibTeX
@inproceedings{gao2025samplellm,
  author = {Jingtong Gao and Zhaocheng Du and Xiaopeng Li and Yichao Wang and Xiangyang Li and Huifeng Guo and Ruiming Tang and Xiangyu Zhao},
  title = {{SampleLLM: Optimizing Tabular Data Synthesis in Recommendations}},
  booktitle = {The Web Conference},
  year = {2025},
  doi = {10.1145/3701716.3715253},
}
Figure