vincenzo-afk/TruthNet
vincenzo-afk/TruthNet has 34 GitHub stars and 0 forks. GitHot measured 0 stars in 24 hours and 0 in 7 days. Last checked 2026-11-13 20:09 UTC. Last push 2026-08-21.
できること
- Multi-Model Support: Choose between Logistic Regression, Naive Bayes, SVM, and DistilBERT.
- Explainability: Integrated feature importance and confidence scoring for every prediction.
- RESTful API: Built with FastAPI, providing high-performance endpoints for real-time inference.
- Extensible Pipeline: Modular data loaders and preprocessors for easy integration of new datasets.
計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 履歴を収集中
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
概要
AI-powered fake news detection system with multiple ML models and explainability.
機械学習README.md
オリジナルTruthNet: AI-Powered Fake News Detection
TruthNet is a comprehensive, production-grade machine learning framework designed to identify and classify news articles as Real or Fake. By leveraging both classical statistical methods and state-of-the-art transformer architectures, TruthNet provides high-accuracy predictions accompanied by explainability signals to help users understand the reasoning behind every classification.
Table of Contents
- Overview
- Key Features
- Architecture
- Performance Benchmarks
- Installation
- Configuration
- Training Pipeline
- API Documentation
- Frontend Interface
- Contributing
- License
Overview
In an era of rapid information dissemination, the proliferation of misinformation poses a significant challenge to public discourse. TruthNet addresses this by providing a robust, scalable API and web interface for news verification. It processes raw article text through a sophisticated preprocessing pipeline and classifies it using a suite of trained models, ranging from efficient Logistic Regression to deep-learning DistilBERT transformers.
Disclaimer: TruthNet is intended for research and educational purposes. No automated classifier is a substitute for professional fact-checking. Treat predictions as a signal, not a verdict.
Key Features
- Multi-Model Support: Choose between Logistic Regression, Naive Bayes, SVM, and DistilBERT.
- Explainability: Integrated feature importance and confidence scoring for every prediction.
- RESTful API: Built with FastAPI, providing high-performance endpoints for real-time inference.
- Extensible Pipeline: Modular data loaders and preprocessors for easy integration of new datasets.
- Interactive Frontend: A clean, responsive web interface for instant article analysis.
- Persistence: Built-in SQLite history tracking for auditing and analysis.
Architecture
TruthNet follows a modular architecture separating concerns between data processing, model management, and service delivery:
graph TD
A[Raw Data / API Request] --> B[Preprocessing Engine]
B --> C[Feature Extraction / Tokenization]
C --> D{Model Factory}
D --> E[Classical ML: Logistic/SVM/NB]
D --> F[Deep Learning: DistilBERT]
E --> G[Prediction Service]
F --> G
G --> H[FastAPI Endpoint]
H --> I[Frontend UI / External Clients]
G --> J[(SQLite History DB)]
Performance Benchmarks
The following metrics were achieved using the mrm8488/fake-news dataset (approx. 38,600 articles):
| Model | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| DistilBERT | 100.0%* | 100.0% | 100.0% | 100.0% |
| SVM | 99.34% | 99.35% | 99.20% | 99.27% |
| Logistic Regression | 98.67% | 99.04% | 98.01% | 98.52% |
| Naive Bayes | 95.33% | 94.37% | 95.34% | 94.85% |
*Note: DistilBERT was fine-tuned on a representative subset to optimize training efficiency.
Installation
Prerequisites
- Python 3.10+
- Virtual Environment (recommended)
Setup
# Clone the repository
git clone https://github.com/vincenzo-afk/TruthNet.git
cd TruthNet
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Configuration
TruthNet uses environment variables for configuration. Copy the example file and adjust as needed:
cp .env.example .env
Key Variables
| Variable | Description | Default |
|---|---|---|
MODEL_TYPE |
Default model for training/API | logistic |
API_PORT |
Port for the FastAPI server | 8000 |
DATASET_PATH |
Path to the training CSV/JSON | datasets/dataset.csv |
Training Pipeline
The training pipeline is fully automated and supports various model architectures.
# Train the default model (Logistic Regression)
python training/train.py
# Train a specific model with a custom dataset
python training/train.py --model svm --dataset path/to/data.csv
# Fine-tune the transformer model
python training/train.py --model distilbert
API Documentation
Once the server is running, interactive Swagger documentation is available at /docs.
Primary Endpoints
GET /health: Check system and model status.POST /predict: Submit an article for classification.GET /history: Retrieve recent prediction history.
Sample Request
{
"title": "Breaking News",
"text": "Full article content goes here..."
}
Frontend Interface
TruthNet includes a built-in frontend accessible at the root URL (http://localhost:8000). It provides:
- A simple text area for article input.
- Real-time prediction visualization.
- Confidence meters and explainability highlights.
Contributing
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
License
Distributed under the MIT License. See LICENSE for more information.
Developed by vincenzo-afk
関連プロジェクトを探す
tensorflow/tensorflow
すべての人のためのオープンソース機械学習フレームワーク
201,593 スターhuggingface/transformers
🤗 Transformers:テキスト、ビジョン、音声、マルチモーダルの最先端機械学習モデル向けモデル定義フレームワークで、推論と学習の両方に対応します。
168,950 スターAUTOMATIC1111/stable-diffusion-webui
Stable Diffusion の Web UI
165,305 スターComfy-Org/ComfyUI
グラフとノードによるインターフェースを備えた、最も強力でモジュール性の高い拡散モデル向け GUI、API、バックエンド。世界最速のローカル推論エンジン。
146,687 スター