Skip to main content

A modular, probabilistic, and research-grounded AI content detection library.

Project description

Veridex

Veridex Logo

A modular, probabilistic, and research-grounded AI content detection library.

Python 3.9+ License PyPI version PyPI Downloads Documentation

Veridex is a production-ready library for detecting AI-generated content across multiple modalities: text, image, and audio. Unlike binary classifiers, Veridex provides probabilistic detection with confidence estimates and interpretable signals.


๐Ÿ“‘ Quick Navigation

Section Description
โœจ Features Key capabilities of Veridex
๐Ÿš€ Quick Start Installation and basic usage
๐Ÿ“ฆ Available Detectors Complete detector comparison
๐Ÿ—๏ธ Architecture System design and philosophy
๐Ÿ“š Documentation Guides, tutorials, and API reference
๐Ÿงช Testing Running tests and coverage
๐Ÿค Contributing How to contribute
๐Ÿ”ฌ Research Academic papers and citations
โš ๏ธ Limitations Important usage constraints

โœจ Features

  • ๐ŸŽฏ Multi-Modal Detection: Text, Image, and Audio deepfake detection
  • ๐Ÿ“Š Probabilistic Outputs: Returns probabilities and confidence scores, not just binary labels
  • ๐Ÿ” Interpretable Signals: Exposes individual detection features for transparency
  • ๐Ÿงฉ Modular Architecture: Easy to extend with new detection methods
  • ๐Ÿš€ Production-Ready: Robust error handling, graceful degradation
  • ๐Ÿ“– Research-Grounded: Based on state-of-the-art papers and benchmarks

๐Ÿ’ก Use Cases

  • ๐Ÿ›ก๏ธ Content Moderation: Automatically flag AI-generated spam, fake profiles, and synthetic media.
  • ๐ŸŽ“ Academic Integrity: Verify the authenticity of student essays and research papers.
  • ๐Ÿ“ฐ Journalism & Media: Validate sources and detect deepfake imagery in news gathering.
  • ๐ŸŽจ Copyright Protection: Distinguish between human-created art and generative AI outputs.

๐Ÿš€ Quick Start

Installation

# Install core library
pip install veridex

# Install with specific modality support
pip install veridex[text]      # Text detection
pip install veridex[audio]     # Audio detection
pip install veridex[image]     # Image detection
pip install veridex[video]     # Video detection

# Install everything
pip install veridex[text,image,audio,video]

# Development installation
pip install -e ".[dev]"

Usage Examples

Text Detection

from veridex.text import PerplexitySignal, BinocularsSignal

# Quick detection with perplexity
detector = PerplexitySignal()
result = detector.run("This text seems suspiciously perfect...")

print(f"AI Probability: {result.score:.2f}")
print(f"Confidence: {result.confidence:.2f}")
print(f"Perplexity: {result.metadata['mean_perplexity']:.2f}")

Audio Detection

from veridex.audio import SpectralSignal

# Lightweight frequency analysis
detector = SpectralSignal()
result = detector.run("audio_sample.wav")

print(f"AI Probability: {result.score:.2f}")
print(f"Spectral Features: {result.metadata}")

Image Detection

from veridex.image import FrequencySignal

# Analyze spectral anomalies
detector = FrequencySignal()
result = detector.run("suspicious_image.png")

print(f"AI Probability: {result.score:.2f}")

Video Detection

from veridex.video import VideoEnsemble

# Combine multiple video signals (recommended)
ensemble = VideoEnsemble()
result = ensemble.run("video.mp4")

print(f"AI Probability: {result.score:.2f}")
print(f"Confidence: {result.confidence:.2f}")

# View individual signal contributions
for sig, res in result.metadata['individual_results'].items():
    print(f"{sig}: {res['score']:.2f}")

๐Ÿ‘‰ See more examples in the examples/ directory


๐Ÿ“ฆ Available Detectors

Text Detectors

Detector Method Speed Accuracy GPU Required Use Case
ZlibEntropySignal Compression-based โšก Fast โญ Low โŒ No Quick first-pass screening
PerplexitySignal Statistical (LLM-based) ๐Ÿ”„ Medium โญโญ Medium ๐Ÿ”ถ Optional General-purpose detection
BinocularsSignal Contrastive Perplexity ๐Ÿ”„ Medium โญโญโญ High ๐Ÿ”ถ Optional High-accuracy text analysis
StylometricSignal Linguistic Analysis โšก Fast โญ Low โŒ No Style pattern detection

Audio Detectors

Detector Method Speed Accuracy GPU Required Use Case
SpectralSignal Frequency Domain โšก Fast โญโญ Medium โŒ No Lightweight audio screening
AASISTSignal Spectro-Temporal ๐Ÿ”„ Medium โญโญโญ High โŒ No Anti-spoofing detection
Wav2VecSignal Foundation Model ๐ŸŒ Slow โญโญโญโญ Very High โœ… Recommended Production-grade detection
SilenceSignal Pause Analysis โšก Fast โญ Low โŒ No Synthetic speech patterns

Image Detectors

Detector Method Speed Accuracy GPU Required Use Case
FrequencySignal Spectral Analysis โšก Fast โญโญ Medium โŒ No Quick image screening
DIRESignal Diffusion Reconstruction ๐ŸŒ Slow โญโญโญ High โœ… Yes High-accuracy AI image detection
ELASignal Error Level Analysis โšก Fast โญโญ Medium โŒ No Image manipulation detection

Video Detectors

Detector Method Speed Accuracy GPU Required Use Case
RPPGSignal Biological (Heartbeat) ๐Ÿ”„ Medium โญโญโญ High โŒ No Face-swap deepfakes
I3DSignal Spatiotemporal Motion ๐Ÿ”„ Medium โญโญโญ High ๐Ÿ”ถ Recommended General video deepfakes
LipSyncSignal Audio-Visual Sync ๐Ÿ”„ Medium โญโญโญ High โŒ No Dubbing/voice cloning
VideoEnsemble Combines All Three ๐Ÿ”„ Medium โญโญโญโญ Very High ๐Ÿ”ถ Recommended Production use

๐Ÿ“บ Recommended: Use VideoEnsemble for robust detection. Combines RPPG, I3D, and LipSync with confidence-weighted fusion.

๐Ÿ“– Video Detection Guide - Comprehensive documentation

๐Ÿ’ก See Choosing the Right Detector for guidance


๐Ÿ—๏ธ Architecture

Veridex follows a signal-based architecture:

Input โ†’ Signal Extractors โ†’ Normalization โ†’ Fusion โ†’ Output
                โ†“
    (Independent, Inspectable Signals)

Each detector:

  • Inherits from BaseSignal
  • Returns standardized DetectionResult
  • Operates independently
  • Declares its limitations explicitly

Learn more: Architecture Documentation


๐Ÿ“š Documentation

๐Ÿ“– Guides & Tutorials

๐Ÿ” Concepts

๐Ÿ“˜ API Reference

๐Ÿ”ฌ Technical Documentation


๐Ÿงช Testing

# Create virtual environment
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install with development dependencies
pip install -e ".[dev,text,audio,image]"

# Run all tests
pytest tests/ -v

# Run specific module tests
pytest tests/audio/ -v

# With coverage
pytest tests/ --cov=veridex --cov-report=html

See TESTING.md for detailed testing guide.


๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Development Setup

# Clone repository
git clone https://github.com/ADITYAMAHAKALI/veridex.git
cd veridex

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install in editable mode with all dependencies
pip install -e ".[dev,text,image,audio]"

# Run tests
pytest tests/

# Format code
black veridex/ tests/
flake8 veridex/

๐Ÿ“„ License

Apache License 2.0 - See LICENSE for details.


๐Ÿ”ฌ Research & Citations

Veridex is based on cutting-edge research in AI-generated content detection. Key methods include:

  • Binoculars: Spotting LLMs With Binoculars (arXiv:2401.12070)
  • AASIST: Audio Anti-Spoofing Integrated Spectro-Temporal Graph Attention
  • DIRE: Diffusion Reconstruction Error for deepfake images
  • Wav2Vec 2.0: Self-supervised foundation models for audio

See Research Documentation for full references.


โš ๏ธ Limitations

Veridex is a probabilistic detection tool, not a definitive proof system:

  • โŒ Not suitable as sole evidence for legal/forensic purposes
  • โŒ Cannot detect all AI-generated content with 100% accuracy
  • โŒ Vulnerable to adversarial attacks and post-processing
  • โš ๏ธ Requires regular updates as generative models improve

Always use multiple signals and human judgment for critical decisions.


๐Ÿ—บ๏ธ Roadmap

  • Text detection (Perplexity, Binoculars)
  • Image detection (Frequency, DIRE)
  • Audio detection (Spectral, AASIST, Wav2Vec)
  • Video detection (rPPG, I3D, LipSync)
  • C2PA provenance integration
  • Ensemble fusion models
  • Real-time streaming detection
  • Model calibration on benchmarks

๐Ÿ“ง Contact

For questions, issues, or contributions:


๐ŸŒŸ Star History

If you find Veridex useful, please consider giving it a โญ on GitHub!


Built with โค๏ธ for transparency in the age of generative AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veridex-0.2.0.tar.gz (123.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veridex-0.2.0-py3-none-any.whl (83.4 kB view details)

Uploaded Python 3

File details

Details for the file veridex-0.2.0.tar.gz.

File metadata

  • Download URL: veridex-0.2.0.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for veridex-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f8ad26a97ea7c3fe0bee8bef201f437782f0b1b1553c29fd553428b3e8559e5a
MD5 05bd979f1629476f9eebd3e17c918ad0
BLAKE2b-256 234dcc2b16636efe63290692c91f9e1c96cde487fb38cc6b0b900c18f1b5b421

See more details on using hashes here.

File details

Details for the file veridex-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: veridex-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 83.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for veridex-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1732c0e4ced6ded0fecc3c4350d3cd4b25046ac8120c495439dde39ae19e2ba1
MD5 c2f40c046664baf726e398e86a112d3f
BLAKE2b-256 afe2a89538c19f08c47e7fdc67e1cadaa9960c6a97ab1480af9ec6c9e365c45e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page