DL0051 Sparsity in NN

Explain the concept of “Sparsity” in neural networks.

Answer

Sparsity in neural networks refers to the property that many parameters (weights) or activations are exactly zero (or very close to zero).
This leads to lighter, faster, and more interpretable models. Techniques such as L1 regularization, pruning, and ReLU activations help enforce sparsity, making networks more efficient without compromising performance.

Common techniques and their equations:
(1) L1 Regularization (encourages sparse weights)
 L = L_{\text{task}} + \lambda \sum_i |w_i|
Where:
 w_i represents the i-th model weight
 \lambda controls the strength of sparsity

(2) ReLU Activation (induces sparse activations)
 \mathrm{ReLU}(x) = \max(0, x)
Where:
 x is the neuron input.

The plot below shows weight distributions trained without using L1 and with L1-induced sparsity.


Login to view more content

Did you solve the problem?

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *