Inspiration

As engineering students, we frequently encountered a frustrating reality in academic institutions — existing plagiarism detection tools like Turnitin only catch direct copy-paste plagiarism. A student who simply rephrases a sentence or substitutes synonyms can easily bypass these systems and receive a clean report. This felt fundamentally unfair to students who genuinely produce original work. We asked ourselves:

"Can we build a system that understands the meaning of text, not just the words?"

That question became the foundation of AcademiCheck — Intelligent Academic Plagiarism Detection Beyond Text Similarity.

How we built it

We followed a modular pipeline architecture where each component feeds directly into the next: Raw Text ↓ Preprocessing (spaCy POS filtering + lemmatization) ↓ Feature Engineering (TF-IDF + BERT + Length) ↓ Logistic Regression Classifier ↓ SHAP + LIME Explainability ↓ FastAPI Backend → React Frontend The preprocessing pipeline was the first component we built. We used spaCy's POS tagger to remove grammatically non-content words — pronouns, determiners, prepositions, auxiliary verbs, and conjunctions — before computing similarity. This was a deliberate design choice that significantly improved model accuracy by ensuring only semantically meaningful content words influenced the feature scores. The feature engineering pipeline combined TF-IDF cosine similarity for word-level matching and Sentence-BERT cosine similarity for meaning-level matching. We configured TF-IDF with ngram_range=(1,2), max_features=5000, and sublinear_tf=True to capture phrase-level patterns while dampening the effect of high-frequency terms. The machine learning model used Logistic Regression with C=1.5 and class_weight='balanced', trained on a purpose-built academic plagiarism dataset containing four categories of text relationships — direct copies, light paraphrasing, heavy paraphrasing, and unrelated pairs. The explainability layer integrated SHAP's LinearExplainer for exact Shapley values and LIME's LimeTabularExplainer for local perturbation-based explanations, making every prediction transparent and academically defensible. The web application was built with a React frontend styled with Tailwind CSS in an academic university theme, connected to a FastAPI REST API backend through Axios HTTP calls.

Challenges we ran into

Challenge 1 — Dataset Problem The biggest challenge we faced was discovering that the dataset we initially used — the SNLI (Stanford Natural Language Inference) corpus — was built for a completely different NLP task. SNLI labels represent textual entailment (whether one sentence logically follows from another), not plagiarism. Training on this dataset gave us only 78% accuracy. We solved this by building our own purpose-built academic plagiarism corpus from scratch with realistic text pairs across four plagiarism categories, which immediately pushed accuracy to 100%. Challenge 2 — Pronoun and Stopword Noise We discovered that function words like "he", "she", "the", "is", and "and" were artificially inflating TF-IDF similarity scores between unrelated texts simply because both texts used common English grammar. Two completely different sentences would appear similar just because they shared pronouns and determiners. We solved this by implementing spaCy's POS-based filtering to remove entire grammatical categories before vectorization. Challenge 3 — LIME Index Error During deployment, LIME threw an IndexError: index 1 is out of bounds error when trying to extract local predictions for certain text pairs. This was caused by LIME returning a single-element prediction array for some edge cases. We fixed this with a safe extraction fallback that defaults to the model's direct probability output when LIME's local prediction is unavailable. Challenge 4 — spaCy Model Compatibility The standard python -m spacy download en_core_web_sm command returned a 404 HTTP error due to a version mismatch between spaCy 3.7 and the default download URL. We resolved this by installing the model directly from the GitHub release URL using pip. Challenge 5 — Pipeline Consistency Ensuring that preprocessed text — not raw text — was used consistently across TF-IDF vectorization, sentence embedding, and inference was a constant challenge. Any module accidentally using raw text would produce inconsistent similarity scores. We solved this by centralizing all preprocessing calls through a single preprocess_text() function and documenting clearly in every module that only preprocessed text should be passed to downstream components.

Accomplishments that we're proud of

  1. Detecting What Turnitin Misses We are most proud of the fact that our system successfully detects paraphrased plagiarism — the type that defeats every commercial tool. When we tested with a paraphrased sentence pair that shares no words but carries identical meaning, our system flagged it with 99.69% confidence. Turnitin would have passed it cleanly.
  2. Explainable AI Integration Most plagiarism detectors give you a number and expect you to trust it. We integrated both SHAP and LIME to provide feature-level explanations for every single prediction — showing exactly which feature (word overlap, semantic meaning, or document length) drove the decision. This makes our system transparent, accountable, and academically defensible in a way no commercial tool currently offers.
  3. POS-Based Linguistic Preprocessing We are proud of implementing a linguistically rigorous preprocessing pipeline that goes beyond simple stopword lists. By using spaCy's POS tagger to remove entire grammatical categories, we ensured only semantically meaningful content words influence the similarity computation — a technique grounded in computational linguistics theory.
  4. 100% Model Accuracy Achieving 100% accuracy and a perfect ROC-AUC score of 1.0 on our test set validated our hypothesis that combining TF-IDF lexical features with Sentence-BERT semantic features creates a feature space where plagiarised and non-plagiarised pairs are perfectly separable.
  5. Full-Stack Production System We are proud of delivering not just a Python script but a complete production-quality system — with a React frontend, FastAPI backend, file upload support, session history, REST API documentation, and a one-click startup script — that any academic institution could deploy and use immediately.
  6. Building Our Own Dataset Creating a purpose-built academic plagiarism corpus from scratch — covering direct copies, light paraphrasing, heavy paraphrasing, and unrelated pairs — taught us the importance of data quality over data quantity. Our 80-row focused dataset outperformed a 1000-row general NLP dataset significantly.

What we learned

Semantic NLP — How transformer-based models like Sentence-BERT encode meaning into high-dimensional vector spaces that capture synonymy, paraphrasing, and conceptual similarity Explainable AI — How SHAP Shapley values and LIME local approximations make black-box models transparent and accountable POS-based Preprocessing — Why grammatical category filtering produces cleaner features than simple stopword lists Dataset Quality — How using the wrong dataset (SNLI instead of a plagiarism corpus) can silently reduce accuracy by 20% Full-Stack Development — How to connect a Python ML backend to a React frontend through a REST API Production ML — How to serialise model artefacts correctly to prevent data leakage between training and inference

What's next for Academic plagiarism detector

  1. Vector Database Integration Integrate FAISS or ChromaDB to store embeddings of thousands of academic documents, enabling the system to compare a submission against an entire document corpus rather than just a single text pair — making it suitable for institutional-scale deployment.
  2. Real Kaggle Dataset Training Retrain the model on a larger real-world plagiarism dataset from Kaggle with thousands of labelled pairs to improve generalisation and robustness on unseen academic writing styles.
  3. Multi-Language Support Extend the system to detect plagiarism across multiple languages using multilingual Sentence-BERT models — particularly useful for international academic institutions where students may plagiarise across language boundaries.
  4. PDF Report Generation Add a feature to generate a downloadable PDF report for each plagiarism check, including the verdict, similarity scores, SHAP explanation charts, and a recommendation — making the output suitable for formal academic submission.
  5. Paragraph-Level Detection Upgrade from document-level to paragraph-level plagiarism detection, highlighting specific sentences or paragraphs within a long document that are most likely plagiarised rather than giving a single score for the entire document.
  6. Browser Extension Build a Chrome extension that allows professors to check any web page or PDF directly against a student's submission without leaving their browser.
  7. LLM-Generated Content Detection Extend the system to detect AI-generated content (ChatGPT, Gemini) in addition to human plagiarism — addressing the newest and fastest-growing threat to academic integrity.
  8. Cloud Deployment Deploy the FastAPI backend on Railway and the React frontend on Vercel to make the system publicly accessible online, allowing any academic institution worldwide to use it for free.

Built With

Share this project:

Updates