seniorNLP

What is the role of activation functions in transformer expressivity?

Updated May 17, 2026

Short answer

Activation functions introduce non-linearity, enabling transformers to model complex patterns.

Deep explanation

Without nonlinear activations, transformers would collapse into linear transformations. GELU and SiLU improve gradient flow and expressivity compared to ReLU. They allow smoother optimization and better performance in deep networks.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More NLP interview questions

View all →