Configure the ViT classifer based on DINO backbone
We are adding a binary classification head (see howtorch.nn.Linear
) onto a DINO backbone.

XAI Module Setup
XAI Module have components to both provide you with easy-to-use explainability tools and evaluation tools. Module consist of two major ingredients:- XAITool - Particular implementations of explainability methods.
- XAIEval - Evaluation methods for achieved explainability maps.
XAITool
cdam_tool
- It is an excellent explainability method, highly discriminative with regards to the target class.smooth_grad_tool
- Classical and simple XAI method.attention_tool
- Classical way to inspect ViT like models.
XAIEval
fidelity_tool
- It is an explainability maps evaluation tool. It assess xai map quality by measuring behaviour of output logits in case of input perturbation.compactness_tool
- It is just another xai maps evaluation tool.
fidelity_tool
measures how accurately a given XAI method reflects the model’s true decision process. It does this by systematically perturbing input features based on their importance scores and observing the resulting change in the model performance.
compactness_tool
evaluates how sparse and concentrated the importance scores are. A more compact set of importance scores is often easier for humans to interpret, as it highlights the most relevant features in a concise manner.
By using these tools, you can better understand and compare the effectiveness and interpretability of different XAI approaches.
