Feedforward Neural Networks and the Transformer model
Abstract
This thesis presents the mathematical framework underlying two central architectures in modern deep learning: the feedforward neural network and the transformer model. Beginning from first principles, the report introduces the perceptron model and builds toward the multi-layer perceptron by incorporating activation functions, layer structure, and matrix notation. The learning process is examined through parameter initialization, the cost function, the backpropagation algorithm, stochastic gradient descent, and regularization techniques including early stopping and dropout. Hyperparameter tuning via grid search is also discussed. The thesis then transitions to the transformer model, introduced in the 2017 paper "Attention Is All You Need," covering the mathematical formulation of scaled dot-product self-attention, multi-head attention, tokenization and positional encoding. The encoder and decoder modules are derived in full matrix form, detailing their respective sublayers, residual connections and layer normalization. Finally, the optimization and regularization choices of the original transformer are discussed. The aim throughout is to bridge the gap between intuitive descriptions and mathematical exposition.
Keywords
Not available
Specialisations
Similar theses
- Image Denoising via Deep Learning Neural Networks and Transformers Jundong Wang · Tampere University · 2024
- A Novel Hybrid Deep Learning Model using U-net and Vision Transformer for Polyp Segmentation in medical imaging Prity Rani Das · 2026
- Understanding Human-Model Alignment in Visual Social Attention with Video Transformers Sabrina M. Lopez · 2026
- Counter-Rotating Aperture Resolution: A Formal Stream-Processing Model for SHA-256 Recurrence, Root-Cover Coupling, and Transformer Language Attention Dean Kulik · 2026
- Hybrid CNN-Transformer Architectures for Image Denoising : Evaluating the quality-efficiency trade-off of integrating self attention into a CNN-based denoising model Filip Norgren · KTH Royal Institute of Technology · 2026
- A Comparative Forecasting Performance Analysis of Symbolic Representation Techniques for Time Series Using Transformer Models and Multi-Head Attention Mechanisms Rami Alalwan · University of Klagenfurt · 2026
