Mean Squared Error
A loss function defined as the mean of the squared differences between predicted and true values. It is commonly used in regression tasks and is not suitable for multi-class classification tasks paired with Softmax.
Timeline (last 90 days)
If mean squared error is mistakenly used together with Softmax in a from-scratch implementation, the gradient will contain an additional Softmax derivative term, causing the update signal to be weak and prone to saturation, and the network tends to output a constant close to the class prior, which is a common cause of "always outputting the last class."
When using mean squared error (MSE) as the loss function, the negative gradient of the loss with respect to the predicted value is exactly equal to the residual y−prediction.
The partial derivative of the MSE loss function with respect to parameter W is ∂L/∂W = (2/n) * Xᵀ(XW - y), and the partial derivative with respect to b is ∂L/∂b = (2/n) * Σ(y_pred - y).
Under the assumption of a Gaussian output distribution, minimizing negative log-likelihood (NLL) and minimizing mean squared error (MSE) are mathematically completely equivalent.
When the prediction error is assumed to follow a Gaussian distribution with zero mean and fixed variance, taking the negative logarithm of the likelihood function and expanding it yields a leading term that is exactly in the form of mean squared error.
MSE suffers from gradient saturation when Sigmoid outputs are close to 0 or 1, causing training to be extremely slow, whereas cross-entropy has larger gradients when predictions deviate severely
All Facts (7)
If mean squared error is mistakenly used together with Softmax in a from-scratch implementation, the gradient will contain an additional Softmax derivative term, causing the update signal to be weak and prone to saturation, and the network tends to output a constant close to the class prior, which is a common cause of "always outputting the last class."
50%UnverifiedWhen using mean squared error (MSE) as the loss function, the negative gradient of the loss with respect to the predicted value is exactly equal to the residual y−prediction.
50%UnverifiedThe partial derivative of the MSE loss function with respect to parameter W is ∂L/∂W = (2/n) * Xᵀ(XW - y), and the partial derivative with respect to b is ∂L/∂b = (2/n) * Σ(y_pred - y).
50%UnverifiedWhen the prediction error is assumed to follow a Gaussian distribution with zero mean and fixed variance, taking the negative logarithm of the likelihood function and expanding it yields a leading term that is exactly in the form of mean squared error.
50%UnverifiedUnder the assumption of a Gaussian output distribution, minimizing negative log-likelihood (NLL) and minimizing mean squared error (MSE) are mathematically completely equivalent.
50%UnverifiedMSE suffers from gradient saturation when Sigmoid outputs are close to 0 or 1, causing training to be extremely slow, whereas cross-entropy has larger gradients when predictions deviate severely
50%UnverifiedSupervised learning is essentially a function approximation problem achieved by minimizing a loss function; common loss functions include Mean Squared Error (MSE) for regression tasks and Cross Entropy for classification tasks.
50%