University of Tokyo Proves Simple Logistic Regression Learns Human Language Rules Exactly
A new proof shows that the language patterns behind phonology and morphology can be learned exactly by plain logistic regression over interpretable features.
ProTakeaways
- New proof shows all standard subregular language classes are linearly separable using finite predicate features.
- Introduces finite observability, connecting formal language theory with VC-dimension learning guarantees.
- Logistic regression hits 100% accuracy on noise-free synthetic SL, SP, and LTT languages.
- On English morphology from MorphoLex-en, linear classifier reaches above 85% accuracy with F1 of 86%.
- Top-weighted features match known linguistic constraints like -ly and -ness suffix restrictions.
- Code released at UTokyo-HayashiLab/subregular; approach fails on full regular languages by design.
A pair of researchers at the University of Tokyo and NAIST have quietly closed a gap that has been open for decades between formal language theory and modern machine learning. Their paper proves that every standard class in the subregular hierarchy, the corner of formal language theory that describes most sound patterns and word-building rules in human languages, is linearly separable once you feed it the right binary features. Translation: a plain logistic regression is provably enough to learn these patterns exactly.
The hierarchy nobody in ML talks about
Regular languages, the ones recognized by finite automata, are too broad to explain what natural languages actually do. Linguists have spent years mapping out a tighter set of classes strictly inside the regular languages, called the subregular hierarchy, which includes families with names like Strictly Local (SL), Strictly Piecewise (SP), Locally Testable (LT), Piecewise Testable (PT), Locally Threshold Testable (LTT), and Tier-based Strictly Local (TSL). Phonotactic restrictions such as vowel harmony, consonant dissimilation, and tonal patterns have been successfully modeled with subregular languages, and morphological and syntactic dependencies align with subregular complexity too.
Each class captures a different kind of constraint. SL bans certain adjacent character combinations. SP bans certain non-adjacent pairs, which is how you model something like a vowel at the start of a word forcing a matching vowel later on. LTT layers in bounded counting, and TSL projects a subset of symbols onto a tier so that non-local rules can be enforced locally on that tier.
The gap: algebra versus geometry
While the algebraic and logical characterizations of subregular classes are well established, there has been limited work providing a geometric perspective on why these classes matter for learnability. Statistical learning theory already tells us that linear separability implies strong generalization guarantees through VC dimension, perceptron mistake bounds, and margin analyses. But nobody had glued the two sides together: if subregular languages could be shown to be linearly separable in some finite feature space, all of that classical learning theory would apply directly to linguistic constraints.
The trick: finite observability
The authors introduce a property they call finite observability. A language class is finitely observable if there exists a finite set of predicates such that, for every language in the class, membership depends only on the truth vector of those predicates. A predicate here is just a boolean feature like "does the trigram ngt appear in the string" or "does the letter a precede i anywhere."
The main theorem then works in two moves:
- Show that each subregular class can be described by a finite predicate set. For SL you use k-gram indicators, for SP you use k-subsequence indicators, for LTT you use thresholded counts, for TSL you use k-grams on tier projections, and so on.
- Show that any finitely observable class is linearly separable through a minterm feature map, with a geometric margin of at least 1/2. Because each feature vector is one-hot with unit norm, the perceptron converges in at most
4|S|mistakes.
The minterm construction is exponential in the number of predicates, but in practice you do not need it. The subregular families admit direct low-dimensional predicate features that already separate the target languages, and these features are polynomial in the alphabet size and the fixed parameters. You can train them with sparse linear methods.
Does it actually work on data
The synthetic experiments are a sanity check for the theory. For SL, SP, and LTT the authors generate positive and negative strings, feed the right predicate features into logistic regression, and sweep both noise and training size.

In the noise-free setting accuracy hits exactly 100% across all three classes, and it degrades gracefully as labels are randomly flipped. The size sweep shows convergence to perfect accuracy within a few hundred to a few thousand examples, depending on the class.
The more interesting test is on real language. The authors use the MorphoLex-en database of English derivational morphology, extract affix sequences from each word, and generate negative examples by permuting affix orders or substituting one affix for another. Features are Piecewise Testable subsequences up to length 2 plus boundary-aware LTT counts. Logistic regression with PT plus LTT features typically reached accuracy above 85%, with F1 scores of 86%.

The interesting part is what the model learned. The most influential features correspond to linguistically interpretable affix constraints, such as boundary-sensitive predicates for the presence of -ly or -ness at the right edge, reflecting the well-attested distributional restrictions of these suffixes. The classifier is not just fitting noise, it is recovering the same constraints linguists have documented by hand.
What it is bad at
The paper is honest about the ceiling. For any fixed finite predicate set, there exist regular languages that cannot be detected, hence cannot be linearly separated in the corresponding feature space. The counterexample is simple: the language of strings whose length is divisible by some integer larger than 2^n, over a one-letter alphabet, needs more equivalence classes than any n-predicate feature space can provide. So this is not a universal recipe for all regular languages, only the subregular slice where natural language phenomena actually live.
The other limitation is parameter fixing. You need to commit to specific values of k, m, and the threshold in advance. Directed unions like PT = union over m of PT_m are not finitely observable as a whole, only each parameterized subclass.
Why this matters in practice
For anyone building lightweight linguistic tooling, morphological analyzers, phonotactic scorers, or interpretable baselines against which to compare neural models, this paper is a green light. You can:
- Extract k-grams, subsequences, tier projections, or thresholded counts as boolean features.
- Train a logistic regression or linear SVM.
- Inspect the top weights and get back constraints that a linguist can read.
The code for the real-data experiments is available on GitHub. The bigger picture is a suggestion the authors make in the conclusion: RNNs and transformers may be theoretically Turing-complete under infinite precision, but the patterns they actually need to learn for natural language may sit much closer to this subregular island where a linear model already suffices. If that conjecture holds up, it reframes a lot of the ongoing effort to probe neural models for hidden formal-language competence.