Why does my hybrid CNN-VQC model predict only one class on my medical imaging dataset?

I’m working on a hybrid quantum-classical neural network that augments a classical CNN with a variational quantum circuit (VQC) for image classification for a medical image dataset.

Model architecture (high-level):

  • Input image is first processed by a classical CNN (convolution +
    pooling layers).
  • Features are passed through fully connected layers to reduce
    dimensionality.
  • Instead of going directly to a classical output layer, the feature
    vector is encoded into a quantum state and passed to a parameterized
    quantum circuit (VQC).
  • The VQC performs single-qubit rotations and entangling operations,
    and the measurement outcomes (expectation values) are used as the
    final feature vector for classification.

Problem:

Despite experimenting with different configurations, the model always predicts only a single class (e.g., always class 0), regardless of the input image. This happens consistently during training and evaluation.

What I’ve tried:

  • Verified that class imbalance is not the issue, the dataset is relatively balanced.

Varying:

  • Number of qubits (4–8)

  • Circuit depth (reps=1, 2)

  • Entanglement pattern (full, circular, linear)

  • Training with different learning rates, and batch sizes.

My question:

What could be causing this hybrid model to collapse to a single-class prediction, and what strategies can I try to debug or stabilize training in this hybrid quantum-classical setup?

Are there known pitfalls in training VQC-based classifiers when integrated into classical CNNs (e.g., vanishing gradients, poor initialization, circuit expressivity issues)?

Hi @quantum_expert_123 ,

I’m not sure why this could be happening. This looks like a research question, I haven’t seen this behaviour before.

If I had to guess I’d say the issue might be in the encoding and/or the preprocessing. If you’re encoding every feature very close together then the mapping performed by the quantum algorithm may cause everything to collapse into a single class.

For a reference on preprocessing, if you look at our demo on the Variational Classifier you’ll see that the data is preprocessed before being encoded into the quantum computer.

I hope this helps!