In short

The data is hashed into 262,144 features. Three routes then reduce it to one value per qubit: two through a Random Forest (grouped votes and leaf embedding) and one through PCA as the baseline. Each route trains a VQC, and every route is tested on the same 50 held-out splits.

flowchart TD
  data["GBAC dataset<br/>malware + benign API-call sequences"]
  pre["Preprocessing<br/>hash unigrams + bigrams into 262,144 features,<br/>L2-normalise, standardise without centring"]
  rf["Train filter model<br/>Random Forest, 100 trees, training fold only"]
  votes["Grouped votes<br/>q tree groups, mean P(malware),<br/>out-of-bag on training rows"]
  leaf["Leaf embedding<br/>one-hot leaf per tree,<br/>TruncatedSVD to q components"]
  pca["PCA baseline<br/>all features, no forest,<br/>centred PCA to q components"]
  scale["Min-max scale to [0, π] (fit on training fold)"]
  angle["Angle encoding<br/>one RY rotation per qubit"]
  zz["ZZFeatureMap encoding"]
  vqc["Train VQC on q qubits<br/>RealAmplitudes ansatz, readout on qubit 0,<br/>cross-entropy loss, COBYLA ≤ 500 evaluations"]
  test["Held-out test fold<br/>fitted scaler, forest, reducer and VQC reused unchanged"]
  res["Malware / benign predictions, metrics<br/>(10 runs × 5 folds)"]
  data --> pre
  pre --> rf
  pre --> pca
  rf --> votes
  rf --> leaf
  votes --> scale
  leaf --> scale
  pca --> scale
  scale -->|votes, leaf| angle
  scale -->|PCA| zz
  angle --> vqc
  zz --> vqc
  vqc --> test --> res

The pipeline has three phases:

  1. Phase 1 – Preprocessing and filter training: hash the data and train the Random Forest.
  2. Phase 2 – VQC training: reduce to values, scale, encode and train the VQC.
  3. Phase 3 – Evaluation: apply everything, unchanged, to held-out test folds and test the differences statistically.

This research compared the performance of the two RF methods to the PCA baseline route at the same number of qubits. This ensures that the primary difference between the two is the stage before encoding, which isolates the change in performance to primarily come from the RF pre-encoding stage. PCA did not improve with angle encoding, therefore the gap should not be caused by the choice of encoding.

See also: dataset and splits, baselines, settings and hardware.