Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Adaptive Parametric Activation: Unifying and Generalising Activation Functions Across Tasks

About

The activation function plays a crucial role in model optimisation, yet the optimal choice remains unclear. For example, the Sigmoid activation is the de-facto activation in balanced classification tasks, however, in imbalanced classification, it proves inappropriate due to bias towards frequent classes. In this work, we delve deeper in this phenomenon by performing a comprehensive statistical analysis in the classification and intermediate layers of both balanced and imbalanced networks and we empirically show that aligning the activation function with the data distribution, enhances the performance in both balanced and imbalanced tasks. To this end, we propose the Adaptive Parametric Activation (APA) function, a novel and versatile activation function that unifies most common activation functions under a single formula. APA can be applied in both intermediate layers and attention layers, significantly outperforming the state-of-the-art on several imbalanced benchmarks such as ImageNet-LT, iNaturalist2018, Places-LT, CIFAR100-LT and LVIS. Also, we extend APA to a plethora of other tasks such as classification, detection, visual instruction following tasks, image generation and next-text-token prediction benchmarks. APA increases the performance in multiple benchmarks across various model architectures. The code is available at https://github.com/kostas1515/AGLU.

Konstantinos Panagiotis Alexandridis, Jiankang Deng, Anh Nguyen, Shan Luo• 2024

Related benchmarks

TaskDatasetResultRank
Object DetectionCOCO (val)--
613
Object DetectionLVIS v1.0 (val)
APbbox31.1
518
Instance SegmentationCOCO (val)
APmk38.9
472
Long-Tailed Image ClassificationImageNet-LT (test)
Top-1 Acc (Overall)59.1
220
Instance SegmentationLVIS v1.0 (val)
AP (Rare)23.6
189
Image ClassificationiNaturalist 2018 (val)--
116
Long-Tailed Image ClassificationPlaces-LT (test)
Accuracy42
61
Long-tail Image ClassificationiNaturalist 2018 (test)--
59
Long-Tailed Image ClassificationCIFAR-100-LT Imbalance Ratio 100
Top-1 Acc52.3
47
Image ClassificationPlaces-365 (val)
Accuracy57.1
43
Showing 10 of 15 rows

Other info

Code

Follow for update