Higher-order Derivatives of Weighted Finite-state Machines

Ran Zmigrod, Tim Vieira, Ryan Cotterell
6/1/2021
cs.CL

Official code: rycolab/wfsm (5 stars, Python, MIT, last commit 2021-08-16).

Abstract

Weighted finite-state machines are a fundamental building block of NLP systems. They have withstood the test of time -- from their early use in noisy channel models in the 1990s up to modern-day neurally parameterized conditional random fields.

Show full abstract

This work examines the computation of higher-order derivatives with respect to the normalization constant for weighted finite-state machines. We provide a general algorithm for evaluating derivatives of all orders, which has not been previously described in the literature. In the case of second-order derivatives, our scheme runs in the optimal $\mathcal{O}(A^2 N^4)$ time where $A$ is the alphabet size and $N$ is the number of states. Our algorithm is significantly faster than prior algorithms. Additionally, our approach leads to a significantly faster algorithm for computing second-order expectations, such as covariance matrices and gradients of first-order expectations.

View on arXivView PDF

Code Implementations(1)

rycolab/wfsmOfficial100%
MIT

Inference Algorithms for Weighted Finite-State Machines

50PythonJun 2, 20215 years agoMIT

Similar Papers

Cite this paper

@article{zmigrod2021higherorder,
  title  = {Higher-order Derivatives of Weighted Finite-state Machines},
  author = {Ran Zmigrod and Tim Vieira and Ryan Cotterell},
  year   = {2021},
  eprint = {2106.00749},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2106.00749}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2106.00749.svg)](https://codeofpaper.com/paper/2106.00749)

Discussion