Skip to content

Repository files navigation

SynthScan

SynthScan — we scan for synthetic content. Text. Images. Code. Anything AI-made.

status license CI

SynthScan is an open-source, self-hostable AI-content authenticity scanner. It detects whether a piece of content was written by a human or generated by AI (text today; image and code detection are on the roadmap). It is built to be open, free, private, and fair — the code is auditable, your text never has to leave your machine, and a score is a signal to investigate, never a verdict to punish.

Read the full philosophy in POSITIONING_MANIFESTO.md.


Why SynthScan?

  • Open source & auditable. The entire detection pipeline is public.
  • Self-hostable. Run it on your laptop, a school's server, or a $5/mo VPS. Your text stays in your hands — ideal for FERPA/GDPR-sensitive environments.
  • Zero-shot by default. Production detection uses Binoculars (no per-model retraining), with a lightweight statistical backend for dev/offline use.
  • Fair by design. Outputs are probabilities with per-segment highlighting, not accusations.

Install

Core (runs everywhere, no heavy ML dependencies):

pip install -e .

Production detection (adds PyTorch + the real Binoculars detector):

pip install -e ".[ml]"

Heads-up for the [ml] extra: the real AI-text-detection Binoculars (ICML 2024, ahans30/Binoculars) is not on PyPI — the PyPI binoculars is an unrelated statistics package. Our [ml] extra installs the correct one from GitHub. It also pins transformers (4.35.x) and pulls two Falcon-7B models (~14 GB download). You need ≥32 GB RAM or a GPU to run it. Use a dedicated virtual environment. Validate with:

python scripts/benchmark_binoculars.py

API server:

pip install -e ".[api]"

Quick Start (CLI)

Scan text directly:

synthscan scan "It is crucial to emphasize the importance of the landscape." --backend heuristic

Scan from a file:

synthscan scan --file essay.txt

Machine-readable output:

synthscan scan "Some text here." --json

List available detection backends:

synthscan list-backends

Quick Start (API server)

synthscan serve --host 0.0.0.0 --port 8000

Then:

curl -X POST http://localhost:8000/scan/text \
  -H "Content-Type: application/json" \
  -d '{"text": "It is crucial to emphasize the importance of the landscape."}'

Health check:

curl http://localhost:8000/health

Browser extension

A Manifest V3 extension is included in extension/ — scan any selection on a webpage via the context menu, or paste text into the popup. It talks to your self-hosted SynthScan server (default port 8001). See extension/README.md for install instructions.

Backends

Backend Deps Notes
heuristic none Lightweight statistical baseline for dev/tests/demos. Not production-accurate.
roberta synthscan[ml] Default production path. Small open-source classifier (~500 MB) - runs on CPU, few GB RAM.
binoculars synthscan[ml] Highest accuracy (ICML 2024 zero-shot) - needs Falcon-7B models, >=32GB RAM or a GPU.

Try the CPU-friendly production backend:

python scripts/benchmark_roberta.py
synthscan scan "Your text here" --backend roberta

Register your own backend by implementing the Detector protocol and calling register_backend(...) — perfect for community models, image detection, etc.


Roadmap

  • Core text detection pipeline (backend registry, segmentation, CLI, API)
  • Lightweight CPU-friendly RoBERTa backend (default production path)
  • Real Binoculars benchmark on GPU hardware
  • Browser extension (Manifest V3 - context menu + popup)
  • Image detection
  • Code detection
  • Live-web plagiarism index (opt-in)

License

Apache-2.0. Attribution and open sharing encouraged — that's the point.

Releases

Packages

Contributors

Languages