🌟 Inspiration The rise of AI-generated content has made it difficult to distinguish between human-written and machine-generated text. Inspired by plagiarism detection tools and the production-grade MNIST classification pipeline you’ve documented, the idea is to build a robust detector that can analyze linguistic signals, statistical features, and semantic coherence to flag AI-generated text.
⚙️ What It Does Accepts text input (essay, article, or snippet).
Runs preprocessing (tokenization, normalization).
Extracts statistical features (burstiness, perplexity, sentence length variance).
Uses a trained classifier (e.g., CNN/LSTM or transformer fine-tuned) to predict whether the text is human-written or AI-generated.
Returns a confidence score and probability distribution, similar to your MNIST API’s JSON response.
🛠️ How We Built It Data Pipeline: Collected datasets of human-written text (blogs, essays) and AI-generated text (GPT, Copilot outputs).
Preprocessing: Tokenization, stopword removal, normalization of sentence lengths.
Model Architecture: Adapted ideas from your MNIST CNN pipeline:
Embedding layer for words.
Convolutional + recurrent layers to capture local and sequential patterns.
Dropout + BatchNorm for regularization.
Softmax output for binary classification (Human vs AI).
Backend: Flask REST API similar to your MNIST project, with endpoints:
POST /api/detect → returns prediction and confidence.
GET /api/health → confirms model is loaded.
Frontend: Simple SPA with text input box and real-time confidence visualization.
🚧 Challenges We Ran Into Data imbalance: Human-written text is diverse, while AI text is often formulaic. Needed careful augmentation.
Short text detection: Harder to classify tweets or one-liners.
Evolving AI models: Detectors must adapt as generative models improve.
False positives: Polished human text sometimes looks “too perfect” and gets flagged.
🏆 Accomplishments We’re Proud Of Achieved >90% accuracy on validation sets.
Designed a modular pipeline inspired by your MNIST architecture (clear separation of training vs inference).
Built a clean REST API with robust error handling.
Integrated automated PyTest cases for regression testing.
📚 What We Learned Statistical signals like burstiness and perplexity are powerful but not sufficient alone.
Combining deep learning with handcrafted linguistic features improves robustness.
Production-grade deployment requires strict separation of training and inference pipelines, just like your MNIST classifier.
🚀 What’s Next Expand dataset with newer AI models (GPT-4, Claude, Copilot outputs).
Add explainability: highlight which sentences triggered “AI-like” classification.
Deploy at scale with WSGI servers (Gunicorn/Waitress).
Integrate into plagiarism detection workflows for universities and publishers.
Continuous retraining pipeline to keep up with evolving AI text styles.
Built With
- cnn
- css
- fastapi
- flask
- html
- java
- javascript
- keras
- machine-learning
- nosql
- pytest
- python
- pytorch
- spacy
- sql
- tensorflow
Log in or sign up for Devpost to join the conversation.