Fuzzy Gate Calculator

Fuzzy logic gates operate on real numbers in the [0, 1] interval. Adjust the sliders representing activation states for two sequential tokens (t1, t2) to see calculated results.

0.70
0.40
Fuzzy AND Gate 0.2800
Equation: t1 · t2
Fuzzy OR Gate 0.8200
Equation: t1 + t2 - (t1 · t2)
Fuzzy NOT Gate (Token 1) 0.3000
Equation: 1 - t1
Fuzzy NOT Gate (Token 2) 0.6000
Equation: 1 - t2

Routing Distribution Simulator

Adjust raw logit projections, temperature (τ), and cutoff values to visualize softmax routing weights, sparsification effects, and renormalization fallback.

2.0
1.0
-1.0
1.00
0.15

Computed Routing Weights

AND Bank
0.0%
OR Bank
0.0%
NOT Bank
0.0%

Empirical Evaluation

Epoch-by-epoch ProofWriter validation accuracy with the rulebase in the input, mean ± standard deviation over 3 seeds (epoch 0 is before training). Backbone is Llama-3.1-8B, with data budget and optimizers held constant. Full results are in the paper (Table 1).

Epoch Baseline No-Gate Control Routed (inter, G=8)
0 0.306 ± 0.033 0.365 ± 0.084 0.319 ± 0.076
1 0.831 ± 0.055 0.897 ± 0.025 0.887 ± 0.041
2 0.893 ± 0.041 0.929 ± 0.007 0.916 ± 0.022
3 0.925 ± 0.005 0.939 ± 0.004 (best) 0.927 ± 0.012

Diagnostic Observations

Fusion Head, Not Routing

The No-Gate Control (same fusion head, no logic operators) beats the linear-head Baseline by 1.4 percentage points in every seed. No routed variant beats the No-Gate Control (see the paper's Table 1).

Fusion α

A learned α starting at 0.01 shrinks to 0.0077 ± 0.0014, so training turns the logic branch down rather than up.

Computing Parity

Peak GPU memory is closely matched (71.7 GB for Routed vs 70.0 GB for Baseline), so the logic pathway adds little memory on top of the 8B backbone.

Citation

If you build upon this work, please cite the course writeup:

@misc{cleasbymayeda2026logicexpert,
  author = {Cleasby-Mayeda, Steven},
  title  = {Parallel Logic Expert with Operator Routing},
  year   = {2026},
  note   = {Course project, Oregon State University AI 535}
}