SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machines

Roy Schwartz, Sam Thomson, Noah A. Smith
5/15/2018
cs.CLcs.AIcs.LG

Official code: Noahs-ARK/soft_patterns (54 stars, MIT, last commit 2022-07-07).

Abstract

Recurrent and convolutional neural networks comprise two distinct families of models that have proven to be useful for encoding natural language utterances. In this paper we present SoPa, a new model that aims to bridge these two approaches. SoPa combines neural representation learning with weighted finite-state automata (WFSAs) to learn a soft version of traditional surface patterns. We show that SoPa is an extension of a one-layer CNN, and that such CNNs are equivalent to a restricted version of SoPa, and accordingly, to a restricted form of WFSA. Empirically, on three text classification tasks, SoPa is comparable or better than both a BiLSTM (RNN) baseline and a CNN baseline, and is particularly useful in small data settings.

View on arXivView PDF

Code Implementations(1)

MIT

Text classification code described in "SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machines" by Roy Schwartz, Sam Thomson and Noah A. Smith, ACL 2018

5413Shell, PythonSep 14, 20174 years agoMIT

Similar Papers

Cite this paper

@article{schwartz2018sopa,
  title  = {SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machines},
  author = {Roy Schwartz and Sam Thomson and Noah A. Smith},
  year   = {2018},
  eprint = {1805.06061},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1805.06061}
}

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/1805.06061.svg)](https://codeofpaper.com/paper/1805.06061)

Discussion