Activation Functions › Mish
Language AI HandbookAll chapters Activation Functions › MishOne section · Sections in this chapter8 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Mish, proposed by Diganta Misra in 2019, is a self-regularized non-monotone activation that has been used successfully in computer vision and some NLP applications.
Definition
Mish is defined as:
where:
- : the pre-activation value
- : a smooth approximation to the ReLU function that avoids the hard zero
- : the hyperbolic tangent applied to the softplus output
Mish, like Swish and GELU, is non-monotone with a slight negative region near its minimum. Its output is unbounded above (the positive side grows like the identity) but bounded below by approximately . The softplus inner function smoothly transitions from near-zero for large negative inputs to near-linear for large positive inputs, and the tanh applied to it produces a gate that smoothly goes from 0 to 1. The product then passes increasingly more of the input as grows more positive.
The derivative of Mish:
where:
- : the derivative of tanh
- : the sigmoid function, which is the derivative of softplus
Mish is more computationally expensive than GELU or Swish due to the compound computation involving both a softplus and a tanh. However, benchmarks show it outperforms ReLU on image classification tasks, and it has been adopted in YOLO-based object detection architectures where the small accuracy gain per layer compounds across the many layers in the network. For NLP tasks, the differences compared to GELU are small enough that GELU remains the default.
The key insight behind Mish is that applying tanh to softplus creates a particularly smooth gate: softplus is infinitely differentiable, and applying another smooth function to it produces a gate with very gentle second-order derivatives. This smoothness in the gate function translates to smoothness in the overall activation, which tends to produce better-conditioned optimization landscapes.
The next figure compares GELU, Swish/SiLU, and Mish, showing how these modern smooth activations resemble each other while differing from ReLU in the negative region:

