# Conditional Computation

- **Canonical URL:** https://getaimath.com/dictionary/conditional-computation/
- **Topics:** [Mixture of Experts (MoE)](https://getaimath.com/dictionary/category/mixture-of-experts-moe/)
- **Last updated:** 2026-11-25

## What is Conditional Computation?

**In one sentence:** Conditional computation means the model decides which parts of itself to use based on the input.

Instead of running every layer and neuron for every input, the model only runs what each input needs. MoE is the best-known example.

![Mixture of Experts (MoE): A Team of Specialists (Only 2 Wake Up) — Simple cartoon showing a question arriving at a Front Desk Receptionist (Router) who wakes up only 2 out of 8 specialist doctors (Math and Finance) while the other 6 specialists stay asleep to save energy.](https://getaimath.com/diagrams/mixture-of-experts-moe.png)
*Napkin Diagram (Mixture of Experts (MoE)): Mixture-of-Experts wakes up only 2 of its 8 specialists for each word (real experts’ specialties are messier than neat topics).*

## What is an example of Conditional Computation?

A model that sends easy tokens through fewer experts and hard tokens through more is using conditional computation.

## Why does Conditional Computation matter?

It is a key idea for making very large models efficient.

## Related Concepts

- [Dense vs Sparse Architecture](https://getaimath.com/dictionary/dense-vs-sparse-architecture/): Dense vs sparse architecture compares models that use all parameters for every token with models that only use some.
- [MoE Layer](https://getaimath.com/dictionary/moe-layer/): An MoE layer is a layer that replaces a normal feed-forward network with a router and a group of experts.
- [Expert Communication](https://getaimath.com/dictionary/expert-communication/): Expert communication is the data sent between GPUs when tokens travel to the experts they need and back.
- [Fine-Grained Experts](https://getaimath.com/dictionary/fine-grained-experts/): Fine-grained experts are many small experts instead of a few big ones, allowing more precise specialization.
- [Expert Parallelism](https://getaimath.com/dictionary/expert-parallelism/): Expert parallelism spreads the experts of an MoE model across different GPUs, so each GPU holds and runs some of the experts.
- [Auxiliary Loss](https://getaimath.com/dictionary/auxiliary-loss/): An auxiliary loss is an extra training penalty added to encourage a side goal, such as balancing work across experts.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/conditional-computation/)
