Differentiable Fuzzy Inference Layer: A Monotone, Compositional Ordinal Reasoning Head for Large Language Models
Organizations: School of Computation, Information and Technology Technical University of Munich, Germany
Abstract
A state-of-the-art language model asked to interpret "most of most students passed" typically answers "most," though composing two instances of "most" yields a proportion closer to "some." We trace this failure to an architectural choice rather than a data deficit: standard classifier heads treat ordinal categories as independent labels, with no mechanism to respect their natural ordering or compose them algebraically. We introduce the Differentiable Fuzzy Inference Layer (DFIL), a dual-path prediction head pairing a standard classifier with a scalar-bottlenecked branch grounded in a bank of ordered membership functions. DFIL supplies two structural primitives that a label-only head cannot inherit: monotonicity in the underlying quantity, and compositional reasoning via t-norm operations without any compositional training data. The scalar branch additionally provides an interpretable interface for analyzing residual errors. We instantiate DFIL on ordinal natural-language tasks across diverse LLM families.
Figures & tables
| Method | exposed | Ordered | Mono. by const. | Composes | LLM head | Interpretable |
|---|---|---|---|---|---|---|
| LoRA fine-tune (label head) | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ |
| CORAL [ 7 ] | ✗ | ✗ | ✓ † | ✗ | partial ‡ | ✗ |
| LaSQuE [ 10 ] | ✗ | ✗ | ✗ | ✗ | ✓ | partial |
| PRESQUE [ 19 ] | ✓ § | fixed | ✓ § | ✗ | no ¶ | ✓ |
| ANFIS [ 15 ] | ✓ | ✓ | ✓ | ✓ ∗ | ✗ | ✓ |
| DFIL (ours) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Claim | Effect | Statistic / setting |
|---|---|---|
| Compositional from-text (Tab. 3 ) | pp | paired , , seeds |
| Uniform-init compositional (§ 5.3 ) | pp | alignment-controlled, seeds |
| Single-step parity, 6 backbones (App. D.7.1 ) | to pp | Welch , FRoG-Hard |
| Sample efficiency, (App. D.1 ) | to pp | MF branch dominates at low budget |
| CSMC consistency, (App. D.8 ) | pp | paired , Wilcoxon |
| Method | From-text | Oracle † |
|---|---|---|
| Self-consistent GT (leakage-free, seeds for FT+Compose / DFIL) | ||
| Fine-tune (text-only) | — | |
| FT+Compose | ||
| DFIL (ours) | ||
| vs. Fine-tune | — | |
| vs. FT+Compose | ||
| Init | Method | From-text | Text-only |
|---|---|---|---|
| Uniform | DFIL | ||
| FT+Compose | |||
| QuRe | DFIL | ||
| FT+Compose |
| Backbone | DFIL (%) | Fine-tune (%) | MF mono. ‡ | |
| Qwen2.5-7B | ||||
| Qwen2.5-14B | +0.4 | |||
| Qwen2.5-32B ¶ | +1.7 | |||
| Qwen2.5-72B † | ||||
| Cross-model generalization: | ||||
| Mistral-7B-v0.3 | — | |||
| Method | 1.5B (%) | 7B (%) | Mono. | Extra Params |
|---|---|---|---|---|
| Fine-tune only (LoRA + Linear) | No | 2.6M | ||
| DFIL-only (MF path only) | 1 viol. | 2.6M | ||
| Unordered MF (no ordering) | Unstable | 2.6M | ||
| No MF (1D linear classifier) | No | 2.6M | ||
| DFIL (dual-path, ours) | 1 viol. | 3.0M |
| Domain | DFIL | FT | Domain | DFIL | FT | ||
|---|---|---|---|---|---|---|---|
| Public health | Clinical trials | ||||||
| Education | Manufacturing | ||||||
| Environment | Research | ||||||
| Governance | Finance | ||||||
| Election | Sports | ||||||
| Overall ( ): DFIL MF vs FT main , pp | |||||||
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Method | Uniform Init from-text | QuRe Init from-text |
|---|---|---|
| DFIL | ||
| FT+Compose | ||
| (DFIL FT+Compose) |
| Method | MF-based | Classifier-based |
|---|---|---|
| DFIL | ||
| Fine-tune | — |
| Method | DFIL-from-text | Text-only |
|---|---|---|
| DFIL | ||
| Fine-tune | — | |
| (DFIL-from-text Fine-tune text-only) | +28.4 | |
| Backbone | DFIL (main cls) | DFIL (MF branch) | Fine-tune |
|---|---|---|---|
| Mistral-7B-v0.3 | |||
| Qwen2.5-7B |
| Budget | |||
|---|---|---|---|
| Fine-tune | |||
| DFIL (best path) | |||
| (DFIL FT) |
| Stratum | DFIL from-text | Text-only | ||
|---|---|---|---|---|
| Headline (mean over /sources, 3 seeds) | ||||
| DFIL ( dfil_reg ) | 249 | |||
| FT+Compose | 249 | |||
| Per outer quantifier (FT+Compose, mean over seeds) | ||||
| most | 80 | |||
| some | 80 | |||
| Property | Product | Minimum | Łukasiewicz |
|---|---|---|---|
| Smoothness | |||
| Idempotent | No | Yes | No |
| Nilpotent | No | No | Yes |
| “most of most” | “most” | “most” | “most” |
| Error contraction | Multiplicative | No contraction | Additive |
| Parameters | 0 | 0 | 0 |
| Quantifier | Train | Val | Test (Hard) | Proportion range |
|---|---|---|---|---|
| none | 25 | 6 | 31 | |
| tiny amount | 85 | 21 | 106 | |
| few | 414 | 104 | 518 | |
| small amount | 322 | 80 | 402 | |
| some | 162 | 40 | 202 | |
| moderate amount | 389 | 97 | 486 |
| 0.1 | 0.5 (default) | 1.0 | 2.0 | 5.0 | |
|---|---|---|---|---|---|
| Accuracy (%) | 50.4 | 51.2 | 49.9 | 51.2 | 50.4 |
| Budget | 16 | 32 | 64 | 128 | 256 |
|---|---|---|---|---|---|
| Fine-tune | |||||
| DFIL (main) | |||||
| DFIL (MF) | |||||
| DFIL (ens., val- ) | |||||
| (best DFIL FT) |
| Budget | 32 | 64 | 128 | 256 | 512 |
|---|---|---|---|---|---|
| Fine-tune | |||||
| DFIL (main) | |||||
| DFIL (MF) | |||||
| DFIL (ens., val- ) | |||||
| (ensemble FT) |
| Backbone | Task | DFIL main | DFIL MF | DFIL ens α=0.5 | Fine-tune | Mono |
|---|---|---|---|---|---|---|
| Qwen2.5-7B-Instruct | SST-5 | |||||
| Mistral-7B-Instruct-v0.3 | SST-5 | |||||
| Phi-3.5-mini-3.8B | SST-5 | |||||
| Llama-3.1-8B-Instruct | SST-5 | |||||
| Qwen2.5-7B-Instruct | STS22 | |||||
| Mistral-7B-Instruct-v0.3 | STS22 |
| Scale | Method | none | tiny | few | small | some | mod. | most | all |
|---|---|---|---|---|---|---|---|---|---|
| (31) | (106) | (518) | (402) | (202) | (486) | (199) | (100) | ||
| 7B | DFIL | 43.0 | 30.5 | 66.2 | 45.7 | 30.9 | 60.4 | 24.0 | 44.7 |
| FT | 36.6 | 31.1 | 72.8 | 45.1 | 36.1 | 60.2 | 25.6 | 28.3 | |
| 14B | DFIL | 48.4 | 58.5 | 72.7 | 56.9 | 33.8 | 62.9 | 38.0 | 39.7 |
| FT | 43.0 | 50.3 | 78.9 | 52.1 | 32.2 | 65.3 | 28.6 | 39.3 | |
| 32B | DFIL | 47.3 | 56.6 | 80.1 | 56.7 | 42.9 | 65.2 | 41.5 | 56.3 |
| Scale | none | tiny | few | small | some | mod. | most | all | |
|---|---|---|---|---|---|---|---|---|---|
| CORAL | 7B | ||||||||
| CORAL | 14B | ||||||||
| none | tiny | few | small | some | mod. | most | all | |
| QuRe initialization: | ||||||||
| .020 | .080 | .180 | .280 | .400 | .580 | .780 | .970 | |
| Learned centers (7B): | ||||||||
| seed 42 | .020 | .024 | .089 | .243 | .353 | .478 | .832 | .980 |
| seed 123 | .020 | .024 | .104 | .239 | .352 | .490 | .774 | .980 |
| seed 456 | .020 | .024 | .082 | .232 | .347 | .470 | .736 | .980 |
| Method / Path | Scale | Pairwise viol. (%) | Mean magnitude | Total pairs |
|---|---|---|---|---|
| DFIL (MF branch) | 7B | — | 1,000 | |
| DFIL (main classifier) | 7B | 10.8 | 1.69 | 1,959,395 |
| Fine-tune (classifier) | 7B | 10.6 | 1.69 | 1,959,395 |
| CORAL (classifier) | 7B | 8.2 | 2.03 | 1,959,395 |
| CORAL (classifier) | 14B | 6.6 | 2.13 | 1,959,395 |
| CORN [ 28 ] (classifier) | 7B | 9.0 | 1.62 | 1,959,395 |
| Overall | Level 1 / Level 2 | |||||||
| Seed | FT-text | Compose-text | DFIL-text | DFIL-oracle | FT-text | Compose-text | DFIL-text | DFIL-oracle |
| 42 | 9.2 | 32.0 | 31.9 | 54.3 | 7.0/13.7 | 25.0/46.0 | 30.8/34.0 | 65.7/31.7 |
| 123 | 23.9 | 25.9 | 31.6 | 36.0 | 34.0/3.7 | 19.0/39.7 | 30.5/33.7 | 37.0/34.0 |
| 456 | 16.1 | 25.6 | 31.1 | 61.2 | 9.5/29.3 | 22.0/32.7 | 28.7/36.0 | 69.3/45.0 |
| Mean | 16.4 | 27.8 | 31.5 | 50.5 | 16.8/15.6 | 22.0/39.5 | 30.0/34.6 | 57.3/36.9 |
| Std | 7.3 | 3.6 | 0.4 | 13.0 | 14.9/12.9 | 3.0/6.7 | 1.1/1.2 | 17.7/7.1 |
| Variant | Accuracy (%) | Trainable params | Description |
|---|---|---|---|
| DFIL (full) | 2,974,489 | Full dual-path model | |
| Fine-tune only | 2,577,672 | Standard classifier, no DFIL | |
| DFIL-only | 2,575,889 | MF branch with on dfil variant | |
| No MF branch | 2,575,889 | MF branch removed entirely ( no_dfil ) | |
| No ordering | 2,575,889 | MF without cumulative softmax |
| Scale | (%) | DFIL (%) | FT (%) | Variance ratio |
|---|---|---|---|---|
| 7B | 1.8 | 1.8 | 1.03 | |
| 14B | +0.4 | 1.7 | 2.8 | 0.61 |
| 32B † | +1.7 | 5.6 | 6.1 | 0.92 |
| 72B | 1.5 | 1.6 | 0.94 |
| Category | DFIL (text) | DFIL (oracle) | Fine-tune |
|---|---|---|---|
| Linguistic ( ) | |||
| Approximate ( ) | |||
| Comparative ( ) | |||
| Emphatic ( ) | |||
| Overall (exact) | |||
| Overall (off-by-one) |
| Configuration | FRoG Acc. | CSMC Consistency | Pairwise Viol. |
|---|---|---|---|
| DFIL baseline | |||
| + Distillation | |||
| Configuration | FRoG Acc. | CSMC Cons. |
|---|---|---|
| DFIL baseline | ||
| + Attention pool † | ||
| † The very large pp FRoG gain is a red flag, not a clean win: | ||
| the attention head appears to memorize easy-split lexical patterns of the FRoG training distribution. | ||
Compositional Reasoning
Compositional reasoning studies how models combine facts, concepts, rules, and skills to solve tasks that require multiple structured steps.
See all 39 papers