T-REX (Table - Refute or Entail eXplainer) is an interactive tool designed for intuitive, transparent, and live fact-checking of tabular data. Leveraging state-of-the-art instruction-tuned reasoning Large Language Models (LLMs), T-REX dynamically analyzes claims against tables, clearly indicating entailment or refutation, along with visual explanations highlighting relevant tble cells.
- Live Fact-Checking: Paste or upload CSV tables or images (OCR), or select from the TabFact dataset.
- Multiple LLMs: Support for multiple models including GPT-OSS (20B), Phiβ4 (14B), Qwen3 (8B), Cogito (8B), DeepSeekβR1 (7B), and Gemma3 (4B).
- Visual Explainability: Highlights cells identified by the model as relevant for the verification.
- Precomputed Results Exploration: Explore results from various LLMs on the TabFact benchmark dataset with performance metrics and intuitive visualizations.
- Multilingual Support: English, French, German, Spanish, Portuguese, Chinese, Arabic, Russian
T-REX got accepted at ECML-PKDD 2025.
Experience the live demo here: https://t-rex.r2.enst.fr/
- Input custom CSV-formatted tables directly or via file/image upload (with OCR support).
- Enter custom claims or select pre-existing claims from the TabFact dataset.
- Real-time inference with streaming outputs from supported LLMs.
- Analyze comprehensive benchmark results from various models (e.g., DeepSeekβR1, Gemma3, Llama, etc.) on the TabFact dataset.
- Detailed visual analytics, including confusion matrices and performance summaries.
- Frontend: HTML, CSS, JavaScript, Plotly.js, Chart.js, Choices.js
- Backend: Python, FastAPI, Uvicorn
- Inference Engine: Ollama
- LLMs: GPT-OSS (20B), Phiβ4 (14B), Qwen3β8B (8B), Cogito v1 Preview (8B), DeepSeekβR1βDistillβQwenβ7B (7B), and Gemma 3 (4B)
- OCR: Tesseract, Granite3.2-vision (Ollama)
T-REX uses the TabFact dataset by Wenhuchen et al. For more details, please refer to the original paper:
TabFact: A Large-scale Dataset for Table-based Fact Verification
Wenhuchen et al., ICLR 2020.
https://github.com/wenhuchen/Table-Fact-Checking
- Python: 3.10+ recommended.
- uv: Fast Python package manager and runner.
- Install with pipx or Homebrew:
pipx install uv # or brew install uv
- Install with pipx or Homebrew:
- Ollama: Install from https://ollama.com/.
- Pull the required models (depending on which ones you would like to use):
ollama pull gpt-oss:20b ollama pull phi4 ollama pull qwen3:8b ollama pull deepseek-r1:latest ollama pull gemma3 ollama pull cogito ollama pull granite3.2-vision # For Ollama OCR - Ensure the Ollama service is running.
- Pull the required models (depending on which ones you would like to use):
- Tesseract OCR (Optional): if you plan to use Tesseract for OCR.
- Install the Tesseract binary:
- macOS:
brew install tesseract - Ubuntu/Debian:
sudo apt-get install tesseract-ocr
- macOS:
- Ensure itβs discoverable:
which tesseractandtesseract --version
- Install the Tesseract binary:
-
Clone the repository:
git clone https://github.com/TimLukaHorstmann/T-REX.git cd T-REX -
Sync dependencies (first time only):
uv sync
-
Run Everything (Single Command, Dev):
- Ensure the Ollama service (with required models) is running (see Prerequisites).
- From the project root, run:
./dev.sh
- Then open:
http://localhost:8000
Notes:
- The FastAPI app also serves the frontend from
frontend/, so/loads the UI and/api/*serves backend endpoints. Dataset assets are served under/static/data/*. - Live reload is enabled; changes under
backend/apiauto-reload the server.
-
Alternative (Separate Servers): If you prefer running frontend and backend separately:
- Backend:
uvicorn main:app --reload --host 0.0.0.0 --port 8000 --app-dir backend/api
- Frontend (new terminal):
cd frontend && python3 -m http.server 8080
This requires a dev proxy to avoid CORS and path issues because the frontend fetches relative
/api/*paths. The recommended approach is the single-command dev server above. - Backend:
- Recommended: Ollama Granite 3.2 Vision (pull
granite3.2-vision). In the UI, select OCR engine βOllamaβ + modelgranite3.2-vision. - Optional: Tesseract OCR (system binary required on PATH)
- Install the Tesseract binary:
- macOS:
brew install tesseract - Ubuntu/Debian:
sudo apt-get install tesseract-ocr
- macOS:
- Ensure itβs discoverable:
which tesseractandtesseract --version - Advanced: If tesseract is not on PATH, set environment variable
TESSERACT_CMDto the full path (e.g.,/opt/homebrew/bin/tesseract). - Python pieces (
pytesseract,pillow) are already listed inpyproject.tomland installed viauv sync.
- Install the Tesseract binary:
Note on Deployment:
The steps above describe a basic local development setup. For deploying T-REX to a server (like the live demo at t-rex.r2.enst.fr), you would typically:
- Run the FastAPI backend using a production-grade ASGI server like
uvicornwithgunicornworkers. - Set up a reverse proxy (e.g., Nginx or Caddy) to handle HTTPS, serve static frontend files efficiently, and forward API requests to the backend application.
- Manage the backend process using a process manager (e.g.,
systemd,supervisor) to ensure it runs reliably. - Ensure the Ollama service is appropriately configured and accessible by the backend on the server.
These production deployment steps are environment-specific and beyond the scope of this basic setup guide.
If you use T-REX in academic work, please cite our ECML-PKDD 2025 demo paper:
@inproceedings{Horstmann2025TREX,
author = {Tim Luka Horstmann and Baptiste Geisenberger and Mehwish Alam},
title = {T-REX: Table -- Refute or Entail eXplainer},
booktitle = {Machine Learning and Knowledge Discovery in Databases. Applied Data Science Track and Demo Track, European Conference, ECML PKDD 2025, Porto, Portugal, September 15--19, 2025, Proceedings},
series = {Lecture Notes in Computer Science},
volume = {16022},
pages = {590--596},
publisher = {Springer, Cham},
year = {2025},
doi = {10.1007/978-3-032-06129-4_33},
url = {http://dx.doi.org/10.1007/978-3-032-06129-4_33}
}This software is released under a Custom Non-Commercial License.
It is free to use for research, academic, or personal purposes.
π Commercial use is prohibited without explicit written permission from the authors.
To inquire about commercial licensing, please contact:
tim.horstmann@ip-paris.fr
See the LICENSE file for full terms.
Institut Polytechnique de Paris
- Tim Luka Horstmann
- Baptiste Geisenberger
- Mehwish Alam
Β© 2025 T-REX: Table - Refute or Entail eXplainer
Here's a comparison of T-REX with some other comparable table fact-checking and question-answering tools:
| Tool (link) | Year | Live Demo / UI | Real-time* | Table Upload | OCR / Image | Evidence Vizβ | LLM Backend | Code Open? |
|---|---|---|---|---|---|---|---|---|
| T-REX (ours) Demo |
2025 | β Live | β streaming | β CSV / text / image (OCR) | β Tesseract & Granite 3.2 | β cell highlighting & reasoning stream | Phi-4, DeepSeek-R1, Cogito v1, Gemma3 | β |
| OpenTFV Paper |
2022 | β immediate synchronous | β CSV, JSON, PDF | β | β NL interp. & entity linking | TAPAS & LPA | β | |
| Aletheia Paper |
2024 | β fixed datasets only | β | β interactive tables & visualizations | Proprietary LLMs GPT-3.5/4 | β | ||
| HF Space (J. Simon) Demo |
2023 | β immediate | β CSV upload | β | β | TAPAS | β | |
| RePanda Paper |
2025 | β CLI only | β offline | β via Pandas API | β | β executable query scripts | Llama-7B | β |
| TabVer Paper |
2024 | β CLI only | β offline | β code-based ingestion | β | β natural-logic proofs | LLM-generated expressions | β |
| TART Paper |
2023 | β CLI only | β offline | β | β | β | Plugin-based reasoning | β |
* Real-time = immediate verdict; βstreamβ means token-level reasoning.
β Evidence Viz = visual or structured justification beyond a plain label.
Performance comparison of different models on the TabFact dataset as reported by Chen, 2025 and Meta AI or evaluated as part of this work.
| Model | Test Accuracy (%) | Validation Accuracy (%) | Year |
|---|---|---|---|
| ARTEMIS-DA Hussain et al., 2024 | 93.1 (on test-small) | - | 2024 |
| Dater Ye et al., 2023 | 93.0 (on test-small), 85.6 (on test-all) | - | 2023 |
| Human Performance: β 92% Chen et al., 2020 | |||
| PASTA Gu et al., 2022 | 89.3 | 89.2 | 2022 |
| Phi4 (Zero Shot) (Ours) | 88.9 (on test-all) | - | 2024 |
| UL-20B Tay et al., 2023 | 87.1 | 2022 | |
| Chain-of-Table Wang et al., 2024 | 86.6 | - | 2024 |
| Binder Cheng et al., 2023 | 86.0 | - | 2022 |
| Tab-PoT Xiao et al., 2024 | 85.8 | - | 2024 |
| Phi4 (RAG Approach) (Ours) | 85.7 | - | 2024 |
| ReasTAP-Large Zhao et al., 2022 | 84.9 | 84.6 | 2022 |
| TAPEX-Large Liu et al., 2022 | 84.2 | 84.6 | 2021 |
| T5-3b (UnifiedSKG) Xie et al., 2022 | 83.7 | 84.0 | 2022 |
| DecompTAPAS Yang et al., 2021 | 82.7 | 82.7 | 2021 |
| Salience-aware TAPAS Wang et al., 2021 | 82.1 | 82.7 | 2021 |
| Phi4 (Code Generation) (Ours) | 81.9 | - | 2024 |
| TAPAS-Large classifier with Counterfactual + Synthetic pre-training Eisenschlos et al., 2020 | 81.0 | 81.0 | 2020 |
| ProgVGAT Yang et al., 2021 | 74.4 | 74.9 | 2020 |
| SAT Zhang et al., 2020 | 73.2 | 73.3 | 2020 |
| HeterTFV Shi et al., 2020 | 72.3 | 72.5 | 2020 |
| LFC (Seq2Action) Zhong et al., 2020 | 71.7 | 71.8 | 2020 |
| LFC (LPA) Zhong et al., 2020 | 71.6 | 71.7 | 2020 |
| Num-Net Ran et al., 2019 | 72.1 | 72.1 | 2019 |
| LPA-Ranking w/ Discriminator (Caption) Chen et al., 2020 | 65.3 | 65.1 | 2020 |
| Table-BERT-Horizontal-T+F-Template Chen et al., 2020 | 65.1 | 66.1 | 2020 |
| BERT classifier w/o Table Chen et al., 2020 | 50.5 | 50.9 | 2020 |

