Gated ResNet architecture for transformer multi-head attention block
Date
2025-01
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
BRAC University
Abstract
Transformer model architectures show excellent performance over machine learning-
related tasks, primarily focusing on natural language processing by removing the
need for recurrence and convolutional techniques. Residual networks (ResNet)
are a core component for transformer models to retain long-term dependencies for
sequence-to-sequence-related tasks. This paper introduces a new ResNet for the at-
tention layer of a transformer model. Through a ResNet connection between layers
of multi-head blocks, we flow information from one layer to the next while keeping
the number of parameters the same. We also explore two-layer deep connections
that retain long-term dependencies even more than one layer. Furthermore, we im-
plement a gating mechanism on the ResNet that will selectively allow less redundant
information to flow through and ensure that the gradient convergence of the model
can be accelerated. In this study, we intend to prove that the performance of a model
can increase even if the parameter increases due to introducing the gated unit which
is insignificant in comparison to the overall number of parameters. Therefore, en-
hancing the model’s performance on seq2seq tasks without demanding additional
training time and memory by adjusting a few trainable parameters introduced for
the gating mechanism is the primary goal of the paper. Our model showed promis-
ing results, especially on long-term dependent seq2seq tasks, by achieving a better
performance score as well as maintaining similar efficiency.
Description
Cataloged from PDF version of thesis.
Includes bibliographical references (pages 56-60).
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2025.
Includes bibliographical references (pages 56-60).
This thesis is submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science, 2025.
Keywords
Transformer model, Residual networks (ResNet), Attention layer, Multi- head blocks, Long-term dependencies, Sequence-to-sequence tasks, Gating mechanism, Gradient convergence, Parameter increase, Memory reduction, Seq2seq tasks, Training stability, Sparse attention scores, Model performance, Information flow, BLEU score
