Papers
Topics
Authors
Recent
Search
2000 character limit reached

Four-Class Classifier Overview

Updated 31 January 2026
  • Four-class classification is a system that assigns inputs to one of four exclusive classes using decision rules based on maximum probability or raw logits.
  • Quantum implementations like QCNN and SWAP-Test leverage amplitude encoding, parameter-shift training, and specialized measurement mapping to achieve high accuracy.
  • Classical methods such as OSELM and CASIMAC use multi-neuron outputs and simplex-based kernel techniques to deliver robust, calibrated performance.

A four-class classifier is a classification algorithm designed to assign each input sample to one of exactly four mutually exclusive classes. This paradigm generalizes the binary classification scenario to a multiclass setting and is relevant across quantum and classical machine learning, signal processing, and information retrieval. Four-class classification exposes algorithmic and representational considerations distinct from either binary or general NN-class scenarios, enabling both focused benchmarking and technical analysis of quantum and classical classifier architectures.

1. Formal Definition and Decision Rule

Let XX denote the input feature space and Y={1,2,3,4}Y = \{1,2,3,4\} denote the set of possible labels. A four-class classifier is a function f:XYf: X \to Y constructed so that for any xXx \in X, f(x)f(x) assigns a single label yYy \in Y corresponding to the predicted class for xx. In probabilistic settings, the classifier may additionally output a vector of class probabilities p=[p1,p2,p3,p4]p = [p_1, p_2, p_3, p_4] with pi=1\sum p_i = 1, and prediction is performed via f(x)=argmaxi=14pif(x) = \arg\max_{i=1}^4 p_i.

The key performance metrics are classification accuracy, cross-entropy loss, and in some settings, calibration error (e.g., ECE for calibrated confidence estimation) (Heese et al., 2021). The prediction rule is thus

y^=argmaxi=1,2,3,4si(x)\hat{y} = \arg\max_{i=1,2,3,4} s_i(x)

where si(x)s_i(x) is either a raw logit or a probability for each class.

2. Quantum Classifier Architectures for Four Classes

Quantum machine learning has produced multiple families of four-class classifiers tailored to NISQ-era hardware, notably the Quantum Convolutional Neural Network (QCNN) and the SWAP-Test Classifier.

Quantum Convolutional Neural Networks (QCNN)

In "Multiclass classification using quantum convolutional neural networks with hybrid quantum-classical learning" (Bokhan et al., 2022) and "Multi-Class Quantum Convolutional Neural Networks" (Mordacci et al., 2024), QCNNs for four classes process images as follows:

  • Data Encoding: Amplitude encoding of a normalized vectorized image, often preprocessed by PCA to fit 2n2^n amplitudes into nn qubits (e.g., 256 features \to 8 qubits).
  • Circuit Architecture: Layered quantum circuits with convolutional (single- and multi-qubit gates) and pooling (qubit reduction via entangling gates or tracing out) stages, ultimately mapping data qubits to a set of two or more measured qubits.
  • Measurement and Output: Final measured qubits yield a four-dimensional readout, either one-hot via ancillas (Bokhan et al., 2022) or by mapping computational basis states 00,01,10,11|00\rangle,|01\rangle,|10\rangle,|11\rangle to the four classes (Mordacci et al., 2024).
  • Training Objective: Classical softmax and cross-entropy loss over output probabilities, with parameters updated by the parameter-shift rule and optimizers such as Adam.
  • Numerical Results: On PCA-reduced MNIST (digits {0,1,2,3}\{0,1,2,3\}), QCNNs achieve test accuracies in the $85$--93%93\% range, narrowly trailing compact classical CNN baselines ($90$--97%97\%) under matched parameter budgets (Bokhan et al., 2022, Mordacci et al., 2024).

SWAP-Test Based Multi-Class Classifiers

The Multi-Class SWAP-Test classifier (Pillay et al., 2023) applies the following scheme:

  • Data and Label-State Encoding: Each sample is encoded as a quantum state via a feature map UΦ(x)U_{\Phi}(x); each class ii gets a fixed single-qubit "label state" i|\ell_i\rangle whose Bloch vector yiy_i is placed as one vertex of the Tammes-optimal tetrahedron on the Bloch sphere.
  • Circuit Topology: Utilizes a modified SWAP-test on two data registers, a label qubit, an ancilla, and an index register for training samples.
  • Measurement and Assignment: Single-qubit tomography on the label register yields a vector ypred=i=14αiyi; αiy_{\mathrm{pred}} = \sum_{i=1}^4 \alpha_i y_i; \ \alpha_i are weights computed from training overlaps.
  • Decision Rule: Assign the class index maximizing the inner product yiypredy_i \cdot y_{\mathrm{pred}}.
  • Noise Robustness: The scheme is invariant to depolarizing noise on the label qubit, as the predicted vector uniformly shrinks but angular relations are preserved unless label-vectors become non-separable.
  • Empirical Results: On 4-XOR synthetic data, ideal simulations yield 100%100\% accuracy; finite-sampling and depolarizing noise up to p=0.1p=0.1 do not degrade accuracy (Pillay et al., 2023).

Polyadic Quantum Classifier

The Polyadic Quantum Classifier (Cappelletti et al., 2020) supports 2N2^N-class prediction with NN measured qubits. For four-class problems:

  • Circuit: 2 entangled qubits with repeated data encoding, entangling, and trainable rotation blocks.
  • Output Mapping: Measurement in the computational basis; bitstrings mapped to class indices (00 \rightarrow class 0, ..., 11 \rightarrow class 3).
  • Loss and Optimization: Mini-batch cross-entropy loss, parameter-shift and gradient-free optimizers.
  • Numerical Results: On a 2D four-Gaussian benchmark, achieves 85%±2.8%85\% \pm 2.8\% accuracy (simulated QPU), compared to XGBoost at 88%88\% (Cappelletti et al., 2020).

3. Classical Four-Class Classifier Methodologies

Four-class classification in classical learning typically leverages well-established architectures with minimal adaptation:

  • Online Universal Classifier (OSELM): An online sequential Extreme Learning Machine with L=4L=4 output neurons (one-hot encoding). The only modified hyperparameters relative to binary or three-class settings are output dimension and initialization block size (Er et al., 2016). In this regime, each prediction is handled as j^=argmaxj=1,,4y^j\hat{j} = \arg\max_{j=1,\ldots,4} \hat{y}_j where y^=βTh(x)\hat{y} = \beta^T h(x).
  • Expected Accuracy: For moderate-scale four-class problems, OSELM achieves $80$--95%95\% accuracy, with millisecond-scale online updates and sub-millisecond prediction times (Er et al., 2016).
  • Calibrated Simplex-Mapping Classifier (CASIMAC): Embeds the four labels as vertices of a regular tetrahedron (R3\mathbb{R}^3 simplex), mapping data to the corresponding simplex region via k-nearest-neighbor attraction/repulsion and kernel ridge or Gaussian process regression. Predictions are given by the closest vertex in latent space; confidence is provided by Monte Carlo estimation of the Gaussian probability mass within each class-region (Heese et al., 2021).

4. Comparative Table of Representative Four-Class Classifiers

Below is a summary of classifier type, quantum/classical regime, and characteristic features (restricted to explicit content in the provided data).

Classifier Regime Output/Decision Scheme
QCNN (Bokhan et al., 2022Mordacci et al., 2024) Quantum NISQ Ancilla or basis state → softmax 4-probabilities
SWAP-Test (Pillay et al., 2023) Quantum NISQ Label state tomography → vector inner product
Polyadic (Cappelletti et al., 2020) Quantum NISQ NN-qubit bitstring mapped to class index
OSELM (Er et al., 2016) Classical online 4 output neurons, argmaxj\arg\max_j decision
CASIMAC (Heese et al., 2021) Classical, kernel Closest simplex vertex in R3\mathbb{R}^3

5. Optimization, Training, and Theoretical Properties

  • Optimization in Quantum Models: Parameter-shift rule for gradient estimation dominates, leveraging two-point evaluations for efficient, hardware-compatible training (Bokhan et al., 2022, Mordacci et al., 2024, Cappelletti et al., 2020). Adam is standard for classical parameter updates, with learning rates in [5×105,102][5\times10^{-5},\,10^{-2}] and minibatch training.
  • Classical Algorithms: Recursive least squares or direct kernel ridge/GPR fitting; no explicit learning rate (Er et al., 2016, Heese et al., 2021).
  • Bayes-Optimality: In the quantum detection-theory framework, the four-class classifier is realized by optimizing a set of four projective or POVM measurements {Πk}\{\Pi_k\} minimizing the average error RR (Helstrom bound). This yields a classifier reducing to classical one-vs-rest in the commuting case but admits strictly lower average risk with quantum-encoded or entangled class/states (Tiwari et al., 2018).

6. Performance, Robustness, and Scalability

  • Four-Class QCNNs: Achieve $85$--93%93\% accuracy on subsets of MNIST (digits {0,1,2,3}\{0,1,2,3\}, {3,4,5,6}\{3,4,5,6\}), with network sizes <<200 trainable parameters and training regimes of 10--50 epochs (Bokhan et al., 2022, Mordacci et al., 2024).
  • SWAP-Test Classifier: Yields $99$--100%100\% accuracy on ideal and noise-limited synthetic 4-class problems; is robust to depolarizing noise due to invariant angular assignment (Pillay et al., 2023).
  • Polyadic Quantum Classifier: Attains 85%±2.8%85\% \pm 2.8\% on synthetic four-class data, with two-qubit circuits and no need for deep variational circuits (Cappelletti et al., 2020).
  • Classical Baselines: OSELM achieves $80$--95%95\% across several real-world problems; CASIMAC matches kernel SVM and GPC accuracy while additionally providing calibrated confidence estimates (Er et al., 2016, Heese et al., 2021).

7. Technical and Practical Considerations

  • Encoding Overhead: Amplitude encoding of high-dimensional classical features into nn qubits is bottlenecked by O(2n)O(2^n) circuit complexity; PCA and dimensionality reduction are typically used to fit classical data into tractable numbers of qubits for quantum classifiers (Bokhan et al., 2022, Mordacci et al., 2024).
  • Readout and Calibration: Direct mapping of measurement outcomes to class indices ensures hardware efficiency in both Polyadic and QCNN architectures. Methods such as CASIMAC provide explicit statistical calibration via simplex-based geometries and kernel regression (Heese et al., 2021).
  • NISQ Suitability: Quantum architectures (QCNN, Polyadic, SWAP-Test) are explicitly designed to constrain circuit depth and qubit count, employing repeated pooling, sparse multi-qubit gates, and data-reuploading (Bokhan et al., 2022, Mordacci et al., 2024, Cappelletti et al., 2020, Pillay et al., 2023).
  • Scalability: For all NISQ quantum schemes, increasing the class number LL typically requires either increased qubit count (n=log2Ln = \lceil\log_2 L\rceil) or expanded measurement schemes; circuit compression and parameter-sharing techniques are discussed as possible improvements (Bokhan et al., 2022, Cappelletti et al., 2020).

References

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Four-Class Classifier.