[Paper Review] Power Consumption Variation over Activation Functions
This paper investigates how different activation functions in neural networks affect power consumption during inference, using empirical measurements on CPU and GPU hardware. It finds that activation functions like ReLU and its variants consume significantly less power than complex functions such as Sigmoid and Tanh, with ReLU showing up to 50% lower power usage on average, highlighting a critical optimization vector for energy-efficient deep learning.
The power that machine learning models consume when making predictions can be affected by a model's architecture. This paper presents various estimates of power consumption for a range of different activation functions, a core factor in neural network model architecture design. Substantial differences in hardware performance exist between activation functions. This difference informs how power consumption in machine learning models can be reduced.
Motivation & Objective
- To quantify the impact of activation function choice on power consumption in deep neural network inference.
- To identify which activation functions are most energy-efficient across different hardware platforms (CPU and GPU).
- To analyze the role of hardware-specific bottlenecks—such as special function units (SFUs)—in increasing power usage during activation computation.
- To provide empirical evidence that activation function complexity directly correlates with higher energy consumption, especially on modern accelerators.
- To inform model design choices that reduce energy use without sacrificing performance, particularly in resource-constrained environments.
Proposed method
- Measured wall-clock power consumption on two platforms: a MacBook Pro (i5-7360U CPU) and an Intel Xeon E5-2660 CPU, using PyTorch 1.5.0 implementations of 28 activation functions.
- Executed inference on a standardized 5-layer feedforward network with 4096 hidden units, varying only the activation function per run.
- Measured power over increasing batch sizes (from 1 to 10^8), with each function tested across multiple runs to ensure stability.
- Used wall-clock time and average power draw as proxies for energy consumption, calculating total energy as power × time.
- Analyzed the relationship between function complexity (e.g., transcendental vs. piecewise linear) and measured power, focusing on low-level instruction costs and hardware resource contention.
- Compared results across hardware to assess the influence of specialized units like SFUs on performance and energy use, particularly for functions like Tanh requiring multiple floating-point operations.
Experimental results
Research questions
- RQ1How does the choice of activation function impact power consumption during neural network inference on modern CPUs and GPUs?
- RQ2Which activation functions are the most energy-efficient, and what factors contribute to their efficiency?
- RQ3To what extent do hardware-specific bottlenecks—such as limited SFUs—amplify power consumption differences between activation functions?
- RQ4How do the computational complexity and instruction-level characteristics (e.g., FPU usage, micro-operations) of activation functions correlate with measured power usage?
- RQ5Can simple architectural choices in activation functions lead to measurable reductions in energy consumption without compromising model accuracy?
Key findings
- ReLU and its variants (e.g., ReLU6, LeakyReLU) consistently showed the lowest power consumption, with ReLU measuring as low as 5.820e-4 W per inference on the MacBook Pro.
- Functions like Sigmoid and Tanh consumed significantly more power—up to 5.342e+02 W for Tanh on the Xeon at 10^8 instances—due to complex FPU-dependent computations.
- The power consumption of Tanh was over 100 times higher than ReLU at scale, with 5.342e+02 W vs. 5.199e+02 W at 10^8 instances, indicating a major energy inefficiency.
- Hardware bottlenecks such as limited SFUs on GPUs (e.g., one SFU per 16 FP32 cores on V100) caused idle threads and increased power draw during computation of complex functions.
- Functions like Softplus and Softsign showed high power usage due to reliance on transcendental operations (e.g., exp, log), even though they are differentiable and widely used.
- On the Xeon E5-2660, ReLU consumed 5.199e+02 W at 10^8 instances, while Tanh consumed 5.342e+02 W, a 2.7% increase despite similar computational load, indicating inefficiency in instruction scheduling and FPU utilization.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.