
Variance: how much models predictions vary when its trained on different subsets training data, error is introduced because model is too sensitive to fluctuations in training data, high variance can lead to overfitting
Bias is error introduced by simplifying assumptions in a model; high bias can prevent it from capturing the underlying relationship.
Under suitable activation assumptions, a sufficiently wide single-hidden-layer network can approximate continuous functions on compact domains. This is an approximation result, not a guarantee that training will find a good model or that it will generalize.
Convolutional Neural Network: If you use FNNs to input 100x100 image → millions of parameters, lead to overfitting on training dataset. In images, patterns like edges, shapes appear in multiple locations a FNN would have to relearn the same pattern for every location which is wasteful. Convolution applies a filter across an image, allows model to detect local features across different regions reducing the number of parameters


If images are multichannel, filters would be multichannel too.
Neurons on a surface level have local connectivity (connected to a small region of input image) but are depth wise global (connected to each channel value)
Local connectivity: neuron is connected to small, local region of the input, not the entire input
Spatial connectivity: how neighboring pixels in image are connected helps identify shapes, edges
Receptive field: region of the input image that affects output neuron
Depth map: represents distance from camera, used in 3D vision
Pooling: down sampling technique to reduce spatial size of feature maps

- Makes model faster
- Adds spatial invariance
- Allows us to observe large receptive field
Pooling can reduce model size and overfitting risk, but does not guarantee generalization.

Explainability for CNNs ~ trying to explain what internal layers are learning

Choosing Hyper parameters
Split data into training, validation, and test sets. Fit model parameters on training data, choose hyperparameters using validation data, and reserve the test set for the final evaluation. Selecting hyperparameters directly on the test set makes its result optimistic.

| Approach | What is selected/evaluated | Problem or benefit |
|---|---|---|
| Use all data | Choose hyperparameters on the same data used to fit the network | A large network can fit training examples; this does not estimate generalization. |
| Train/test only, tune on test | Fit on training data and choose settings by test performance | The test data influences selection, so it no longer provides an independent final estimate. |
| Train/validation/test | Fit weights on train, choose settings on validation, evaluate once on test | Separates fitting, model selection, and final evaluation. |
Saddle points have zero gradient but are neither local minima nor maxima. Flat regions and poor conditioning can slow optimization.
Anisotropic loss surfaces: loss changes fast in one direction, slow in another
SGD equation:
- Faster updates ⊖ Unstable training ⊖ Can stuck in saddle points or local minima

Jittery updates due to large change in y and small change in x
Our gradients come from minibatches so they can be noisy
Hessian matrix has a high condition number
SGD+Momentum: If gradients keep pointing in the same direction, inertia increases
SGD with momentum is just running mean of gradients

Adam (Adaptive Moment Estimation): combines momentum and RMSProp
Data Augmentation: since neurons on a surface level have local connectivity and neurons may memorize biases(e.g. orientational). Augmentation increases dataset and generalizes model for real-world variations.
- Horizontal/Vertical Flips
- Random Crops and Zoom
- Randomized contrast/brightness
- Random Translations
- Noise injection
- Random Cutouts to prevent occlusion
- Random Warp
- Reducing number of Color bits