HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

Poly-NL: Linear Complexity Non-local Layers with Polynomials

Francesca Babiloni Ioannis Marras Filippos Kokkinos Jiankang Deng Grigorios Chrysos Stefanos Zafeiriou

Poly-NL: Linear Complexity Non-local Layers with Polynomials

Abstract

Spatial self-attention layers, in the form of Non-Local blocks, introduce long-range dependencies in Convolutional Neural Networks by computing pairwise similarities among all possible positions. Such pairwise functions underpin the effectiveness of non-local layers, but also determine a complexity that scales quadratically with respect to the input size both in space and time. This is a severely limiting factor that practically hinders the applicability of non-local blocks to even moderately sized inputs. Previous works focused on reducing the complexity by modifying the underlying matrix operations, however in this work we aim to retain full expressiveness of non-local layers while keeping complexity linear. We overcome the efficiency limitation of non-local blocks by framing them as special cases of 3rd order polynomial functions. This fact enables us to formulate novel fast Non-Local blocks, capable of reducing the complexity from quadratic to linear with no loss in performance, by replacing any direct computation of pairwise similarities with element-wise multiplications. The proposed method, which we dub as "Poly-NL", is competitive with state-of-the-art performance across image recognition, instance segmentation, and face detection tasks, while having considerably less computational overhead.

Benchmarks

BenchmarkMethodologyMetrics
face-detection-on-wider-face-easyPoly-NL(ResNet-50)
AP: 0.9637
face-detection-on-wider-face-hardPoly-NL(ResNet-50)
AP: 0.9276
face-detection-on-wider-face-mediumPoly-NL(ResNet-50)
AP: 0.9571

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
Poly-NL: Linear Complexity Non-local Layers with Polynomials | Papers | HyperAI