Now Reading
Microsoft Introduces Mathematical Framework To Tune Up Attention Architectures

Microsoft Introduces Mathematical Framework To Tune Up Attention Architectures

  • The mathematical framework relies heavily on linear transformations of measures modelled by Markov kernels.

Recently, Microsoft Research and the University of Montreal introduced a new mathematical framework that uses measure theory and integral operators to model attention architectures in neural networks. According to the researchers, the framework is proposed to quantify the regularity; in other words, the amount of smoothness of the attention operation. 

The attention mechanism is the fundamental building block of neural networks like multi-layer perceptron, convolution neural network and recurrent neural network cell. The mechanism, a part of the network’s architecture, is in charge of managing and quantifying the interdependence between the input and output elements and also within the input elements. 

Register for Data & Analytics Conclave>>

Why This Research

Attention has proved to be a powerful component of modern neural networks across a variety of domains. Researchers have been working to improve this architecture. However, there is still a lack of clarity in the explanations about the mathematical properties of attention and regularities of the attention architectures. The new mathematical framework comes in the wake of this situation. 

The researchers stated, “In particular, we seek to understand how “close” the outputs of the attention operation are in terms of the closeness of the inputs and the parameters of the attention block.”

Importance Of Regularity

According to the researchers, the regularity of attention is essential for various reasons. More specifically, regularity impacts self-attention networks’ properties, such as their invertibility and the existence of infinite-depth limits.

The key reasons why regularity is important:

  • Regularity is a basic property of a function with crucial implications for tasks such as feature learning. Also, Lipschitz regularity, in particular, plays an important role in such cases.
  • Secondly, the repeated composition of a function magnifies its regularity. Since attention is liberally used in very deep architectures, understanding the regularity of this essential building block can shine a light on the training and stability of these models.
  • Lastly, having a precise theory allows us to make testable predictions about experiments to generate improvements and post hoc analysis of experimental results to understand better why a given behaviour was observed.

Behind The Framework

The mathematical framework relies heavily on linear transformations of measures modelled by Markov kernels. The idea behind this research is to show that attention is Lipschitz continuous under various assumptions, and to do so, the researchers introduced the modelling paradigm for attention based on measure theory and integral operators.

They demonstrated that the attention operation is Lipschitz continuous and provided an estimate of its Lipschitz constant. Lipschitz continuity is mainly used to improve the state-of-the-art in several deep learning topics such as generative models and robust learning. 

See Also

The researchers also assessed the impact of these regularity results on practical applications of attention such as cross-attention, robustness and token-level perturbations in NLP, and sophisticated extensions to the transformer architecture. 

Wrapping Up

The researchers studied how regularity can help certain applications by providing robustness to the learned representations. They showed several benefits of using this mathematical framework:

  • The mathematical framework is consistent with the usual definition, and it captures the essential properties of attention. 
  • The framework showed the resulting representation is Lipschitz continuous concerning the output semantic space.
  • The framework provides a potential mathematical basis for the robustness of transformers.
  • The modelling could be used to derive predictions of the distance between self-attention networks’ contextual embeddings as a function of the context to test this hypothesis.
  • It could also be used to design better model components, such as input embedding spaces that reduce the regularity mismatch for specific perturbations that are highly irregular.

Read the paper here.

What Do You Think?

Subscribe to our Newsletter

Get the latest updates and relevant offers by sharing your email.
Join our Telegram Group. Be part of an engaging community

Copyright Analytics India Magazine Pvt Ltd

Scroll To Top