# Enhancing Neural Network Interpretability Through Deep Prior-Guided Expected Gradients
## 3 Methodology
### Motivation and Proposed Framework  
This paper proposes DeepPrior-EG, a prior-guided EG explanation framework that initiates path integration from knowledge-enhanced baselines. As illustrated in Figure 1, the framework computes expectation gradients along trajectories spanning from prior-based baselines to input images, addressing feature absence while amplifying critical feature contributions during gradient integration. The DeepPrior-EG architecture comprises four core components, namely deep feature extraction, prior knowledge modeling, prior baseline construction, and expected gradients computation, which are detailed as follows:  
**Deep Feature Extraction**: Leveraging convolutional neural networks (CNNs), we process input images to obtain feature representations from final convolutional layers. The extracted high-dimensional tensor \((B,C,H,W)\), where \(C\) denotes feature map channels and \(H/W\) represent spatial dimensions, is flattened along spatial axes into a 2D matrix \((N,C)\). Each row corresponds to feature vectors at specific spatial locations, forming the basis for subsequent probabilistic analysis. Our methodology draws inspiration from [PERSON] et al. 's deep image prior work [24], with CNN-based feature extraction justified by four key advantages:  
* Inherent Prior Encoding: CNNs naturally encode hierarchical priors through layered architectures, capturing low-level features (edges/textures) and high-level semantics (object shapes/categories), enabling effective modeling of complex nonlinear patterns. * Superior Feature Learning: Unlike traditional methods (SIFT/HOG) limited to low-level geometric features, CNNs automatically learn task-specific representations through end-to-end training, eliminating manual feature engineering. * Noise-Robust Representation: By mapping high-dimensional pixels to compact low-dimensional spaces, CNNs reduce data redundancy while enhancing feature robustness. Figure 1: The architecture of DeepPrior-EG. Transfer Learning Efficiency: Pretrained models (ResNet/VGG) on large datasets (ImageNet) provide transferable general features, improving generalization and reducing training costs. **Prior Knowledge Modeling**: Flattened feature vectors undergo probabilistic modeling using MGM or BGMM to capture distribution characteristics. These models structurally represent feature occurrence likelihoods, serving as crucial components for baseline optimization (detailed in subsequent sections). **Prior Baseline Construction**: The prior distribution is upsampled to match input spatial dimensions and integrated into the baseline through the transformation Equation (8). \[x^{\prime}_{\text{prior}}=x^{\prime}-p_{\text{prior}} \tag{8}\]  
where \(p_{\text{prior}}\) denotes the prior probability map. This translation adapts baselines to simulate clinically meaningful \"missingness\" rather than artificial null references. Let us illustrate the meanings of Equation (8) by the scenario in explaining diabetic diagnosis models. In diabetic prediction, replacing conventional baselines (\(0 mmol/L\) blood glucose) with clinical reference-adjusted baselines (\(\approx\)5 mmol/L) redefines pathological deviations. For a glucose level of \(9 mmol/L\), the attribution shift from \(\delta=9-0\) (artificial absence) to \(\delta=9-(-1)\) (clinical absence) amplifies sensitivity to true anomalies while suppressing spurious signals. This baseline adjustment mechanism provides four key benefits:  
Adaptive Reference Points: Baselines function as flexible anchors rather than fixed statistical measures. Bias Mitigation: Subtracting prior distributions neutralizes feature biases toward specific classes. Mathematical Flexibility: The translation preserves baseline functionality while enhancing contextual adaptability. Clinical Relevance: Prior integration aligns explanations with domain-specific knowledge, as evidenced by reduced background attributions in experiments. **Expected Gradient Computation**: With prior-guided baselines, we reformulate expected gradients shown in Equation (9).