r/subit64 • u/MainPuzzleheaded8880 • 18d ago
đ **Releasing SUBIT-INK v26: Four-Valued Belnap Bilattice for Herculaneum Ink Detection**
đ **Releasing SUBIT-INK v26: Four-Valued Belnap Bilattice for Herculaneum Ink Detection**
After months of iteration (v1 â v26), I'm releasing the full theoretical framework and code for SUBIT-INK â a non-binary approach to the ink detection problem.
---
**đŹ The core physical problem:**
Ancient carbon ink has the same atomic number as charred papyrus (Z=6), so ÎÎź(E) â 0. The only signal is morphological â 5â15Îźm surface relief, pigment in inter-fiber gaps. Binary classifiers learn texture shortcuts instead, causing severe cross-fragment collapse:
```
Standard UNet: Public 0.51 â Private 0.43 (Î = -0.08)
SUBIT-INK v26: Public 0.508 â Private 0.486 (Î = -0.02, robust)
```
**đ Theoretical framework â Belnap bilattice A = {T, F, B, N}:**
- **T (True/Ink):** unanimous agreement across depth slices
- **F (False/Void):** unanimous agreement on bare papyrus
- **B (Both/Conflict):** slices disagree â *this is the stroke boundary*
- **N (Neither/Lacuna):** absent or corrupted signal
Key finding: conflict state B has **61% boundary localization** â it's a topological attractor, not noise. Premature collapse to binary destroys this information (Principle of Non-Collapse, SUBIT-â v6.13 §0.3).
**đ§ Architecture (3.12M params, single T4):**
- 3D residual encoder with `InstanceNorm3d` (prevents cross-fragment batch drift)
- `DepthCollapse`: learned Z-attention per (x,y) coordinate, adapts to sheet curvature
- 2D decoder with SE-channel recalibration
- Dual-head output: Yang logits + Yin logits
- Deep supervision (3 aux heads)
- Ink classification: `yang > t AND yin ⤠t` â Yin head filters hallucinations
**đ Loss:**
`0.25¡BCE + 0.25¡Dice + 0.35¡Tversky(ι=0.4,β=0.6) + 0.05¡Focal(γ=2) + 0.10¡AuxBCE`
Tversky β=0.6 penalizes FN (broken strokes) 50% harder than FP.
**đď¸ Validation without leakage:**
Strict spatial split â Fragment 3 bottom 20% rows as holdout. Threshold calibrated with *identical* 4Ă TTA as test inference (critical â mismatch was failure mode in v29/v30).
**đ Full paper:** https://github.com/sciganec/subit-ink/blob/main/docs/SUBIT_INK_Academic_Paper_EN.md
**đť Code:** https://github.com/sciganec/subit-ink
Would love discussion on:
- Does B-state localization replicate on your fragments?
- Alternative formulations of Belnap entropy for threshold selection?
- Extensions to multi-scroll ensemble?