Khaos Column Type Detection

A character-level CNN that predicts the semantic type of a table column from a sample of its cells. It returns a type distribution over 91 schema.org-based types and a column embedding.

tab_column_types v1, from Khaos (a local-first library of pre-trained models for domain-specific tasks). This is the first release of the artifact.

Model

  • Architecture: ColumnTypeCNN: byte embedding, parallel 3/5/7-wide convolutions per cell, mean and max pooling over cells, MLP head
  • Parameters: 238,331
  • Format: ONNX (model.onnx) plus PyTorch weights (model.pt) and manifest.json
  • Training data: fletxcher/khaos-tab_column_types

Results

Measured on the held-out test split of the training dataset.

Metric Value
test_accuracy 0.7278
test_top3_accuracy 0.8612
test_macro_f1 0.7221
baseline_char_ngram_logreg_accuracy 0.7011
baseline_char_ngram_logreg_macro_f1 0.6921
n_types 91
n_test_columns 12979

Training

{
  "epochs": 30,
  "batch": 128,
  "lr": 0.002,
  "architecture": "ColumnTypeCNN"
}

Best epoch 20, trained in 2.2 minutes on a single consumer GPU (RTX 3050 8 GB).

Intended use

Typing the columns of messy tables so values can be parsed, validated and joined. Feed up to 24 sampled cells per column (khaos.tabular.text.encode_column).

Limitations

  • Types are the SOTAB label set (schema.org), trained on web tables, not enterprise data.
  • Uses cell values only, not headers.
  • Overlapping types such as Date and DateTime are confused.

Usage

pip install khaos
khaos serve ./tab_column_types

License

Trained on data released under CC BY 4.0 or generated by Khaos; released under CC BY 4.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support