Nanyang Technological University
Transformer performance enhancement via hardware acceleration, partially homomorphic federated learning and memory protection
Abstract
dc:description.abstractTransformer neural networks have emerged as powerful models dominating various machine learning tasks. However, the extensive computational and power demands of Transformer networks present significant challenges for their deployment in resource-constrained environments. This thesis proposes efficient and innovative hardware solutions to accelerate critical nonlinear layers, specifically the softmax function and layer normalization of the Transformer. These layers are crucial for model accuracy and efficiency, but can become bottlenecks as model complexity and data size increase. The proposed solutions reduce hardware implementation overheads without compromising inference performance. While Transformer models are originally designed for natural language processing, they have become popular in various domains due to their ability to capture long range dependencies in data with the attention mechanism. Combining transformers with federated learning (FL) allows for training powerful, privacy-preserving, and robust models that can be adapted to different modalities and tasks. A fundamental challenge in FL frameworks is secure data aggregation. Privacy-preserving data aggregation is commonly achieved with computationally intensive homomorphic encryption schemes. Instead of accelerating the Paillier cryptosystem that is widely used for aggregating model updates in FL, we explore hardware acceleration techniques for Fast Additive Homomorphic Encryption (FAHE) to achieve an order-of-magnitude faster encryption and decryption than Paillier, while maintaining additive homomorphism for privacy-preserving aggregation in FL. RISC-V has been widely adopted for AI workloads due to its open and modular architecture, which allows for rapid development and architectural adaptation to optimize performance and energy efficiency for specific tasks. Like all modern processors, RISC-V implementations are highly vulnerable to physical memory errors, which disproportionally impact Transformer models due to their reliance on attention mechanisms and the large amount of memory used to store and process input sequences. The final contribution of this thesis addresses the reliability and protection of RISC-V memory in transformer neural network implementation. Specifically, the smaller feature sizes and lower operating voltage of RISC-V make it more susceptible to single-event upsets (SEUs). Recognizing the sensitivity of transformer model performance on weights and program execution corruption by SEUs, we rigorously investigate and comparatively analyze three prominent memory protection techniques: Error Correction Codes (ECC), Triple Modular Redundancy (TMR), and Dual Modular Redundancy (DMR) combined with ECC. Collectively, these contributions enhance the practical application of Transformer neural networks by improving their efficiency, broader applicability, and robustness, ultimately enabling their deployment in various real-world scenarios.
Degree
thesis:*- College dc:contributor.school
- School of Electrical and Electronic Engineering
- Grantor dc:publisher
- Nanyang Technological University
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Koca, Nazim Altar
- Advisor dc:contributor.supervisor
-
- Chang Chip Hong
Subjects
dc:subject × 1Rights
dc:rights- Statement dc:rights
-
- This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0).
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Identifier URI
- https://hdl.handle.net/10356/216757