Leakage-Safe Evaluation of Sensor-Failure Robustness in Dynamic Gas Mixture Quantification
Bakti Dwi Waluyo, Muhammad Aulia Rahman Sembiring
This repository contains the complete execution pipeline for the study: "Leakage-Safe Evaluation of Stochastic Channel Masking for Sensor-Failure Robustness in Dynamic Gas Mixture Quantification." The code provides an end-to-end reproducible workflow for processing the UCI Gas Sensor Array Dynamic Gas Mixtures dataset, building leakage-safe chronological splits, training standard temporal baselines, training the proposed TA-SFRNet and GRU-Masked variants, and conducting extensive simulated sensor failure analyses. Hardware & Software Requirements Due to the computationally intensive nature of generating hundreds of thousands of temporal windows and retraining architectures, the following specifications are required: Hardware: Multi-core CPU, minimum 16 GB RAM (32 GB strongly recommended), and at least 20 GB of free disk space. An NVIDIA GPU with at least 8 GB VRAM (e.g., RTX 2070, RTX 3060, or better) is highly recommended for Deep Learning training. Operating System: Windows 10/11, Ubuntu Linux 20.04+, or macOS. Software: Python 3.9, 3.10, or 3.11, and PyTorch >= 1.13.0 (installed with CUDA support if using an NVIDIA GPU). Core Dependencies: numpy, pandas, scikit-learn, matplotlib, seaborn, tqdm, scipy. Usage Instructions The code is designed to be executed sequentially. Ensure that the raw dataset (Dataset_Ethylene-CO.txt) is placed in the root directory before running the scripts. The pipeline is divided into 5 main steps: Data Preparation and Preprocessing: Scripts 00 to 05 to audit the dataset, handle missing values, resample to 10Hz, and build leakage-safe temporal windows. Model Training (Clean Baseline): Scripts 06 to 07c to train standard classical and temporal deep learning models across 5 independent random seeds. TA-SFRNet Architecture Training: Script 08 to train the proposed masking-based architectures. Sensor-Failure Robustness Evaluation: Scripts 09 to 09c to simulate missing sensor channels and evaluate the trained models under stressed conditions. Statistics and Analysis Synthesis: Scripts 10 to 13 to aggregate repeated-seed data, perform non-parametric statistical tests, and generate formatting tables/figures for manuscript inclusion. Output Structure Upon completion, the pipeline will populate the following directories: processed/: Contains scaled matrices, segmentation data, and bounding masks. models/: Stores the .pth weights for every trained neural network model and pickled classical models. results/: Contains the generated PDF figures, CSV evaluation tables, mixed-effects regression logs, and statistical output required for reproducibility. License This code is released under the MIT License. You are free to use, modify, and distribute this software, provided that proper attribution is given to the original authors.