# Enhancing Neural Network Interpretability Through Deep Prior-Guided Expected Gradients
## 3 Methodology
### Bayesian Gaussian Mixture Models for Deep Priors  
The Bayesian Gaussian mixture model [35] provides enhanced capability to model complex and heterogeneous data distributions. Our rationale for selecting BGMM encompasses three principal advantages:  
Automatic Component Selection: Through Dirichlet process priors, BGMM dynamically infers the optimal number of mixture components \(K\) without manual specification. Traditional Gaussian mixture models (GMMs) require cross-validation or information criteria (AIC/BIC) for \(K\) selection, which often leads to under/over-fitting with dynamically changing distributions (e.g., lesion morphology variations in medical imaging). BGMM's nonparametric Bayesian framework enables adaptive complexity control.  
Hierarchical Feature Modeling: BGMM's hierarchical structure captures both global and local feature relationships. Globally, mixture coefficients \(\pi_{k}\) quantify component significance across semantic patterns. Locally, individual Gaussians \((\mu_{k},\Sigma_{k})\) model subclass-specific distributions (e.g., normal vs. pathological tissues in medical images). This dual-level modeling enhances interpretability for heterogeneous data.  
Conjugate Prior Regularization: BGMM imposes conjugate priors (normal-inverse-Wishart distributions) on parameters \(\{\pi_{k},\mu_{k},\Sigma_{k}\}\), constraining the parameter space to prevent overfitting in low-data regimes. This regularization ensures numerical stability, particularly in covariance matrix estimation.  
Following the deep priors framework, we implement BGMM-based appearance prior modeling through the following steps:  
**Feature Flattening**: Reshape convolutional feature map \(\mathbf{F}\in\mathbb{R}^{\mathcal{B}\times\mathbb{C}\times H\times W}\) into matrix \(\mathbf{F}^{\prime}\in\mathbb{R}^{N\times C}\) (\(N=H\times W\)) through Equation (16).  
\[\mathbf{F}^{\prime}=\text{reshape}(\mathbf{F},(-1,C)) \tag{16}\]  
**Model Fitting**: Train BGMM with automatic component selection according to Equation (17).  
\[\text{BGMM}=\text{Fit}(\mathbf{F}^{\prime},K) \tag{17}\]  
**Posterior Computation**: For each pixel \(\mathbf{F}^{\prime}_{i}\), calculate component membership probabilities using Equation (18).  
\[P(z_{k}|\mathbf{F}^{\prime}_{i})=\frac{\pi_{k}\mathcal{N}(\mathbf{F}^{\prime}_ {i}|\mathbf{\mu}_{k},\mathbf{\Sigma}_{k})}{\sum_{j=1}^{k}\pi_{j}\mathcal{N}(\mathbf{ F}^{\prime}_{i}|\mathbf{\mu}_{j},\mathbf{\Sigma}_{j})} \tag{18}\]  
where \(\mathcal{N}(\cdot)\) denotes the Gaussian probability density function. The resultant posterior matrix \(P\in\mathbb{R}^{N\times K}\) provides fine-grained appearance priors for baseline enhancement.  
Compared to alternative approaches, BGMM offers three key advantages:  
* vs. GMM: Avoids preset \(K\) and singular covariance issues through nonparametric regularization;
* vs. KDE: Explicitly models multimodality versus kernel-based density biases;
* vs. VAE: Maintains strict likelihood-based generation unlike decoder-induced distribution shifts.  
This adaptive modeling capability makes BGMM particularly effective for heterogeneous data distributions, multimodal features, and limited-sample scenarios, providing a robust probabilistic framework for deep feature space interpretation.