Skip to main content
QUICK REVIEW

[Paper Review] Learning Compact Neural Networks Using Ordinary Differential Equations as Activation Functions

MohamadAli Torkamani, Phillip Wallis|arXiv (Cornell University)|May 19, 2019
Model Reduction and Neural NetworksPhysics and Astronomy15 references5 citations
TL;DR

This paper introduces Differential Equation Units (DEUs), where each neuron learns a personalized nonlinear activation function by solving a trainable second-order ordinary differential equation (ODE). By learning five parameters per neuron—coefficients and initial conditions—DEUs enable compact, high-performing networks that match or exceed larger models using fixed activations like ReLU, achieving over 1% accuracy gain on CIFAR-10 with fewer parameters.

ABSTRACT

Most deep neural networks use simple, fixed activation functions, such as sigmoids or rectified linear units, regardless of domain or network structure. We introduce differential equation units (DEUs), an improvement to modern neural networks, which enables each neuron to learn a particular nonlinear activation function from a family of solutions to an ordinary differential equation. Specifically, each neuron may change its functional form during training based on the behavior of the other parts of the network. We show that using neurons with DEU activation functions results in a more compact network capable of achieving comparable, if not superior, performance when is compared to much larger networks.

Motivation & Objective

  • To address the computational and memory inefficiency of large deep neural networks in resource-constrained environments like mobile and wearable devices.
  • To overcome the limitations of fixed activation functions (e.g., ReLU, sigmoid) that do not adapt to network structure or data distribution.
  • To enable each neuron to dynamically learn its own nonlinear activation function from a rich family of ODE solutions, improving representational capacity without increasing model size.
  • To develop a trainable, parameter-efficient mechanism for activation function learning that reduces network size while maintaining or improving performance.

Proposed method

  • Each neuron’s activation is derived from the solution of a second-order linear ODE: $ a y''(t) + b y'(t) + c y(t) = u(t) $, where $ u(t) $ is a Heaviside step function.
  • The five learnable parameters—$ a, b, c, c_1, c_2 $—are optimized via backpropagation to adapt the activation function during training.
  • Singular subspaces (e.g., $ a=0 $, $ b=0 $, or $ c=0 $) are handled by explicit projection to avoid numerical instability and ensure differentiable behavior.
  • A regularization strategy sets $ b^2 - 4ac $ close to zero to $ \sqrt{4ac} $ to prevent exponential blowup in solutions.
  • Batch normalization and separate learning rates for network and DEU parameters are used to stabilize training and prevent gradient explosion.
  • Solutions are precomputed using symbolic computation (Maple) and compiled into optimized code for GPU-parallel inference.

Experimental results

Research questions

  • RQ1Can a neural network achieve higher performance with fewer parameters by allowing each neuron to learn its own activation function?
  • RQ2Does learning a dynamic, ODE-based activation function lead to better generalization and compactness compared to fixed activation functions?
  • RQ3Can the solution space of a second-order ODE provide sufficient expressivity to replace standard activation functions while remaining trainable and stable?
  • RQ4How does the performance of DEU compare to ReLU, PReLU, and Swish in terms of accuracy and model size across different architectures?

Key findings

  • On CIFAR-10 with ResNet-18, DEUs achieve over 1% higher accuracy than ReLU, PReLU, and Swish, demonstrating superior performance with no architectural changes.
  • DEUs significantly reduce the performance gap between full ResNet-18 and a stunted version with half the blocks, indicating strong efficiency in compact network design.
  • On MNIST and Fashion-MNIST, DEU-based networks achieve competitive or better accuracy than standard ReLU networks while using substantially fewer parameters.
  • The method enables neurons to dynamically adopt diverse functional forms—periodic, exponential, or quadratic—based on learned ODE parameters, increasing representational capacity.
  • The training process successfully avoids singular subspaces by projecting near-zero coefficients to zero and stabilizing near-critical discriminants, ensuring robust optimization.
  • The use of separate learning rates and batch normalization effectively prevents gradient explosion and stabilizes training despite highly nonlinear activation functions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.