ML Model Parameters
- (Harvard University - Harvard Taiwan Student Association)
- Overview
Internal model parameters are learned numerical values inside a machine learning (ML) model that get updated during training or fine-tuning to map inputs to outputs. Unlike hyperparameters (such as learning rate, batch size, or number of epochs), which engineers set externally before training, model parameters are discovered automatically from data.
1. Core Parameters:
- Weights: Multipliers applied to input features or signals between nodes. Larger weights give a feature or connection stronger influence over the output; positive values push predictions up, while negative values push them down.
- Biases: Offset terms added to the weighted sum before or after an activation function. A bias shifts the model's output up or down independently of the input features, letting decision boundaries or curves avoid being pinned to the origin.
2. Other Internal Parameters:
Depending on the model architecture, internal parameters can also include:
- Convolutional filters/kernels: Small weight matrices in CNNs that scan inputs to detect local patterns (like edges or textures).
- Normalization parameters: Scale (gain) and shift parameters learned in layers like BatchNorm or LayerNorm.
- Gating or attention projections: Learned weight matrices in recurrent or transformer models that control information flow and token relationships.
3. How They Are Learned:
- Forward pass: Inputs pass through layers using current weights and biases to produce a prediction.
- Loss calculation: A loss function measures how far the prediction is from the target.
- Backpropagation & gradient descent: Gradients show how each parameter affects the loss, and an optimizer updates the parameters in small steps to reduce error.
[More to come ...]

