Short-Term Memory Convolutions

Grzegorz Stefanski, Krzysztof Arendt, Pawel Daniluk, Bartlomiej Jasik, Artur Szumaczuk

Abstract

The real-time processing of time series signals is a critical issue for many real-life applications. The idea of real-time processing is especially important in audio domain as the human perception of sound is sensitive to any kind of disturbance in perceived signals, especially the lag between auditory and visual modalities. The rise of deep learning (DL) models complicated the landscape of signal processing. Although they often have superior quality compared to standard DSP methods, this advantage is diminished by higher latency. In this work we propose novel method for minimization of inference time latency and memory consumption, called Short-Term Memory Convolution (STMC) and its transposed counterpart. The main advantage of STMC is the low latency comparable to long short-term memory (LSTM) networks. Furthermore, the training of STMC-based models is faster and more stable as the method is based solely on convolutional neural networks (CNNs). In this study we demonstrate an application of this solution to a U-Net model for a speech separation task and GhostNet model in acoustic scene classification (ASC) task. In case of speech separation we achieved a 5-fold reduction in inference time and a 2-fold reduction in latency without affecting the output quality. The inference time for ASC task was up to 4 times faster while preserving the original accuracy.

Introduction

In real-time audio processing applications, such as noise cancellation or live speech separation, latency is a critical performance metric. Humans are highly sensitive to audio-visual desynchronization; delays exceeding 40ms can significantly degrade user experience. While Deep Learning has advanced signal processing quality, it often introduces a "latency tax." Standard Convolutional Neural Networks (CNNs) typically require a data chunk at least as large as their receptive field to produce an output, leading to high algorithmic latency. Furthermore, standard implementations often re-calculate overlapping data points, increasing computational latency. Recurrent Neural Networks (RNNs) like LSTMs offer lower latency but are harder to parallelize and less stable during training. This work introduces Short-Term Memory Convolutions (STMC) to combine the training stability of CNNs with the instantaneous response of RNNs.

Methods: Short-Term Memory Convolutions

The core innovation is the Short-Term Memory Convolution (STMC) and its transposed counterpart (tSTMC). These layers introduce a layer-wise caching mechanism that stores intermediate feature maps using shift registers.

Architectural overview of Short-Term Memory Convolution (STMC) and its transposed counterpart (tSTMC).

Layer-wise Caching and Redundancy Elimination

Unlike traditional incremental inference methods that only cache raw inputs, STMC caches the output of every convolutional layer. When a new data chunk arrives, the network does not re-process the entire receptive field. Instead, it retrieves the "past context" from shift registers and only computes values for the new data points. This approach effectively eliminates redundant calculations across time steps.

Visualization of temporal redundancy and the buffering mechanism in STMC layers.

Transposed STMC (tSTMC)

Decoders like U-Nets often use transposed convolutions, which are naturally "anti-causal" because they look ahead into future time steps. The authors propose a specific shifting and padding strategy for tSTMC to force these layers to remain causal. This ensures the model can produce outputs without waiting for future data, maintaining low latency in auto-encoder architectures.

Experimental Evaluation

The STMC method was evaluated on two distinct tasks: speech separation using a U-Net architecture on the DNS Challenge dataset, and Acoustic Scene Classification (ASC) using a GhostNet architecture on the TAU Urban Acoustic Scene 2020 Mobile dataset.

Key Results

The performance gains were substantial across both desktop (Intel Xeon) and mobile (Snapdragon 888) platforms:

  • Speech Separation: STMC achieved an 8-fold reduction in latency for non-causal settings and a 2.5-fold reduction for causal settings compared to standard incremental inference. Total inference time was reduced by a factor of 5.
  • Acoustic Scene Classification: On mobile devices using XNNPACK, STMC GhostNet was up to 4 times faster than the baseline while maintaining the original accuracy of 65.83%.
  • Memory Efficiency: Peak memory consumption was reduced by approximately 20-39%, enhancing viability for memory-constrained edge devices.

Discussion and Conclusion

The effectiveness of STMC increases with network depth. In deep CNNs, the receptive field grows significantly; by caching intermediate states, STMC prevents the computational explosion typically associated with running deep models on small data chunks. Because STMC is a structural modification applied after training, it is model-agnostic and does not require retraining or weight changes.

While highly effective, implementation details like shift register sizes depend on specific model parameters (strides, dilations, skip connections). Furthermore, while STMC reduces computational latency, algorithmic latency is still bounded by the causality of the underlying model design. Future work may explore STMC in other high-volume data domains like medical imaging or radio astronomy.

Summary updated

BibTeX
@inproceedings{stefanski2023short,
  author = {Grzegorz Stefanski and Krzysztof Arendt and Pawel Daniluk and Bartlomiej Jasik and Artur Szumaczuk},
  title = {{Short-Term Memory Convolutions}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=4DU_HCijfJp},
}
Figure