Skip to content

Sappymukherjee214/robust-vision-research

Repository files navigation

Research Investigation: Robust Object Recognition Under Extreme Environmental Noise

Research Poster Dataset Compute XAI

πŸ“Œ 0. Abstract

This project presents a rigorous software and mathematical framework to solve the "Robustness Gap" in modern computer vision. While Deep Learning models excel on deterministic, clean datasets, they exhibit catastrophic performance decay when faced with out-of-distribution (OOD) corruptions. This research implements a modular Denoising Autoencoder (DAE) infrastructure combined with high-capacity classifiers (ResNet, WideResNet, ViT) and verifies the results using the international standard CIFAR-10-C benchmark. Through the use of Explainable AI (XAI), we demonstrate that structural restoration is a viable path toward achieving human-level robustness in autonomous systems.


πŸ”¬ 1. Problem Statement: The Vulnerability of Deep Vision

Modern Convolutional Neural Networks (CNNs) and Vision Transformers (ViTs) are "texture-biased." Research indicates that these models often rely on high-frequency pixel patterns to achieve high accuracy. In real-world edge scenariosβ€”such as autonomous driving in fog, drone surveillance in low light, or satellite transmission over noisy channelsβ€”these high-frequency patterns are the first to be obliterated.

The Problem Dimensions:

  • Stochastic Interference: Gaussian and Speckle noise introduce random variance that corrupts the signal manifold.
  • Structural Distortion: Motion and Defocus blur introduce deterministic convolutions that smear semantic boundaries.
  • Catastrophic Failure: Accuracy often drops from ~95% to <10% (random chance) even with moderately severe noise (Severity level 3+).
  • The Explainability Crisis: Standard models do not just "fail"; they become "overconfident" in their failure, locking onto noise artifacts as if they were semantic features.

🎯 2. Research Objectives

This project was designed with four primary academic goals:

  1. Architecture Stress-Testing: To quantify the inherent "Zero-Shot Robustness" of different inductive biases (Convolutions vs. Global Self-Attention).
  2. Manifold Restoration: To implement and train a self-supervised Denoising Autoencoder (DAE) capable of mapping a corrupted input manifold back to the clean data distribution.
  3. Hybrid Defense Integration: To build a RobustClassifier wrapper that synchronizes denoising with classification, including automated re-normalization of restored tensors.
  4. Semantic Interpretability: To verify through Grad-CAM that our defense mechanism restores the "Semantic Focus"β€”ensuring the model looks at the object, not the noise.

πŸ“š 3. Theoretical Foundation & Literature Context

This framework is built upon the following seminal works:

  • Benchmark Standard: Following Hendrycks & Dietterich (ICLR 2019), we utilize the 19 corruptions defined in the CIFAR-10-C set to ensure scientific reproducibility.
  • Restoration Logic: Inspired by Vincent et al. (ICML 2008), we leverage the Denoising Autoencoder's ability to extract robust features through reconstruction loss ($\mathcal{L}_{MSE} = ||x - \hat{x}||^2$).
  • ViT Robustness: Following Naseer et al. (NeurIPS 2021), we investigate whether the global receptive field of Transformers provides a more stable representation than local CNN kernels.

πŸ’Ύ 4. Dataset Strategy: CIFAR-10-C (Kaggle Integration)

To move beyond toy examples, we utilize the official CIFAR-10-C supplement. This dataset consists of the original CIFAR-10 test set images, each processed through 19 types of mathematical corruptions across 5 levels of severity.

  • Kaggle Repository: luckily66/cifar-10-c-2
  • Access Method: Integrated via kagglehub for automated cache management.
  • Corruption Spectrum:
    • Noise: Gaussian, Shot, Impulse, Speckle.
    • Blur: Defocus, Glass, Motion, Zoom.
    • Weather: Snow, Frost, Fog, Spatter.
    • Digital: Brightness, Contrast, Elastic, Pixelate, JPEG.

Dataset Visualization

Noise Grid Above: Samples of the 19 corruption types used in our research, demonstrating the extreme difficulty of the OOD (Out-of-Distribution) challenge.


βš™οΈ 5. Implementation Methodology

The framework is divided into three major architectural components:

5.1 The Denoising Engine (DAE)

A multi-layer convolutional autoencoder.

  • Encoder: Compresses noisy input into a bottleneck representation, forcing the model to discard non-persistent noise.
  • Decoder: Reconstructs the image using ConvTranspose2d layers and a Sigmoid output.
  • Innovation: Our internal pipeline uses a synchronized "Noisy-Clean" dataloader (return_clean=True) to ensure the DAE learns on perfectly aligned pairs.

Restoration Results

DAE Reconstruction Above: DAE performance showing original (top), noisy input (middle), and reconstructed output (bottom). The restoration successfully recovers structural priors necessary for classification.

5.2 The Classification Suite

We support three high-performance architectures:

  1. ResNet-18: Modified for 32x32 resolution (removed initial maxpool, changed conv1 kernel size).
  2. WideResNet-50: Wide residual blocks for enhanced feature redundancy.
  3. SimpleViT: A transformer-based baseline that splits 32x32 images into 4x4 patches with linear embedding and learnable positional encodings.

5.3 The Robust Pipeline (RobustClassifier)

A unified class that combines the DAE and a Classifier:

  1. Stage 1: Denoise raw input $\tilde{x} \rightarrow \hat{x}$.
  2. Stage 2: Automatically re-normalize $\hat{x}$ using $\mu=(0.491, 0.482, 0.446)$ and $\sigma=(0.202, 0.199, 0.201)$.
  3. Stage 3: Inference on the restored tensor.

πŸ“Š 6. Quantitative Analysis & Results

All results are automatically logged and plotted.

  • Baseline Metrics: Mean Corruption Error (mCE) across all 19 types.
  • Restoration Metrics:
    • MSE: Measures pixel-wise reconstruction accuracy.
    • PSNR: Quantifies signal-to-noise ratio in decibels.
  • Performance Curves: Generated via compare_models.py, showing Accuracy as a function of $\sigma$ (noise intensity).

Example: Robustness Curve (Gaussian)

Robustness Curve Above: Comparison of the Baseline ResNet-18 vs. our DAE-Protected Robust Classifier. Notice how the DAE-based model maintains a higher accuracy floor as noise severity increases.


πŸ‘οΈ 7. Explainable AI (XAI) & Grad-CAM

A critical contribution of this project is the Explainability Suite. Using Grad-CAM (Gradient-weighted Class Activation Mapping), we visualize the model's intermediate activations.

  • Observation: Under Gaussian Noise (Severity 5), a standard ResNet's activations are "scattered" and "noisy."
  • The Defense: Our DAE-restored model shows "focal" activations, where the heatmap accurately centers on the object's most descriptive features.

Explainability Visualization

Grad-CAM Comparison Above: Heatmap analysis showing the model's focus. The robust model (right) successfully ignores noise artifacts to identify semantic structural features.


πŸ“‚ 8. Project Structure & Repository Contents

β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”œβ”€β”€ dataset.py        # Master synchronized dataloader
β”‚   β”‚   β”œβ”€β”€ kaggle_loader.py  # CIFAR-10-C Kaggle API integration
β”‚   β”‚   └── noise.py          # Synthetic noise generators
β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”œβ”€β”€ baselines.py      # ResNet, WideResNet, SimpleViT implementations
β”‚   β”‚   └── denoisers.py      # DAE & RobustClassifier architectures
β”‚   └── utils/
β”‚       └── trainer.py        # Generic training & evaluation loops
β”œβ”€β”€ reports/
β”‚   β”œβ”€β”€ figures/              # Robustness curves, Grad-CAM maps
β”‚   └── Research_Summary.md   # Automated consolidated report
β”œβ”€β”€ main.py                   # Standard robustness suite
β”œβ”€β”€ train_dae.py              # DAE training script
β”œβ”€β”€ compare_models.py         # Comparative benchmark tool
β”œβ”€β”€ research_explainability.py# XAI visualization tool
└── benchmark_archs.py        # Architecture comparison suite

πŸš€ 9. Usage Instructions for Academic Review

9.1 Environment Replication

# Clone and install dependencies
git clone https://github.com/Sappymukherjee214/robust-vision-research.git
cd robust-vision-research
pip install -r requirements.txt

9.2 Reproducing Results

To replicate our findings, execute the scripts in the following order:

  1. Restoration Phase: python train_dae.py (Trains the DAE for 5-20 epochs).
  2. Benchmark Phase: python compare_models.py (Generates the accuracy curves).
  3. Visualization Phase: python research_explainability.py (Generates Grad-CAM evidence).
  4. Reporting: python generate_report.py (Compiles the final thesis-style report).

πŸ“ 10. Future Directions

  • Adversarial Hardening: Testing against PGD and FGSM attacks.
  • Swin-Transformer Integration: Implementing hierarchical transformers for more efficient denoised reconstruction.
  • Real-World Low-Light: Fine-tuning on the SID (See-in-the-Dark) dataset.

πŸ‘¨β€πŸ”¬ 11. Author & Contact

Saptarshi Mukherjee Specializing in Robust Computer Vision & Self-Supervised Learning.

This research was conducted with the objective of advancing the state of "Trustworthy AI" in high-stakes visual recognition tasks.


Generated for the Robust Object Recognition Under Extreme Noise Suite.

About

A research-grade PyTorch framework for robust object recognition under extreme environmental noise. Implements self-supervised Denoising Autoencoders (DAE) with ResNet/ViT architectures on the official CIFAR-10-C benchmark. Includes Grad-CAM interpretability and automated robustness benchmarking.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages