Neural network model predictions can be underconfident (when the predicted confidence of the model is less than the true likelihood of the event) or overconfident, that means the model is badly calibrated. This marks the importance of having the uncertainty estimate for the neural networks.
Uncertainties can be of different types:
-
Aleatoric uncertainty (Data-Dependent Uncertainty): It arises from inherent randomness or variability in the data itself, such as measurement noise or inherent variability in the data distribution. This is irreducible uncertainty as it arises from the natural complexity of the data, such as class overlap, label noise, homoscedastic and heteroscedastic noise.
-
Epistemic uncertainty (Model-Dependent Uncertainty) : It measures the uncertainty in estimating the model parameters given the training data - this measures how well the model is matched to the data. Thus, it reflects the model’s inability to perfectly capture the underlying relationship between the input features and the target variable. Model uncertainty is reducible as the size of training data increases.
Following is the process we followed to quantify Data Uncertainty and Model Uncertainty in the Neural Network where we have a base neural network architecture and on top of which we append another layer that helps us to quantify uncertainty:
![flow](https://private-user-images.githubusercontent.com/36258085/407072593-590a7508-4d19-4bb2-a66c-85219b9e2e33.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MTU0MDksIm5iZiI6MTczOTYxNTEwOSwicGF0aCI6Ii8zNjI1ODA4NS80MDcwNzI1OTMtNTkwYTc1MDgtNGQxOS00YmIyLWE2NmMtODUyMTliOWUyZTMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEwMjUwOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZhMDc4NGI5Y2QxMDNmMWJhMDVjMzU5NjM1YWMyZGZkNzdjMzQyMmEyMDMzOTdjYzdjMWQxNWY1NDgzNTU1MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.RU3JQcwF_S4GFtvuf_9UUEdeSGSENwT6njhFDEKWu38)