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:X→Yf: X \to Y constructed so that for any x∈Xx \in X, f(x)f(x) assigns a single label y∈Yy \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 XX0.

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

XX1

where XX2 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 XX3 amplitudes into XX4 qubits (e.g., 256 features XX5 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 XX6 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 XX7), QCNNs achieve test accuracies in the XX8--XX9 range, narrowly trailing compact classical CNN baselines (Y={1,2,3,4}Y = \{1,2,3,4\}0--Y={1,2,3,4}Y = \{1,2,3,4\}1) 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 Y={1,2,3,4}Y = \{1,2,3,4\}2; each class Y={1,2,3,4}Y = \{1,2,3,4\}3 gets a fixed single-qubit "label state" Y={1,2,3,4}Y = \{1,2,3,4\}4 whose Bloch vector Y={1,2,3,4}Y = \{1,2,3,4\}5 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 Y={1,2,3,4}Y = \{1,2,3,4\}6 are weights computed from training overlaps.
  • Decision Rule: Assign the class index maximizing the inner product Y={1,2,3,4}Y = \{1,2,3,4\}7.
  • 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 Y={1,2,3,4}Y = \{1,2,3,4\}8 accuracy; finite-sampling and depolarizing noise up to Y={1,2,3,4}Y = \{1,2,3,4\}9 do not degrade accuracy (Pillay et al., 2023).

Polyadic Quantum Classifier

The Polyadic Quantum Classifier (Cappelletti et al., 2020) supports f:X→Yf: X \to Y0-class prediction with f:X→Yf: X \to Y1 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 f:X→Yf: X \to Y2 class 0, ..., 11 f:X→Yf: X \to Y3 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 f:X→Yf: X \to Y4 accuracy (simulated QPU), compared to XGBoost at f:X→Yf: X \to Y5 (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 f:X→Yf: X \to Y6 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 f:X→Yf: X \to Y7 where f:X→Yf: X \to Y8.
  • Expected Accuracy: For moderate-scale four-class problems, OSELM achieves f:X→Yf: X \to Y9--x∈Xx \in X0 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 (x∈Xx \in X1 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 x∈Xx \in X2-qubit bitstring mapped to class index
OSELM (Er et al., 2016) Classical online 4 output neurons, x∈Xx \in X3 decision
CASIMAC (Heese et al., 2021) Classical, kernel Closest simplex vertex in x∈Xx \in X4

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 x∈Xx \in X5 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 x∈Xx \in X6 minimizing the average error x∈Xx \in X7 (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 x∈Xx \in X8--x∈Xx \in X9 accuracy on subsets of MNIST (digits f(x)f(x)0, f(x)f(x)1), with network sizes f(x)f(x)2200 trainable parameters and training regimes of 10--50 epochs (Bokhan et al., 2022, Mordacci et al., 2024).
  • SWAP-Test Classifier: Yields f(x)f(x)3--f(x)f(x)4 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 f(x)f(x)5 on synthetic four-class data, with two-qubit circuits and no need for deep variational circuits (Cappelletti et al., 2020).
  • Classical Baselines: OSELM achieves f(x)f(x)6--f(x)f(x)7 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 f(x)f(x)8 qubits is bottlenecked by f(x)f(x)9 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 y∈Yy \in Y0 typically requires either increased qubit count (y∈Yy \in Y1) 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.