Title: ETH_Sem6 / DC / W10_UnsupervisedAndXAI

Q: What are the 4 criterions for a good explanation?
A: - Contrastive; Comparing to other references
- Selective; In what is explained
- Understandable
- Truthful

Q: What are variants of explainability methods? (2)
A: Explainablity Methods can be:
- Model-specific or Model-agnositc; The former works only for one model type where the latter works for any model
- Local or global; The former explaining a subset of predictions (or even only one) and the latter explaining the overall behaviour of the model

Q: What is the spectrum of "Box Colors" (include examples in your answer)?
A: - Black: Hardly/not explainable. (e.g. NN, Kernel methods)
- Gray: Some aspects are explainable. (e.g. RF Feature importance)
- Glass/White: (Obviously) explainable. (Linear Regression, Short decision trees)

Q: What is understood by the Flexibility-interpretabiliy trade-off?
A: - As models become more flexible, they are harder to interpret.

Q: What is a global and agnostic method to analyze Feature Importance?
A: - Permutation Feature importance.
- For each feature its values in X are permutated and the drop in performace is measured. This is repeated a certain number of times per feature. This allows the features to be ranked not by their assigned feature importance but by how sensitve the model is to the permutation. So we have an argument for explaining which features are important to the model for making correct predictions.

Q: What is SHAP (inkl. the basic formular)?
A: - SHapley Additive exPlanations
- Using game theory, the feature importances are fairly distributed between all the features of X for predicting a single result. Each prediction is viewed as a linear sum of the feature contributions.

Q: What kind of explanation is SHAP?
A: - In its basic form it is local (explains one prediction) and agnostic as it can be used for multiple different models.
- However all the local explanations can be combined to give global explanation as a summary of the local explanations.

Q: How can Deep learning models be explained? (6)
A: - Count as Black-Box Models
- One option is to perturb the features and observe the change in the output
- All of these are local and specifc to the model at hand
- Optimized SHAP for Deep learning;
- Using attention weight from transformers
- Using surrogate models

Q: What is a surrogate model?
A: - It is an explainable model which is applied to the results of a black-box model.
- Assuming that both models behave similar, the surrogate model gets interpreted instead of the blackbox model.
- Can be based on parts of the data (i.e. local) or all data (i.e. global)

Q: How can a model be explained by using the chemical space surrounding predictions?
A: - Using a counterfacutal Approach: What would have happend if the molecule was different? Would the label or the predicted value be different?
- E.g. The MMACE Algortihm: Using STONED, the chemical space around the predicted molecule is generated and then examine the most similar molecule with a different label or value is found. Comparing the two molecules at hand might explain parts of the model.
- \(d(x, x') \) is the Tanimoto distance

Q: What are the uses for dimensionality reduction? (3)
A: - Speed Up Training or clustering
- Visualize high-dimensional data
- Regularization for methods that lack it.

Q: What is the difference between Projection and Manifold learning dimensionality reduction?
A: - Projection projects onto a lower dimension hyperplane (linear).
- Manifold learning can project on a non-linear lower-dimension manifold.

Header: What is the term for the model behind the mask and what is it purpose?
Remarks: Then encoder compresses the input vector into the latent space represnetation.

Header: What is the term for the model behind the mask and what is it purpose?
Remarks: The Decoder learns to decompress the data from the latent vector.

Header: What is the Name of Z?

Q: What is the idea of PCA and why is it roughly equivalent to autoencoders?
A: Perform a linear transformation of the features to orthogonal basis vectors
If the autoencoder is linear, meaning that the input in encoded as \(z = xW_e\) and then decoded as \(\hat{x} = zW_d = xW_eW_d\) the results is equivalent to the PCA (\(\hat{x} = xWW^\text{T}\)) if \(W_d = W_e^\text{T}\) and \(W_dW_e = \mathbb{1}\)

Q: How does UMAP work (roughly)? (2)
A: - UMAP constructs a graph representation of the data in orignal dimensionality an then constructs a lower dimensional graph to be as similar to the original graph as possible.
- The inital high dimesional graph is constructed by setting radii (locally choosen based on distance to the \(n^{th}\) nearest neighbor; n_nearest, min_dist) around each point. Data with overlapping radii is then connected by a distance (e.g. tanimoto, euklidian, ...) weighted edge.
- Source: https://pair-code.github.io/understanding-umap/?ref=dylancastillo.co

Q: What are 3 chemical applications of clustering?
A: - Automated anomaly/outlier detection
- Selection of representative compounds from large chemical space
- Semi-supervised learning with limited available data

Header: Which type of clustering is shown below the red mask?
Remarks: In prototype-based clustering clusters are formed based on prototype datapoints (centroids)

Header: Which type of clustering is shown below the red mask?
Extra 1: In hierarchical clustering clusters are formed based on merging and splitting clusters

Header: Which type of clustering is shown below the red mask?
Extra 1: In density based clustering clusters are formed based on point-density.

Q: What is the pseudo-code algorithm for k-means-clustering?  (4)
A: 1. Pick (random) cluster centroid
2. Assign points to cluster
3. Calculate new centroid
4. Repeate until converged

Q: What is used to pick the number of clusters in kmeans clustering?
A: - Intertia is used:

Q: Give the algorithm for agglomerative clustering in words. (3)
A: 1. Each point is assigned its own cluster
2. The two closest clusters are merged based on a distance criterion
3. Repeat until only one cluster is left

Q: How can agglomerative clustering be used to fix colinearity of the features?
A: - All the features correlated to one of the "higher branching point" features is cut.
- The resulting number of clusters is represented by the same number of features.

Q: What is the algorithm for DBSCAN (Density-Based Spatial Clustering Of Applications With Noise) in words? (3)
A: 1. Points are assigned as core, border or noise points
2. Form one cluster of set of connected core points
3. Assign border points to the cluster of their core point