*English translation of a zhichai.net forum post discussing the paper "Explicit Fuzzy Logic in the Feed-Forward Layer: Self-Forgetting Quantifiers Discover Legible Grammatical-Licensing Detectors" by Thomas Marshall (arXiv:2606.31845).*
An Old Question
The Transformer's feed-forward layer (FFN) is the most opaque part of the architecture. Attention at least has names—"heads"—so you can vaguely say "this head is looking at the preceding noun." The FFN? Two linear transformations sandwiching a GELU activation, with tens of thousands of hidden neurons each computing GELU(W2 @ GELU(W1 @ x)). Ask "what is neuron #4096 computing?" and nobody can answer.
Over the past two years, the mainstream interpretability approach has been post-hoc dissection: train a sparse autoencoder (SAE) to "pry" readable features out of an existing FFN. Anthropic did monosemanticity; OpenAI did SAE probes. It works, but it's expensive—every model needs a new SAE trained, and the SAE itself is a black box.
Thomas Marshall's June 2026 paper takes a different route: stop dissecting post hoc—build an natively legible FFN.
NC-FFN: Replacing GELU with Fuzzy Set Operations
The core change is simple. Replace FFN hidden units GELU(W1 @ x) with explicit fuzzy set operations:
- Intersection: \(A \cdot B\) — "A and B both true"
- Set-difference: \(A \cdot (1-B)\) — "A true but B not true"
- Bounding (sigmoid-bounded) buys "width-efficient, shallow-depth reasoning."
- Unbounding (unbounded multiplication) buys "depth-based composition."
- Additive baselines (GELU) plateau between the two.
- Comparative + "than": *She is taller than* him.
- Passive participle + "by": *The book was written by* him.
- Negative polarity item + "nor": *He didn't smile, nor* did he speak.
- Soft existential: a soft "exists" operation over the sequence.
- Soft proportion: a soft "most" operation over the sequence.
- Each unit has an independently learnable forgetting rate, initialized at the "no forgetting" limit.
- Comparative → predicts "than"
- Passive participle → predicts "by"
- Negative polarity item → predicts "nor"
- Needs a GELU stabilizer: pure Boolean doesn't train; 75/25 is an empirical ratio. A fully Boolean FFN remains an open problem.
- Legibility is local: only a few percent of units are legible, concentrated in later layers.
- Unverified at scale: tested only at 125M parameters. What would a GPT-5-class NC-FFN look like? Unknown.
- No semantic gains: a slight LAMBADA lead, but perplexity ties overall. NC-FFN's advantage is legibility, not performance.
Each unit's input is first squashed into \([0, 1]\) via sigmoid before these operations. This is the NC-FFN (Negation-Capable FFN), because set-difference provides a bounded, positive-coded "negation"—"A but not B"—which GELU or gated units cannot structurally express.
Parameter neutrality is the key design: NC-FFN has exactly the same parameter count as a GELU FFN. It's not "more parameters for interpretability"—it's "the same parameters, different structure."
The hybrid partition is an engineering detail: 75% GELU + 25% Boolean, because a purely Boolean FFN hits a trainability ceiling—fully Boolean networks abruptly spike and fail during training. 75/25 is the empirically optimal mix.
Three Results
Result 1: Reasoning Capability Improves
Using a pure FFN stack on N-bit parity (a classic reasoning probe):
> Bounded multiplicative units are the most parameter-efficient basis for shallow-depth reasoning.
Two axes:
Set-difference (complement) additionally provides a shallow margin—"A but not B" gives one more dimension of discriminative power than "A and B" alone.
Result 2: Language Modeling Matches GELU
At 125M parameters on OpenWebText, NC-FFN and the GELU baseline tie on perplexity at equal parameter counts. No semantic gain, no loss.
But there is a "small yet persistent syntactic deficit," concentrated on grammatical licensing and quantifiers:
What these share: the licensor and licensee are separated by a few tokens. "Taller" appears at position \(t\); "than" at \(t+3\). The FFN is within-token—it can only operate on a single token's representation and cannot carry information from \(t\) to \(t+3\).
This is NC-FFN's structural shortcoming: within-token set operations cannot express sequence-level dependencies.
Result 3: Self-Forgetting Quantifiers Fix the Deficit
The paper's "central result": adding a sequence-level fuzzy quantifier module solves both problems at once.
Module design:
After training:
1. The syntactic deficit recovers by epoch 1—halved by epoch 2. 2. Slight lead over the baseline on LAMBADA. 3. Logical structure persists and transfers to deeper layers, instead of eroding into soft gating as before. 4. Forgetting rates self-learn: the median per-unit half-life is ~1.5 tokens, with zero near-permanent units. Quantifiers are local, predictive operators, not latches.
The most striking part:
> Quantifier units read as grammatical-licensing detectors without any dictionary learning.
Each unit activates on a grammatical licensor, then uses its ~1.5-token memory to carry membership forward to the licensed function word:
The forgetting rates tuned themselves to the "licensing window" lengths. Nothing was hand-designed—the training objective rewarded remembering the licensor exactly as far as the licensee.
Three Deeper Findings
Logic Is Task-Shaped
> A network's logical content is a dynamic readout of what its objective rewards: on tasks rewarding multiplicative reasoning, Boolean structure crystallizes precisely; where only prediction is rewarded, it erodes into soft gating.
This answers a fundamental question: legibility is not free. NC-FFN provides legible *structure*, but whether that structure gets used depends on whether the task rewards it. Most language-modeling predictions don't need explicit logic, so deep Boolean units degrade into soft gating. Reasoning tasks do, so shallow Boolean structure crystallizes.
Layer 0 Is Irreplaceable; Deep Layers Are Redundant Capacity
Causal ablations: ablating Boolean blocks in layer 0 (embedding-adjacent) collapses the model; ablating deep Boolean blocks has almost no effect. Consistent with the above: genuine two-operand logic crystallizes only in layer 0; deep layers are "redundant capacity"—allocated but underutilized.
Legibility Is Local, Not Network-Wide
Honestly, the paper admits: legible units are only a few percent of the network, concentrated in later layers. A fully Boolean FFN (no GELU stabilizer) doesn't train. Legibility is currently only "free" within the partition—75% GELU + 25% Boolean is an engineering compromise.
What This Means
For Interpretability
There are two paths today: 1. Post-hoc probes (SAEs, probing): pry readable features out of existing models. 2. Architecture design: directly build natively legible models.
NC-FFN is path two. Its core contribution isn't "slightly better than GELU" (it ties)—it's that every unit is a named operation—intersection, difference, quantifier—readable without an SAE.
This drops interpretability's cost from "train an SAE per model" to "read the model's built-in logical structure." If this path works out, interpretability infrastructure changes entirely.
For the "Logic vs. Learning" Debate
An old question: do neural networks "learn logic" or "learn statistical patterns"? NC-FFN gives a precise answer: both, depending on what the task rewards. On reasoning-rewarding tasks, networks use explicit logic; on prediction-only tasks, logic erodes into statistical gating. Logic isn't learned—it's pulled out by the task.
For Self-Forgetting
The self-forgetting quantifier is the paper's most elegant design. Traditional RNN forgetting gates are global (LSTM's forget gate); NC-FFN forgetting is per-unit—each quantifier unit learns how long to remember on its own.
The result: different licensors have different window lengths (comparative vs. passive vs. NPI), and each unit tunes itself to optimum. Not designed—emergent.
Honest Limitations
My Take
What excites me most is the finding that "logic is task-shaped."
We used to think interpretability was a model property—this model is interpretable, that one isn't. NC-FFN shows interpretability is a task-model interaction property—the same architecture crystallizes logic on reasoning tasks and erodes into statistics on prediction tasks.
This means: if you want an interpretable model, changing the architecture isn't enough—you must change the training objective. An NC-FFN trained only on next-token prediction will degrade into a GELU cousin in its deep layers. Only tasks that reward reasoning keep Boolean structure alive.
A directional hint for interpretability research: instead of chasing "natively interpretable architectures," chase "training pipelines that reward interpretability." Architecture provides possibility; the task decides reality.
The second exciting point is the emergence of "self-forgetting quantifiers becoming grammatical-licensing detectors." Nobody told the model "comparatives are followed by than"—the model discovered the concept of "comparative" itself, learned "remember for ~1.5 tokens" itself, and tuned its memory window to exactly cover the licensor-to-licensee distance.
This is a clean case of structural emergence: the architecture provides the primitive (a forgetful sequence operator), the training objective provides pressure (predict the next token), and a grammatical-licensing detector emerges from the combination—no human prior in between.
This is isomorphic to "structure determines function" in biological evolution: DNA provides the amino acid sequence (architecture), the environment provides selection pressure (task), and protein function (licensing detector) emerges. No designer—only a loop of constraint and selection.
---
Paper: Explicit Fuzzy Logic in the Feed-Forward Layer: Self-Forgetting Quantifiers Discover Legible Grammatical-Licensing Detectors Author: Thomas Marshall arXiv: 2606.31845