Skip to content
AI & Machine Learning Rich #activations#relu#gelu

Activation Functions Compared

ReLU, sigmoid, tanh, GELU, SiLU. Curves, gradients, and where each shines.

A free, animated activation functions compared you can read here or embed on any website, from Scrollchart.

Activation Functions Compared

Activation Functions ComparedReLU dominates CNNs; GELU and SiLU dominate transformers. Saturation regions highlighted.-4-2024-101input xf(x)saturationdead zone (ReLU)Gradient of sigmoid peaks at 0.25; ReLU gradient is exactly 1 for x > 0, 0 for x < 0.

Six activations plotted on shared axes: sigmoid, tanh, ReLU, leaky ReLU, GELU, SiLU. Below each, its derivative. Dead-ReLU and saturation regions are highlighted. Annotations explain why ReLU dominates CNNs, GELU/SiLU dominate transformers, and sigmoid/tanh persist in gates.

Good for

  • Activation comparison articles explaining why architecture choices depend on the nonlinearity
  • Architecture choice writeups for CNN vs transformer design decisions
  • Deep learning course material covering gradient pathologies and modern remedies

Source & accuracy

This activation functions compared is an editorial illustration built to represent the concept accurately. Where it shows figures, they are typical or representative values chosen to make the relationship clear, not a single underlying dataset. The diagram and its explainer are reviewed and maintained centrally, and updated over time as understanding improves.

From sigmoid to modern activations: a brief history

Sigmoid and tanh dominated early deep learning. Sigmoid maps any input to 0-1; tanh maps to -1 to 1. Both are smooth and differentiable everywhere, which made them mathematically convenient for backpropagation. However, their gradients become tiny for extreme inputs, causing vanishing gradients in deep networks. ReLU changed the game: it is just max(0, x), piecewise linear, with large gradients outside the zero region. The simplicity and gradient properties made ReLU standard for decades. Yet ReLU dies at negative inputs (zero gradient), potentially losing information.

Modern variants and where they excel

GELU and SiLU are smoother alternatives that avoid ReLU's dead-neuron problem while retaining gradient flow. GELU (used in BERT and GPT models) uses the Gaussian cumulative distribution function, creating a soft version of ReLU. SiLU (used in modern CNNs like EfficientNet) uses a sigmoid-weighted linear term, balancing smoothness with efficiency. Each activation has nuances: SiLU is more expressive but slightly slower; GELU is more expensive but often trains faster. The choice depends on architecture, dataset, and computational constraints. Modern transformers favor GELU and SiLU, while older CNNs relied on ReLU variants.

Embed this diagram

Add this animated activation functions compared to your own site. Copy one line of HTML, or use the embed builder for theme and sizing options.

Reference

What this is
A free, embeddable, animated activation functions compared for any website.
Who uses it
AI/ML blogs, CS educators.
How to embed
Copy one line of HTML. No signup. No watermark. Works in WordPress, Webflow, Ghost, Substack, plain HTML.
File size
iframe embed, ~80 KB gzipped (loads on demand, does not block your page paint).
License
Free forever. Editorial explainer text included; updated centrally over time.

Embed format options

Copy the universal HTML snippet, the WordPress shortcode, or an iframe fallback - see the WordPress plugin page for details. Any format keeps the same Core Web Vitals profile and the same explainer text.

Embed snippet
<div data-scrollchart="activation-functions" data-scrollchart-v="1"></div>
<script src="https://scrollchart.com/embed.js" async></script>

Frequently asked questions

Where can I get a free animated "Activation Functions Compared" for my website?
Scrollchart provides "Activation Functions Compared" as a free, embeddable animated diagram you can add to any website with one line of HTML. No signup is required and there is no watermark. The diagram and its explainer text are served from scrollchart.com, so the embed stays current without any maintenance on your end.
How do I embed a activation functions compared in a developer or tech blog?
Copy the one-line snippet from the Scrollchart diagram page and paste it into your post HTML. It works in any static site generator, CMS, or hand-coded HTML page. The embed is a thin loader, not an iframe, so the content is fully in your DOM.