Table of Contents
Fetching ...

Hardness of Learning Regular Languages in the Next Symbol Prediction Setting

Satwik Bhattamishra, Phil Blunsom, Varun Kanade

TL;DR

We address the problem of learning languages in the Next Symbol Prediction ($NSP$) setting, where a learner receives positive strings with per-prefix membership labels and next-symbol continuation information. The authors formulate a PAC-learning framework for NSP and prove that learning even restricted classes like Boolean acyclic DFAs remains cryptographically hard under standard assumptions, using a padding construction that translates NSP learning into conventional learning. They show that an efficient NSP learner would yield an efficient standard learner, implying hardness for DFA and Boolean-formula learning. This suggests that NSP-based signals, while richer, have limited potential to circumvent hardness and informs interpretation of NSP-based empirical analyses of neural sequence models.

Abstract

We study the learnability of languages in the Next Symbol Prediction (NSP) setting, where a learner receives only positive examples from a language together with, for every prefix, (i) whether the prefix itself is in the language and (ii) which next symbols can lead to an accepting string. This setting has been used in prior works to empirically analyze neural sequence models, and additionally, we observe that efficient algorithms for the NSP setting can be used to learn the (truncated) support of language models. We formalize the setting so as to make it amenable to PAC-learning analysis. While the setting provides a much richer set of labels than the conventional classification setting, we show that learning concept classes such as DFAs and Boolean formulas remains computationally hard. The proof is via a construction that makes almost all additional labels uninformative, yielding a reduction from the conventional learning problem to learning with NSP labels. Under cryptographic assumptions, the reduction implies that the problem of learning DFAs is computationally hard in the NSP setting.

Hardness of Learning Regular Languages in the Next Symbol Prediction Setting

TL;DR

We address the problem of learning languages in the Next Symbol Prediction () setting, where a learner receives positive strings with per-prefix membership labels and next-symbol continuation information. The authors formulate a PAC-learning framework for NSP and prove that learning even restricted classes like Boolean acyclic DFAs remains cryptographically hard under standard assumptions, using a padding construction that translates NSP learning into conventional learning. They show that an efficient NSP learner would yield an efficient standard learner, implying hardness for DFA and Boolean-formula learning. This suggests that NSP-based signals, while richer, have limited potential to circumvent hardness and informs interpretation of NSP-based empirical analyses of neural sequence models.

Abstract

We study the learnability of languages in the Next Symbol Prediction (NSP) setting, where a learner receives only positive examples from a language together with, for every prefix, (i) whether the prefix itself is in the language and (ii) which next symbols can lead to an accepting string. This setting has been used in prior works to empirically analyze neural sequence models, and additionally, we observe that efficient algorithms for the NSP setting can be used to learn the (truncated) support of language models. We formalize the setting so as to make it amenable to PAC-learning analysis. While the setting provides a much richer set of labels than the conventional classification setting, we show that learning concept classes such as DFAs and Boolean formulas remains computationally hard. The proof is via a construction that makes almost all additional labels uninformative, yielding a reduction from the conventional learning problem to learning with NSP labels. Under cryptographic assumptions, the reduction implies that the problem of learning DFAs is computationally hard in the NSP setting.
Paper Structure (6 sections, 5 theorems, 20 equations, 1 figure)

This paper contains 6 sections, 5 theorems, 20 equations, 1 figure.

Key Result

Theorem 3.1

There exists a polynomial $p(\cdot)$ such that the problems of inverting RSA, factoring Blum integers, etc., are probabilistic polynomial-time reducible to weakly learning $\mathrm{ADFA}_{p(\cdot)}$ in the standard PAC setting.

Figures (1)

  • Figure 1: Transformation from Section \ref{['subsec:bdfa-construct']}. In (b), green states are from the original DFA; blue states $q'_1,\ldots,q'_4$ ensure every prefix of length $<N$ has continuation labels $[1,1,0]$, and $q'_4$ routes to accept on input $1$ (to the dead state on $0$).

Theorems & Definitions (8)

  • Theorem 3.1: kearns1994cryptographic
  • Lemma 3.2: Unique depth in minimal ADFA
  • proof
  • Lemma 3.3: Padded Construction
  • proof
  • Theorem 3.4
  • proof
  • Corollary 3.4.1: Cryptographic hardness for $\mathrm{NSP}$ learning of fixed-length acyclic DFAs