An adaptable task-oriented dialog system for stand-alone embedded devices

Long Duong, Vu Cong Duy Hoang, Tuyen Quang Pham, Yu-Heng Hong, Vladislavs Dovgalecs, Guy Bashkansky, Jason Black, Andrew Bleeker, Serge Le Huitouze, Mark JohnsonACL 2019

Abstract

Modern voice assistants typically rely on cloud-based processing, which introduces concerns regarding privacy, latency, and operational costs. This paper presents a fully offline, task-oriented spoken dialogue system designed for low-power embedded hardware. By combining optimized deep learning models with efficient rule-based components, the system achieves high accuracy and sub-100ms latency on a Raspberry Pi, demonstrating the feasibility of privacy-preserving, edge-based conversational AI.

Introduction

The ubiquity of voice assistants like Alexa and Siri has popularized voice-first interaction. However, these systems are predominantly "cloud-first," requiring user voice data to be transmitted to remote servers. This architecture has significant drawbacks: it compromises user privacy, introduces latency dependent on internet connectivity, and incurs high server maintenance costs for manufacturers.

The challenge in moving these systems to the "edge"—devices like home appliances or smart clocks—lies in the severe resource constraints of the hardware. Porting complex pipelines involving Automatic Speech Recognition (ASR), Natural Language Understanding (NLU), and Text-to-Speech (TTS) to devices with limited CPU and RAM without sacrificing performance is a significant engineering hurdle. This work describes a modular architecture that balances neural flexibility with rule-based efficiency to meet these constraints.

System Architecture

The proposed system employs a modular pipeline architecture, strategically selecting between machine learning and rule-based approaches to optimize for both memory and performance.

Overview of the modular task-oriented dialog system architecture.

As shown in Figure 1, the pipeline begins with a "Wake word" detector and ASR. The NLU component consists of Named Entity Recognition (NER) and a Semantic Parser. A key innovation is the use of "Topic-Action Attribute-Value Logical Forms" (TAVLFs). This bipartite structure separates the topic (e.g., "workout alarm") from the action (e.g., "edit"), facilitating context management via a "Context Stack."

To ensure the system fits within the 1GB RAM of a Raspberry Pi 3+, the authors utilized the Hyperband algorithm for hyperparameter optimization, searching through thousands of configurations to find the optimal balance between model size and a maximum latency of 100ms. Furthermore, trained models were quantized to reduce their memory footprint before deployment in a C++11 runtime.

Data and Training

Training a robust semantic parser requires high-quality data. The authors utilized the "Overnight" approach, generating logical forms and using crowdsourcing to paraphrase them into natural language. For the smart alarm clock domain, they collected approximately 11,000 paraphrases corresponding to over 1,000 unique Logical Forms. A real-time validation step, where crowd workers verified each other's paraphrases, was implemented to ensure data quality and filter out "spam" entries.

Key Insights: Rule-Based Logic and Context

While modern research often favors end-to-end neural models, this system demonstrates that rule-based components can be a feature rather than a limitation for embedded devices.

Flowchart of the Dialog State Tracker (DST) logic for processing semantic representations.

The Dialog State Tracker (DST), illustrated in Figure 2, uses a rule-based approach to process the semantic representation (LF1) from the NLU. This method requires zero training data, is computationally inexpensive, and allows for precise manual adjustments to domain-specific logic. By splitting intents into Topic and Action, the system handles follow-up queries naturally. For instance, if a user says "Move it to 9 AM," the system identifies "it" as the previously discussed "Topic" on the stack, avoiding the need for complex neural co-reference resolution.

Evaluation and Results

The system was benchmarked on a Raspberry Pi 3+ (1.4GHz CPU, 1GB RAM) with the following results:

  • Accuracy: The semantic parser achieved an 85% exact match accuracy on the development set.
  • Latency: The NLU component processes utterances in under 100ms, ensuring a responsive user experience.
  • Resource Efficiency: The entire NLU/NER stack consumes less than 16MB of RAM. The ASR acoustic model is 7.9MB, and the Semantic Parser is 2.5MB.
  • Real-time Factor: The customized Kaldi ASR achieved a real-time factor of 0.23, processing speech significantly faster than real-time.

Conclusion and Future Work

This work demonstrates that a high-performance, task-oriented dialog system can run entirely offline on low-cost embedded hardware. While the current system relies on template-based Natural Language Generation (NLG), which can feel repetitive, it provides a robust foundation for privacy-centric voice interaction. Future work will explore the integration of pretrained embeddings to improve parser robustness and the development of multi-task neural models to further streamline the pipeline.

Summary updated

BibTeX
@inproceedings{duong2019adaptable,
  author = {Long Duong and Vu Cong Duy Hoang and Tuyen Quang Pham and Yu-Heng Hong and Vladislavs Dovgalecs and Guy Bashkansky and Jason Black and Andrew Bleeker and Serge Le Huitouze and Mark Johnson},
  title = {{An adaptable task-oriented dialog system for stand-alone embedded devices}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/p19-3009},
}
Figure