Image classification via a quantum-inspired strategy involving a mixture of experts
Summary
Proposes a quantum-inspired hybrid classical-quantum framework for image classification using a mixture of experts, demonstrating improved performance and reduced failure rate on MNIST and Fashion-MNIST datasets.
View Cached Full Text
Cached at: 07/10/26, 06:14 AM
# Image classification via a quantum-inspired strategy involving a mixture of experts Source: [https://arxiv.org/html/2607.07754](https://arxiv.org/html/2607.07754) Kumari Jyoti[kumarijyoti@iisc\.ac\.in](https://arxiv.org/html/2607.07754v1/mailto:[email protected])Centre for High Energy Physics, Indian Institute of Science, Bangalore 560012Rohith Babu[rohithbabu@iisc\.ac\.in](https://arxiv.org/html/2607.07754v1/mailto:[email protected])Centre for High Energy Physics, Indian Institute of Science, Bangalore 560012Apoorva D\. Patel ###### Abstract Pattern recognition problems arise in a variety of physical image processing situations, and convolutional neural networks are a popular scheme for the required feature extraction and classification tasks\. The classical networks use diffusion\-based smearing and block\-wise pooling to downsample the image data and capture important structural features\. In this work, we propose and demonstrate a more efficient quantum\-inspired strategy involving a mixture of experts\. It is a hybrid classical\-quantum framework\. The quantum part consists of amplitude encoding of the images, convolution using local unitary operations, multiple experts processing the same image with different parameters, and feature extraction using quantum stabiliser codes\. The classical part then jointly processes the features extracted by different experts using a standard fully connected neural network for image class prediction\. Using MNIST and Fashion\-MNIST datasets as benchmarks, we demonstrate that the joint expert analysis outperforms the individual expert one, as well as reduces the failure rate of image class prediction by around a factor of two\. The overhead of our quantum\-inspired strategy is only moderate on GPU workstations, which makes our proposal a practical alternative to existing classical schemes\. We also point out how the quantum part of our framework can be executed on a quantum processor\. Supervised machine learning, Quantum\-inspired algorithm, Mixture of experts, Amplitude encoding, Unitary convolution, Stabiliser code, Fully connected neural network\. ## IIntroduction Rapid technological developments have made various types of sensors and detectors affordable and convenient\. They collect huge amounts of data which need to be analysed to make decisions\. Often there is no time or space to store the data; interesting features must be extracted quickly and the rest discarded\. Examples range from astronomy, imagery and surveillance to internet traffic and collider physics\. Machine learning models are used for pattern recognition analysis of such big data problems, without direct human intervention\. Supervised learning is a basic machine learning problem, where the models are trained using data with known pattern labels, and then used to classify unlabeled test data\. In the standard form, the data is first embedded in a high dimensional feature space, and then separated into disjoint classes with binary labels using linear algebra operations\. The common technique processes the high\-dimensional data using Convolutional Neural Networks \(CNNs\)\[[1](https://arxiv.org/html/2607.07754#bib.bib1),[2](https://arxiv.org/html/2607.07754#bib.bib2)\]for feature extraction and spatial aggregation\. Mechanisms such as diffusion and pooling utilise continuous neighborhood dynamics and heat\-kernel approximations to reduce the data while capturing multi\-scale features\. While mathematically robust, these manipulations are inherently lossy\. Nevertheless they are imperative, because handling data with a large number of features is computationally prohibitive and only a small number of features are important for extracting the relevant information such as the class labels\. The central aim then is to find a clever way to reduce the number of features, such that as much relevant information as possible can be extracted from the reduced data\. In recent years, quantum algorithms have been developed for various information processing tasks\. Many attempts are being made to see how incorporating quantum logic operations in machine learning strategies can enhance their efficiency\. It is becoming clear that significant quantum advantage can be obtained only when quantum data are provided as input to the algorithms\[[3](https://arxiv.org/html/2607.07754#bib.bib3),[4](https://arxiv.org/html/2607.07754#bib.bib4),[5](https://arxiv.org/html/2607.07754#bib.bib5)\]\. Such a scenario can be a genuine quantum experiment whose output is fed to a quantum processor, without any measurement that would collapse the output to a classical form\[[6](https://arxiv.org/html/2607.07754#bib.bib6)\]\. In this work, we consider a more general structure for “quantum data”, where both magnitude and phase information can be extracted from the same data\. Such situations occur when signals from a wave source contain the data of interest, and multiple detectors are used to study the source properties from different perspectives\. A motivating analogy comes from how two eyes allow us to judge the distance of the source by parallax and two ears allow us to judge the direction of the source by detection time difference—properties that cannot be obtained with only one eye or one ear\. We incorporate this strategy in our work, by encoding images in superposition states and then letting multiple experts classify them from different viewpoints \(these viewpoints are taken to be initial values of the variational parameters that are tuned to classify the data\)\. This defines our framework for a Quantum Mixture of Experts \(QMoE\) analysis, which has been implemented by others in a somewhat different manner\[[8](https://arxiv.org/html/2607.07754#bib.bib8),[7](https://arxiv.org/html/2607.07754#bib.bib7)\]\. We replace parts of the CNN technique by quantum subroutines to construct a hybrid image classification algorithm, where classical diffusion is replaced by unitary smearing and block\-wise pooling is substituted by a quantum stabiliser code, while the binary classification task is carried out by a standard fully connected neural network\. We then compare the classification performance of the quantum subroutines with their classical versions\. We also check for the advantage offered by multiple experts acting jointly versus when they act independently\. Our tests are carried out for both the publicly available MNIST\[[9](https://arxiv.org/html/2607.07754#bib.bib9)\]and Fashion\-MNIST\[[10](https://arxiv.org/html/2607.07754#bib.bib10)\]datasets\. The MNIST database consists of various handwritten forms of 0\-9 digits forming 10 classes, while the Fashion\-MNIST database consists of pictures of various clothing items also forming 10 classes\. Our detailed algorithmic methodology is presented in Section 2\. Our results are discussed in Section 3, and we end with conclusions in Section 4\. All our numerical analysis is carried out in a quantum\-inspired setting, with PyTorch programming on GPU workstations\. In the Appendix, we describe how our quantum subroutines can be implemented on a quantum processor\. ## IIMethodology Our algorithmic implementation has several components: State encoding, convolutional smearing, introduction of multiple experts, block\-wise pooling, and classification using a fully connected neural network\. We describe these components in turn\. ### II\.1State Encoding Both the MNIST and Fashion\-MNIST datasets are grey\-scale 28×\\times28 pixel images\. We pad them with blank pixels to 32×\\times32 size, for easy binary processing\. Bothxxandyycoordinates of the images are then labeled using 5 bits each\. We embed the images into quantum states using amplitude encoding\. We first convert each grey\-scale image into a black\-and\-white one with a thresholding step, such that the value for each pixelcx,y=c\_\{x,y\}=\+1 or \-1\. We then construct the highly entangled superposition state: \|ψ⟩=132∑x,y∈\{0,1\}5cx,y\|x0x1x2x3x4,y0y1y2y3y4⟩\.\|\\psi\\rangle=\\frac\{1\}\{32\}\\sum\_\{x,y\\in\\\{0,1\\\}^\{5\}\}c\_\{x,y\}\|x\_\{0\}x\_\{1\}x\_\{2\}x\_\{3\}x\_\{4\},y\_\{0\}y\_\{1\}y\_\{2\}y\_\{3\}y\_\{4\}\\rangle\.\(1\)Such an amplitude encoding of the classical pixel values is exhaustive at the beginning\. But once it is done, all the subsequent operations are carried out on the encoded 10 qubit states, with an exponential reduction of the space resources\. ### II\.2Convolutional Smearing The convolutional smearing mixes pixel value for each image with those of its neighbours\. The classical diffusion process uses the discrete Laplacian operator for this purpose\. We implement that iteratively, by repeating nearest neighbour mixing at each iteration for a number of iterations\. Denoting the pixel values at timettbyXi,jtX\_\{i,j\}^\{t\}, the transformation is: Xi,jt\+1=\(1−α\)Xi,jt\+α4\(Xi−1,jt\+Xi\+1,jt\+Xi,j−1t\+Xi,j\+1t\)\.X\_\{i,j\}^\{t\+1\}=\(1\-\\alpha\)X\_\{i,j\}^\{t\}\+\\frac\{\\alpha\}\{4\}\(X\_\{i\-1,j\}^\{t\}\+X\_\{i\+1,j\}^\{t\}\+X\_\{i,j\-1\}^\{t\}\+X\_\{i,j\+1\}^\{t\}\)\.\(2\)The parameterα\\alphacontrols the diffusion speed, and the transformation is repeated forTTtime steps\. This update can be easily carried out with a checkerboard partition of the square pixel grid that we have\. Roughly,αT\\alpha Trepresents the total diffusion depth, andα∈\[0,1\]\\alpha\\in\[0,1\]is needed for the stability of diffusion\. For finiteTTand checkerboard updates, the range ofα\\alphacan be extended somewhat to optimise smearing\. Such a smoothing of the pixel values degrades fine\-grained structural details, transforming the image towards a blurred low\-resolution spatial distribution\. The blurred images can be good enough to discern shapes, clusters and global patterns\. Instead, we process the quantum image states by a non\-lossy unitary smearing, using the transformation described in\[[11](https://arxiv.org/html/2607.07754#bib.bib11)\]\. Local unitary smearing can be carried out for a hypercubic structure in any dimension, by a bipartite splitting of the data into even and odd subsets, as illustrated in Fig\.[1](https://arxiv.org/html/2607.07754#S2.F1)\. Figure 1:Bipartite splitting of hypercubic lattice structures: \(a\) One dimension, \(b\) Two dimensionsThe two\-dimensional image is organised in a checkerboard pattern, and the two subsets \(labeled even and odd\) are evolved in an alternate manner\. Each time step implements \|ψ\(t\+1\)⟩=UeUo\|ψ\(t\)⟩\.\|\\psi\(t\+1\)\\rangle=U\_\{e\}U\_\{o\}\|\\psi\(t\)\\rangle\.\(3\)The operatorsUo\(e\)U\_\{o\(e\)\}unitarily mix the quantum amplitudes at the four corners of checkerboard elementary squares, according to Uo\(e\)=cI−is2Ho\(e\),\|c\|2\+\|s\|2=1\.U\_\{o\(e\)\}=cI\-is\\sqrt\{2\}H\_\{o\(e\)\}~,~~\|c\|^\{2\}\+\|s\|^\{2\}=1\.\(4\)The4×44\\times 4Hamiltonian blocks are: HoB\\displaystyle H\_\{o\}^\{B\}=\\displaystyle=−i2\(0−1−101001100−10−110\)00100111\\displaystyle\-\\frac\{i\}\{2\}\\begin\{pmatrix\}0&\-1&\-1&0\\\\ 1&0&0&1\\\\ 1&0&0&\-1\\\\ 0&\-1&1&0\\end\{pmatrix\}\\begin\{matrix\}00\\\\ 10\\\\ 01\\\\ 11\\end\{matrix\}\(5\)=\\displaystyle=−12\(I⊗σ2\+σ2⊗σ3\),\\displaystyle\-\\frac\{1\}\{2\}\(I\\otimes\\sigma\_\{2\}\+\\sigma\_\{2\}\\otimes\\sigma\_\{3\}\),\(6\)where the column on the right denotes the vertices of the elementary square on whichHoBH\_\{o\}^\{B\}operates, andσi\\sigma\_\{i\}are the Pauli matrices\. Similarly,HeB=−HoBH\_\{e\}^\{B\}=\-H\_\{o\}^\{B\}when operating on the elementary square with vertices \{00,\-10,0\-1,11\}\. The mixing parametersccandsscan be tuned to achieve suitable smearing of the image, and the total smearing depth is roughlysTsT\. More generally, the parametersscan be chosen to be different for different time steps\. Note that we have adopted the convention such that all numerical computations need only real numbers \(and not complex numbers\)\. ### II\.3Multiple Experts We identify the experts by the parameters they use for the classification problem\. These parameters appear in the convolutional smearing part of the algorithm, while the block\-wise pooling part is essentially deterministic\. In the classical case, the relevant parameter isα\\alpha, and the optimisation of classification fidelity amounts to finding the optimal value forα\\alpha\. In the quantum case, the experts are labeled by their parameter values forss\. There are two strategies available\. We can optimise the classification fidelity for each expert independently, and make the final classification prediction by a majority vote\. Alternately, we can optimise the classification fidelity by joint decisions made by all the experts together\. Our emphasis in this work is on showing that joint decisions by all the experts provides better classification predictions compared to the case when the experts act independently\. ### II\.4Block\-wise Pooling Block\-wise pooling is an irreversible process that reduces the number of image pixels, while retaining the features crucial for image classification\. The decrease in number of image pixels significantly cuts down the subsequent work to be carried out by the image classifier\. In the classical case, we downsize the images thrice in steps of 2 along both axes, reducing the pixels first from 32×\\times32 to 16×\\times16, then from 16×\\times16 to 8×\\times8, and then from 8×\\times8 to 4×\\times4\. Each downsizing step of 2 is accomplished by combining the central pixel value with those of its nearest and next\-to\-nearest neighbours in a 3×\\times3 window, with weights assigned as in Fig\.[2](https://arxiv.org/html/2607.07754#S2.F2)\. The weights are chosen so as to give the same overall weight to each pixel, and the 3×\\times3 window slides over the whole image in steps of 2\. 1\.00\.50\.50\.50\.50\.250\.250\.250\.25Figure 2:Pixel weights for classical pooling using a 3×\\times3 windowThe final 4×\\times4 pixel values are passed on to the image classifier as 16 distinct features\. In the quantum case, we exploit the fact that error correcting codes partition the state space into non\-overlapping disjoint subsets\. These subsets are identified by their distinct syndromes, and the syndromes can be used as the features to be passed on to the image classifier\. In this work, the pixel coordinates are labeled using 5 qubits along each axis, and so we use the perfect nondegenerate \[\[5,1,3\]\] stabiliser code to extract the syndromes for each axis\[[12](https://arxiv.org/html/2607.07754#bib.bib12)\]\. Using the four commuting syndrome generatorsXZZXIXZZXI,IXZZXIXZZX,XIXZZXIXZZandZXIXZZXIXZfor each axis, we extract the 4×\\times4=16 distinct features \(they are the expectation values of the syndrome generators in the state\|ψ⟩\|\\psi\\rangle\) that are passed on to the image classifier\. Since the stabiliser generators are independent of the images, they can be precomputed and stored in lookup arrays\. Then the syndrome extraction is considerably simplified by observing that when the generators are expressed as 32×\\times32 matrices, there is only one nonzero element \(which is either \+1 or \-1\) in each row and each column\. Note that the \[\[5,1,3\]\] stabiliser code does not distinguish between the two highly entangled states corresponding to the encoded logical qubit, and we ignore the associated feature\. ### II\.5Classification We use the popular strategy of a fully connected neural network with multiple layers \(FCL\) to classify the images by processing their extracted features\. Such fully connected neural networks have a large number of parameters, which frequently lead to problems of barren plateaus and local minima, because many parameters are not relevant to the classification problem\. The significant reduction in the number of features, resulting from the convolution and pooling processes, simplify the classification problem by making the required FCL smaller\. Both MNIST and Fashion\-MNIST datasets have 10 distinct classes, digits and shapes respectively\. We perform a binary classification analysis, i\.e\. whether the test image belongs to a particular class or not, and repeat that for each of the 10 classes\. In both classical and quantum cases, we have 16 distinct features extracted from the images that are fed to the FCL \(compared to the 784 pixels of the original 28×\\times28 images\)\. We experimented with the PyTorch implementation of FCL to find a reasonable setting\. We chose to cascade the pooled features through a funnel\-shaped512→256→128→10512\\to 256\\to 128\\to 10neural network configuration, ending with the output classes\. This choice was stabilised via the batch normalization scaled by 10 and the dropout rate set to 0\.2\. Also, the classical baseline was evaluated for 10 different diffusion time steps,TT=1 to 10, to benchmark the inverse relationship between diffusion and classification accuracy\. Optimisation in the FCL used loss gradient and theCrossEntropyLoss\(label\_smoothing=…\)function from PyTorch\. For the training data, the mismatch between predicted and known class labels gives an estimate of the loss gradient for the parameters, which is then backpropagated to the convolution stage\. In this parameter training process, we applied the Adam optimizer\[[13](https://arxiv.org/html/2607.07754#bib.bib13)\]with a learning rate of 0\.002\. ## IIIResults and Discussion Both MNIST and Fashion\-MNIST databases have 60000 training images and 10000 test images\. We carried out their classification analysis using PyTorch tensor broadcasting and vectorised linear algebra operations to get maximum computational speedup on NVIDIA H200 GPUs\. In this section, we describe and discuss our results\. ### III\.1Convolutional Smearing We smear the image pixels with multiple rounds of convolution operations\. The rate of smearing is controlled by the parameterα\\alphain the classical case and the parameters≡sinθs\\equiv\\sin\\thetain the quantum case\. These parameters are later optimised by FCL\. To handle coordinate shifts that go outside the image boundaries, we used modulo arithmetic to wrap around to the opposite side \(these wrap\-arounds involve only the padded blank pixels\)\. In the classical case, we checked how varying the diffusion rateα\\alphaaffects the classification prediction, withTTfixed at 1\. For the MNIST dataset, the test accuracy peaked at a 95\.02% forα=1\.5\\alpha=1\.5, and was worse at 94\.62% forα=1\.0\\alpha=1\.0and 93\.27% forα=0\.5\\alpha=0\.5\. For the Fashion\-MNIST dataset, the test accuracy remained smaller, around 76%\. A particular example of the confusion matrix, which specifies misidentified class labels, is shown in Fig\.[3](https://arxiv.org/html/2607.07754#S3.F3)\. Results for classification accuracy for different values ofα\\alphaare summarised in Table[1](https://arxiv.org/html/2607.07754#S3.T1)\. Figure 3:Confusion matrix for the MNIST dataset in case of classical diffusion withα\\alpha=1,TT=1\.Table 1:Classical classification performance forTT=1 and varying diffusion rateα\\alphaIn the quantum case, for computational efficiency on a GPU, we bypassed the sequential “for loops” using PyTorch tensor slicing\. By fully extracting the subgrids in steps of 2, e\.g\.X\[:,:,0::2,0::2\], the algorithm applies theUoU\_\{o\}andUeU\_\{e\}transformations to all 2×\\times2 squares at once, tantamount to a quantum processor taking advantage of superposition\. In general, the parameterθ\\thetacan be made dependent on pixel position and convolution layer number\. We avoided pixel position dependence forθ\\theta, but allowedθ\\thetato depend on the convolution layer number\. We show our results for unitary smearing of sample images from MNIST and Fashion\-MNIST data sets, in Figs\.[4](https://arxiv.org/html/2607.07754#S3.F4)and[5](https://arxiv.org/html/2607.07754#S3.F5)respectively, illustrating the effect of thresholding followed by 3 layers of alternate odd and even subset evolution\. Figure 4:Unitary convolution of MNIST images for 3 layers, withθ\\thetavalues as mentioned, after thresholding\.Figure 5:Unitary convolution of Fashion\-MNIST images for 3 layers, withθ\\thetavalues as mentioned, after thresholding\. ### III\.2Multiple Experts We identify the quantum experts by the parametersθ\\thetathey use for the convolutional smearing, whereby they transform the image features differently\. ForNexpN\_\{exp\}experts, their individual parametersθi\\theta\_\{i\}are clamped in the intervals\[\(i−1\)π/Nexp,iπ/Nexp\]\[\(i\-1\)\\pi/N\_\{exp\},i\\pi/N\_\{exp\}\]during the optimisation by FCL, so as to keep them distinct\. Each expert provides 16 syndrome features that are passed on to the FCL\. In our quantum\-inspired setting, the feature for syndrome generatorMMis easily calculated as the expectation value⟨ψ\|M\|ψ⟩\\langle\\psi\|M\|\\psi\\rangleusing vectorised operations\. For independent experts, the classification prediction is made based on their individual 16NlyrN\_\{lyr\}features\. On the other hand, for the joint expert scenario, the classification prediction is made based on their combined 16NexpNlyrN\_\{exp\}N\_\{lyr\}features\. ### III\.3Classification For maximal hardware utilization, we employedtorch\.set\_float32\_matmul\_precision\(’high’\)to enforce TensorFloat\-32 \(TF32\) matrix multiplications on NVIDIA GPUs\. Also, to reduce framework overhead, the quantum model was compiled into optimized C\+\+ kernels viatorch\.compile\. The FCL implemented Leaky ReLU activations, and batch normalization \(with batch size 256\) was performed across the layers\. The model incorporated a dropout rate of 0\.2 and was trained for 30 epochs\. The learning rate began at 0\.002, and was regulated by a scheduler with a decay factor of 0\.5 and a patience parameter of 1\. The CrossEntropyLoss label smoothing parameter was set to 0\.05\. To benchmark the efficacy of our proposed quantum\-inspired algorithm, we adopted the results obtained with classical diffusion \(with varying diffusion parameterα\\alpha\) and block\-wise pooling as the baseline\. The comparison then focused on class prediction accuracy and the number of parameters involved in the analysis, while still maintaining the algorithm’s capability to preserve the underlying features of interest\. The complexity of the algorithm was dictated by two core parameters: the number of quantum experts and the number of quantum convolution layers\. In the independent expert case, the feature tensor produced by pooling was sliced, completely separating the analysis of individual experts\. The cross entropy loss was computed independently for every expert, penalising each isolated pathway for its specific domain errors\. For class prediction, the network collected the results of all the decoupled experts and made the decision by majority vote\. In the joint expert case, all the features produced by pooling were processed together in the cross entropy loss computation\. We found that this strategy consistently outperformed the independent expert case in class prediction\. Table[2](https://arxiv.org/html/2607.07754#S3.T2)exemplifies our results, contrasting the joint expert case results with those of the individual expert case as well as the corresponding classical baseline\. The improved performance of the joint expert algorithm over the classical baseline is consistent with our expectation that deterministic quantum convolution would retain full image information compared to the lossy smearing of classical diffusion\. Moreover, the time per epoch for the joint expert case shows only a moderate increase compared to the classical case, much less than the values ofNexpN\_\{exp\}andNlyrN\_\{lyr\}\(both are effectively 1 in the classical case\), making the joint expert algorithm practical\. We therefore concentrated on optimising the joint expert algorithm to obtain the best possible classification performance\. Table 2:Performance comparison between quantum and classical classification algorithms\. HereNexpN\_\{exp\}is the number of experts,NlyrN\_\{lyr\}is the number of convolution layers, Acc the accuracy for joint expert prediction, I\-Acc is the accuracy for independent expert prediction, andTET\_\{E\}the time per epoch in seconds \(without the initial overhead for loading data\)\. ### III\.4Mixture of Experts: Detailed Joint Classification Results We systematically varied the values ofNexpN\_\{exp\}andNlyrN\_\{lyr\}to find the combination that yields the best classification accuracy\. By studying the training and test accuracy distributions, we observed that increasingNexpN\_\{exp\}andNlyrN\_\{lyr\}initially gives a sharp increase in the classification accuracy, which suggests that a finer discretisation of the parameter space helps in capturing a richer set of image properties\. But increasingNexpN\_\{exp\}andNlyrN\_\{lyr\}beyond a point produces diminishing returns with increasing overfitting, which is also consistent with the general empirical FCL behaviour\. To better understand how the image features affect the class prediction, we also looked at the confusion matrices for the best parameter values\. #### 1\. MNIST Dataset Our classification accuracy results for the training and test datasets, while varyingNexpN\_\{exp\}andNlyrN\_\{lyr\}, are presented in Figs\.[7](https://arxiv.org/html/2607.07754#S3.F7)and[7](https://arxiv.org/html/2607.07754#S3.F7)in graphical form and in Figs\.[9](https://arxiv.org/html/2607.07754#S3.F9)and[9](https://arxiv.org/html/2607.07754#S3.F9)as heatmaps\. Going up from small values ofNexpN\_\{exp\}andNlyrN\_\{lyr\}, the classification accuracy initially increases substantially but then levels off\. Giving more emphasis to the test dataset accuracy, we identified the robust optimal performance point asNexpN\_\{exp\}=16 paired withNlyrN\_\{lyr\}=16\. In this configuration, the algorithm yields a test accuracy of 97\.63% and a training accuracy of 99\.81%\. We also noticed that the accuracy reached close to its final value by about 20 epochs, indicating that the algorithm converges well\. The classification accuracy increases slightly with still higher values ofNexpN\_\{exp\}andNlyrN\_\{lyr\}, but that is a matter of diminishing returns\. Our quantum\-inspired classification algorithm thus attains good accuracy at moderate depths, while more than halving the failure rate compared to the classical baseline, which should make it a highly viable choice in practice\. Figure 6:Quantum joint expert performance for the training MNIST dataset, with respect toNexpN\_\{exp\}andNlyrN\_\{lyr\}\. Figure 7:Quantum joint expert performance for the test MNIST dataset, with respect toNexpN\_\{exp\}andNlyrN\_\{lyr\}\. Figure 8:Heatmap for quantum joint expert performance for the training MNIST dataset Figure 9:Heatmap for quantum joint expert performance for the test MNIST dataset The confusion matrix for our optimal choice of mixture of experts algorithm is shown in Fig\.[10](https://arxiv.org/html/2607.07754#S3.F10)\. It shows excellent class separation among the digits of the MNIST test dataset\. It shows that the largest misidentifications occur between digits 3↔\\leftrightarrow5 and 4↔\\leftrightarrow9, which can be reasonably inferred from the writing style\. Figure 10:Confusion matrix for the optimal quantum joint expert analysis of the MNIST test dataset #### 2\. Fashion\-MNIST Dataset Our classification accuracy results for the training and test datasets, while varyingNexpN\_\{exp\}andNlyrN\_\{lyr\}, are presented in Figs\.[12](https://arxiv.org/html/2607.07754#S3.F12)and[12](https://arxiv.org/html/2607.07754#S3.F12)in graphical form and in Figs\.[14](https://arxiv.org/html/2607.07754#S3.F14)and[14](https://arxiv.org/html/2607.07754#S3.F14)as heatmaps\. The Fashion\-MNIST dataset has more complex features than the MNIST dataset, with somewhat ambiguous shapes of spatial boundaries, and so provides a more stringent test of our classification algorithm\. The higher classification difficulty of the Fashion\-MNIST dataset is also reflected in the result that the class prediction accuracy with classical diffusion peaks at around 76%\. Our multi\-expert quantum\-inspired algorithm performs substantially better, bringing down the failure rate by about a factor of two\. We identified the optimal performance point asNexp=18N\_\{exp\}=18andNlyr=16N\_\{lyr\}=16, althoughNexp=18N\_\{exp\}=18andNlyr=6N\_\{lyr\}=6is almost as good\. There the test accuracy is 86\.20% and the training accuracy is 96\.04%\. The overall qualitative trends of the classification accuracy are similar to those for the MNIST dataset\. Figure 11:Quantum joint expert performance for the training Fashion\-MNIST dataset, with respect toNexpN\_\{exp\}andNlyrN\_\{lyr\}\. Figure 12:Quantum joint expert performance for the test Fashion MNIST dataset, with respect toNexpN\_\{exp\}andNlyrN\_\{lyr\}\. Figure 13:Heatmap for quantum joint expert performance for the training Fashion\-MNIST dataset Figure 14:Heatmap for quantum joint expert performance for the test Fashion\-MNIST dataset The confusion matrix for our optimal choice of mixture of experts algorithm is shown in Fig\.[15](https://arxiv.org/html/2607.07754#S3.F15)\. It shows very good separation among the garment shapes of the Fashion\-MNIST test dataset\. The misclassifications highlight similarity of shapes among the garments, such as Shirt vs\. T\-shirt/top, Shirt vs\. Pullover, Coat vs\. Pullover, and Shirt vs\. Coat\. These specifics reveal the limitations of our feature extraction method\. Garments like shirts, coats and pullovers share similar silhouettes \(e\.g\., long sleeves and common torso coverage\), which lead to similar pooling syndromes\. Note that classes with distinct shapes \(e\.g\., Trousers, Bags and Ankle Boots\) have little trouble getting differentiated\. Figure 15:Confusion matrix for the optimal quantum joint expert analysis of Fashion\-MNIST test dataset ## IVConclusions In this work, our objective has been to devise a strategy for extracting as much information as possible from the input data, while giving up the details to reduce the computational effort, in the CNN framework for classifying images\. We formulated a hybrid classical\-quantum strategy for this purpose, and have illustrated its performance on the standard MNIST and Fashion\-MNIST datasets\. Specifically, - •We converted the images by amplitude encoding, from 28×\\times28 pixels to 5×\\times5 qubit states\. This reduction of the image size exponentially brought down the complexity of subsequent operations\. - •We replaced the classical diffusion\-based lossy convolution by quantum local unitary convolution with even\-odd partitioning of the image grid\. In the process, we introduced multiple experts performing convolution with different smearing parameters\. - •For feature extraction from the images, we replaced the classical block\-wise pooling method by the syndromes of a quantum stabiliser code\. - •We then analysed the extracted 16NexpNlyrN\_\{exp\}N\_\{lyr\}features by the experts, jointly using the conventional FCL framework\. This number of features is orders of magnitude smaller than the number of parameters needed in the FCL analysis of the original 28timestimes28 pixel size images\. Our results rigorously demonstrate that our quantum\-inspired strategy is superior to the conventional classical method for the feature extraction and classification tasks\. This is noteworthy for the MNIST dataset, and much more so for the Fashion\-MNIST dataset with higher shape ambiguity\. In particular, - •The class prediction accuracy by the joint expert analysis clearly outperforms that by the independent expert analysis, implying that our mixture of experts strategy extracts more of the relevant features from the images\. - •The class prediction failure rate for our joint expert analysis is roughly half of that for the conventional classical method, indicating that our unitary convolution and stabiliser code based syndrome extraction cause less information degradation than the feature extraction methods based on classical diffusion\. Moreover, the computational overhead introduced by our replacement is quite moderate and tolerable\. We have thus firmly established that our quantum\-inspired mixture of expert strategy offers a clear advantage in image classification tasks\. How it can be implemented in a hybrid classical\-quantum processor architecture is described in the Appendix\. Future research on the topic can address how to extend our strategy to more structurally complex diagnostic datasets\. For example, anomalies can be identified for early disease detection in medical imaging \(such as chest radiography or retinal scans\), as well as agricultural and environmental pathologies can be investigated by complex pattern recognition in images\. Needless to say, the strategy of performance optimisation using a mixture of experts can be applied to other machine learning tasks, such as reinforcement learning and unsupervised learning\. Even physical implementation on neuromorphic computing architectures can be attempted, with promising advantage for latency and power consumption\. ## Acknowledgements This work was supported by the project “Quantum Algorithms and Simulations” under the DIA\-RCoE at IISc Bangalore\. We thank R\.K\. Ramakrishnan for his comments on the manuscript\. ## References - \[1\]A\. Krizhevsky, I\. Sutskever and G\.E\. Hinton, “ImageNet Classification with Deep Convolutional Neural Networks”, Advances Neural Information Processing Systems \(NeurIPS\) 25 \(2012\)\. - \[2\]Y\. LeCun, Y\. Bengio and G\. Hinton, “Deep Learning”, Nature 521, 436\-444 \(2015\)\. - \[3\]P\. Bermejo, P\. Braccia, M\.S\. Rudolph, Z\. Holmes, L\. Cincio and M\. Cerezo, “Quantum Convolutional Neural Networks are Effectively Classically Simulable”, Phys\. Rev\. X Quantum 7, 020304 \(2026\)\. - \[4\]J\. Bowles, S\. Ahmed and M\. Schuld, “Better than Classical? The Subtle Art of Benchmarking Quantum Machine Learning Models”, \[preprint arXiv:2403\.07059\] \(2024\)\. - \[5\]R\.K\. Ramakrishnan, S\. Kashyap, K\. Jyoti and A\.D\. Patel, “Advancing in Machine Learning: Where can Quantum Techniques Help?”, \[preprint arXiv:2507\.08379\] \(2025\)\. - \[6\]H\.\-Y\. Huang, M\. Broughton, J\. Cotler, S\. Chen, J\. Li, M\. Mohseni, H\. Neven, R\. Babbush, R\. Kueng, J\. Preskill and J\.R\. Mcclean, “Quantum Advantage in Learning from Experiments”, Science 376, 1182\-1186 \(2022\)\. - \[7\]H\.\-Q\. Nguyen et al\., “QMoE: A Quantum Mixture of Experts Framework for Scalable Quantum Neural Networks”, 2025 IEEE International Conference on Quantum Computing and Engineering \(QCE\), Albuquerque, NM, USA, pp\. 223\-228 \[preprint arXiv:2507\.05190\] \(2025\)\. - \[8\]P\.A\.X\. Tognini et al\., “Solving MNIST with a Globally Trained Mixture of Quantum Experts”, \[preprint arXiv:2505\.14789\] \(2025\)\. - \[9\]Y\. LeCun, L\. Bottou, Y\. Bengio and P\. Haffner, “Gradient\-based Learning Applied to Document Recognition”, Proc\. IEEE 86\(11\), 2278\-2324 \(1998\)\. Image database: http://kaggle\.com/datasets/hojjatk/mnist\-dataset - \[10\]H\. Xiao, K\. Rasul and R\. Vollgraf, “Fashion\-MNIST: A Novel Image Dataset for Benchmarking Machine Learning Algorithms”, \[preprint arXiv:1708\.07747\] \(2017\)\. Image database: http://kaggle\.com/datasets/zalando\-research/fashionmnist - \[11\]A\. Patel, K\.S\. Raghunathan and P\. Rungta, “Quantum Random Walks without a Coin Toss”, Proc\. Workshop on Quantum Information, Computation and Communication \(QICC2005\), Kharagpur, India, Allied Publishers, pp\. 41\-55, \[preprint arXiv:0506221 \(quant\-ph\)\] \(2005\)\. - \[12\]John Preskill, “Chapter 7: Quantum Error Correction,” Lecture notes for Ph219/CS219: Quantum Information and Computation, California Institute of Technology, 2020\. Available online: https://www\.preskill\.caltech\.edu/ph229/notes/chap7\.pdf - \[13\]D\.P\. Kingma and J\. Ba, “Adam: A method for stochastic optimization”, \[preprint arXiv:1412\.6980\] \(2014\)\. - \[14\]D\.P\. DiVincenzo and P\.W\. Shor, “Fault\-Tolerant Error Correction with Efficient Quantum Codes”, Phys\. Rev\. Lett\. 77, 3260 \(1996\)\. ## Appendix Here we describe how various quantum\-inspired parts of our algorithm can be implemented on a quantum processor\. ### IV\.1Amplitude Encoding We have opted for amplitude encoding of the quantum state after thresholding\. That fixes the normalisation of the state specified in Eq\.[1](https://arxiv.org/html/2607.07754#S2.E1)\. Such a state can be generated in a straightforward manner, by starting from\|00000,00000⟩\|00000,00000\\rangleand applying rotations by fixed angles while sequentially going through the pixels labeled byx,y∈0,15x,y\\in\{0,1\}^\{5\}\. Each new rotation adds to the state a component orthogonal to the ones already included, which uniquely specifies the rotation direction while the value ofcx,yc\_\{x,y\}specifies the rotation angle\. Amplitude encoding efficiently encodes the quantum state in a small number of qubits, but then operations on the state require a higher number of logic gates\. We need to keep in mind that implementation of the quantum algorithm on the currently available noisy quantum processors requires careful management of both space and time resources, to ensure efficiency as well as reliability\. An alternative is angle encoding, which maps each classical pixel information \(i\.e\. thecx,yc\_\{x,y\}value before thresholding\) to the rotation angle of one qubit about a chosen axis\. That leads to shallow logic circuits, but the number of qubits remains large\. We find that unsuitable for our quantum algorithm, and so do not consider the possibility of angle encoding\. ### IV\.2Quantum Convolution The 4×\\times4 block matrices of our unitary convolution, Eq\.[4](https://arxiv.org/html/2607.07754#S2.E4), operate on elementary squares whose vertices have labels \{00,10,01,11\}\. Hence, they are 2\-qubit logical operations\. In the spirit of Euler angle decomposition, they can be factored in terms of 2×\\times2 submatrices as Uo=\(I00U2\)\(CISI−SICI\)\(U300σ3\),U\_\{o\}=\\begin\{pmatrix\}I&0\\\\ 0&U\_\{2\}\\end\{pmatrix\}\\begin\{pmatrix\}CI&SI\\\\ \-SI&CI\\end\{pmatrix\}\\begin\{pmatrix\}U\_\{3\}&0\\\\ 0&\\sigma\_\{3\}\\end\{pmatrix\},\(7\)whereC=c2\+s′2C=\\sqrt\{c^\{2\}\+s^\{\\prime 2\}\},S=s′=s/2S=s^\{\\prime\}=s/\\sqrt\{2\}andC2\+S2=1=c2\+s2C^\{2\}\+S^\{2\}=1=c^\{2\}\+s^\{2\}, together with U3=1c2\+s′2\(cs′−s′c\),U2=U3σ3\.U\_\{3\}=\\frac\{1\}\{\\sqrt\{c^\{2\}\+s^\{\\prime 2\}\}\}\\begin\{pmatrix\}c&s^\{\\prime\}\\\\ \-s^\{\\prime\}&c\\end\{pmatrix\},~~U\_\{2\}=U\_\{3\}\\sigma\_\{3\}\.\(8\)Note that our convention has kept all components real, completely avoiding complex numbers\. We convert this decomposition into elementary quantum logic gates, by rewriting it as Uo=\(I00U2\)\[\(CS−SC\)⊗I\]\[\(U300U3\)\(I00U3†σ3\)\],U\_\{o\}=\\begin\{pmatrix\}I&0\\\\ 0&U\_\{2\}\\end\{pmatrix\}\\left\[\\begin\{pmatrix\}C&S\\\\ \-S&C\\end\{pmatrix\}\\otimes I\\right\]\\left\[\\begin\{pmatrix\}U\_\{3\}&0\\\\ 0&U\_\{3\}\\end\{pmatrix\}\\begin\{pmatrix\}I&0\\\\ 0&U\_\{3\}^\{\\dagger\}\\sigma\_\{3\}\\end\{pmatrix\}\\right\],\(9\)and the resultant quantum logic gate circuit forUoU\_\{o\}is shown in Fig\.[16](https://arxiv.org/html/2607.07754#Sx2.F16)\. q0q\_\{0\}q1q\_\{1\}ZZRy\(−α\)R\_\{y\}\(\-\\alpha\)Ry\(α\)R\_\{y\}\(\\alpha\)Ry\(β\)R\_\{y\}\(\\beta\)ZZRy\(α\)R\_\{y\}\(\\alpha\)Figure 16:Two\-qubit logic gate circuit for the operatorUoU\_\{o\}Here, the rotation operator isRy\(ϕ\)=exp\(iϕσ2\)R\_\{y\}\(\\phi\)=\\exp\(i\\phi\\sigma\_\{2\}\), and the rotation angles areα=tan−1\(s′/c\)\\alpha=\\tan^\{\-1\}\(s^\{\\prime\}/c\)andβ=tan−1\(S/C\)\\beta=\\tan^\{\-1\}\(S/C\)\. ### IV\.3Coordinate Translation As described in Section[II\.2](https://arxiv.org/html/2607.07754#S2.SS2), the operation ofUeU\_\{e\}is the same as that ofUoU\_\{o\}, with the parameterssreplaced by−s\-sand the vertex labels of elementary square changed to \{00,\-10,0\-1,\-1\-1\}\. Because of the negative shifts, the vertex labels cannot be covered by just two bits\. A simple way out is to translate the whole image so that the point \(0,0\) maps to point \(1,1\), apply the operatorUeU\_\{e\}using two bit vertex labels, and then translate the image back to its original coordinates\. This procedure needs logic circuits that first add one to, and later subtract one from, thexxandyypixel labels\. The reversible logic circuits that accomplish these addition and subtraction tasks, using Toffoli gates and two ancilla bits, are presented in Fig\.[17](https://arxiv.org/html/2607.07754#Sx2.F17)\. \|q4⟩\|q\_\{4\}\\rangle\|q3⟩\|q\_\{3\}\\rangle\|q2⟩\|q\_\{2\}\\rangle\|q1⟩\|q\_\{1\}\\rangle\|q0⟩\|q\_\{0\}\\rangle\|0⟩\|0\\rangle\|0⟩\|0\\rangle⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplus⊕\\oplusFigure 17:Reversible logic circuit for adding 1 to \(left\) and subtracting 1 from \(right\) a 5\-qubit register\. They are inverses of each other\. The least significant bit is at the top, and two ancilla bits are at the bottom\. ### IV\.4Stabiliser Code Syndrome Extraction We use the expectation values of the syndromes of the \[\[5,1,3\]\] stabiliser code as image features, along bothxxandyyaxes\. These syndromes contain onlyXXandZZPauli operators, and can be extracted using the single qubit Hadamard logic gate and parity measurements\[[14](https://arxiv.org/html/2607.07754#bib.bib14)\]\. On a quantum processor, the syndrome measurements give the eigenvalues \(\+1 or \-1\) of the generators\. To obtain the image features as the expectation values, the syndrome measurements require many shots till the features reach sufficient accuracy\. This effort is a computational overhead, because the convergence towards the expectation value scales asO\(Nshot−1/2\)O\(N\_\{shot\}^\{\-1/2\}\)\. ### IV\.5Complete Algorithm Structure The complete hybrid classical\-quantum structure of our image classification algorithm is presented as a block diagram in Fig\.[18](https://arxiv.org/html/2607.07754#Sx2.F18)\. Figure 18:Block circuit diagram for the full multi\-expert image classification algorithm
Similar Articles
PQFA: Parallel Quantum Feature Augmentation of Fused Representations for Multimodal Classification
Proposes Parallel Quantum Feature Augmentation (PQFA), a hybrid quantum-classical framework that applies shallow variational quantum circuits to enhance fused multimodal features, outperforming classical baselines with fewer parameters.
Medical Imaging Classification with Cold-Atom Reservoir Computing using Auto-Encoders and Surrogate-Driven Training
This paper presents a hybrid quantum-classical pipeline using neutral-atom reservoir computing and auto-encoders for medical image classification, specifically for polyp detection. It addresses quantum measurement non-differentiability with a surrogate model to enable end-to-end training.
Supervised Latent Restructuring for Small-Data Quantum Learning in Plant Phenomics
This paper proposes a hybrid quantum-classical workflow for plant phenomics classification under small-data regimes, using supervised latent restructuring (PCA + LDA) to improve geometric separability before quantum kernel alignment. Experiments show improved separability but highlight compression trade-offs and the difficulty of achieving strong quantum performance.
Hybrid Classical-Quantum Variational Autoencoder for Neural Topic Modeling
This paper proposes a hybrid classical-quantum variational autoencoder for neural topic modeling, embedding parameterized quantum circuits in the inference network. Experiments on the AgNews dataset demonstrate improved topic coherence and diversity compared to state-of-the-art classical models, showing viability on NISQ-era quantum devices.
QUIVER: Quantum-Informed Views for Enhanced Representations in Large ML Models
This paper introduces Quiver, a paradigm that enriches classical machine learning models with quantum-inspired features derived from the quantum Fisher information matrix, demonstrating improvements on molecule property prediction and jet flavor classification benchmarks.