What is AI sparsity?

Sparsity is when a significant share of a neural network's weights, activations or computation is zero or unused; it is created deliberately to cut memory and compute cost by storing fewer values and doing fewer operations.

Pruning creates sparsity by removing weights or structures. A mixture of experts model makes computation sparse by running only some experts per token; sparse attention lets each token attend only to some tokens.

Topic
Machine learning, models and training
Also known as
Sparse model

How AI sparsity works

  1. Weight sparsity comes from zeroing unimportant weights during or after training.
  2. In semi-structured patterns, such as two of every four weights being zero, hardware can speed up directly.
  3. In activation sparsity only part of the network runs per input; mixture of experts is an example.
  4. Sparse matrices use special storage formats with index overhead, so gains usually need high sparsity; speed gains depend on hardware and library support.

In more detail

Sparsity combined with quantisation and sparse attention

In large language models, sparsity is often combined with quantisation (such as 2:4 sparsity paired with FP8 or INT4 weights) and dynamic activation sparsity (exploiting ReLU-like gating or MoE routing) to stay within tight VRAM and memory-bandwidth budgets. In attention layers, block-sparse and native sparse attention mechanisms keep long-context compute sub-quadratic without dropping critical tokens.

Commonly confused terms

TermHow it differs
QuantisationQuantisation reduces the numerical precision (bit width) of every weight or activation while keeping matrices dense, whereas sparsity sets a fraction of values to exact zero or skips computing parts of the network.
Low-rank factorisationLow-rank factorisation (such as SVD or LoRA) approximates a dense matrix as the product of two smaller dense matrices, whereas sparsity keeps the original matrix dimensions with many zero entries.

Why AI sparsity matters for on-premises AI

A review of over 300 papers on sparsity in deep learning notes sparse networks can generalise as well as, sometimes better than, the original dense networks while reducing memory footprint and training time. An early study using pruning that learns only important connections cut parameters of two image classifiers 9 and 13 times without accuracy loss. For in-house inference, the key question is whether sparsity yields real speed on the hardware and inference engine used.

ON-PREMISES EXAMPLE

An energy company sparsifies a fault classifier running on limited field devices; it measures speed and accuracy where the inference stack supports semi-structured patterns and relies only on memory savings on devices that do not.

Common questions

Does sparsity always bring speed?

No. Irregular sparsity does not speed up most standard hardware; gains depend on pattern, hardware and software support.

Is a mixture of experts model sparse?

In computation, yes: only some experts run per token, though all parameters stay in memory.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.