Quantum Semi-Random Forests for Qubit-Efficient Recommender Systems

Azadeh Alavi, Fatemeh Kouchmeshki, Abdolrahman Alavi, Yongli Ren, Jiayang Niu · DOI

Abstract

Modern recommenders describe each item with hundreds of sparse semantic tags, yet most quantum pipelines still map one qubit per tag, demanding well beyond one hundred qubits, far out of reach for current noisy-intermediate-scale quantum (NISQ) devices and prone to deep, error-amplifying circuits. We close this gap with a three-stage hybrid machine learning algorithm that compresses tag profiles, optimizes feature selection under a fixed qubit budget via QAOA, and scores recommendations with a Quantum semi-Random Forest (QsRF) built on just five qubits, while performing similarly to the state-of-the-art methods. Leveraging SVD sketching and k-means, we learn a 1000-atom dictionary (>97% variance), then solve a 20x20 QUBO via depth-3 QAOA to select 5 atoms. A 100-tree QsRF trained on these codes matches full-feature baselines on ICM-150/500.

Introduction

Modern recommendation engines rely on hundreds of sparse semantic tags to describe items. Most existing quantum approaches to this problem are resource-intensive, typically mapping one qubit to every single tag. For systems with 150 or 500 tags, this requires hardware far beyond the capabilities of today’s Noisy Intermediate-Scale Quantum (NISQ) devices. Furthermore, mapping these problems to quantum annealers often incurs a "minor-embedding" overhead, where a single logical variable is spread across multiple physical qubits to handle connectivity constraints, further inflating the qubit count and introducing errors. This paper demonstrates a hybrid pipeline that reduces hardware requirements to just five qubits while maintaining high accuracy.

Methodology

The proposed pipeline consists of four distinct stages designed to compress high-dimensional tag data into a format suitable for NISQ processors.

The four-stage hybrid pipeline: Dictionary Learning, Sparse Encoding, QAOA-based feature selection, and Quantum semi-Random Forest.
  1. Low-Rank Dictionary Learning: Using Randomized SVD and k-means clustering, the system learns a dictionary of 1,000 atoms. This captures over 97% of the original variance while significantly reducing dimensionality.
  2. Performance-Driven Scoring: Atom importance is calculated by measuring the drop in ranking quality (nDCG@10) upon atom removal.
  3. 5-Qubit QAOA: The top 20 candidate atoms are selected to formulate a 20x20 Quadratic Unconstrained Binary Optimization (QUBO) problem. A depth-3 Quantum Approximate Optimization Algorithm (QAOA) on five logical qubits identifies the optimal 5-atom subset.
  4. Quantum semi-Random Forest (QsRF): An ensemble of 100 shallow decision trees is trained on the resulting 5-dimensional codes to generate final recommendations.

Key Insights

A critical observation is the high redundancy in item-tag matrices; the top 32 singular vectors capture nearly all variance. By utilizing gate-based QAOA instead of quantum annealing, the researchers achieved a 1-to-1 mapping of logical variables to physical qubits, avoiding the significant overhead of annealer embeddings.

Energy runs for ICM-500 using depth-3 QAOA, demonstrating the algorithm's ability to explore the solution space and find low-energy states across multiple runs.

As shown in the energy run distributions, a shallow depth-3 QAOA circuit is sufficient to consistently reach optimal or near-optimal solutions. This stability is vital for NISQ devices where circuit depth is limited by noise.

Results

The 5-qubit QsRF demonstrates significant improvements over previous quantum benchmarks:

  • Qubit Efficiency: Reduction from 130–450 qubits in prior methods to only 5 qubits.
  • Accuracy: On the ICM-500 dataset, the model achieved an nDCG@10 of 0.5942, vastly outperforming previous quantum methods that hovered around 0.14.
  • Computational Speed: The end-to-end pipeline completes in 8–12 minutes on a standard laptop, approximately 10x faster than reported annealer-based wall-clock times.
  • Ranking Quality: A micro-nDCG of 0.916 indicates strong global ranking performance across active users.

Conclusion

This work proves that quantum-enhanced recommendations are achievable on current NISQ hardware through intelligent data compression and hybrid optimization. Future research will focus on validating these results on physical QPUs, exploring the impact of slightly larger qubit budgets (10-20 qubits), and implementing "Adaptive Clustering" to further refine the dictionary learning stage.

Summary updated

BibTeX
@misc{alavi2025quantum,
  author = {Azadeh Alavi and Fatemeh Kouchmeshki and Abdolrahman Alavi and Yongli Ren and Jiayang Niu},
  title = {{Quantum Semi-Random Forests for Qubit-Efficient Recommender Systems}},
  year = {2025},
  eprint = {2508.00027},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.00027},
}
Figure