Following the successful application of vision transformers in multiple computer vision tasks, these models have drawn the attention of the signal processing community. This is because signals are often represented as spectrograms (e.g. through Discrete Fourier Transform) which can be directly provided as input to vision transformers. However, naively applying transformers to spectrograms is suboptimal. Since the axes represent distinct dimensions, i.e. frequency and time, we argue that a better approach is to separate the attention dedicated to each axis. To this end, we propose the Separable Transformer (SepTr), an architecture that employs two transformer blocks in a sequential manner, the first attending to tokens within the same time interval, and the second attending to tokens within the same frequency bin. We conduct experiments on three benchmark data sets, showing that our separable architecture outperforms conventional vision transformers and other state-of-the-art methods. Unlike standard transformers, SepTr linearly scales the number of trainable parameters with the input size, thus having a lower memory footprint. Our code is available as open source at https://github.com/ristea/septr.
翻译:在多次计算机视觉任务中成功应用了视觉变压器之后,这些模型引起了信号处理界的注意。 这是因为信号通常被作为光谱图( 例如通过分光变换器) 来代表, 可以直接作为向视觉变压器的输入。 但是, 将变压器应用到光谱图中是不完美的。 由于轴代表不同的维度, 即频率和时间, 我们主张更好的办法是将每个轴的注意力分开。 为此, 我们建议采用 Septrable 变压器( SepTr), 这个结构以相继方式使用两个变压器块( separble 变压器), 这个结构以两个变压器块, 在同一时间间隔内使用第一个标记, 第二次表示符号。 我们用三个基准数据集进行实验, 显示我们的变压结构超越了常规变压器和其他最先进的方法。 与标准变压器不同, SepTr 线度尺度的可训练参数数量与输入尺寸不同, 因此内存留痕迹较低 。 我们的代码作为开放源 http://pr/ 。