# BioHCL-SSSM Project Deliverables Package (Revised per Supervisor Feedback) This repository package contains the finalized, publication-grade benchmarks, segregated ablation studies, and 10-fold cross-validation results for the **BioHCL-SSSM** model on the Guangzhou Pediatric Chest X-Ray dataset (Kermany et al., *Cell* 2018; 5,856 images, 624 official held-out test split). --- ## Deliverables Architecture & Supervisor Alignment ``` deliverables/ ├── README.md # Deliverables index & executive summary ├── tathagat_sir_revision_report.md # Full report mapped directly to Tathagat Sir's feedback ├── 1_sota_benchmarks_master.csv # 15-Model SOTA Benchmark (Literature baselines + Ours) ├── 2_table1_component_ablation.csv # Table 1: Macro Component Ablation (SSSM vs Attention vs CNN) ├── 3_table2_layer_hyperparameter_deduction.csv # Table 2: Proposed SSSM Layer Hyperparameter Deduction ├── 4_table3_loss_function_weighting.csv # Table 3: Loss Function Formulations & Class Weighting Dynamics ├── 5_10_fold_cross_validation_metrics.csv # Approved 10-Fold CV metrics (Folds 1 to 10 + Mean/Std) ├── raw_sweeps/ # Unaggregated raw grid sweep files │ ├── ablation_grid_sweep_64_runs.csv # 64-run ablation search │ └── benchmark_profiling_raw.csv # Latency & FLOPs profiling log └── figures/ # Publication-grade evaluation figures ├── 10_fold_overlay_roc_curve.png # 10-Fold ROC with variance envelopes ├── 10_fold_overlay_pr_curve.png # 10-Fold PR with variance envelopes ├── 10_fold_confusion_matrix.png # Pooled 10-Fold Confusion Matrix (5,232 images) ├── 10_fold_global_roc_curve.png # Pooled global ROC ├── 10_fold_global_pr_curve.png # Pooled global PR ├── 10_fold_trajectory_plot.png # Training/validation curves across folds ├── layerwise_tradeoff_plot.png # Latency / FLOPs vs F1 Pareto frontier ├── test_student_biohcl_sssm_cm.png # Official Test Set Confusion Matrix (BioHCL-SSSM) ├── test_student_biohcl_sssm_roc.png # Official Test Set ROC Curve (BioHCL-SSSM) ├── test_baseline_resnet50_cm.png # Official Test Set Confusion Matrix (ResNet-50) ├── test_baseline_resnet50_roc.png # Official Test Set ROC Curve (ResNet-50) ├── test_bioprior_ablation_cm.png # Official Test Set Confusion Matrix (BioPrior Ablated) └── test_roc_pr_comparison.png # Official Test Set ROC/PR Comparison ``` --- ## 1. State-of-the-Art Comparative Benchmarks (`1_sota_benchmarks_master.csv`) *Directly addresses feedback: "Benchmark - wrong. I need benchmark as in state of the art techniques accuracy as a vanilla model Like Resnet, vit, deit etc around 10 to 15 latest models and ofc ours best model in the sheet"* * **15 Distinct Models** benchmarked on the official 624-image Kermany test split (234 Normal, 390 Pneumonia). * **Covered Families:** Classic CNNs (Inception-V3, ResNet-18, DenseNet-121, ResNet-50, Xception, GoogLeNet, AlexNet, VGG-16), Modern Lightweight CNNs (MobileNetV3, MobileNet-v1), Vision Transformers (ViT-Base, DeiT-Small, Swin-T), and Proposed State-Space Hybrids (BioHCL-SSSM). * **Key Finding:** BioHCL-SSSM achieves **96.47% accuracy, 97.22% F1, and 99.37% ROC-AUC** with only **14.01M parameters and 8.56 GFLOPs**, outperforming large transformers like ViT-Base (86.57M params, 92.47% acc) and matching/exceeding Swin-T (27.52M params, 95.99% acc) at half the parameter footprint. --- ## 2. Table 1: Component-Wise Architectural Ablation (`2_table1_component_ablation.csv`) *Directly addresses feedback: "Table 1 - for component so ur layers comes there and other alternative like if u don't use SSSM and use attention how much computation is gained how much accuracy is gained or lost etc"* * **SSSM vs. Multi-Head Self-Attention (MHSA):** Replacing SSSM with MHSA increases compute by **+50.0% FLOPs (12.84 vs 8.56 GFLOPs)** and latency by **+59.8% (78.4ms vs 49.06ms)**, while dropping validation F1 by **-0.0269** due to quadratic $O(N^2)$ memory bottlenecks and lack of directional scanline continuity. * **SSSM vs. Depthwise Separable Conv:** Replacing SSSM with local convolutions saves compute (-16.8% FLOPs, -16.96ms faster), but suffers an acute **-0.0703 F1 drop** due to inability to model bilateral consolidations across hemithoraces. * **Dual-Chain vs. Single-Chain Backbone:** Dropping DenseNet-121 drops F1 by **-0.2055** (severe underfitting); dropping Hierarchical CNN drops F1 by **-0.0483**. * **Clinical Prior Ablation:** Disabling anatomical prior drops F1 by **-0.0775** due to false-positive over-indexing on peripheral rib/diaphragmatic edges. * **Fusion Mechanism:** Bilinear gated cross-attention outperforms naive additive fusion by **+0.0467 F1**. --- ## 3. Table 2: Proposed SSSM Layer Hyperparameter Deduction (`3_table2_layer_hyperparameter_deduction.csv`) *Directly addresses feedback: "Table 2 - of ur proposed layer how u can deduce hyperparameters on this. I take only one example which u have used is SSSM blocks or the parameter for ssssm similarly u can have other parameters for other layers. If not atleast table 2"* * **Block Depth ($L$):** Swept across $L \in \{1, 2, 3, 4, 6\}$. Peak Pareto efficiency occurs at **$L = 3$** (14.01M params, 49.06ms latency, 0.9987 Val F1). Depths $L=4$ and $L=6$ induce parameter redundancy (+13% to +40%) without accuracy gains. * **State Dimension ($d_{state}$):** Evaluated at $d_{state} \in \{16, 32, 64, 128\}$. $d_{state} = 16$ creates an information bottleneck (0.9580 F1); **$d_{state} = 64$** hits optimal capacity (0.9987 F1); $d_{state} = 128$ increases latency to 61.2ms without performance gains. * **Channel Expansion Factor ($E$):** Evaluated at $E \in \{1, 2, 4\}$. **$E = 2$** offers the optimal continuous ODE transformation; $E=4$ triggers severe over-parameterization (+30% params) prone to overfitting. * **Residual Connection Strategy:** Direct sequential cascading without skips drops F1 to 0.9120 (-8.67%); **Additive Identity Highways** guarantee stable continuous-to-discrete gradient propagation. --- ## 4. Table 3: Loss Function & Class Weighting Dynamics (`4_table3_loss_function_weighting.csv`) *Directly addresses feedback: "Then table 3 is loss function which u are using what weighted metrics are taken for granted etc"* * **Unweighted CE:** Suffers from severe false positive bias (18.38% false alarm rate in healthy children, specificity 81.62%) because it over-indexes on the 72% pneumonia majority class. * **Class-Weighted CE ($w = [1.95, 0.67]$):** Heavily penalizes normal-class misclassifications, elevating specificity to **93.16% (+11.54%)**. * **Focal Loss ($\gamma=2.0, \alpha=0.25$):** Down-weights easily classified clear lungs, concentrating gradient updates on borderline consolidations (94.07% acc, 0.9529 F1). * **Bio-PINN Inductive Penalty Loss (Proposed):** Integrates anatomical regularization masks, achieving the optimal clinical Pareto frontier: **98.21% Sensitivity, 93.59% Specificity, and 99.37% ROC-AUC**. --- ## 5. 10-Fold Cross-Validation (`5_10_fold_cross_validation_metrics.csv`) *Directly addresses feedback: "CV is correct" (Approved by Tathagat Sir)* * **Exact Integer Confusion Matrix:** Pooled across 5,232 images: **3,862 TP, 1,337 TN, 12 FP, 21 FN** (99.37% global accuracy, only 33 errors). * **Mean Performance:** **Accuracy: 99.37% ± 0.33%**, **Precision: 0.9969 ± 0.0036**, **Recall: 0.9946 ± 0.0059**, **Specificity: 0.9911 ± 0.0103**, **F1-Score: 0.9957 ± 0.0022**, **AUC: 0.9929 ± 0.0039**.