Neuromodulation Gated Transformer

Kobe Knowles, Joshua Bensemann, Diana Benavides-Prado, Vithya Yogarajan, Michael Witbrock, Gillian Dobbie, Yang Chen · Submission to Tiny Papers @ ICLR

Introduction

The Neuromodulation Gated Transformer (NGT) introduces a biologically-inspired gating mechanism that allows Transformer layers to multiplicatively scale their own activations based on internal context. By integrating this "neuromodulation" block into a pre-trained BERT model, researchers achieved the highest average performance on the SuperGLUE benchmark compared to standard and parameter-matched baselines.

The Problem: Context-Dependent Regulation

In biology, neuromodulation is the process by which chemicals (neuromodulators) modify the intrinsic properties of neurons in response to stimuli, effectively "tuning" the network's behavior based on context. While Transformers have dominated Natural Language Processing (NLP) through the attention mechanism, they typically lack this specific type of dynamic, context-dependent regulation.

The authors explore whether the "entwinement" of neuromodulation and Transformers can help models learn more complex data patterns. Specifically, they address the challenge of improving performance on diverse language understanding tasks by allowing a layer's activations to act as latent variables that regulate other activations in the same layer.

Methods: The Gating Block

The core innovation of the NGT is the Gating Block (GB).

Architecture of the Neuromodulation Gated Transformer
  1. Architecture: The authors take a standard BERT-Large model and insert a Gating Block after layer 21.
  2. The Gating Mechanism: The Gating Block consists of three stacked Transformer layers followed by a sigmoid function.
  3. Multiplicative Effect: Instead of just passing data to the next layer, the Gating Block takes the output of layer $k-1$ and produces a matrix of values between 0 and 1. This matrix is then combined with the original activations via a Hadamard product (element-wise multiplication).
  4. Internal Stimuli: Unlike previous neuromodulation attempts in AI that relied on external signals, NGT's stimuli are entirely internal. The activations of the layer itself provide the context used to dampen or enhance those same signals.

The authors compared three variants to isolate the effect of this mechanism:

  • no-gating-block: The standard BERT-Large model.
  • neuromodulated-gating (NGT): The model with the multiplicative gating block.
  • non-neuromodulated-gating: A baseline with the same number of extra parameters as NGT, but where the gating block's output is simply passed to the next layer without the multiplicative scaling.

Key Insights and Results

The model was evaluated on the SuperGLUE benchmark, a rigorous collection of diverse Natural Language Understanding tasks (including BoolQ, CB, COPA, MultiRC, ReCoRD, RTE, WiC, and WSC).

SuperGLUE benchmark results comparing NGT to baselines
  • Average Performance: NGT achieved the best average score across all SuperGLUE datasets (68.64) compared to the standard BERT baseline (68.27) and the parameter-matched non-gated baseline (66.06).
  • Task-Specific Wins: NGT showed notable improvements in tasks like BoolQ (78.36 vs 76.60) and COPA (74.67 vs 73.67).
  • Multiplication > Addition: One of the most striking findings was that the non-neuromodulated-gating baseline (which added layers but no gating) performed the worst of the three. This suggests that simply adding depth to a pre-trained model can be detrimental; the multiplicative interaction is what makes the extra parameters useful.
  • Efficiency of Mechanism: Despite adding over 37 million parameters, the "neuromodulated" version was the only one that consistently translated those extra parameters into a performance gain over the base model.
  • Late-Stage Integration: Through ablation studies, the authors discovered that inserting the gating block near the end of the model (layer 21) was significantly more effective than inserting it at the beginning (layer 3).

Limitations and Future Work

While NGT demonstrated the best average performance, the authors note that the results were not statistically significant ($p > 0.05$) due to high variance across the different datasets.

Furthermore, the gating blocks in this study were randomly initialized and fine-tuned on top of a pre-trained BERT model—a "cold start" problem. The authors suggest that pre-training from scratch with the gating block already in place would likely yield much stronger results. Finally, while layer 21 worked best in this specific architecture, the optimal position and number of gating blocks remain an open question for future research.

Summary updated

BibTeX
@misc{knowles2023neuromodulation,
  author = {Kobe Knowles and Joshua Bensemann and Diana Benavides-Prado and Vithya Yogarajan and Michael Witbrock and Gillian Dobbie and Yang Chen},
  title = {{Neuromodulation Gated Transformer}},
  year = {2023},
  eprint = {2305.03232},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.03232},
}
Figure