Skip to content

Repository files navigation

Enhancing the Robustness of State-of-the-Art CNNs using Quantum Error Correcting Output Codes (QECOC)

This repository presents a framework to enhance the robustness of convolutional neural networks (CNNs) using Quantum Error Correcting Output Codes (QECOC). The defence mechanism follows a QECOC head randomization strategy during the inference stage, reducing the efficiency of a particular white-box ECOC-targeted attack. The proposed model architecture consists of a BaseModel followed by n Quantum ECOC heads, each corresponding to a distinct and orthogonal set of codebooks.


Repository Structure

qecoc_main/ — Quantum ECOC Version

Implements the QECOC architecture and experiments.

  • qecoc_utils.py
    Contains the quantum circuit construction, training and evaluation routines, and helper functions for QECOC.

ecoc_main/ — Classical ECOC Version

Implements the classical ECOC baseline for comparison.

  • ecoc_utils.py
    Contains training, evaluation logic, and supporting utilities.

basemodels/basemodels.py

Defines various CNN base models evaluated in this study, including architectures like ResNet, DenseNet121, and GoogLeNet.

datasets.py

Preprocesses datasets and saves them into structured directories for easy access during training and evaluation.

targetted_ecoc_attack.py

Implements targeted attack (Zhang, B et al., 2020) on individual ECOC codebooks to test model robustness under adversarial conditions.

requirements.txt

Packages necessary for this repo


Highlights

  • Supports both classical and quantum ECOC implementations.
  • Integrates seamlessly with popular CNN backbones.
  • Provides modular scripts for training, evaluation, and dataset handling.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages