
Normalization rescales features to a common range or distribution so optimizers train stably and no single feature dominates because of its units.
Min-Max maps values to a fixed range like [0,1] and is sensitive to outliers. Z-score centers data at mean 0 and unit variance and is often better for roughly Gaussian features.
No. Feature scaling is preprocessing on inputs. Batch/layer/instance normalization are layers inside neural nets that stabilize activations during training.
Normalization is a fundamental preprocessing technique in artificial intelligence and machine learning that transforms data into a standard scale, making it suitable for model training and analysis. This process adjusts the values in a dataset to a common scale without distorting differences in the ranges of values or losing information. Normalization is particularly important when dealing with features that have different units or scales, which is common in real-world datasets.
Normalization serves several critical purposes in AI and machine learning:
Improves Model Performance: Many machine learning algorithms, especially those using distance calculations (like k-NN) or gradient descent (like neural networks), perform better when features are on similar scales.
Faster Convergence: Normalized data helps optimization algorithms converge more quickly during training.
Prevents Feature Dominance: Without normalization, features with larger scales can dominate the model's behavior, even if they're less important.
Numerical Stability: Normalization helps prevent numerical overflow/underflow issues in computations.
Scales features to a fixed range, typically [0,1].
Formula:
x_normalized = (x - x_min) / (x_max - x_min)
Characteristics:
Process Flow:
Transforms data to have zero mean and unit variance.
Formula:
z = (x - μ) / σ
where:
μ = mean
σ = standard deviation
Characteristics:
Process Flow:
Applies logarithmic transformation to handle skewed data.
Formula:
x_normalized = log(x + 1) # Adding 1 to handle zeros
Characteristics:
Process Flow:
| Technique | Best For | Sensitive To | Output Range |
|---|---|---|---|
| Min-Max | Neural Networks, Images | Outliers | [0,1] or custom |
| Z-Score | PCA, Clustering | Non-Gaussian data | (-∞, +∞) |
| Log Transform | Financial data, Counts | Zero/Negative values | (0, +∞) |
Normalizes layer outputs by recentering and rescaling across the batch dimension.
Formula:
y = γ * ((x - μ_B) / sqrt(σ²_B + ε)) + β
where:
γ, β = learnable parameters
μ_B = batch mean
σ²_B = batch variance
ε = small constant (1e-5)
Process Flow:
Normalizes inputs across feature dimensions (per-instance).
Formula:
μ_L = (1/H) * Σ(x_i)
σ²_L = (1/H) * Σ((x_i - μ_L)²)
y = γ * ((x - μ_L) / sqrt(σ²_L + ε)) + β
Process Flow:
Normalizes each channel separately within each sample (used in style transfer).
Process Flow:
Key Characteristics:
Specialized Normalization Techniques are customized preprocessing or internal normalization methods designed to improve the stability, convergence, or performance of machine learning or deep learning models by accounting for specific data properties or architectural needs.
Concept: Decouples the weight vector into magnitude (g) and direction (v/||v||)
w = g * v/||v||
Visualization:
Key Properties:
Concept: Constrains the Lipschitz constant by dividing by the largest singular value
W_SN = W / σ(W)
Visualization:
Key Properties:
Concept: Divides channels into groups and normalizes within each group (independent of batch size).
Key Properties:
Concept: Dynamically adjusts normalization parameters (scale/shift) based on input or external conditions.
Key Properties:
AdaIN (Adaptive Instance Norm) in style transfer.