# What is Loss Function? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Mathematical Foundations  
> **Canonical Citation:** [https://spidits.com/ai-glossary/loss-function](https://spidits.com/ai-glossary/loss-function)

## Definition
A Loss Function is a mathematical algorithm that measures the discrepancy between a model's predicted output and the actual true target value during training. The goal of training is to minimize this loss, adjusting weights based on gradients computed from it.

## Architectural Mechanics & Deep Dive
A loss function is a mathematical formula that measures the error between a model's prediction and the actual ground-truth label for a single training instance. The training objective is to minimize this loss across the entire dataset. Common loss functions include Mean Squared Error (MSE) for regression and Cross-Entropy Loss for classification tasks.

## Industry Applications & Real-World Use Cases
Optimization algorithms, cost metric calculation, and error assessment during training

## Frequently Asked Questions

### What is Cross-Entropy Loss?
A loss function commonly used in classification tasks to measure the difference between two probability distributions (predicted probabilities vs. true labels).

### What is Mean Squared Error (MSE)?
A loss function used in regression tasks that averages the squared differences between predicted and actual values.

## Related Terminology
- [backpropagation](https://spidits.com/ai-glossary/backpropagation)
- [supervised-learning](https://spidits.com/ai-glossary/supervised-learning)

---
*From the SPIDITS AI Knowledge Base (336+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
