TabFix
Schema-aware detection and correction for multilingual tabular data. TabFix combines deterministic column checks with a shared mmBERT encoder to identify errors and generate cell replacements. It uses table context and the original value to repair cells while preserving valid data.
Try TabFix in your browser — interactive CSV editing and local WebGPU inference.
Supports English, French, Dutch, German, Polish, Greek, and Japanese.
How it works
- Detect: schema rules check supported formats, allowed values, required fields, and structured relationships. Neural detection handles residual spelling and encoding errors.
- Correct: a masked-language-model head generates a replacement using the original cell, its column schema, and neighboring table rows.
- Accept or abstain: supported schema checks and conditional pseudo-perplexity filter candidates before the CSV runner applies changes.
The original value remains visible during generation:
<cell column="Date"><original>2026/09/20</original><replacement>[MASK]…</replacement></cell>
Replacement length is variable: an END_EDIT token terminates the generated value. Valid-copy examples teach the corrector to leave correct values unchanged.
Model specification
| Property | Value |
|---|---|
| Backbone | jhu-clsp/mmBERT-base |
| Parameters | 307.8 million |
| Neural detection categories | text.encoding, text.spelling |
| Detection heads | Per-category BIO classification and insertion detection |
| Correction head | Shared encoder with an MLM vocabulary head |
| Decoding | Iterative masked-token completion of a whole-cell replacement |
| Confidence filter | Conditional pseudo-perplexity; threshold 1.0092596407844958 |
The pipeline retains 18 business error categories for rules, reporting, and category controls. These are distinct from the two neural detection categories. Deterministic correction directly handles supported unambiguous whitespace, case, and boolean normalization; detecting a rule violation does not always determine its repair.
End-to-end evaluation
Evaluated on 76 held-out test tables, covering seven languages and all 18 business error categories. The complete CSV pipeline processes every cell; reference answers and error locations are withheld from inference. Acceptance thresholds were fixed using validation before this evaluation.
| Measure | Result |
|---|---|
| Faulty cells repaired exactly | 48 / 67 (71.6%) |
| Correct changes among applied changes | 48 / 49 (98.0%) |
| Valid cells changed incorrectly | 0 / 8,600 |
| Faulty cells left unchanged | 18 / 67 |
| Faulty cells changed to an incorrect value | 1 / 67 |
| Explicit hard-negative tables preserved | 18 / 18 |
Of the 49 applied changes, seven were deterministic and 42 were generated by the model. These results measure the combined pipeline, rather than the neural model alone.
This is a small, deliberately balanced diagnostic panel, not a prevalence-weighted benchmark or an evaluation of the entire test split. Category and language subgroups are small. The zero observed changes to valid cells is a sample result, not a guarantee.
See the evaluation summary for category breakdowns and the case selection for reproducibility.
Using the model
Download the repository, install the pinned runtime dependencies, and run the included CSV interface:
hf download Antix5/tabfix-preview --local-dir tabfix
uv venv --python 3.12
uv pip install torch==2.13.0 transformers==5.16.1 huggingface-hub==1.31.0 \
pyarrow==25.0.1 safetensors==0.8.0 tokenizers==0.23.2
uv run --no-project tabfix/test_csv.py input.csv \
--checkpoint tabfix --schema schema.xml --output output
The runner produces a corrected CSV, an audit of proposed and applied changes, and an HTML review. Supply the table's column rules in the XML schema; see evaluated examples for input CSVs and matching schemas. No clean reference is required for inference.
The checkpoint has custom detection heads. Load it through the bundled train_tabfix.py rather than directly through AutoModelForMaskedLM. Its load_checkpoint(path, device) function returns the model, tokenizer, and manifest and verifies checkpoint checksums.
Training
The model was jointly fine-tuned from mmBERT-base on 27,948 training records from tabular-errors-v1, a predominantly synthetic corpus. The dataset revision is 602b8a454ca448713d8a5658650d4feaad8d579c.
The objective combines detection loss with correction loss weighted by ln(2) / ln(256000) ≈ 0.055661. Valid-copy tasks comprise 30% of correction sampling. Training uses learning-rate warmup, cosine decay, periodic held-out validation, and early stopping. Checkpoint selection uses a fixed 28-record validation panel; the published weights are from update 3,600. The test split is excluded from checkpoint selection.
Detailed losses and validation measurements are available in metrics.json. Targeted correction validation and end-to-end CSV evaluation measure different tasks.
Limitations
- Relational inconsistencies may identify an affected group without identifying which value is wrong. Missing contents and swapped values can remain unresolved.
- Only implemented schema rules are enforced. Unsupported numeric formats or relation types can escape detection.
- A confident replacement can still be semantically wrong: one such replacement occurred in the end-to-end evaluation. Pseudo-perplexity is an acceptance score, not a calibrated probability of correctness.
- With business categories disabled, the CSV runner conservatively abstains from neural whole-cell correction; deterministic category controls remain available.
- Results on this mostly synthetic corpus do not establish performance on every real-world table or domain.
License
TabFix fine-tuning contributions are licensed under CC BY-NC 4.0. Commercial use requires the project owner's permission. The underlying mmBERT model retains its MIT terms and attribution; see BASE_MODEL_CARD.md. Dataset provenance and source-specific terms are documented in the dataset card.
- Downloads last month
- 128
Model tree for Antix5/tabfix-preview
Base model
jhu-clsp/mmBERT-base