Dashboard Data IEEE Graphs Config Methodology
Theoretical Framework & Methodology Specifications

Multivariate Spatiotemporal Fusion of Microenvironmental Pollutants: A Hybrid Neural-Causal Framework for Subclinical Health Deterioration Forecasting

Spatiotemporal Deep Learning PCMCI Causal Discovery Subclinical Risk Index (SRI) ESP32 Microenvironmental Telemetry

1. Abstract & System Architecture

Microenvironmental air pollutants—including Carbon Dioxide ($\text{CO}_2$), Carbon Monoxide ($\text{CO}$), Air Quality Index ($\text{AQI}$), and Ambient Temperature—exhibit highly nonlinear, dynamic, multivariate, and spatiotemporally lagged interactions. Traditional predictive models rely strictly on correlation, failing to isolate direct causal drivers of subclinical human physiological deterioration.

This framework introduces a Hybrid Neural-Causal Architecture combining temporal Convolutional Neural Networks ($\text{Conv1D}$), Bidirectional Long Short-Term Memory ($\text{Bi-LSTM}$) networks, Multi-Head Self-Attention, and Peter-Clark Momentary Conditional Independence (PCMCI) causal inference algorithms to forecast subclinical health risk deterioration scores.

System Hardware, Ingestion API & Neural Processing Pipeline

graph TD A["ESP8266 / ESP32 Hardware Node
(MQ-2, MQ-7, MQ-135, DHT22)"] -->|HTTP POST JSON Payload| B["RESTful Ingestion Gateway
(/api/sensor_data)"] B -->|Validation & Timezone Sync| C["SQLite Time-Series Data Store
(Asia/Kolkata Formatting)"] C -->|Multivariate Matrix Extraction| D["Granger & PCMCI Causal Engine"] D -->|Discovered Causal DAG Weights| E["Hybrid Conv1D-BiLSTM Attention Model"] E -->|Forward Projection| F["Subclinical Health Deterioration Index (SRI)"] F -->|Real-time Rendering| G["Web Dashboard & Export Exporters"]

2. Mathematical Formulations & Governing Equations

Equation 1: Microenvironmental Exposure Index ($\text{MEI}_t$)

Calculates the weighted, z-score normalized instant pollutant concentration aggregated with exponential temporal decay memory factor $\gamma$:

$$\text{MEI}_t = \sum_{i=1}^{P} w_i \cdot \left( \frac{X_{i,t} - \mu_i}{\sigma_i} \right) + \lambda \int_{\tau=0}^{t} e^{-\gamma (t-\tau)} X_{i,\tau} d\tau$$

Equation 2: PCMCI Momentary Conditional Independence ($\text{MCI}$)

Identifies genuine causal links between pollutant sensor $X^i$ and sensor $X^j$ at time lag $\tau$, conditioning out common parents $\mathcal{P}(X_t^i)$:

$$\text{MCI}(X^i, X^j) = \text{Corr}\left( X_{t}^i - \hat{X}_{t}^i, X_{t-\tau}^j - \hat{X}_{t-\tau}^j \;\middle|\; \mathcal{P}(X_t^i) \setminus \{X_{t-\tau}^j\} \right)$$

Equation 3: Conv1D Multi-Head Attention Latent Feature Representation ($H_t$)

Convolves sliding window vectors through 1D feature extractors, fed into Bi-LSTM and scaled dot-product attention:

$$H_t = \text{BiLSTM}\Big( \text{ReLU}\big( \mathbf{W}_c * \mathbf{X}_{t-k:t} + \mathbf{b}_c \big) \Big) \cdot \text{Softmax}\left( \frac{\mathbf{Q} \mathbf{K}^T}{\sqrt{d_k}} \right) \mathbf{V}$$

Equation 4: Subclinical Health Deterioration Index ($\text{SRI}_{t+\Delta t}$)

Final activation projecting latent spatiotemporal features $H_t$ modulated by causal link factors $\beta \sum \text{MCI}(k)$:

$$\text{SRI}_{t+\Delta t} = \sigma \left( \mathbf{W}_s \cdot H_t + \beta \sum_{k \in \mathcal{C}} \text{MCI}(k) \cdot \Delta X_k \right)$$

3. Discovered Causal DAG & Neural Layer Specifications

Causal Discovery Directed Acyclic Graph (DAG)

graph LR CO2["CO₂ (ppm)"] -->|MCI=0.74| AQI["AQI Score"] CO["CO (ppm)"] -->|MCI=0.81| AQI TEMP["Temperature (°C)"] -->|MCI=0.42| CO2 AQI -->|Direct Causal Driver| SRI["Subclinical Health Risk (SRI)"] CO -->|Direct Hypoxia Driver| SRI

Neural Layer Sequence

graph TD X["Input Tensor: (Batch, Timesteps, Channels)"] --> C["Conv1D Layer (64 Filters, Kernel=3)"] C --> B["Bi-LSTM Layer (128 Hidden Units)"] B --> A["Multi-Head Self-Attention (4 Heads)"] A --> D["Dense FC Layer (ReLU, Dropout=0.2)"] D --> O["Sigmoid Health Deterioration Risk Score"]

4. Algorithmic Specifications

// Algorithm 1: Spatiotemporal Neural-Causal Fusion & Risk Forecasting
1: Input: Time-series telemetry matrix X in R^(T x P), dynamic sensor configs C
2: Output: Forecasted Subclinical Risk Index SRI at time t + delta_t
3: Begin
  Normalize X using min-max bounds defined in sensor_config.
  Compute Granger-PCMCI Causal Matrix MCI_matrix = PCMCI_Discovery(X, max_lag=5).
  Construct Spatial-Temporal Graph G = (V, E) with weights E_ij = MCI_matrix[i, j].
  Pass sliding window X_window through Conv1D temporal filter.
  Extract sequential dependencies via Bi-LSTM hidden state H_lstm.
  Apply Multi-Head Attention Z = Softmax(Q K^T / sqrt(d_k)) * V.
  Compute SRI score: SRI = Sigmoid(W_fc * Z + beta * sum(MCI_matrix * delta_X)).
4: Return SRI