This repository presents a comparative study between classical Convolutional Neural Networks (CNNs) and Hybrid Quantum Neural Networks (QNNs) for predicting electrical resistivity of materials using synthetically generated Electrical Resistivity Tomography (ERT) data.
The project explores whether quantum-enhanced machine learning can match or outperform classical deep learning models in solving inverse problems commonly encountered in geophysics and material science.
Electrical resistivity prediction is a challenging inverse problem due to:
- High-dimensional dependencies
- Noise sensitivity
- Non-linear spatial relationships
Traditional numerical inversion techniques are computationally expensive and poorly scalable. This project investigates:
- A spatial-attention-based CNN
- A hybrid QuantumβClassical Neural Network (QNN)
Both models are trained and evaluated on the same synthetically generated ERT dataset, enabling a fair and controlled comparison.
Can hybrid quantum neural networks provide comparable or improved performance over classical CNNs for resistivity prediction β even when executed on quantum simulators?
πΉ Physics-inspired synthetic ERT data generation
πΉ Polynomial feature engineering for spatial relations
πΉ Log-scaled resistivity modeling (geophysical best practice)
πΉ Spatial attention mechanism in CNN
πΉ Hybrid quantum-classical learning pipeline
πΉ Ensemble learning for robustness
πΉ Detailed evaluation using regression metrics
- Generate realistic multi-anomaly ERT datasets
- Train CNN and QNN models on identical data
- Perform fair metric-based comparison
- Visualize:
- Training vs validation loss
- Predicted vs actual resistivity
- Residual distributions
- Export reproducible resul ts
- Python 3.10+
- PyTorch
- Scikit-learn
- NumPy
- Pandas
- Matplotlib
- PennyLane
- Qiskit (hardware-compatible)
- PyGIMLi (ERT forward modeling)
βββ data_gen.py # Synthetic ERT data generation
βββ cnn.py # Spatial Attention CNN model
βββ qnn.py # Hybrid Quantum Neural Network
βββ README.md
-
Synthetic Data Creation
- Designed layered subsurface with embedded anomalies
- Simulated dipoleβdipole ERT surveys
- Added realistic noise and filtering
-
Feature Engineering
- Electrode positions & spacings
- Pseudo-depth & geometric factors
- Polynomial interaction features
-
Model Design
- CNN: Attention + dilation + residual learning
- Hybrid-QNN: CNN feature extractor + quantum circuit
-
Training Strategy
- Log-transformed targets
- Huber loss for robustness
- One-cycle learning rate scheduling
- Early stopping
-
Evaluation
- RMSE, MAE, MSE, RΒ²
- Visual diagnostics
| Metric | CNN | QNN |
|---|---|---|
| RΒ² Score | 0.8910 | 0.8862 |
| RMSE | 7.5094 | 7.6745 |
| MSE | 56.39 | 58.89 |
| MAE | 3.8923 | 3.8785 |
- CNN shows slightly better global accuracy
- QNN achieves lower MAE, indicating better local anomaly handling
- Performance gap is minimal despite quantum simulation overhead
Note: QNNs were executed on quantum simulators due to limited access to real hardware.
- Training vs Validation Loss
- Predicted vs Actual Resistivity
- Residual Error Analysis
These confirm:
- Stable convergence
- Minimal bias
- Strong generalization
- CNNs remain strong baselines for spatial inverse problems
- Quantum layers can integrate meaningfully with classical models
- Hybrid QNNs are already competitive despite hardware limitations
- Data preprocessing is as critical as model architecture
- Scientific ML benefits from physics-informed data generation
- Liu et al., ERS-InvNet, IEEE TGRS (2020)
- Vu & Jardani, CNN-3D-ERT, GJI (2021)
- Li et al., VD-Net, IEEE TIM (2021)
- Aleardi et al., CNN for ERT, Politecnico di Milano (2024)
- Schuld & Petruccione, Machine Learning with Quantum Computers
(Full reference list available in project report)
- Deploy QNNs on real quantum hardware
- Expand to 3D resistivity inversion
- Add uncertainty quantification
- Explore deeper quantum circuits
- Apply framework to other material properties
Developed collaboratively by an 8-member interdisciplinary team as part of an academic physics research project.
- Team Leader: Yalluru Purushotham Reddy - Hybrid CNNβQNN architecture design, integration and team co-ordination
- Nipun Saxena β CNN model design, training, and comparative analysis
- Saswata Bastia β Data preprocessing and feature engineering
- Caleb Kurian George β ERT physics modeling and synthetic data simulation
- Abhinav Saikumar β Implementation support and debugging
- Pranav β General assistance
- Atharva β General assistance
Under the guidance of Dr. Korlepara Divya Bharathi VIT Chennai Assistant Professor Grade II
This project is intended for academic and research use.