Arm Newsroom Blog

Enabling Next-Gen Edge AI Applications with Transformer Networks 

New development era dawns for multimodal, scalable edge AI
By Stephen Su, Senior Segment Marketing Manager, Arm IoT, Arm
Transformer networks for Edge AI

The acceleration of AI and ML is as much about the relentless improvements in foundational hardware as it is about software achievements.  

Take for example transformer networks. The architecture, which first emerged in a Google research paper in 2017, is based on the concept of self-attention, which allows the model to weigh different input tokens differently when making predictions. This self-attention mechanism enables transformer networks to capture long-range dependencies in data, making them highly effective for tasks like language translation, image processing, text generation, and sentiment analysis. Generative Pre-Trained Transformers (GPTs), for example, are popular trained transformer models. And such models are already used in voice assistants and AI-powered image-generation tools. 

It’s a long, long way from perceptrons, one of the early neural networks that consisted of a single layer of artificial neurons that made binary decisions in pattern-recognition tasks, such as recognizing handwritten digits. Transformer networks have begun to gain favor over convolutional neural networks (CNNs), which have built-in assumptions about how data is structured. CNNs focus on nearby relationships and how objects move or change in images or video. 

Transformer networks don’t make these assumptions. Instead, they use self-attention to understand how different parts of a sequence relate to each other, regardless of their position.  Because of this flexibility, transformer-based models can be adapted to different tasks more easily.  

How is this possible? Transformer networks, and the attention mechanism they employ, have revolutionized the AI landscape, as many use-cases can benefited from attention’s capabilities. Text itself (and so language) is encoded information, and so images, audio and other forms of serial data. Therefore since encoded information can be interpreted as a language, the techniques of transformer networks can be extended to various use-cases. This adaptability can be incredibly useful for tasks like understanding videos, filling in missing parts of images, or analyzing data from multiple cameras or multi-modal sources (see examples below) at once.  

The Vision Transformer (ViT) in 2020 was one of the first networks to successfully apply transformer networks to image classification. ViT divided images into patches and modeled interactions between these patches using self-attention. 

Since then, transformer networks have rapidly been adopted for all kinds of vision tasks: 

  • Image classification 
  • Object detection 
  • Semantic segmentation 
  • Image super-resolution 
  • Image generation 
  • Video classification 

Optimizing models on hardware 

So what does hardware have to do with all this? Plenty, and it’s where the future gets really interesting.  

GPUs, TPUs, or NPUs – even CPUs – can handle the intensive matrix operations and parallel computations required by transformer networks. At the same time, the architecture lends itself to enabling more sophisticated models to be run on more resource-constrained devices at the edge.  

There are three key reasons for this: 

  • Transformer networks inherently have a more parallelizable architecture compared to CNNs or recurrent neural networks (RNNs). This characteristic allows for more efficient hardware utilization, making it feasible to deploy transformer-based models on edge devices with limited computational resources. 
  • The self-attention mechanism means that smaller transformer models can achieve comparable performance to larger models based on CNNs or RNNs, reducing the computational and memory requirements for edge deployment. 
  • Advancements in model-compression techniques, such as pruning, quantization, knowledge distillation, and sparse attention, can further reduce the size of transformer models without significant loss in performance or accuracy.  

Transforming transformer networks

And now imagine – because you know it’s coming – vastly more capable computing resources.  By optimizing hardware for transformer networks, innovators can unlock the full potential of these powerful neural networks and enable new possibilities for AI applications across various domains and modalities. 

For example, increased hardware performance and efficiency could enable:  

  • Faster inference of transformer-based models leading to better responsiveness and improved user experiences. 
  • Deployment of larger transformer models to drive better performance on tasks like language translation, text generation, and image processing. 
  • Improved scalability for deploying transformer-based solutions across a range of applications and deployment scenarios edge devices, cloud servers, or specialized AI accelerators. 
  • Exploration of new architectures and optimizations for transformer models. This includes experimenting with different layer configurations, attention mechanisms, and regularization techniques to further improve model performance and efficiency. 
  • Much higher power efficiency, which is vital given the growth of some model sizes. 

Think about, for example, a vision application on your phone or smart glasses that, when operating, would identify a certain style shirt and then suggest trousers to match with it from your closet. Or new image-generation capabilities thanks to computing advancements?  

And increased computing resources don’t have to come with a lot of blood, sweat and tears. Integrated subsystems offer verified blocks of various processing units, including CPUs, NPUs, interconnects, memory, and other components. And software tools can optimize transformer models based on the processors for maximum performance and efficiency. 

Welcome to tomorrow

With hardware optimizations, transformer networks networks are poised to drive amazing, new applications. The possibilities – faster inference, larger models for better performance, improved scalability, and so on – are all made feasible by optimized hardware configurations, integrated subsystems and interconnects and development software. A new journey of unprecedented innovation and discovery is underway. 

Article Text
Copy Text

Any re-use permitted for informational and non-commercial or personal use only.

Editorial Contact

Brian Fuller & Jack Melling
Subscribe to Blogs and Podcasts
Get the latest blogs & podcasts direct from Arm

Latest on Twitter