Neural Network Architectures

By 2026, transformers have eaten most of the deep-learning landscape. They started in language, took over vision, made meaningful inroads into speech, audio, and biology. Older architectures (CNNs, RNNs, MLPs) still appear, but the slope of "transformers everywhere" has steepened year over year.

This page is the architectures you'll meet, what they do, and the cases where each is still the right pick.

MLP (Multi-Layer Perceptron)

The simplest neural network: stacked dense layers with non-linearities.

input -> linear(W1) -> ReLU -> linear(W2) -> ReLU -> ... -> output

When it's the right answer:

When it's not:

CNN (Convolutional Neural Network)

Convolutions detect local patterns; stacking convolutions detects hierarchical patterns. The original "ImageNet moment" architecture (AlexNet, 2012) was a CNN.

When CNNs are still the right pick:

When CNNs lose:

See ConvolutionalNeuralNetworks.

RNN / LSTM / GRU

Recurrent networks process sequences one step at a time, maintaining state across steps. LSTMs and GRUs added gating to handle long-range dependencies.

By 2026, RNNs are mostly historical for language. Transformers replaced them in 2017–2019. They persist in:

For most sequence work in 2026, transformers are the default; state-space models are emerging as a contender for very-long-context tasks.

See RecurrentNeuralNetworks.

Transformers

The architecture that changed everything (Vaswani et al., 2017). Self-attention + position encoding + feedforward, stacked.

The core idea: every token can attend to every other token, weighted by learned similarity. The model decides what's relevant; you don't pre-specify locality (CNN) or recurrence (RNN).

Properties that made it dominant:

Variants:

Cost: attention is O(n²) in sequence length. Long-context tricks (FlashAttention, ring attention, sparse attention, linear attention) push this lower in practice.

Mixture of Experts (MoE)

Each layer has multiple "expert" sub-networks; a router picks which ones process each token. Total parameters are huge; activated parameters per token are small.

Examples: Mixtral 8x7B (47B total parameters, ~13B activated per token), DeepSeek-V3.

Win:

Trade-off:

Production trend: most frontier models in 2026 are MoEs internally. Open-weights MoEs are increasingly common.

Diffusion models

For generation tasks (image, video, audio, occasionally text), diffusion models work by learning to reverse a noise process. Given pure noise, they progressively denoise into a sample.

State of the art for image and video generation in 2026 (Stable Diffusion 3, FLUX, video-generation models). Different in spirit from autoregressive language models — generates the full output in parallel rather than token-by-token.

Use when:

Don't use when:

Architecture decisions you might actually face

"What architecture for my custom task?"

In 2026, the answer is almost always:

  1. If labelled data is small (< 100k examples): fine-tune a pretrained model. The pretrained backbone is more important than the architecture choice. For text → fine-tune an existing LLM. For vision → fine-tune a CLIP or DINO.
  2. If you're doing image classification/detection/segmentation specifically: a vision transformer or hybrid (DINOv2, EVA, ConvNext) pretrained at scale, fine-tuned on your data.
  3. If you're doing tabular data: try gradient-boosted trees first. They often win.
  4. If you have a genuinely novel modality: tokenise it and use a transformer. The substrate is universal enough.

The era of designing custom architectures for specific tasks is mostly over. Pretrained big models, adapted, win.

"How big a model do I need?"

For most production deployments:

The right size is task-dependent. Run a few, measure, pick.

"Open weights or commercial API?"

Most production systems pair: open-weights for high-volume routine tasks, commercial API for hard tasks where the quality gap pays.

What's emerging

Where the 2027-2028 architectures land is unclear. The trend over the past five years has been "transformers but bigger" with some innovation around efficiency. Expect continued mostly-transformers with significant inference-time techniques.

Further reading