Faster Activation Functions at the Edge for Post-Training Speedups

Anton Lydike, Jun Bi, Jackson Woodruff

International Conference on Machine Learning 2026 · Oral

Overview

Modern deep learning has largely standardized around sophisticated non-linearities like SiLU (Sigmoid Linear Unit) and GeLU (Gaussian Error Linear Unit), particularly in state-of-the-art vision and language architectures. However, deploying these complex activation functions on resource-constrained edge devices exposes a severe performance bottleneck. While massive Large Language Models (LLMs) spend an infinitesimal fraction of their total compute on activation functions due to dominating matrix multiplication (matmul) operations, smaller models and edge-optimized architectures find up to 20% to 50% of their total floating-point operations (flops) consumed entirely by these non-linearities.

Watch on SlidesLive

Visual summary for Faster Activation Functions at the Edge for Post-Training Speedups by Anton Lydike, Jun Bi, Jackson Woodruff
Visual summary for Faster Activation Functions at the Edge for Post-Training Speedups by Anton Lydike, Jun Bi, Jackson Woodruff

Key moments

  1. 0:00 Introduction and motivation for faster activation functions
  2. 1:59 Bit-casting floating-point numbers for fast approximations
  3. 3:58 Tooling and automated PyTorch module generation
  4. 6:33 Hardware benchmarks and speedup results
  5. 9:36 Accuracy impact and edge cases like catastrophic collapse
  6. 11:28 Q&A session on out-of-domain data and diagnostics
  7. 13:24 Q&A on applying approximations to softmax and normalization layers

Faster Activation Functions at the Edge for Post-Training Speedups

Speakers: Anton Lydike; Jun Bi; Jackson Woodruff

Conference: ICML

YouTube: https://slideslive.com/39083759

Overview

Modern deep learning has largely standardized around sophisticated non-linearities like SiLU (Sigmoid Linear Unit) and GeLU (Gaussian Error Linear Unit), particularly in state-of-the-art vision and language architectures. However, deploying these complex activation functions on resource-constrained edge devices exposes a severe performance bottleneck. While massive Large Language Models (LLMs) spend an infinitesimal fraction of their total compute on activation functions due to dominating matrix multiplication (matmul) operations, smaller models and edge-optimized architectures find up to 20% to 50% of their total floating-point operations (flops) consumed entirely by these non-linearities.

This talk, presented at ICML, investigates how to eliminate this overhead through post-training acceleration. By resurrecting low-level floating-point bit manipulation tricks from 30-year-old graphics programming—specifically the internal layout of the IEEE 750 floating-point standard—the authors demonstrate how to approximate complex transcendental functions with extreme efficiency. The resulting approximations achieve up to a 6x speedup over exact implementations on microcontroller hardware while requiring no retraining, opening the door for complex activations on resource-constrained microcontrollers and edge hardware.

Background

▶ Watch: Introduction and motivation for faster activation functions (0:00)

In the systems and machine learning literature, compute optimization has historically concentrated on accelerating matrix multiplications through hardware tensor cores, pruning, and quantization. Activation functions like ReLU (Rectified Linear Unit) are virtually free because they compile down to simple conditional or max operations (taking roughly 1 cycle on modern architectures). In contrast, modern activations such as GeLU and SiLU involve transcendental operations—specifically exponentiation and division—which require expensive software or hardware approximations in standard math libraries.

For large-scale models, this overhead is hidden beneath the immense latency of massive weight-matrix multiplications. Yet, as the industry pushes intelligence to the edge—utilizing architectures like ConvNeXt V2 (specifically femto and tiny variants), lightweight autoencoders, and models running on devices like ARM M7 microcontrollers or mobile phones—the arithmetic intensity shifts. In these regimes, the memory and compute overhead of evaluating transcendental functions becomes a dominant factor in end-to-end latency. Prior work has largely relied on hand-written assembly kernels (such as those found in GGML) or forced developers to fall back to suboptimal piecewise linear functions like ReLU, sacrificing model accuracy for speed. This paper addresses the gap by providing a principled, post-training approach to compute transcendental activations natively through integer bit-casting.

Key Findings

▶ Watch: Tooling and automated PyTorch module generation (3:58)

The central finding of this research is that bit-level manipulation of IEEE floating-point numbers can replace standard transcendental function evaluations with minimal instruction counts, achieving dramatic speedups for non-linearities without requiring model retraining.

  • Cycle-Accurate Speedups: On an ARM M7 development board, exact evaluations of complex activation functions hover around 140 clock cycles per operation. The proposed bit-cast approximations reduce this overhead to roughly one-sixth of that cost, bridging the performance gap toward ReLU (which executes in a single cycle) while maintaining mathematical fidelity.
  • Model-Level Acceleration: When integrated into smaller vision backbones such as the ConvNeXt V2 femto and tiny families, replacing exact GeLU activations with the proposed approximations captures almost all of the optimization headroom otherwise only accessible by switching to raw ReLU.
  • Negligible Accuracy Impact: Across standard benchmarks, substituting exact activations with tuned approximations results in minimal top-1 accuracy deltas (ranging between -0.02% and +0.4%), preserving model quality without fine-tuning.
  • Failure Mode Identification: The primary limitation stems from out-of-domain activations. In anomaly-detection autoencoders where internal activations span unusually wide numerical ranges, the approximations break down, leading to catastrophic failure due to the piecewise linear nature of the bit-cast bounds outside the tuned domain.

Technical Deep Dive

▶ Watch: Hardware benchmarks and speedup results (6:33)

The core mechanism of this work leverages the structural layout of the IEEE floating-point format, which comprises a sign bit, an exponent, and a mantissa. Because the exponent field inherently encodes the floor of the base-2 logarithm ($\log_2$) of a number, and the mantissa smoothly interpolates between distinct exponents, floating-point numbers can be directly bit-cast to integers to approximate logarithms and exponentiations.

The core approximation pipeline proceeds through the following algorithmic steps:

  1. Bit-Casting to Integer: The IEEE 750 floating-point representation is reinterpreted directly as an integer binary value without conversion overhead, preserving the raw bit patterns.
  2. Logarithm Approximation: An approximate $\log_2$ is computed via:

$$\text{approx\_log}_2(x) = \frac{\text{bitcast}(x)}{L} - \text{exponent\_bias}$$

where $L$ represents the length of the mantissa.

  1. Exponentiation Reversal: The inverse operation applies the steps in reverse order to approximate exponentiation bases.
  2. Basis Transformations & Tuning Parameters: Because activation functions like SiLU and GeLU require exponentiation base $e$ rather than base 2, change-of-basis operations are applied alongside compiler optimizations (constant folding and common subexpression elimination). Furthermore, accuracy is enhanced by introducing a tunable scalar parameter ($\epsilon$) into the approximation expressions.
  3. Automated Loss Landscape Optimization: Rather than relying on manual tuning of magic constants, the authors implement an automated tool that accepts a target PyTorch expression and domain constraints. By formulating the approximation error as a low-dimensional loss landscape, standard gradient descent via PyTorch optimizes the $\epsilon$ parameters to minimize error against accurate baselines.

Experimental Setup & Results

▶ Watch: Q&A session on out-of-domain data and diagnostics (11:28)

The evaluation spans microcontrollers, mobile handsets, and desktop hardware to quantify both isolated instruction overhead and end-to-end model performance.

  • Hardware Environments: Benchmarks were executed on an ARM M7 microcontroller dev board for cycle-accurate single-instruction profiling, alongside mobile phone hardware, standard laptop CPUs, and desktop environments. Framework comparisons included native PyTorch compilation pipelines and handwritten assembly routines from GGML.
  • Architectures Tested: The evaluation focuses heavily on edge-friendly computer vision models, specifically the ConvNeXt V2 family (femto and tiny variants), alongside an anomaly-detection autoencoder acting as a stress-test for wide activation distributions.
  • Baseline Comparisons: Approximations were benchmarked against exact transcendental implementations and aggressive fallback to ReLU.
  • Quantitative Results:
  • Individual activation function execution times dropped from ~140 cycles down to roughly 23-25 cycles (a ~6x speedup over exact math).
  • End-to-end inference on ConvNeXt V2 models demonstrated consistent latency reductions, capturing nearly all optimization headroom compared to ReLU baselines.
  • Top-1 accuracy deltas remained tightly bound between -0.02% and +0.4% across standard image classification tasks, with the sole exception of the autoencoder anomaly detector, which suffered catastrophic failure when extreme activations triggered values outside the valid approximation domain.

Practical Implications

▶ Watch: Q&A on applying approximations to softmax and normalization layers (13:24)

For machine learning engineers, infrastructure teams, and edge deployers, this work introduces a practical method for running high-accuracy models on deeply embedded hardware without requiring hardware floating-point accelerators or extensive post-training quantization pipelines.

  • Deployment Simplicity: Packaged as a standard utility that outputs native PyTorch modules via a simple installation command, the tool abstracts away the underlying bit-level math.
  • Tradeoffs and Limitations: The primary risk factor for practitioners is the numerical range of intermediate activations. Models characterized by unbounded or exceptionally wide activation distributions (such as certain autoencoders or unconstrained regression networks) can encounter out-of-domain inputs that produce catastrophic numerical errors under bit-cast approximations. Practitioners must validate edge models on representative out-of-domain data before deployment.
  • Future Directions: Beyond traditional activation functions, the underlying bit-casting and approximation primitives hold potential for accelerating other exponential-heavy layers, such as normalization layers and softmax operations, though careful validation of numerical stability is required in those domains.

Key Takeaways

  • Activation Bottlenecks at the Edge: While irrelevant for massive LLMs, activation functions can consume 20% to 50% of total model flops in smaller edge architectures and microcontrollers.
  • Bit-Level Approximations: Leveraging the IEEE floating-point standard via integer bit-casting provides low-overhead approximations for transcendental functions like exponentiation and logarithms.
  • Substantial Speedups: Cycle-accurate benchmarks on ARM M7 hardware demonstrate a ~6x reduction in instruction cycles compared to exact activation implementations.
  • Minimal Accuracy Loss: Post-training integration into vision models like ConvNeXt V2 yields top-1 accuracy deltas within fractions of a percent (-0.02% to +0.4%) without retraining.
  • Domain Boundaries Matter: Models with excessively wide activation ranges (e.g., specific autoencoders) risk catastrophic failure due to out-of-domain inputs, necessitating empirical validation prior to edge deployment.

About the Speaker(s)

  • Anton Lydike: Anton Lydike is a researcher working with a supervisor on activation function optimization. He is presenting work on faster activation functions at the edge for post-training speedups.

Co-authors: Jun Bi, Jackson Woodruff.

Reviews

→ Top-rated talks at International Conference on Machine Learning 2026

All talks from International Conference on Machine Learning 2026