Relation is an option for processing context information - Yamada, Kazunori D; Baladram, M. Samy; Lin, Fangzhou (Frontiers in Artificial Intelligence, 2022)
Attention mechanisms are one of the most frequently used architectures in the development of artificial intelligence because they can process contextual information efficiently. Various artificial intelligence architectures, such as Transformers for processing natural language, image data, etc., include the attention mechanism. Various improvements have been made to enhance its performance since Attention is a powerful component to realize artificial intelligence. The time complexity of Attention depends on the square of the input sequence length. Developing methods to improve the time complexity of Attention is one of the most popular research topics. Attention is a mechanism that conveys contextual information of input sequences to downstream networks. Thus, if one wants to improve the performance of processing contextual information, the focus should not be confined only to improving Attention but also to devising other similar mechanisms as possible alternatives. In this study, we devised an alternative mechanism called ``Relation'' that can understand the context information of sequential data. A relation is easy to implement, and its time complexity depends only on the length of the sequences; a comparison of the performance of Relation and Attention on several benchmark datasets showed that the context processing capability of Relation is comparable to that of Attention but with less computation time. Processing contextual information at high speeds would be useful because natural language processing and biological sequence processing sometimes deal with very long sequences. Hence, Relation is an ideal option for processing context information.