Skip to main content
QUICK REVIEW

[Paper Review] Differentiable Weighted Finite-State Transducers

Awni Hannun, Vineel Pratap|arXiv (Cornell University)|Oct 2, 2020
Topic ModelingComputer Science38 references10 citations
TL;DR

This paper introduces a differentiable framework for weighted finite-state transducers (WFSTs), enabling end-to-end training of structured sequence models by integrating WFST operations into deep learning pipelines. By supporting automatic differentiation, the framework allows joint optimization of loss functions, latent variable modeling (e.g., word piece decomposition), and novel layers—such as convolutional WFST layers—resulting in improved accuracy with fewer parameters, validated in speech and handwriting recognition tasks.

ABSTRACT

We introduce a framework for automatic differentiation with weighted finite-state transducers (WFSTs) allowing them to be used dynamically at training time. Through the separation of graphs from operations on graphs, this framework enables the exploration of new structured loss functions which in turn eases the encoding of prior knowledge into learning algorithms. We show how the framework can combine pruning and back-off in transition models with various sequence-level loss functions. We also show how to learn over the latent decomposition of phrases into word pieces. Finally, to demonstrate that WFSTs can be used in the interior of a deep neural network, we propose a convolutional WFST layer which maps lower-level representations to higher-level representations and can be used as a drop-in replacement for a traditional convolution. We validate these algorithms with experiments in handwriting recognition and speech recognition.

Motivation & Objective

  • To enable automatic differentiation through weighted finite-state transducers (WFSTs) for use during model training, overcoming limitations of static WFST use in inference.
  • To allow structured sequence-level loss functions (e.g., CTC, ASG) to be expressed and optimized via graph operations rather than hand-coded implementations.
  • To learn task-specific word piece decompositions by marginalizing over latent decompositions during training, improving model adaptability.
  • To integrate WFSTs as learnable layers within deep neural networks, replacing or augmenting traditional convolutional layers.
  • To demonstrate that differentiable WFSTs can improve model accuracy while reducing parameters and computational cost.

Proposed method

  • Separate graph structures (WFSTs) from operations, enabling automatic differentiation through WFST composition, intersection, and forward scoring.
  • Express sequence-level loss functions (e.g., ASG, CTC) as graph operations: compute loss via difference of forward scores on constrained and normalization graphs.
  • Use a transition WFST with pruning and back-off to scale to large vocabularies, enabling efficient computation over large token sets.
  • Model latent word piece decomposition using WFSTs that marginalize over possible subword units during training, allowing the model to learn task-specific subword units.
  • Design a convolutional WFST layer that maps lower-level representations (e.g., letters) to higher-level representations (e.g., word pieces), with learnable transduction rules.
  • Train the entire model end-to-end using backpropagation through the differentiable WFST operations, with gradients computed via the framework’s C++ and Python front-ends.

Experimental results

Research questions

  • RQ1Can weighted finite-state transducers be made differentiable to support end-to-end training in deep learning models?
  • RQ2Can differentiable WFSTs express and optimize novel structured sequence-level loss functions more flexibly than hand-coded alternatives?
  • RQ3Can latent word piece decompositions be learned dynamically during training using WFST-based marginalization, improving performance on large-vocabulary tasks?
  • RQ4Can WFSTs be used as learnable layers within deep neural networks, replacing or outperforming traditional convolutional layers?
  • RQ5Does integrating differentiable WFSTs lead to improved accuracy with reduced model complexity in speech and handwriting recognition?

Key findings

  • The differentiable WFST framework enables end-to-end training with structured loss functions such as ASG and CTC, computed via graph operations and automatic differentiation.
  • Marginalizing over latent word piece decompositions improves recognition accuracy, especially on large-vocabulary tasks, recovering performance lost with fixed subword tokenization.
  • On the IAM handwriting recognition dataset, the convolutional WFST layer achieved a CER of 19.5 with only 2,048 parameters, outperforming a traditional convolution (20.7 CER, 79,000 parameters).
  • The WFST convolution layer scales with the length of word pieces (w) rather than input channels (ci), reducing both parameters and operations compared to standard convolutions.
  • The model dynamically selects optimal word piece decompositions per input, such as favoring higher-level tokens for tightly spaced handwriting, demonstrating adaptive representation learning.
  • Experiments show that differentiable WFSTs allow joint optimization of data and prior knowledge encoded in graphs, improving generalization and reducing exposure bias.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.