Abstract
We propose a two-layer cache mechanism to speed up dynamic WFST decoding with personalized language models. The first layer is a public cache that stores most of the static part of the graph. This is shared globally among all users. A second layer is a private cache that caches the graph that represents the personalized language model, which is only shared by the utterances from a particular user. We also propose two simple yet effective pre-initialization methods, one based on breadth-first search, and another based on a data-driven exploration of decoder states using previous utterances. Experiments with a calling speech recognition task using a personalized contact list demonstrate that the proposed public cache reduces decoding time by factor of three compared to decoding without pre-initialization. Using the private cache provides additional efficiency gains, reducing the decoding time by a factor of five.
Introduction
Weighted Finite State Transducers (WFSTs) are the backbone of modern Automatic Speech Recognition (ASR) systems, typically mapping acoustic signals to words via a statically composed $HCLG$ graph. While efficient, these static graphs are inherently rigid. The need for personalization—such as recognizing unique names in a user's contact list—requires "dynamic decoding," where personalized components are composed on the fly. Historically, this dynamic composition has been a significant bottleneck due to high computational costs and latency.
Two-Layer Cache Architecture
To address the latency of dynamic decoding, we propose a hybrid structure utilizing two distinct cache layers:
- Public Cache ($T_P$): A global, thread-shared cache containing the static, frequently accessed portions of the grammar. It uses "placeholders" for personalized classes to allow pre-composition of the surrounding grammar without user-specific data.
- Private Cache ($T_D$): A per-user dynamic cache that stores the results of on-demand composition for personalized entities. This cache persists across a dialog session, enabling cumulative performance gains as the interaction continues.
Pre-initialization Strategies
The public cache is populated using two strategies:
- Breadth-First Search (BFS): Expanding the graph from the start state to a fixed depth.
- Data-driven Warmup: Using a small set of representative utterances to identify and pre-compose the most frequently visited states. Findings indicate that this data-driven approach is superior, as it captures frequent states that may reside deep within the graph structure.
Experimental Results
The system was evaluated on a calling domain task (7,500 utterances) and general domains (~10,000 utterances). Each simulated user was assigned a contact list of approximately 500 names.
As shown in the experimental results, pre-initializing the public graph significantly reduces the Real-Time Factor (RTF). The "warmup" strategy achieves the lowest RTF, reducing decoding time by a factor of three compared to a fully dynamic baseline. When the private cache is utilized over a multi-turn session, the total speedup reaches a factor of five.
Furthermore, the data shows that while pre-composed graphs have a higher initial memory footprint, their marginal memory cost per concurrent request is approximately 1.5x lower than the fully dynamic approach. This makes the system highly scalable for cloud-based ASR services. Importantly, these efficiency gains were achieved with zero loss in Word Error Rate (WER).
Conclusion
The proposed two-layer caching mechanism successfully bridges the gap between the flexibility of dynamic decoding and the efficiency of static WFSTs. By leveraging both global public caches and session-persistent private caches, the system achieves significant speedups and improved scalability for personalized ASR. Future work will explore combining BFS and data-driven methods to further optimize cache performance across diverse, multi-domain applications.
Summary updated