Skip to content

Repository files navigation

SynoptiQ

Neural Source-Criticism for the Synoptic Problem

Python 3.12+ PyTorch 2.6+ Hugging Face Gradio Demo License: MIT

SynoptiQ is a suite of transformer models, datasets, and analytical tools designed to study the Greek texts of Matthew, Mark, and Luke. It provides state-of-the-art NLP infrastructure for Koine Greek, while delivering a rigorous, computationally-backed negative result on the limits of inferring textual dependence.

The underlying methods — domain-adaptive pretraining (LoRA/DAPT), multitask seq2seq fine-tuning, token-level sequence alignment, span/masked restoration, and preregistered, cluster-bootstrapped evaluation — are corpus-agnostic and transfer to any low-resource or historical-text collection.


🏛️ Releases & Artifacts

SynoptiQ provides foundational tools for computational classics and digital humanities, fully open-sourced on Hugging Face.

Asset Description Links
Koine-T5 A multitask seq2seq LoRA adapter handling POS tagging (96.6% accuracy), lemmatization, text infilling, and synoptic style transfer. 🤗 Model · 🎮 Live Demo
KoineFormer An encoder-only domain adaptation (DAPT) of GreTa, achieving 96.62% POS tagging via linear probing. Lightweight 14MB adapter. 🤗 Model
SynoptiQ Corpus A token-level dataset of the Synoptic Gospels with morphological annotations, Aland pericope boundaries, and Needleman-Wunsch alignments. 🤗 Dataset

🚀 Usage

You can load and run Koine-T5 using standard Hugging Face peft and transformers libraries to perform advanced Ancient Greek NLP tasks out of the box.

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from peft import PeftModel

# 1. Load the base Classical Greek model and the Koine-T5 adapter
tokenizer = AutoTokenizer.from_pretrained("bowphs/GreTa")
tokenizer.pad_token = "<pad>"
tokenizer.eos_token = "</s>"

base = AutoModelForSeq2SeqLM.from_pretrained("bowphs/GreTa")
model = PeftModel.from_pretrained(base, "ainouche-abderahmane/koine-t5")
model.eval()

# 2. Perform POS Tagging on Koine Greek
text = "pos: καὶ φωνὴ ἐγένετο ἐκ τῶν οὐρανῶν"
inputs = tokenizer(text, return_tensors="pt")

with torch.no_grad():
    out = model.generate(**inputs, max_new_tokens=256, num_beams=1)

tags = tokenizer.decode(out[0], skip_special_tokens=True).upper()
print(tags) 
# Output: C- N- V- P- RA N-

🔬 The Science: A Closed Negative Result

The central question of the Synoptic Problem is identifying the direction of literary copying (e.g., did Luke copy Mark, or did Mark copy Luke?).

SynoptiQ was built to test if modern neural models could detect this directionality from textual features alone. After extensive modeling, Phase 3 and Phase 6 of this project were concluded with a firm negative result: the direction of copying cannot be recovered purely from text. It is isomorphic to distinguishing a lossy projection from its inverse.

We believe negative results are critical to scientific progress. The code attempting this has been removed to prevent misuse, and the methodology is documented transparently in DIRECTION_NEGATIVE_RESULT.md.


🔮 Roadmap & Related Work

Our generation experiments established that a 220M-parameter encoder-decoder has a strict ceiling for fluent Koine Greek discourse. A generation-maximised variant (Koine-T5-Hexapla) was investigated and shelved as a negative result — the ceiling is the backbone, not the training diet.

A larger, different-backbone continued-pretraining attempt (Krikri-Koine, bootstrapping a Greek-aware base model such as Llama-Krikri-8B-Base) is documented as a possible future direction, gated behind the write-up of the current results rather than a committed next phase.

Read the preregistered feasibility scan and implementation plan: ANCIENT_GREEK_8B_PLAN.md.


📚 Repository Architecture

  • synoptiq/ — Core Python package containing corpus parsing, dataset alignment algorithms, and evaluation metrics.
  • models/ — Training configurations for KoineFormer and Koine-T5.
  • spaces/ — Source code for the interactive Hugging Face Gradio applications.
  • docs/ — Scientific preregistrations, negative result documentations, and future architectural plans.

📄 License & Citation

The code is released under the MIT License. The trained models and datasets carry CC BY-NC-SA 4.0 and CC-BY-SA 4.0 licenses, inheriting from the open Ancient-Greek resources they were built upon (SBLGNT, MorphGNT, PROIEL).

If you use SynoptiQ in your research, please cite:

@software{synoptiq,
  author = {Ainouche, Abderahmane},
  title  = {SynoptiQ: Neural Source-Criticism for the Synoptic Problem},
  url    = {https://github.com/abderahmane-ai/SynoptiQ},
  year   = {2026}
}

About

Computational source criticism of the Synoptic Gospels. A neural framework that applies transformers, causal modeling, and Bayesian inference to determine how Matthew, Mark, and Luke are literarily related — who copied from whom, and what the lost sources might have looked like.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages