Papers
Topics
Authors
Recent
Search
2000 character limit reached

Quantum Masked Autoencoders (QMAEs)

Updated 3 July 2026
  • Quantum Masked Autoencoders (QMAEs) are variational quantum architectures that extend masked autoencoders by learning missing data features directly within quantum states.
  • They employ amplitude embedding, a variational encoder–decoder pair with a learnable mask token, and a SWAP-test based fidelity objective to optimize reconstruction.
  • Experiments on MNIST show a 12.86% improvement in downstream classification accuracy over standard quantum autoencoders, highlighting enhanced state-level reconstruction.

Searching arXiv for the specified paper and closely related work to ground the article. arxiv_search(query="(Andrews et al., 21 Nov 2025)", max_results=5, sort_by="relevance") Quantum masked autoencoders (QMAEs) are variational quantum architectures designed to learn missing features of a data sample within quantum states rather than classical embeddings. They extend the masked-autoencoding paradigm to quantum representation learning by combining amplitude embedding, a variational encoder–decoder pair, a learnable mask token, and a fidelity-based reconstruction objective defined through a SWAP-test. In the formulation introduced for vision learning, QMAEs are used to reconstruct masked image content and to improve downstream performance on masked MNIST inputs relative to a standard quantum autoencoder (QAE) baseline (Andrews et al., 21 Nov 2025).

1. Formal definition and problem setting

QMAEs are motivated by the contrast between three settings. Classical autoencoders are widely used to learn features of input data. Classical masked autoencoders extend classical autoencoders to learn the features of the original input sample in the presence of masked-out data. Quantum autoencoders exist, but the QMAE formulation addresses the absence of a design and implementation of quantum masked autoencoders that can leverage the benefits of quantum computing and quantum autoencoders (Andrews et al., 21 Nov 2025).

The core objective is not merely to compress a quantum representation, but to reconstruct masked features of an image after those features have been replaced at the classical level by a trainable token and then embedded into a quantum state. In this sense, QMAEs are defined by the conjunction of masking and quantum-state reconstruction. The architecture is therefore situated between masked representation learning and variational quantum circuit design.

A central conceptual distinction is that the missing-content learning occurs “within quantum states instead of classical embeddings.” This means that the masked image, after token insertion, is mapped into a Hilbert-space representation before the variational encoder–decoder acts on it. A plausible implication is that the method treats occlusion recovery as a quantum-state fidelity optimization problem rather than as direct pixel-space regression.

2. Encoding images and representing masks

The input is a grayscale image xRH×Wx\in\mathbb{R}^{H\times W}. It is normalized and flattened into a length-2n2^n vector {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}. Amplitude embedding then prepares

ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,

which automatically enforces ixi2=1\sum_i |x_i|^2=1 (Andrews et al., 21 Nov 2025).

Masking is performed before quantum state preparation. A random subset of patches is blanked out on the classical image, and each masked patch is replaced by a single learnable tensor MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}. The resulting patched image, containing these mask-token entries, is then amplitude-embedded as the input quantum state. The masking configuration used in the reported experiment blanks out 25 % of pixels randomly.

This design makes the mask token a trainable classical object that influences a subsequently prepared quantum state. It is therefore neither a conventional quantum register nor a fixed placeholder. Rather, it is a classical patch-sized trainable parameter whose entries are optimized jointly with the variational circuit parameters. This suggests that QMAEs hybridize classical parameterization and quantum reconstruction more tightly than a zero-fill masking strategy.

3. Variational encoder–decoder construction

The QMAE architecture consists of four key modules: Image Embedding, Encoder Ansatz U(θ)U(\theta), Learnable Mask Token, and Decoder Ansatz U(θ)U^\dagger(\theta) (Andrews et al., 21 Nov 2025). The encoder is a variational quantum circuit, and the decoder is the Hermitian adjoint of the encoder using the same parameter set θ\theta and the reversed gate order.

During encoding, the circuit maps

ψinAB    ψAϕB,\lvert\psi_{\rm in}\rangle_{AB}\;\longrightarrow\; \lvert\psi\rangle_A\otimes\lvert\phi\rangle_B,

where 2n2^n0 is the 2n2^n1-qubit latent space and 2n2^n2 is the 2n2^n3-qubit trash space. Before decoding, the trash qubits are reset to 2n2^n4. This reset is structurally important because the decoder acts after the latent/trash factorization has been imposed.

Each layer of the encoder is decomposed into two-qubit interaction blocks. For a qubit pair 2n2^n5, the block is specified as

  • 2n2^n6
  • 2n2^n7
  • 2n2^n8
  • 2n2^n9
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}0
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}1
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}2
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}3
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}4
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}5
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}6
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}7
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}8
  • {xi}i=02n1\{x_i\}_{i=0}^{2^n-1}9

In total, each block has 15 real parameters, consisting of 9 from ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,0 gates and 6 from ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,1 gates, together with 3 CNOTs. For an ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,2-qubit register in which all ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,3 pairs are entangled in a single layer, the total number of ansatz parameters is

ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,4

The parameter count is explicitly identified as polynomially scaling. A plausible implication is that the architectural claim of efficiency is tied to ansatz parameterization rather than to the full physical resource cost of state preparation, reference-state duplication, and fidelity estimation.

4. Reconstruction objective, fidelity estimation, and optimization

After decoding, the reconstructed state is compared with a fresh amplitude-embedded reference copy of the original unmasked image using a SWAP-test. If ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,5 denotes the decoder output and ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,6 denotes the reference state, then the ancilla expectation satisfies

ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,7

which equals the quantum fidelity (Andrews et al., 21 Nov 2025).

The reconstruction loss is defined as

ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,8

so minimizing the loss maximizes fidelity. An equivalent formulation is given as a Frobenius-norm loss on density matrices,

ψin  =  i=02n1xii,\lvert\psi_{\rm in}\rangle \;=\;\sum_{i=0}^{2^n-1}x_i\,\lvert i\rangle,9

although the SWAP-test expectation is reported as sufficient in practice.

Optimization jointly updates the circuit parameters ixi2=1\sum_i |x_i|^2=10 and the mask-token entries. The total trainable dimension is

ixi2=1\sum_i |x_i|^2=11

Gradients of ixi2=1\sum_i |x_i|^2=12 with respect to each parameter are estimated via the parameter-shift rule, and the optimizer is Adam with typical learning rates such as ixi2=1\sum_i |x_i|^2=13 to ixi2=1\sum_i |x_i|^2=14. The training loop initializes ixi2=1\sum_i |x_i|^2=15 and ixi2=1\sum_i |x_i|^2=16 randomly; samples mask indices for each data example; embeds the masked and original images on distinct qubit registers; applies ixi2=1\sum_i |x_i|^2=17, trash reset, and ixi2=1\sum_i |x_i|^2=18; runs the SWAP-test; computes ixi2=1\sum_i |x_i|^2=19; and updates MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}0.

A common misconception would be to interpret the objective as a direct pixel-space reconstruction loss. The formulation instead defines the primary training signal through quantum fidelity, with cosine similarity and SSIM appearing only in evaluation.

5. Experimental realization on MNIST

The reported experimental setup uses MNIST images resized to MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}1, which requires MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}2 qubits for amplitude embedding (Andrews et al., 21 Nov 2025). The latent size is MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}3, and the trash space has MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}4 qubit. An additional 8 qubits store the reference copy, together with 1 ancilla qubit for the SWAP-test and 1 helper qubit to reset the trash by SWAP, for a total of 18 qubits.

The comparison is against a standard QAE that uses the identical ansatz but applies zero-fill masking rather than a learnable mask token. The test set contains 10 000 images. The reported metrics are as follows.

Metric QMAE QAE
Quantum fidelity 0.734 0.600
Cosine similarity (pixel space) 0.843 0.799
SSIM 0.446 0.445
Classification accuracy (pretrained ResNet18 as downstream) 65.06 % 52.20 %

The downstream classification result corresponds to a +12.86 % relative improvement in classification over QAE. The visual-reconstruction claim is phrased as improved visual fidelity on MNIST images. The numerical pattern is also notable: the gain is substantial for quantum fidelity and downstream classification, moderate for cosine similarity, and nearly negligible for SSIM. This suggests that the principal advantage may be more visible in state-level reconstruction quality and downstream feature utility than in all pixel-level perceptual indices equally.

6. Advantages, limitations, and research directions

Three stated advantages define the current case for QMAEs. First, they learn to reconstruct genuinely missing pixels instead of reproducing the mask. Second, they outperform plain QAE by 12.86 % in downstream classification. Third, they require only MRHp×Wp\mathsf{M}\in\mathbb{R}^{H_p\times W_p}5 variational parameters, with polynomial scaling (Andrews et al., 21 Nov 2025).

The limitations are equally explicit. Qubit overhead is high because the method requires a reference embedding and ancilla resources. Mid-circuit resets and SWAP-tests increase circuit depth and noise vulnerability. Amplitude embedding itself can be costly for larger images. These constraints make it misleading to equate polynomial ansatz parameter scaling with low end-to-end implementation cost. The resource profile is dominated not only by trainable parameters but also by state-preparation, duplication, reset, and overlap-estimation requirements.

The future directions enumerated for QMAEs focus on both systems and theory. They include developing more qubit-efficient SWAP-test alternatives such as fidelity witnesses, exploring patch-wise or hierarchical mask tokens for higher-resolution vision tasks, implementing on near-term hardware with error mitigation strategies, and theoretically characterizing the expressibility of the two-qubit interaction ansatz under masking. Taken together, these directions indicate that QMAEs currently occupy a transitional position: they are a concrete variational design for masked quantum vision learning, but their broader significance depends on progress in qubit-efficient fidelity estimation, hardware execution, and expressibility analysis.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

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 Quantum Masked Autoencoders (QMAEs).