Streaming MANN: A Streaming-Based Inference for Energy-Efficient Memory-Augmented Neural Networks

Seongsik Park, Jaehee Jang, Sei Joon Kim, Sungroh Yoon

Abstract

Memory-Augmented Neural Networks (MANNs) are highly effective for complex Natural Language Processing (NLP) tasks but are difficult to deploy on edge devices due to complex data paths and computational bottlenecks in the output layer. This paper introduces a specialized FPGA-based accelerator that utilizes a streaming dataflow architecture and a speculative "inference thresholding" technique. The proposed system achieves up to 140x better energy efficiency and approximately 7x faster inference than high-end GPUs, making complex question-answering models viable for low-power mobile environments.

Introduction

MANNs utilize an external memory component to store and retrieve information, making them ideal for reasoning tasks like question-answering. However, standard CPU and GPU architectures struggle with MANNs due to recurrent data loops and the energy-intensive Maximum Inner Product Search (MIPS) required for large vocabulary outputs. To address these challenges, we propose a hardware-software co-design approach that optimizes both the data movement and the underlying algorithm for streaming execution.

Hardware-Software Co-Design

The core of the proposed system is a modular Dataflow Architecture (DFA) implemented on a Field-Programmable Gate Array (FPGA). Unlike traditional architectures that rely on frequent memory fetches, the DFA allows data to stream directly between specialized processing elements, minimizing memory-access overhead.

The proposed FPGA-based modular dataflow architecture for MANN inference.

The accelerator is divided into four primary modules:

  1. INPUT & WRITE: Manages word embeddings.
  2. MEM: Handles external memory operations.
  3. READ: Contains the RNN-based controller.
  4. OUTPUT: Executes the final classification.

To mitigate the output bottleneck, we introduce Inference Thresholding (ITH). This technique uses pre-calculated thresholds to allow for "early exits" during the MIPS process. If a calculated logit exceeds its threshold, the system immediately returns the result, skipping remaining computations. This is further optimized by Efficient Index Ordering, which sorts output classes based on their distinctness (using silhouette coefficients) to maximize the probability of an early exit.

Experimental Evaluation

The system was evaluated using the bAbI dataset, a standard benchmark for question-answering reasoning across 20 distinct tasks. Performance and energy efficiency were compared against high-end hardware, including an NVIDIA TITAN V GPU and an Intel i9 CPU.

Results and Discussion

The FPGA implementation demonstrated remarkable gains in energy efficiency, ranging from 126x to 140x (measured in FLOPS/kJ) compared to the GPU. In terms of raw speed, the accelerator outperformed the GPU by 5.2x to 7.5x and the CPU by up to 8.0x.

Energy efficiency comparison across 20 bAbI tasks, showing significant gains for the FPGA-based approach.

The integration of Inference Thresholding provided an additional 6% to 18% reduction in inference time with negligible impact on accuracy. Analysis revealed that as clock speeds increased, the primary bottleneck shifted from computation to the host-FPGA communication interface (PCIe/FIFO), suggesting that tighter system integration could yield even higher performance.

Conclusion

Streaming MANN demonstrates that hardware-algorithm synergy is key to bringing advanced neural models to the edge. By tailoring the inference process to a streaming dataflow and employing speculative execution, we achieve orders-of-magnitude improvements in energy efficiency. Future work will focus on scaling these techniques to larger vocabularies and adapting the architecture for other emerging models like Transformers.

Summary updated

BibTeX
@inproceedings{park2019streaming,
  author = {Seongsik Park and Jaehee Jang and Sei Joon Kim and Sungroh Yoon},
  title = {{Streaming MANN: A Streaming-Based Inference for Energy-Efficient Memory-Augmented Neural Networks}},
  booktitle = {DATE},
  year = {2019},
  doi = {10.23919/date.2019.8715013},
}
Figure