arXiv:2611.26201cs.LGNov 2026

Manuscript Offprint

arXiv:2611.26201

Learn, Freeze, and Transfer an Activation Function Across Architectures

Arun Prakash A

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Transfer learning typically reuses knowledge acquired by a source network through its learned weights. We investigate whether a learned activation function can also be transferred and remain useful in networks trained from scratch. We study this complementary form of transfer through a learn–freeze–transfer protocol, in which the activation is optimized jointly with a source network in a single training run, and is then frozen and reused in target networks trained from scratch. A pointwise activation with globally shared parameters is independent of layer dimensions and can therefore be incorporated into networks of different architectures trained from scratch. We instantiate this protocol with FAct, a five-parameter activation represented by a two-harmonic truncated Fourier series, initialized from a Fourier approximation of GELU and learned in a Vision Transformer (ViT) on ImageNet-1K. When reused in a ViT of the same architecture trained from scratch on ImageNet-1K, the frozen activation (Frozen FAct) improves top-1 accuracy by 1.46 percentage points over GELU. Across four smaller target architectures (standard ViT, Swin Transformer, linear-attention ViT, and MLP-Mixer) and four image-classification datasets, it achieves the highest mean accuracy among eleven activation functions in 15 of 16 settings under a common training configuration, with improvements of up to 1.71 percentage points over the best conventional activation. When the learning rate and weight decay are tuned separately for each activation under the same search budget, Frozen FAct still ranks first in 11 of the 16 settings, second in four, and fourth in one. These results provide empirical evidence that a learned activation function can retain its usefulness when transferred across vision architectures, independently of the weights with which it was learned.

1 Introduction

Transfer learning typically reuses knowledge acquired by a source network through its learned weights. We investigate whether an activation function learned jointly with a source network in a single training run can also be transferred to target networks and remain useful. To this end, we use a parameterized activation function whose coefficients are shared globally across all activation sites of the network. Global sharing makes the number of activation parameters independent of network depth and width, so the learned function can be reused in networks of different architectures. This yields a complementary form of transfer, in which the learned activation, rather than the source-network weights, is retained and reused.

Learnable activation functions allow the nonlinear transformation to adapt during training. Existing parameterizations include adaptive slopes [10, 14], customized activation functions [23], rational functions [26], and kernel-based representations [30]. Their parameters may be assigned locally to individual neurons or layers [1, 10, 15, 23, 26] or shared across multiple layers [14, 5]. These approaches study how activation functions adapt within a network. In contrast, we examine whether a learned activation can be retained and reused independently of the network in which it was optimized.

Prior work has reused activation functions beyond the setting in which they were obtained, but mainly through automated search [29, 2, 32] or meta-learning [34]. To our knowledge, transferring an activation learned in a single training run across architectures has not been studied. In our setting, the activation is learned through end-to-end training with a single source network, without meta-learning or a separate search. After source training, the activation is frozen and transferred to target networks trained from scratch. Only its learned coefficients are transferred; the source-network weights are not reused, and the activation remains fixed throughout target training (Figure 1). This protocol allows us to examine whether a nonlinearity learned within one network remains useful across different architectures and tasks.

Figure 1: Overview of the learn–freeze–transfer framework. (a) A five-parameter FAct activation, shared across all MLP blocks, is learned jointly with a depth-6 ViT on ImageNet-1K. (b) The learned activation coefficients are frozen after source training. (c) Only these coefficients, not the source-network weights, are transferred to independently initialized target networks. Evaluation includes same-task transfer to a freshly initialized copy of the source architecture (ViT-d6) and cross-architecture transfer to depth-2 targets (ViT-d2, Swin-d2, LinViT-d2, and MLP-Mixer), with the activation coefficients fixed throughout target training. Transfer performance for these settings is reported in Tables 1, 2, 3, 4, and 6.

We instantiate this protocol with FAct (Fourier Activation), a learnable activation represented by a two-harmonic truncated Fourier series with five coefficients. A single set of coefficients is shared across all MLP blocks of the network. The coefficients are initialized from a two-harmonic Fourier approximation of GELU [11] and optimized jointly with the source-network weights. We refer to the activation after source training, with its coefficients fixed, as Frozen FAct.

We evaluate Frozen FAct in two transfer settings. In the same-task setting, the activation learned by a depth-6 Vision Transformer (ViT) [7] on ImageNet-1K [6] is reused in a ViT of the same architecture, trained from scratch on the same task. In the cross-architecture setting, the same five coefficients are used in four depth-2 target architectures: a ViT with global self-attention, a Swin Transformer with shifted-window self-attention [22], a ViT with linear attention [16], and an attention-free MLP-Mixer [35]. These targets contain approximately 100K parameters each and are trained on four image-classification datasets: Fashion-MNIST [36], CIFAR-10, CIFAR-100 [20], and Food-101 [3].

In the same-task setting, Frozen FAct improves ImageNet-1K top-1 accuracy by 1.46 percentage points over GELU. In the cross-architecture setting, it achieves the highest mean test accuracy among eleven activation functions in 15 of the 16 architecture–dataset combinations under a common training configuration, with improvements of up to 1.71 percentage points over the best conventional activation. When the learning rate and weight decay are tuned separately for each activation under the same search budget, Frozen FAct still ranks first in eleven combinations, second in four, and fourth in one. Finally, on Swin targets of one to six blocks, a frozen, untrained Fourier approximation of GELU does not reproduce these gains, indicating that the benefit comes from the learned activation rather than the Fourier parameterization alone. In contrast to the SPLASH ablation of Tavakoli et al. [33], these results show that a frozen learned activation can retain its benefit after transfer.

This work makes three contributions:

  1. A learn–freeze–transfer protocol for activation functions. We formulate a complementary form of transfer in which a globally shared activation is learned jointly with a source network in a single training run, then frozen and reused in target networks trained from scratch, without transferring source-network weights.
  2. A globally shared activation suited for transfer. We instantiate the protocol with FAct, whose five coefficients are shared across all MLP blocks, so that the learned activation can be placed in networks of different architectures.
  3. An empirical evaluation of activation transferability. We evaluate same-task and cross-architecture transfer using three transformer architectures and an attention-free MLP-Mixer on four image-classification datasets. We compare Frozen FAct with ten conventional activation functions under common and activation-specific hyperparameter configurations, and we include a control showing that the gains come from the learned activation rather than its parameterization.

References (36)