Deep Learning (DEEP-0001)�
Prof. André E. Lazzaretti
https://sites.google.com/site/andrelazzaretti/graduate-courses/deep-learning-cpgei/2025
9 – Performance
Measuring performance
MNIST Dataset
MNIST 1D Dataset
Network
Need to use separate test data
The model has not generalized well to the new data
Measuring performance
Regression example
Generated data: Sampling input values in the range [0, 1], passing them through this function, and adding Gaussian noise with a fixed variance.
Toy model
Noise, bias, and variance
Data generation is noisy, so even if the model exactly replicates the true underlying function (black line), the noise in the test data (gray points) means that some error will remain (gray region represents two standard deviations).
Noise, bias, and variance
The three-region model (cyan line) cannot exactly fit the true function (black line).
Noise, bias, and variance
Depending on the training dataset, the results will vary slightly each time.
Noise, bias, and variance
Measuring performance
Variance
Can reduce variance by adding more samples
Measuring performance
Reducing bias
Increasing model capacity also increases the variance term (gray region). This is known as the bias-variance trade-off.
Why does variance increase? Overfitting
Describes the training data better, but not the true underlying function (black curve)
model with three regions
model with ten regions
Bias and variance trade-off
model capacity (number of hidden units / linear regions in range of data)
Measuring performance
Number of datapoints
MNIST-1D for a two-hidden layer network as we increase the number of hidden units
The training error decreases to zero as the number of parameters approaches the number of training examples (vertical dashed line).
The test error does not show the expected bias-variance trade-off but continues to decrease even after the model has memorized the dataset.
Double descent
noisier training data
Potential explanation:
But why?
Measuring performance
Curse of dimensionality
Measuring performance
Choosing hyperparameters
K-Fold Cross-Validation
Grid Search