FlexAct: Why Learn when you can Pick?
Ramnath Kumar, Kyle Ritscher, Junmin Judy, Lawrence Liu, Cho-Jui Hsieh
TL;DR
Activation functions are often fixed, hindering performance across scales and tasks. Flex-Act introduces layer-wise discrete activation routing using the Gumbel-Softmax trick to select among a fixed set of activations during training, with a gradient-norm-based regularizer to prevent bias toward unbounded functions. The approach yields end-to-end differentiable learning of per-layer activations, with analytical consideration of gradient propagation for discrete choices. In synthetic regression experiments, Flex-Act consistently recovers the correct activation and improves training stability, highlighting potential for robust, modular neural architectures that adapt their non-linear cores to task demands.
Abstract
Learning activation functions has emerged as a promising direction in deep learning, allowing networks to adapt activation mechanisms to task-specific demands. In this work, we introduce a novel framework that employs the Gumbel-Softmax trick to enable discrete yet differentiable selection among a predefined set of activation functions during training. Our method dynamically learns the optimal activation function independently of the input, thereby enhancing both predictive accuracy and architectural flexibility. Experiments on synthetic datasets show that our model consistently selects the most suitable activation function, underscoring its effectiveness. These results connect theoretical advances with practical utility, paving the way for more adaptive and modular neural architectures in complex learning scenarios.
