mlsanityData to 7 Oct 2026

Transformers with Learnable Activation Functions

arXiv 2208.14111 ↗First posted 30 Aug 2022cs.CLcited by 5

Not on the map. Why?

Abstract (arXiv)

Activation functions can have a significant impact on reducing the topological complexity of input data and therefore improve the performance of the model. Selecting a suitable activation function is an essential step in neural model design. However, the choice of activation function is seldom discussed or explored in Transformer-based language models. Their activation functions are chosen beforehand and then remain fixed from pre-training to fine-tuning. As a result, the inductive biases they imposed on models cannot be adjusted during this long life cycle. Moreover, subsequently developed models (e.g., RoBERTa, BART, and GPT-3) often follow up prior work (e.g., BERT) to use the same activation function without justification. In this paper, we investigate the effectiveness of using Rational Activation Function (RAF), a learnable activation function, in the Transformer architecture. In contrast to conventional, predefined activation functions, RAFs can adaptively learn optimal activation functions during training according to input data. Our experiments show the RAF-based Transformer (RAFT) achieves a lower validation perplexity than a vanilla BERT with the GELU function. We further evaluate RAFT on downstream tasks in low- and full-data settings. Our results show that RAFT outperforms the counterpart model across the majority of tasks and settings. For instance, RAFT outperforms vanilla BERT on the GLUE benchmark by 5.71 points on average in low-data scenario (where 100 training examples are available) and by 2.05 points on SQuAD in full-data setting. Analysis of the shapes of learned RAFs further unveils that they substantially vary between different layers of the pre-trained model and mostly look very different from conventional activation functions. RAFT opens a new research direction for analyzing and interpreting pre-trained models according to the learned activation functions.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 50 of its 75 references that are in the map. First posted on arXiv 30 Aug 2022.

Builds on

50 of 75 references.

References · 50

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
  5. 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
  6. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  7. 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,854
  8. 2019Parameter-Efficient Transfer Learning for NLPcited by 4,195
  9. 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
  10. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
  11. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  12. 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
38 more
  1. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  2. 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
  3. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  4. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  5. 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
  6. 2015A large annotated corpus for learning natural language inferencecited by 1,837
  7. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
  8. 2018DARTS: Differentiable Architecture Searchcited by 1,782
  9. 2020GLU Variants Improve Transformercited by 1,724
  10. 2016Neural Architecture Search with Reinforcement Learningcited by 1,489
  11. 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,234
  12. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  13. 2021Scaling Language Models: Methods, Analysis & Insights from Training Gophercited by 1,199
  14. 2017SemEval-2017 Task 1: Semantic Textual Similarity - Multilingual and Cross-lingual Focused Evaluationcited by 998
  15. 2018Neural Network Acceptability Judgmentscited by 952
  16. 2016Language Modeling with Gated Convolutional Networkscited by 688
  17. 2022Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Modelcited by 557
  18. 2020AdapterHub: A Framework for Adapting Transformerscited by 441
  19. 2016Using the Output Embedding to Improve Language Modelscited by 266
  20. 2021CANINE: Pre-training an Efficient Tokenization-Free Encoder for Language Representationcited by 229
  21. 2022Delta Tuning: A Comprehensive Study of Parameter Efficient Methods for Pre-trained Language Modelscited by 179
  22. 2022DeepNet: Scaling Transformers to 1,000 Layerscited by 176
  23. 2021Primer: Searching for Efficient Transformers for Language Modelingcited by 162
  24. 2021Activation Functions in Deep Learning: A Comprehensive Survey and Benchmarkcited by 153
  25. 2018Activation Functions: Comparison of trends in Practice and Research for Deep Learningcited by 130
  26. 2020What Happens To BERT Embeddings During Fine-tuning?cited by 113
  27. 2020Topology of deep neural networkscited by 111
  28. 2021How to Train BERT with an Academic Budgetcited by 80
  29. 2019Pad'e Activation Units: End-to-end Learning of Flexible Activation Functions in Deep Networkscited by 65
  30. 2021A Closer Look at How Fine-tuning Changes BERTcited by 42
  31. 2017Neural networks and rational functionscited by 40
  32. 2020On the Interplay Between Fine-tuning and Sentence-level Probing for Linguistic Knowledge in Pre-trained Transformerscited by 39
  33. 2020Attention-Based Transformers for Instance Segmentation of Cells in Microstructurescited by 38
  34. 2020Discovering Parametric Activation Functionscited by 21
  35. 2018Learning Combinations of Activation Functionscited by 20
  36. 2020Evolutionary Optimization of Deep Learning Activation Functionscited by 18
  37. 2018Adaptive Blending Units: Trainable Activation Functions for Deep Neural Networkscited by 13
  38. 2022Adaptable Adapterscited by 13

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 3; 2025: 1; 2026: 1.

5 papers.