Post hoc layer reveals key features in trained neural networks

Post-Hoc Feature Selection Layer for Neural Networks Interpretability

Machine LearningArtificial Intelligence

Summary

Interpreting complex neural networks after they are trained is hard, especially when they are already in use for important decisions. The authors created a lightweight layer called post-hoc Feature Selection Layer (FSL) that attaches to these models without changing them. This layer learns which input features are most important by tuning itself based on the original model's outputs. Their tests show it effectively identifies relevant features while keeping the model's predictions accurate.

What this means in practice

Authors

João Kenji Suwa, João Pedro Silveira e Silva, Bruno Iochins Grisci

Abstract

The interpretability of complex neural networks remains a critical challenge, especially for models already deployed in high-stakes domains. To address this, we adapted the Feature Selection Layer (FSL) to optimize feature weights post-training, a variant we term post-hoc FSL. Our approach reframes the FSL as a lightweight, trainable module that integrates with already frozen pre-trained models on tabular datasets to highlight the features the original model considers most important. This post-hoc FSL learns feature relevance by fine-tuning its weights based on the original model's learned outputs. Crucially, this process is non-invasive, operating without altering the original model's architecture or its learned parameters. We conducted our experiments using both statistical and visual metrics, including accuracy, F1 score, recall, precision, weighted t-SNE and silhouette score, and also analyzed the stability of the post-hoc FSL on high-dimensional synthetic and real-world tabular datasets. We compared the post-hoc FSL feature weighting method using these metrics against the original embedded FSL and other post-hoc interpretability methods, such as Integrated Gradients, Noise Tunnel, DeepLIFT, Gradient SHAP, and Feature Ablation. Experimental results demonstrate that the post-hoc FSL feature weighting method successfully identified relevant features across the different datasets, maintaining the predictive power of the original neural network while enhancing its interpretability.