Conceptio › Archive › arXiv CS
arXiv CS open access

Is SwiGLU's Open Positive Tail Necessary? Evidence from Closed-Tail Gating with MemGLU

2026 · arxiv_cs
arXiv CS · Papers · 2026
Open Source ↗Direct PDF ↓
deep-learningmachine-learningneural-networks
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

Is SwiGLU’s Open Positive Tail Necessary? Evidence from Closed-Tail Gating with MemGLU Yuting Ge1,∗ 1

Pengju Yang2,†

Department of Electrical Engineering City University of Hong Kong

2

Beihang University

Mingkai Nie3,† 3

National University of Singapore

yangda1223@outlook.com

mingkai.nie@u.nus.edu

yutingge3-c@my.cityu.edu.hk

†

These authors contributed equally.

∗

Corresponding author.

arXiv:2608.07323v1 [cs.LG] 7 Aug 2026

Abstract We test whether decoder-only language-model FFNs require SwiGLU’s open positive tail. We introduce MemGLU as a closed-tail comparator derived from a memristive branch geometry. Across paired 9M and 30M pretraining runs with three seeds, MemGLU remains within about 0.1% of SwiGLU in validation NLL. Trained SwiGLU checkpoints are sensitive to positive-tail suppression, while mechanism diagnostics show that the two models use their gates differently despite similar losses. These results suggest that models adapt to the gate geometry available during pretraining. At the tested scales, SwiGLU’s open positive tail is not necessary for decoder-only language-model FFNs. Keywords: SwiGLU, MemGLU, closed-tail gating, gated feed-forward networks, decoder-only language models, activation functions

1

Introduction

SwiGLU [Shazeer, 2020] has become a common feed-forward design in decoder-only language models, with adoption in model families such as PaLM, LLaMA, and Qwen [Chowdhery et al., 2022, Touvron et al., 2023, Bai et al., 2023]. Its gate is ϕSiLU (g) = gσ(g). For large positive g, the response remains approximately linear, leaving the positive tail open. Modern FFNs now inherit this open positive tail by default. Yet widespread adoption does not establish functional necessity. Is that tail actually necessary? We test this question with MemGLU: ϕMemGLU (g) = c0 tanh(g) sech(g). MemGLU reaches a finite peak and then decays to zero on both sides, removing the open positive tail (Figure 1). Its shape derives from a memristor branch geometry. In the Transformer, it acts as a static elementwise gate. We evaluate paired decoder-only language models at 9M and 30M parameters across three seeds. RMS-matched MemGLU is 0.111% better at 9M and 0.122% worse at 30M, so the direction reverses while the magnitude remains close to 0.1%. Mechanistic probes show that MemGLU models still enter the region beyond the gate peak, but this region contributes much less gate-output and GLU-product energy. Interventions on trained SwiGLU checkpoints show that suppressing the positive tail degrades performance at both scales. Together with the closely matched pretraining trajectories, these results suggest that the model adapts to the Preprint.

gate geometry available during training. MemGLU therefore provides a controlled counterexample to the necessity of an open positive tail at the tested scales. Our main contributions are: 1. We introduce MemGLU, a closed-tail GLU gate derived from the antisymmetric branch geometry of a first-order memristor model. To our knowledge, this is the first evaluation of this branch-derived gate in decoder-only language-model pretraining. 2. We compare MemGLU with SwiGLU to test whether SwiGLU’s open positive tail is necessary. Paired experiments at 9M and 30M yield opposite-sign differences, while the magnitude remains close to 0.1% at both scales. 3. We identify occupancy–energy decoupling beyond the MemGLU peak and show that trained SwiGLU checkpoints are sensitive to positive-tail suppression. Together with the closely matched training trajectories, these results support adaptation to the available gate geometry during pretraining. 0.6

4

SiLU gate MemGLU gate

4

0.4 3

3

2

Gate output

Gate output

Gate output

0.2

0.0

−0.2

1

2

1

Closed positive tail

Open positive tail

0

−0.4

0 −0.6

−4

−2

0

2

4

−1 −4

−2

0

2

4

−4

−2

0

g

g

g

(a)

(b)

(c)

2

4

Figure 1: Gate geometry of SwiGLU and MemGLU. (a) The SiLU gate and its open positive tail. (b) The MemGLU gate and its closed positive tail, with g⋆ = arsinh(1) marking the positive maximum. (c) Direct comparison of the two scalar gate responses.

2

Related Work

2.1

Gated Feed-Forward Networks and Gate Geometry

Gated linear units introduce multiplicative interactions by modulating a value branch with an activation-controlled gate [Dauphin et al., 2017]. Shazeer introduced several GLU variants into Transformer feed-forward networks [Shazeer, 2020]. Among these variants, GEGLU and SwiGLU performed better than conventional FFNs using ReLU or GELU. SwiGLU was subsequently adopted by major decoder-only language-model families, including PaLM, LLaMA, and Qwen [Chowdhery et al., 2022, Touvron et al., 2023, Bai et al., 2023]. Recent work has examined several properties of activation and gate design. Expanded Gating Ranges directly studies the effect of extending the gate range beyond its usual interval [Huang, 2024]. Other methods modify curvature, trainable shape, token adaptivity, sparsity, or numerical behavior [Huang and Schlag, 2024, Fishman et al., 2024, Lee et al., 2024, Zhuo et al., 2025, Jiang et al., 2026, Wang et al., 2026]. These studies develop alternative gates or improve their training properties, but they do not directly isolate whether SwiGLU’s open positive tail is necessary. We test this question by comparing SwiGLU with a closed-tail gate at the same parameter count. 2.2

Closed-Tail and Memristor-Derived Precedents

Bounded and tail-decaying neural functions predate MemGLU. ReSech uses x sech(x) as an activation in feed-forward networks [Njikam and Zhao, 2016], while Fujita et al. incorporate sech into recurrent gates [Fujita et al., 2021]. These functions are mathematically related to MemGLU, but neither uses tanh(g) sech(g) as the scalar gate of a Transformer FFN. In the literature reviewed for this study, we did not identify a decoder-only language model using this exact product in a GLU. 2

Memristor-inspired neural activations also have established precedents. RMAF derives a static activation from a memristor-like window function [Yu et al., 2020], and Li et al. implement configurable activation responses with nonlinear memristor hardware [Li et al., 2020]. These studies apply memristor-derived nonlinearities to broader neural-network settings. In the literature reviewed here, we did not identify prior work using a memristor-derived function as the scalar GLU gate of a decoder-only language model.

3

MemGLU: From Memristor Branch Geometry to Closed-Tail Gating

3.1

From Branch Separation to MemGLU

A first order memristor model can produce two voltage branches under periodic excitation [Chua, 1971, Chua and Kang, 1976]. We isolate the normalized antisymmetric separation between the two branches: p v− (ξ) − v+ (ξ) = ξ 1 − ξ2, 2Γ

ξ ∈ [−1, 1].

The branch separation follows the sign of the input. Its magnitude peaks at an intermediate value and returns to zero at both boundaries. These properties provide a natural closed-tail contrast to the open positive tail of SiLU. Neural gate preactivations span the real line, so we map the bounded coordinate using ξ = tanh(g). Since q

1 − tanh2 (g) = sech(g),

the branch separation becomes b(g) = tanh(g) sech(g). MemGLU uses the scaled gate ϕMemGLU (g) = c0 b(g). The unscaled response is odd and bounded. Its extrema occur at |g| = arsinh(1), where its magnitude is 1/2, and it decays to zero in both directions. The full device derivation is provided in Appendix A. 3.2

MemGLU in the Transformer FFN

For an FFN input x, SwiGLU computes FFNSwiGLU (x) = Wo [ϕSiLU (Wg x) ⊙ Wu x] . MemGLU replaces only the scalar gate: FFNMemGLU (x) = Wo [ϕMemGLU (Wg x) ⊙ Wu x] . All projection dimensions and parameter counts remain unchanged. The gate is static and elementwise, with no device state or path dependence. Figure 2 illustrates this controlled replacement. 3

Linear projection

Gate function

Data flow

Elementwise product

g: gate preactivation u: value projection output

SwiGLU FFN

MemGLU FFN

𝑥𝑥

𝑥𝑥 𝑊𝑊𝑢𝑢

𝑊𝑊𝑔𝑔

Gate projection

𝑊𝑊𝑢𝑢

𝑊𝑊𝑔𝑔

Value projection

𝑔𝑔

SiLU 𝑔𝑔

⊙

Gate projection

Value projection

𝑔𝑔

𝑢𝑢

𝑢𝑢

𝜙𝜙MemGLU 𝑔𝑔

⊙

⊙

𝑊𝑊𝑜𝑜

𝑊𝑊𝑜𝑜

Output projection

Output projection

FFN output

FFN output

SwiGLU 𝑥𝑥 = 𝑊𝑊𝑜𝑜 SiLU 𝑊𝑊𝑔𝑔 𝑥𝑥 ⊙ 𝑊𝑊𝑢𝑢 𝑥𝑥

MemGLU 𝑥𝑥 = 𝑊𝑊𝑜𝑜 𝜙𝜙MemGLU 𝑊𝑊𝑔𝑔 𝑥𝑥 ⊙ 𝑊𝑊𝑢𝑢 𝑥𝑥

Figure 2: Controlled replacement of the scalar gate in the Transformer FFN. SwiGLU and MemGLU use the same projection structure and dimensions. Only the scalar gate function is changed.

We evaluate an unscaled form with c0 = 1 and use the RMS-matched form as the primary comparison. The calibration procedure is described in Section 4.

4

Experimental Design

We use paired training runs to isolate the effect of the scalar gate at two language-model scales. Within each pair, SwiGLU and MemGLU share the same initial weights and data order. They also use the same token schedule, validation set, optimizer, learning rate schedule, and model dimensions. Each formal comparison uses three paired seeds. For the RMS matched variant, c0 is selected to match the initialization time gate output RMS of SwiGLU: s c0 =

E[ϕSiLU (g)2 ] . E[b(g)2 ]

The expectations are estimated empirically from FFN gate preactivations. The resulting c0 is shared across formal seeds and fixed throughout training. Final validation negative log-likelihood (NLL) is the primary metric. We additionally report the mean of the final five evaluations. Complete model configurations, training budgets, and calibration details are provided in Appendix B.

5

Paired Language-Model Pretraining

We next apply the paired protocol to decoder-only language models at 9M and 30M scales. 4

5.1

Training Trajectories

At both scales, SwiGLU and RMS-matched MemGLU follow nearly indistinguishable mean trainingloss and validation-NLL trajectories (Figure 3). The corresponding paired differences are shown in Appendix C. 9.0

9.0 SwiGLU MemGLU (RMS-matched)

8.5

SwiGLU MemGLU (RMS-matched)

8.5 8.0

7.5

Validation NLL

Training Loss

8.0

7.0 6.5

7.0 6.5

6.0

6.0

5.5 5.0

7.5

0

10

20

30

40

5.5

50

0

10

20

(a)

10.5

9.5

9.0

9.0

8.5

8.5

8.0

8.0

Validation NLL

Training Loss

50

SwiGLU MemGLU (RMS-matched)

10.0

9.5

7.5 7.0 6.5 6.0 5.5

7.5 7.0 6.5 6.0 5.5

5.0

5.0

4.5

4.5

4.0 3.5

40

(b)

10.5 SwiGLU MemGLU (RMS-matched)

10.0

30

Training tokens (M)

Training tokens (M)

4.0 0

100

200

300

400

3.5

500

0

Training tokens (M)

100

200

300

400

500

Training tokens (M)

(c)

(d)

Figure 3: Paired pretraining trajectories at 9M and 30M scales. (a) 9M training loss. (b) 9M validation NLL. (c) 30M training loss. (d) 30M validation NLL. Curves show three-seed means. 5.2

Final Paired Comparison

Table 1: Paired language-modeling results across three seeds. Values are mean ± sample standard deviation. Relative final differences use SwiGLU at the same scale as the reference. Lower NLL is better. The unscaled 9M variant is an auxiliary unscaled comparison. The RMS-matched variant is the primary comparison. Scale Gate SwiGLU 9M MemGLU (RMS-matched) MemGLU (unscaled)

30M

SwiGLU MemGLU (RMS-matched)

Final NLL ↓

Final-five NLL Relative final Paired ↓ ∆ wins

5.726682 ± 0.007679 5.720326 ± 0.002360 5.696731 ± 0.010864

5.732096 ± 0.007528 5.725963 ± 0.002470 5.702339 ± 0.011563

3.553958 ± 0.000169 3.558291 ± 0.003820

3.557468 ± 0.000179 3.561710 ± 0.003779

reference

–

−0.111%

3/3

−0.523%

3/3

reference

–

+0.122%

0/3

Table 1 confirms the late-stage pattern. At 9M scale, RMS-matched MemGLU achieves lower final NLL in all three paired seeds, with a mean relative difference of −0.111%. At 30M scale, its final 5

NLL is higher in all three paired seeds, with a difference of +0.122%. Across the two scales, the sign reverses while the magnitude remains close to 0.1%.

6

Gate Usage and Positive Tail Sensitivity

At the tested scales, a decoder-only language model can be trained to near-SwiGLU performance with a closed-tail gate. The next question is how MemGLU operates inside the trained FFN. 6.1

Occupancy and Energy Beyond the MemGLU Peak SwiGLU MemGLU (RMS-matched)

5.23

Positive beyond-peak occupancy (%)

Gate response r(g)

0.4

0.2

0.0 Beyond-peak region

−0.2

−0.4

−4

−2

0

2

4

5.00

5

3.95

4

3

2.69

2

1

0

(a)

0.25 40 33.74

30

20

10

0

0.297

0.30

50.86

49.02

RMS magnitude

Positive beyond-peak energy share (%)

54.92

50

(b)

0.35

SwiGLU MemGLU (RMS-matched)

60

0.20

0.240

0.227

0.162

0.15 0.122

9M Gate output

0.122 0.093

11.87 8.21

9M GLU product

30M Gate output

(c)

8.57

0.102 0.081

0.05 0.00

30M GLU product

SwiGLU MemGLU (RMS-matched)

0.199

0.10 10.13

30M

9M

g

9M Gate

9M GLU

9M FFN

(d)

0.074

0.059

30M Gate 30M GLU 30M FFN

Figure 4: Occupancy–energy decoupling beyond the MemGLU peak. (a) The region g > g⋆ . (b) Positive beyond-peak occupancy. (c) Gate output and GLU product energy shares from g > g⋆ . (d) RMS magnitudes of the gate output, GLU product, and FFN update. MemGLU reaches its positive maximum at g⋆ = arsinh(1). We define g > g⋆ as the positive beyond-peak region shown in Figure 4a. A simple explanation is that MemGLU learns to avoid the descending part of its gate. Figure 4b rules out this explanation through the occupancy measurements. At 9M, positive beyond-peak occupancy increases from 2.688% under SwiGLU to 5.230% under RMS-matched MemGLU. At 30M, it decreases from 5.002% under SwiGLU to 3.954% under RMS-matched MemGLU. The direction of change reverses across scales. Figure 4c shows the energy measurements. At 9M, the gate-output energy share contributed by the positive beyond-peak region falls from 33.736% under SwiGLU to 10.129% under MemGLU. The corresponding GLU-product energy share falls from 49.018% to 11.870%. At 30M, the gate-output share falls from 50.857% to 8.209%, and the GLU-product share falls from 54.921% to 8.573%. The region can remain populated while contributing a much smaller fraction of the squared energy in the gated branch. We refer to this separation as occupancy–energy decoupling. 6

Figure 4d shows lower RMS magnitudes for the gate output, GLU product, and FFN update under MemGLU. Appendix D provides the full RMS ratios, including the gate preactivation g, together with metric definitions and aggregation details. 6.2

Positive Tail Sensitivity in Trained SwiGLU

We apply hard removal, positive capping, and smooth attenuation to trained SwiGLU checkpoints only during evaluation (Figure 5). Exact definitions are provided in Appendix E. SiLU baseline Hard removal

4

3

Gate response

3

Gate response

SiLU baseline Positive cap

4

2

1

2

1 Set to zero for g > g*

0

0

−4

−2

0

2

4

−4

−2

g

(a) SiLU baseline Smooth attenuation

4

1.0

2

4

(b)

9M 30M

0.960

0.8

Δ validation NLL

3

Gate response

0

g

2

1

0.6 0.403

0.4

0.303

0.2

0

−4

−2

0

2

4

0.0

g

(c)

0.122

0.093

0.032

Positive cap

Smooth attenuation

(d)

Hard removal

Figure 5: Positive-tail interventions on trained SwiGLU checkpoints. (a) Hard removal. (b) Positive cap. (c) Smooth attenuation. (d) Validation-NLL increase at 9M and 30M scales. Every intervention increases validation NLL in all three seeds at both scales. The ordering is identical across the two model sizes. Positive capping produces the smallest increase, smooth attenuation produces an intermediate increase, and hard removal produces the largest increase. At 9M, the mean ∆NLL values are 0.03173, 0.09258, and 0.40291, respectively. At 30M, they increase to 0.12194, 0.30288, and 0.95986. Every intervention has a larger effect at 30M.

7

Discussion and Limitations

7.1

Can the Model Adapt Without an Open Tail?

Figure 3 and Table 1 show that SwiGLU and MemGLU follow closely matched pretraining trajectories and reach similar language-modeling performance. A model trained from the start with a closed positive tail can therefore reach near-SwiGLU performance at both tested scales. This provides a counterexample to the necessity of SwiGLU’s open positive tail. At the same time, Figure 5 shows that trained SwiGLU checkpoints are sensitive to positive-tail suppression after pretraining. Figure 4 shows that MemGLU models continue to enter the beyondpeak region, but that region contributes much less gate-output and GLU-product energy than under 7

SwiGLU. Together, these results show that the two models reach similar performance while using their gates differently. But why can gate geometry shape how a trained model uses its FFN without substantially limiting the performance it reaches? Gate geometry is one of the fixed constraints under which optimization proceeds, and every parameter update occurs with that geometry in place. Training under different gate geometries can therefore produce different FFN usage patterns while still reaching similar losses. This is consistent with an adaptation account: pretraining forms an FFN usage pattern compatible with the gate geometry available throughout training. At the tested scales, gate geometry therefore appears to shape how the trained FFN operates without strongly constraining the final language-modeling loss. 7.2

Scope and Limitations

The evidence is limited to 9M and 30M decoder-only models, with three paired seeds at each scale and a shared training setup. The proposed adaptation account is inferred from the close pretraining trajectories and the final checkpoint diagnostics. Broader validation will require experiments with substantially larger models. The current MemGLU implementation does not use a fused kernel. In the measured 30M setup, it reduces training throughput by 10.46% and increases peak memory by 18.81%. Larger models, broader training settings, and optimized kernels are needed to determine how far the results generalize.

8

Conclusion

We asked whether SwiGLU’s open positive tail is necessary in decoder-only language-model FFNs. To test this, we replaced the SiLU gate with MemGLU, whose response closes on the positive side. Across paired 9M and 30M pretraining runs, MemGLU remains within about 0.1% of SwiGLU. The diagnostic and intervention results further indicate that similar final losses can accompany different use of gate geometry. This suggests that pretraining adapts to the gate geometry available throughout training. At the tested scales, SwiGLU’s open positive tail is not necessary for decoder-only languagemodel FFNs.

References Jinze Bai, Shuai Bai, Yunfei Chu, Zeyu Cui, Kai Dang, Xiaodong Deng, Yang Fan, Wenbin Ge, Yu Han, Fei Huang, et al. Qwen technical report. arXiv preprint arXiv:2309.16609, 2023. URL https://arxiv.org/abs/2309.16609. Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. PaLM: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022. URL https: //arxiv.org/abs/2204.02311. Leon O. Chua. Memristor—the missing circuit element. IEEE Transactions on Circuit Theory, 18 (5):507–519, 1971. doi: 10.1109/TCT.1971.1083337. URL https://doi.org/10.1109/TCT. 1971.1083337. Leon O. Chua and Sung Mo Kang. Memristive devices and systems. Proceedings of the IEEE, 64 (2):209–223, 1976. doi: 10.1109/PROC.1976.10092. URL https://doi.org/10.1109/PROC. 1976.10092. Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language modeling with gated convolutional networks. In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 933–941. PMLR, 2017. URL https://proceedings.mlr.press/v70/dauphin17a.html. Maxim Fishman, Brian Chmiel, Ron Banner, and Daniel Soudry. Scaling FP8 training to trillion-token LLMs. arXiv preprint arXiv:2409.12517, 2024. URL https://arxiv.org/abs/2409.12517. 8

Tomohiro Fujita, Zhiwei Luo, Changqin Quan, Kohei Mori, and Sheng Cao. Performance evaluation of RNN with hyperbolic secant in gate structure through application of parkinson’s disease detection. Applied Sciences, 11(10):4361, 2021. doi: 10.3390/app11104361. URL https: //doi.org/10.3390/app11104361. Allen Hao Huang. Expanded gating ranges improve activation functions. arXiv:2405.20768, 2024. URL https://arxiv.org/abs/2405.20768.

arXiv preprint

Allen Hao Huang and Imanol Schlag. Deriving activation functions using integration. arXiv preprint arXiv:2411.13010, 2024. URL https://arxiv.org/abs/2411.13010. Introduces the Expanded Integral of the Exponential Linear Unit (xIELU). Peijie Jiang, Yuqi Feng, Cunyin Peng, Qian Zhao, Jia Liu, KunLong Chen, Zhiqiang Zhang, and Jun Zhou. PowLU: An activation function for stable pre-training of LLMs. arXiv preprint arXiv:2605.25704, 2026. URL https://arxiv.org/abs/2605.25704. Donghyun Lee, Je-Yong Lee, Genghan Zhang, Mo Tiwari, and Azalia Mirhoseini. CATS: Contextually-aware thresholding for sparsity in large language models. arXiv preprint arXiv:2404.08763, 2024. URL https://arxiv.org/abs/2404.08763. Kun Li, Yi Sun, Wei Wang, Xi Zhu, Bing Song, Rongrong Cao, Sen Liu, and Qingjiang Li. Configurable activation function realized by non-linear memristor for neural network. AIP Advances, 10 (8):085207, 2020. doi: 10.1063/5.0013510. URL https://doi.org/10.1063/5.0013510. Aboubakar Nasser Samatin Njikam and Huan Zhao. A novel activation function for multilayer feed-forward neural networks. Applied Intelligence, 45(1):75–82, 2016. doi: 10.1007/ s10489-015-0744-0. URL https://doi.org/10.1007/s10489-015-0744-0. Noam Shazeer. GLU variants improve transformer. arXiv preprint arXiv:2002.05202, 2020. URL https://arxiv.org/abs/2002.05202. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, et al. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. URL https://arxiv. org/abs/2302.13971. Mingze Wang, Jinbo Wang, Yikuan Xia, Kai Shen, and Shu Zhong. More expressive feedforward layers: Part i. token-adaptive mixing of activations. arXiv preprint arXiv:2605.26647, 2026. URL https://arxiv.org/abs/2605.26647. Introduces Mixture of Activations (MoA). Yongbin Yu, Kwabena Adu, Nyima Tashi, Patrick Anokye, Xiangxiang Wang, and Mighty Abra Ayidzoe. RMAF: ReLU-memristor-like activation function for deep learning. IEEE Access, 8: 72727–72741, 2020. doi: 10.1109/ACCESS.2020.2987829. URL https://doi.org/10.1109/ ACCESS.2020.2987829. Zhijian Zhuo, Ya Wang, Yutao Zeng, Xiaoqing Li, Xun Zhou, and Jinwen Ma. Polynomial composition activations: Unleashing the dynamics of large language models. In International Conference on Learning Representations, 2025. URL https://openreview.net/forum?id=CbpWPbYHuv. arXiv:2411.03884.

9

A

Full Derivation of the Memristive Branch Geometry

Following the first-order memristor formulation [Chua, 1971, Chua and Kang, 1976], we consider v = R(w)i,

R(w) = R0 + β(w − w0 ).

ẇ = κi,

Here, v and i denote the device voltage and current. The internal state variable is w, with ẇ = κi specifying its evolution. The resistance R(w) varies linearly with the state around the reference value w0 . R0 is the corresponding reference resistance, and β controls the state dependence. Under the sinusoidal input i(t) = I sin(ωt), the state equation becomes ẇ = κI sin(ωt). Integrating with respect to time gives w(t) − w0 = −

κI cos(ωt), ω

where the integration constant is absorbed into the reference state w0 . We now define the normalized input coordinate ξ = sin(ωt) ∈ [−1, 1]. For a fixed value of ξ, there are two corresponding phases of the sinusoidal cycle with opposite cosine signs: p cos(ωt) = ± 1 − ξ 2 . Substituting these two possibilities into the state expression gives the two corresponding state branches, w± (ξ) − w0 = ∓

κI p 1 − ξ2 . ω

Using R(w) = R0 + β(w − w0 ), these state branches produce two resistance branches, R± (ξ) = R0 ∓

βκI p 1 − ξ2 . ω

The current at the same normalized coordinate is i = Iξ. Substituting the resistance branches into v = R(w)i therefore gives v± (ξ) = R0 Iξ ∓

βκI 2 p ξ 1 − ξ2 . ω

Defining Γ=

βκI 2 , ω

we obtain v± (ξ) = R0 Iξ ∓ Γξ

p

1 − ξ2 .

The two branches share the same term R0 Iξ. Their difference cancels this common component and isolates the branch-dependent part: v− (ξ) − v+ (ξ) = 2Γξ

10

p 1 − ξ2.

Normalizing by 2Γ gives the antisymmetric branch separation p v− (ξ) − v+ (ξ) = ξ 1 − ξ2 . 2Γ For neural gating, we map the bounded coordinate ξ ∈ [−1, 1] to the real-valued gate preactivation g using ξ = tanh(g). Since q

1 − tanh2 (g) = sech(g),

the normalized branch separation becomes b(g) = tanh(g) sech(g), and the MemGLU gate is ϕMemGLU (g) = c0 b(g). For the scalar basis r(z) = tanh(z) sech(z), its derivative is  r′ (z) = sech(z) 1 − 2 tanh2 (z) . Its extrema occur at z = ± arsinh(1),

|r(± arsinh(1))| =

1 , 2

and near the origin, r(z) = z −

5 3 z + O(z 5 ). 6

Moreover, lim r(z) = 0.

z→±∞

MemGLU comes from a normalized antisymmetric branch separation. The relation ξ = tanh(g) is a design mapping for neural gating, and in a Transformer the resulting gate is a static elementwise function.

11

B

Experimental Configurations Table B1: Model and training configurations for the paired 9M and 30M experiments.

Configuration Parameter count Number of layers Model width (dmodel ) Attention heads FFN width (dff ) Context length Formal training tokens/run Training steps Paired seeds Optimizer Base learning rate RMS calibration c0

9M

30M

8,948,160 6 192 3 512 256 50,000,000 3,052 42, 43, 44 AdamW 3.0 × 10−4 0.6039096539628113

30,285,696 10 384 6 1,024 512 499,908,608 3,814 42, 43, 44 fused AdamW 3.0 × 10−4 0.6990967290796867

Data. Both scales use the same pre-tokenized corpus with disjoint training and validation shards. The vocabulary size is 32,768. Optimization. The 9M and 30M runs use effective batches of 16,384 and 131,072 target tokens per update, respectively. Both use AdamW with a learning rate of 3 × 10−4 , betas (0.9, 0.95), weight decay 0.1, gradient clipping at 1.0, and no dropout. The learning rate follows cosine decay to 10% of its initial value. Warmup covers 2% of training at 9M and 4% at 30M. The 9M runs use FP16 autocast, while the 30M runs use BF16. Logging and evaluation. At 9M, training loss and validation NLL are recorded at approximately 1M-token intervals. At 30M, training loss is logged every 10 optimizer steps, and validation NLL is evaluated at approximately 10M-token intervals. RMS calibration. The scale-specific c0 is estimated before formal training from FFN gate preactivations. At each scale, training-token windows are passed through 32 randomly initialized models and the resulting preactivations are collected for calibration. The resulting c0 is shared across the three formal seeds at that scale and fixed throughout training. The values used in the experiments are reported in Table B1. Diagnostics. Each mechanism and intervention diagnostic uses 1,048,576 validation tokens.

12

C

Paired Training and Validation Differences

0.015

0.015

0.010

0.010

0.005

0.005

Δ validation NLL

Δ training loss

Figure C1 reports the paired differences corresponding to Figure 3.

0.000

−0.005

−0.010

−0.015

0.000

−0.005

−0.010

0

10

20

30

40

−0.015

50

0

10

20

Training tokens (M)

(a)

0.010

0.010

0.005

0.005

0.000

−0.005

−0.010

−0.015

40

50

400

500

(b)

0.015

Δ validation NLL

Δ training loss

0.015

30

Training tokens (M)

0.000

−0.005

−0.010

0

100

200

300

400

−0.015

500

0

100

200

300

Training tokens (M)

Training tokens (M)

(d)

(c)

Figure C1: Mean paired differences corresponding to Figure 3. ∆ = LMemGLU − LSwiGLU . Panels (a)–(d) follow the order of Figure 3. Negative values indicate lower MemGLU loss, and positive values indicate lower SwiGLU loss.

13

D

Mechanism Metrics and RMS Propagation

Metric definitions. For an FFN input x, we record the following quantities: g = Wg x,

q = ϕ(g),

h = q ⊙ u,

u = Wu x,

∆x = Wo h.

Here, g is the gate preactivation, q is the gate output, u is the value-branch output, h is the GLU product, and ∆x is the FFN update. We use g⋆ = arsinh(1) to define the positive beyond-peak region. For each gate preactivation element gi , mi = 1[gi > g⋆ ]. The positive beyond-peak occupancy is the fraction of gate preactivation elements that fall in this region: P mi . Occ = Pi i1 To measure how much squared magnitude comes from the same region, we define the gate-output energy share as Sq =

P 2 i mi qi P , 2 i qi

Sh =

P 2 i mi hi P . 2 i hi

and the GLU-product energy share as

For these three metrics, the index i runs over all layers, diagnostic batches, token positions, and FFN channels in the fixed validation probe. RMS magnitudes. We also measure the global RMS magnitude of the gate preactivation, gate output, GLU product, and FFN update. For each quantity z, s RMS(z) =

1 X 2 z , Nz i i

z ∈ {g, q, h, ∆x},

where Nz is the total number of scalar elements accumulated for z. For each seed and gate type, squared quantities are accumulated over the full diagnostic probe before the RMS is computed. The values in Figure 4d are therefore global RMS magnitudes across the diagnostic set. Across-seed summary. Each reported mechanism metric is computed separately for the three seeds. Figure 4 reports the mean across seeds, with error bars showing the sample standard deviation. Table D1 reports the ratio RMSMemGLU RMSSwiGLU for g, q, h, and ∆x. Values below 1 indicate a smaller RMS magnitude under MemGLU.

14

Table D1: RMS ratios for MemGLU relative to SwiGLU. Values below 1 indicate smaller RMS under MemGLU. Scale

g

q

h

∆x

9M 30M

1.209 0.949

0.830 0.763

0.763 0.751

0.802 0.803

15

E

Positive-Tail Intervention Definitions

All interventions use the threshold g⋆ = arsinh(1). This is the positive peak of the MemGLU gate and marks where modification of the SwiGLU positive tail begins. The baseline gate is ϕSiLU (g) = gσ(g). Hard removal and positive capping are defined by ( ( ϕSiLU (g), g ≤ g⋆ , ϕSiLU (g), ϕhard (g) = ϕcap (g) = 0, g > g⋆ , g⋆ σ(g⋆ ),

g ≤ g⋆ , g > g⋆ .

For smooth attenuation, we first define the SiLU value at the threshold c⋆ = g⋆ σ(g⋆ ). We use a transition width w = 0.5 and decay parameter β = 1.0. For g > g⋆ , the normalized distance from the threshold is t(g) = clip

g − g

⋆

w

 , 0, 1 .

A smooth interpolation weight is then defined as m(g) = t(g)2 (3 − 2t(g)) . The attenuated gate is  ϕSiLU (g),  1 − m(g) ϕSiLU (g) ϕsmooth (g) =  + m(g)c⋆ exp[−β softplus(g − g⋆ )] ,

g ≤ g⋆ , g > g⋆ ,

Here, softplus(z) = log(1 + ez ). All interventions modify only the forward gate during evaluation and perform no retraining or parameter updates.

16

Related documents

Record · ID 440370 · SHA-256 b62aeb8f606420ec
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive