SUBIT-Ink: Topological Signal Recovery & Ink Detection in Herculaneum Papyri
%2520%257C%2520Public%25200.5245%2520(v41)-brightgreen.svg)
SUBIT-Ink is an advanced 3D deep learning framework for non-invasive ink detection in carbonized Herculaneum papyri from X-ray micro-computed tomography (micro-CT), developed for the Vesuvius Challenge.
Grounded in SUBIT-∞ formal theory (§0.3 Principle of Non-collapse & §9 Tree∞ space), SUBIT-Ink solves the critical domain-shift and cross-fragment generalization failure of conventional binary segmentors through 3D depth-attention fusion, Squeeze-and-Excitation spatial decoding, multi-resolution deep supervision, and test-time-calibrated decision boundaries.
🏆 Key Achievements
- Kaggle Leaderboard Best: Reached 0.524456 Public Score (Version 41 / v30.0-v27Repro, All-Time Public Record) and 0.546201 Private Score (Version 33 / v27.0-OmegaAttained), consistently delivering >0.51–0.54 Private Scores across production runs.
- Public-to-Private Resilience: Unlike conventional baselines that drop over $0.07$ on the private test set due to boundary overfitting, SUBIT-Ink maintains balanced generalization across unseen scroll fragments.
- Compact & Fast: Custom 3.12M parameter architecture that runs 22 epochs of training, 4x TTA holdout validation, and full 4x TTA high-density test inference in $\approx 405$ minutes on a standard 16GB Tesla T4 GPU (comfortably below Kaggle’s 540-minute limit).
📊 Competition Benchmark Progression
| Release / Kaggle Run |
Code Architecture |
Public Score |
Private Score |
Calibrated Threshold |
Key Breakthrough |
| v20 Baseline |
Standard Binary 3D U-Net |
0.5094 |
0.4367 |
0.550 |
Severe public $\to$ private overfit (-0.072 drop) |
| v26 |
v22.5-SpeedChampion |
0.4643 |
0.4799 |
0.585 |
Spatial 80/20 CV split + Hann window blending |
| v27 |
v23.0-InfinityChampion |
0.5083 |
0.4864 |
0.580 |
Recall-Boost Tversky + 4x TTA Holdout Calibration |
| v29 |
v24.1-Grandmaster |
0.4973 |
0.4787 |
0.505 |
DEPTH=20 experiment (proved slower convergence) |
| v30 |
v25.0-RecallMaster |
0.4813 |
0.4797 |
0.655 |
Diagnosed 75/25 split & early epoch pollution |
| v31 |
v24.0-DiverseEnsemble |
0.4272 |
0.4717 |
0.580 |
Epoch gap bug forced under-converged models (Ep11, 14) |
| v32 |
v26.0-GrandmasterLateConverge |
0.4745 |
0.4876 |
0.480 (clamped) |
Restored late-epoch ensemble ($\ge 16$) + F0.5 weighting |
| v33 |
v27.0-OmegaAttained |
0.5008 |
0.546201 (PRIVATE RECORD) |
0.620 |
Unclamped [0.35, 0.65], stride=112, 4800 patches, natural attractor |
| v34 |
v28.0-WarpInfinity |
0.512781 |
0.544153 |
0.590 |
WarpedDepthCollapse (RS curvature prior) + Belnap boundary gradient loss |
| v41 🌟 |
v30.0-v27Repro |
0.524456 (ALL-TIME PUBLIC RECORD) |
0.512067 |
0.630 |
Restored TEST_STRIDE=64, top-3 mature late-ensemble (Ep18, 20, 21), early-stop OFF, holdout F0.5=0.7064 |
🧠 Neural Architecture: SUBITInkV26
3D Surface Volume [B, 1, 16, 256, 256]
│
├──► Conv3DBlock (1 -> 32) ──► DepthCollapse (Z=16 -> 1) ──► FusionBlock (32 -> 48) ──► Skip 1
├──► Downsample (1, 2, 2)
├──► Conv3DBlock (64 -> 64) ──► DepthCollapse (Z=16 -> 1) ──► FusionBlock (64 -> 80) ──► Skip 2
├──► Downsample (1, 2, 2)
├──► Conv3DBlock (96 -> 96) ──► DepthCollapse (Z=16 -> 1) ──► FusionBlock (96 -> 112) ──► Skip 3
├──► Downsample (1, 2, 2)
└──► Conv3DBlock (128 -> 128)──► DepthCollapse (Z=16 -> 1) ──► FusionBlock (128 -> 144) (Bottleneck)
│
┌────────────────────────────────────────────────────────────────────┘
▼
DecoderBlock 3 (144 + 112 -> 112) ──► Deep Supervision Aux 3 (1x1 Conv)
▼
DecoderBlock 2 (112 + 80 -> 80) ──► Deep Supervision Aux 2 (1x1 Conv)
▼
DecoderBlock 1 (80 + 48 -> 48)
▼
Refinement Head (48 -> 48 -> 32) ──► Deep Supervision Aux 1 (1x1 Conv)
▼
Final Head (32 -> 1) ──► Logits [B, 1, 256, 256]
Core Components:
- Conv3DBlock: Dual 3D convolutions with
InstanceNorm3d, GELU activations, and identity skip connections.
- DepthCollapse: Learnable self-attention mechanism over the active $Z$-depth anchor planes ($\text{softmax}$ projection along depth dimension), reducing 3D features to rich 2D manifold representations.
- FusionBlock & DecoderBlock: Multi-scale feature aggregators equipped with Squeeze-and-Excitation (
SEBlock) channel recalibration.
- Deep Supervision: Auxiliary prediction heads at all three decoder resolutions to accelerate gradient flow and guide multi-scale letter stroke segmentation.
🎯 Loss Function Engine (Recall-Boosted)
Because historical carbon-based ink does not contain heavy metals and produces very faint CT attenuation contrast, traditional binary cross-entropy misses faint strokes. We employ an asymmetric 4-part loss:
$$\mathcal{L}{\text{total}} = 0.25 \mathcal{L}{\text{BCE}} + 0.25 \mathcal{L}{\text{Dice}} + 0.35 \mathcal{L}{\text{Tversky}}(\alpha=0.4, \beta=0.6) + 0.05 \mathcal{L}{\text{Focal}}(\gamma=2.0) + 0.10 \mathcal{L}{\text{aux}}$$
- Setting $\beta = 0.6$ penalizes False Negatives (missed letter fragments) 50% more heavily than False Positives ($\alpha = 0.4$).
- Deep supervision on layers 1, 2, and 3 stabilizes intermediate feature representations.
🔬 Theoretical Foundation: SUBIT-∞ & Belnap Bilattice
SUBIT-Ink is informed by the formal specification SUBIT-∞ v6.13 (October 2026):
- Principle of Non-collapse (§0.3): The state of a pixel is distinguished from its trajectory and boundary attractor. Letter boundaries exhibit domain ambiguity and are treated as non-reducible states rather than noise.
- Four-Valued Belnap Space: Signals are modeled over the four-valued bilattice $\mathbb{A} = {T, F, B, N}$:
- $T$ (True / Ink): Consistent positive signal across depth anchors.
- $B$ (Both / Boundary): Domain disagreement and boundary instability.
- $F$ (False / Void): Clear papyrus matrix or background.
- $N$ (Neither / Lacuna): Absence of scan information or degraded layer.
📁 Repository Structure
subit-ink/
├── ink_detection_kaggle_v31.py # Flagship candidate pipeline (v31.0-OmegaFusion: WarpedDepth + Belnap + Harmonic Centroid)
├── ink_detection_kaggle_v30.py # Flagship Kaggle pipeline (v30.0, All-Time Public Record 0.524456)
├── ink_detection_kaggle_v29.py # OmegaCentroid prototype (v29.0)
├── ink_detection_kaggle_v28.py # Previous public record iteration (v28.0-WarpInfinity, Public 0.512781)
├── ink_detection_kaggle_v27.py # All-time private record iteration (v27.0-OmegaAttained, Private 0.546201)
├── ink_detection_kaggle_v26.py # Previous stable iteration (v26.0)
├── requirements.txt # Core package dependencies
├── RELEASE.md # Official GitHub release notes (v28.0-WarpInfinity)
├── CHANGELOG.md # Chronological history of all iterations
├── REPRODUCIBILITY.md # Exact replication and submission instructions
├── LICENSE # MIT License
├── .gitignore # Git exclusions
│
├── notebooks/ # Curated milestone notebooks
│ ├── SUBIT_Ink_v23.0.ipynb # Kaggle Record v27 (Private 0.4864)
│ ├── subit_ink_v22.1.ipynb # Architectural baseline
│ └── subit_ink_colab.ipynb # Google Colab adaptation
│
├── surface_detection/ # Attractor surface reconstruction (Dice 0.997)
│ ├── ARCHITECTURE.md # Surface neural PDE & curvature specs
│ ├── dataset.py # Surface 3D volume sampler
│ ├── model.py # AttractorDecoder & Scale-space model
│ ├── train.py # Surface training loop
│ └── inference.py # 3D surface mesh extractor
│
├── belnap_combiner/ # Four-valued Belnap logic combiner (v2)
│ ├── subit_belnap_v2.py # Belnap multi-domain evidence combiner
│ ├── subit_belnap_v2.ipynb # Clean analysis notebook
│ ├── subit_belnap_v2.png # Conflict & entropy visual map
│ └── results_v2.json # Verification metrics
│
├── docs/ # Submission proposals & visual atlas
│ ├── Herculaneum-Subit-Atlas-Real.html # Interactive visual segmentation atlas
│ ├── subit_vesuvius_proposal.md # Vesuvius Challenge Progress Prize proposal
│ ├── SUBMISSION_v1.md # Milestone v1 submission writeup
│ └── SUBMISSION_v2.md # Milestone v2 submission writeup
│
└── legacy/ # Historical research prototypes
└── v1_single_model/ # v1 single-model dual-head prototype
⚡ Quickstart
Option 1: Kaggle Notebook (Recommended)
- Open a new notebook on Kaggle.
- Attach
vesuvius-challenge-ink-detection under Data.
- Set Accelerator to GPU T4 and turn Internet Off.
- Copy & paste
ink_detection_kaggle_v26.py.
- Click Run All. The generated
submission.csv will be produced upon completion.
Option 2: Local Station
git clone https://github.com/sciganec/subit-ink.git
cd subit-ink
pip install -r requirements.txt
# Run full training and test inference
python ink_detection_kaggle_v26.py
For full details, see REPRODUCIBILITY.md.
📜 Citation
@software{subit_ink_2026,
author = {Slavick Ciganec},
title = {SUBIT-Ink: Topological Signal Recovery & Ink Detection in Herculaneum Papyri},
year = {2026},
url = {https://github.com/sciganec/subit-ink},
version = {26.0.0}
}
⚖️ License
Distributed under the MIT License. See LICENSE for more information.
Compliant with Vesuvius Challenge open-source requirements.
评论