---
title: Quantum Semi-Random Forest (QsRF)
url: https://www.emergentmind.com/topics/quantum-semi-random-forest-qsrf
type: topic
---

# Quantum Semi-Random Forest (QsRF)

Searching arXiv for the cited QsRF-related papers to ground the article in published work.
arXiv search: "Quantum-Inspired Forest Regressors 1711.08117"
Quantum semi-Random Forest (QsRF) designates two distinct lines of research that share Random-Forest-style ensemble structure while altering how feature subspaces are chosen. In the earlier usage, introduced by Xie and Sato, QsRF denotes the Quantum-Inspired Forest, also called Quantum-Inspired Semi-Random Forest: a fully classical ensemble regressor in which principal components are sampled according to a quantum-inspired “Fraction Transition Probability” derived from PCA variance and regression coefficients [1711.08117]. In a later usage for recommender systems, QsRF denotes a hybrid quantum-classical pipeline in which feature compression and performance scoring are followed by QAOA-based selection of a fixed small subspace, after which a classical semi-random forest is trained on the selected codes [2508.00027]. The common theme is that the conventional uniform random-subspace step of Random Forest is replaced by a structured, nonuniform feature-selection mechanism.

## 1. Terminological scope and lineage

The expression “Quantum semi-Random Forest” is not uniform across the literature. In Xie and Sato’s ACML 2017 work, the method is described as a Quantum-Inspired Subspace Ensemble Method and Quantum-Inspired Forest Regressor, with the alternative designation Quantum-Inspired Semi-Random Forest (QsRF) [1711.08117]. In that formulation, the method remains classical: the “quantum” aspect is an interpretive device used to define feature-sampling probabilities from a density-matrix view of PCA covariance.

In the 2025 recommender-system formulation, QsRF refers to a three-stage hybrid machine learning algorithm that compresses sparse item-tag profiles, optimizes feature selection under a fixed qubit budget via QAOA, and scores recommendations with a Quantum semi-Random Forest built on just five qubits [2508.00027]. Here the quantum component is operational rather than metaphorical, but it is restricted to the feature-selection stage; the final ensemble of decision trees is explicitly classical.

This dual usage suggests that QsRF is better understood as a naming family than as a single canonical algorithm. A plausible implication is that the defining property across usages is not a particular tree architecture, but the replacement of uniform feature randomness by a structured subspace-selection prior.

## 2. Core formulation in the quantum-inspired regressor

In the 2017 formulation, QsRF differs from a standard Random Forest only in how it chooses the random subspace for each base regressor [1711.08117]. The procedure begins with a full-rank PCA of the centered training data matrix $X \in \mathbb{R}^{n \times m}$ and centered response $y \in \mathbb{R}^n$. The unnormalized Gram matrix is written as
$$
P = X X^T = U \Sigma^p U^T,
$$
where $\Sigma^p = \operatorname{diag}(\sigma_1^2,\dots,\sigma_r^2)$ and $r=\operatorname{rank}(X)$.

Normalizing to trace $1$ yields
$$
\rho = P / \operatorname{Tr}(P) = U \Sigma U^T,\qquad \Sigma=\operatorname{diag}(s_1^2,\dots,s_r^2),\quad \sum_i s_i^2=1.
$$
With the physics-inspired interpretation
$$
\rho = \sum_i s_i^2 |u_i\rangle \langle u_i|,
$$
the quantity $s_i^2$ is the “Fraction Probability” of eigenstate $|u_i\rangle$ [1711.08117].

Regression is then viewed as a linear operator $\hat A$ mapping PCA-space to $y$, with transition amplitude
$$
t_i=\langle y|\hat A|u_i\rangle,
$$
and classical transition probability $|t_i|^2$. Combining variance and target relevance gives the Fraction Transition Probability
$$
p_i \propto s_i^2 \cdot t_i^2,\qquad
p_i = \frac{s_i^2 t_i^2}{\sum_{j=1}^r s_j^2 t_j^2}.
$$

In practice, after full-rank PCA one works in orthogonalized coordinates $X_R=XV$ and approximates $\hat A$ by the ordinary least squares solution
$$
t = (X_R^T X_R)^{-1} X_R^T y \in \mathbb{R}^m.
$$
Then $t_i$ is the linear-regression coefficient on component $i$, and the sampling vector is formed by element-wise multiplication:
$$
p_s=[s_1^2,\dots,s_r^2],\qquad
p_t=[t_1^2,\dots,t_r^2],\qquad
p = (p_s \odot p_t)/\operatorname{sum}(p_s \odot p_t).
$$

The substantive claim of this construction is that feature subsets are biased toward principal components that both carry high variance and have strong regression coefficients. The remaining ensemble steps—bootstrap sampling, tree induction, and averaging—are identical to Breiman’s Random Forest [1711.08117].

## 3. Algorithmic realization of QIS and QsRF

The 2017 method decomposes into QISubspace and QsRF. QISubspace prepares the feature subsets $\{F_i\}_{i=1}^T$, while QsRF uses them inside an otherwise standard regression-forest pipeline [1711.08117]. The prescribed sequence is:

1. Input data $X \in \mathbb{R}^{n \times m}$, target $y \in \mathbb{R}^n$, feature set $F=\{1\dots m\}$, ensemble size $T$, and subspace size $K(=\alpha m)$.
2. Perform full-rank PCA to obtain $X_R=\operatorname{PCA}(X)$ with orthogonal columns.
3. Compute Fraction probabilities
   $$
   p_{s_i} = (X_R(:,i)^T X_R(:,i))/\operatorname{Tr}(X_R^T X_R)=s_i^2.
   $$
4. Compute transition amplitudes
   $$
   t=(X_R^T X_R)^{-1}X_R^T y.
   $$
5. Set transition probabilities $p_{t_i}=t_i^2$.
6. Form
   $$
   p_i = (p_{s_i}\cdot p_{t_i})/\sum_j (p_{s_j}\cdot p_{t_j}).
   $$
7. For each $i=1\dots T$, sample without replacement $K$ distinct indices from $\{1\dots m\}$ with probabilities $\{p_i\}$ and let $F_i$ be that subset.

The ensemble then proceeds as
$$
H(x)=\frac{1}{T}\sum_i h_i(x),
$$
where each tree $h^i$ is built on a bootstrap sample $S^i$ and feature subset $F^i$ [1711.08117].

The practical recommendation accompanying this design is to prepend a full-rank PCA so that the parameter-invariance assumption holds. This adds only $O(m^3)$ cost once, after which $s_k^2$ comes from PCA and $t_k$ from a single OLS solve in PCA space [1711.08117]. The method is described as trivially parallelizable because feature subsets and trees are independent.

## 4. First-order theory and ensemble ambiguity

Xie and Sato provide a theoretical analysis under a simplified linear-regression model and state that the QIS strategy simultaneously increases ensemble ambiguity and decreases individual-learner expected error, thereby reducing total generalization error [1711.08117]. For an average ensemble
$$
H(x)=T^{-1}\sum_i h_i(x),
$$
the error–variance–covariance decomposition is given as
$$
E[\operatorname{err}(H)]
= E[\operatorname{err}(h_i)] -(1-1/T)\cdot E[\operatorname{Var}(h_i)] +(1-1/T)\cdot E[\operatorname{Cov}(h_i,h_j)].
$$
This decomposition makes explicit that reduced ensemble error is associated with smaller expected base-learner error and larger $\operatorname{Var}(h_i)-\operatorname{Cov}(h_i,h_j)$, described as larger ambiguity.

After PCA, with $x_k$ the $k$-th principal feature and corresponding linear-regression weight $w_k$, a base learner on feature subset $F_i$ is written as
$$
h_i(x)=\sum_{k \in F_i} w_k x_k.
$$
Assuming orthogonality so that $w_k$ are unchanged by feature-subset choice, and further assuming $w_k \sim N(0,\sigma^2)$ i.i.d., the randomness of subset selection yields
$$
E[\operatorname{Var}(h_i)] = \sum_k w_k^2 p_k,\qquad
E[\operatorname{Cov}(h_i,h_j)] = \sum_k w_k^2 p_k^2,
$$
subject to $\sum_k p_k=1$ [1711.08117].

Uniform Random Subspace sets $p_k=1/r$, while QIS sets $p_k \propto w_k^2 s_k^2$. By choosing $p_k \propto w_k^2 s_k^2$, the analysis states that one minimizes $E[\operatorname{Cov}(h_i,h_j)]$ and simultaneously increases $E[\operatorname{Var}(h_i)]$ over the uniform choice, so QIS strictly raises ensemble ambiguity [1711.08117]. Under the Gaussian prior on $w_k$, the marginal expected $p_k$ is $s_k^2/\sum s^2$, and this is also shown to lower the expected individual-learner squared error. The stated conclusion is
$$
E[\operatorname{err}(H)]_{\mathrm{QIS}} < E[\operatorname{err}(H)]_{\mathrm{RS}}
$$
in the first-order linear approximation.

A common misconception is that this result establishes a general quantum advantage. It does not: the proof concerns a first-order approximation for ensemble regression under specific orthogonality and Gaussian assumptions. The significance of the result is instead methodological: it links the quantum-inspired probability assignment to a classical bias–variance–covariance argument.

## 5. Empirical behavior in regression settings

The empirical evaluation in the 2017 paper uses 10 UCI regression sets, including Abalone, Crime, Forest Fires, Housing, and Wine Quality, with preprocessing by full-rank PCA and centering of $y$ so that any performance difference is due only to QIS rather than PCA itself [1711.08117]. The base learners are regression trees with mean-squared-error split, no depth limit, and no min-sample splits. Performance is measured by mean square error (MSE), reported as mean$\pm$std over 15 runs.

The default hyperparameters are $T=30$ trees, subspace size $K=\alpha m$ with $\alpha=0.5$, bootstrap sample size equal to $100\%$ of training data drawn with replacement, and training set fraction $N=60\%$ [1711.08117]. Under these settings, the reported averaged MSE over 10 sets is:

| Method | Averaged MSE over 10 sets |
|---|---|
| QsRF | $0.3263\pm0.0094$ |
| RF | $0.3534\pm0.0168$ |

The summary given is that QsRF significantly outperforms RF on 8/10 datasets, is slightly worse on 1/10 (Facebook Metrics), and ties in 1 [1711.08117]. When trees are replaced by linear regressors, described as “QIE-LR vs RE-LR,” QIS again wins on all 10.

The robustness studies vary $\alpha \in \{0.125,0.25,0.5,0.75,1.0\}$, $T \in \{3,10,30,100\}$, and training fraction $N \in \{30\%,40\%,50\%,60\%\}$. The reported pattern is that QsRF beats RF at every $\alpha<1$, with larger gain for smaller $\alpha$; maintains a lead for all $T$, with advantage most pronounced for small $T$; and outperforms RF for all $N \ge 40\%$, with the gap growing as $N$ shrinks [1711.08117]. This supports the paper’s practical recommendation that QsRF is particularly useful when computational budget is low or data are scarce.

## 6. Hybrid QsRF for qubit-efficient recommender systems

In the 2025 usage, QsRF is a hybrid quantum-classical pipeline for recommender systems rather than a PCA-weighted regression forest [2508.00027]. The architecture contains four stages: Dictionary Learning & Compression, Performance-Driven Importance Scoring, QAOA-Based Feature Selection with fixed qubit budget $k=5$, and a Classical Semi-Random Forest on 5-Dim Codes.

The input is a TF–IDF item-feature matrix $X \in \mathbb{R}^{n \times M}$ with $M=150$ or $500$ and $n \approx 5{,}000$ items [2508.00027]. A global dictionary $D \in \mathbb{R}^{M \times 1000}$ is learned using a randomized SVD sketch with top-$d=32$ right singular vectors, preserving $>97\%$ of the Frobenius energy, followed by Mini-Batch k-means into $K=50$ groups, and sparse coding per cluster via alternating LARS–Lasso updates in a K-SVD-style scheme. With $A=20$ atoms per cluster, the concatenated dictionary has $1000$ atoms. At inference, an item row $x \in \mathbb{R}^M$ is encoded as
$$
z=xD_k \in \mathbb{R}^k,
$$
where $D_k \in \mathbb{R}^{M \times k}$ contains the final $k=5$ atoms selected by the quantum step.

Stage 2 computes atom-wise performance weights
$$
w_j = (1/|\mathcal B|)\sum_{u \in \mathcal B}[nDCG@10_u - nDCG@10_u^{(-j)}],
$$
where $\mathcal B$ is a $20\%$ bootstrap of users [2508.00027]. The top $K_{\text{top}}=20$ atoms are retained to form a candidate set, and the selection of $k=5$ atoms is posed as the binary optimization
$$
z \in \{0,1\}^{20},\qquad \sum_j z_j = k
$$
with objective
$$
E(z) = -\sum_{j=1}^{20} w_j z_j + \mu \left(\sum_j z_j-k\right)^2,
$$
equivalently a dense $20 \times 20$ QUBO
$$
Q=-\operatorname{diag}(w)+\mu 11^T,\qquad \mu \approx 10^3.
$$

The QUBO is solved via depth-$p=3$ QAOA on exactly five logical qubits, with
$$
H_C=\sum_{i \le j} Q_{ij} Z_i Z_j,\qquad H_M=\sum_{j=1}^5 X_j,
$$
initial state
$$
|\psi_0\rangle = H^{\otimes 5}|00000\rangle,
$$
and variational state
$$
|\gamma,\beta\rangle = \left[\prod_{\ell=p}^1 U_M(\beta_\ell)U_C(\gamma_\ell)\right]|\psi_0\rangle.
$$
The $2p$ angles are tuned on the validation split by SPSA with $128$ shots per evaluation [2508.00027]. If the measured bit-string satisfies the cardinality constraint, those atoms are selected; otherwise the method falls back to the classical top-$k$ by $w_j$.

The final ensemble stage is classical. Each tree is trained on a bootstrap sample of the code vectors in $\mathbb{R}^k$ and a random subset of the $k=5$ features at each split. Nodes scan thresholds to maximize Gini gain or entropy, and the best split $(f^*,\tau^*)$ partitions the data according to $z[f^*]\le \tau^*$ versus $>$ [2508.00027]. The ensemble contains $T=100$ trees, arranged as $10$ runs $\times$ $10$ trees each, and each tree outputs $p_t(\text{click}\mid z)$. Final ranking uses
$$
\hat p(\text{click}\mid z)=\frac{1}{T}\sum_{t=1}^T p_t(\text{click}\mid z),
$$
with items sorted in descending order of $\hat p$.

The resource analysis given for this stage emphasizes exactly $k=5$ logical qubits, circuit depth $p=3$, and gate complexity $O(pk^2)=O(75)$ two-qubit gates and $O(pk)=O(15)$ single-qubit rotations, with total roughly $90$ entangling and rotation gates plus initial Hadamards [2508.00027]. The paper contrasts this with competing pipelines such as MIQUBO and CAQUBO, which embed all original features onto qubits and require 130+ qubits or more.

## 7. Performance claims, related models, and interpretive boundaries

On the QuantumCLEF ICM-150 split, the 2025 QsRF configuration with 5 qubits, $d=5$ codes, 100 trees, and $p=3$ reports macro nDCG@10 of $0.1483$, ROC-AUC of $0.8413$, Log-Loss of $0.2300$, and train+validate+test time of approximately 10 minutes wall-clock on Apple M2 [2508.00027]. On the same benchmark, CAQUBO with 130 qubits reports nDCG@10 $=0.1363$, AUC $=0.8556$, LL $=0.2218$, and runtime of 2 hours, while MIQUBO with 130 qubits reports nDCG@10 $=0.1040$, AUC $=0.8482$, LL $=0.2241$.

On ICM-500, QsRF with 5 qubits reports macro nDCG@10 $=0.5942$, ROC-AUC $=0.8260$, and Log-Loss $=0.2372$, while CAQUBO with 400 qubits reports nDCG@10 $=0.1441$, AUC $=0.8486$, LL $=0.2226$, and MIQUBO with 450 qubits reports nDCG@10 $=0.1324$, AUC $=0.8531$, LL $=0.2206$ [2508.00027]. The paper interprets these results as showing that QsRF performs similarly to state-of-the-art methods while using only five qubits.

An important interpretive boundary is that the ensemble itself is not a quantum tree model. The paper explicitly states that no quantum gates or qubits are invoked in Stage 4; the “quantumness” sits entirely in the preceding feature-selection subcircuit [2508.00027]. This distinguishes the method from other quantum forest proposals. A related example is the kernel-based Quantum Random Forest, in which each split node is a quantum-kernel SVM and the ensemble consists of quantum decision trees trained by bagging, with a low-rank Nyström approximation used to reduce the number of kernel estimations [2210.02355]. That model is a different architecture: the quantum component is embedded in split functions themselves rather than isolated to a front-end feature-selection routine.

Taken together, these works indicate that “QsRF” names a broader design principle: preserving the bagged-tree backend while re-engineering feature-subspace generation through either quantum-inspired probability weighting or a small-scale quantum optimization step. This suggests that the central research question is not whether forests are quantum in a categorical sense, but how structured subspace selection alters the accuracy–diversity trade-off under classical or hybrid computational constraints.

Source: https://www.emergentmind.com/topics/quantum-semi-random-forest-qsrf