Papatzis Spotter V3: When Coursework Hands You the 'Key' to AI-Forensics

PUBLISHED: 2026-05-025 MIN READ

Current Session Stats

Panic Level: 0%
⏱️
Time Spent
0 hours

What is the Jaccard Similarity Algorithm?

The Jaccard Similarity Index is a mathematical tool used to measure the similarity between two sets of data. In practice, it compares how many elements are shared between two groups relative to the total number of elements they contain.

Imagine you have two bags of colored marbles. Jaccard measures:

  1. How many marbles are exactly the same in both bags (The "Intersection").
  2. How many marbles exist in total across both bags (The "Union").

By dividing the "Intersection" by the "Union," you get a score from 0 to 1. The closer to 1, the more one bag is a "replica" of the other. In Papatzis Spotter, these "marbles" are code patterns. When AI generates code, it uses the same "statistical marbles" repeatedly, creating an unnatural uniformity that the algorithm catches instantly.

⚠️Robotic Uniformity

A human, no matter how hard they try, cannot write 10 different modules with the same statistical signature. AI, however, does this by default.

The Story: The Assignment that became an Obsession

There are moments in your studies when an assignment is just... an assignment. And then there are moments when a confusing prompt, a professor's clarification, and a few sleepless nights (fueled by obsession) give birth to something much bigger.

It all started with Assignment 4 for the PLH10 module at the Hellenic Open University (EAP). The final task required implementing the Jaccard Similarity algorithm. However, there was a "creative" hurdle: the prompt was a bit confusing, with the example provided not perfectly aligning with the implementation instructions. After a meeting with the professor and the necessary clarifications, the theory finally clicked.

But for me, it was no longer just an exercise for a grade. It was the answer to the problem I had been battling with Papatzis Spotter: How do you mathematically prove that code is "robotically uniform"? After countless hours of "deep-work" (while the actual assignment sat on my desktop waiting to be submitted), Papatzis was upgraded to Version 3.5: The Jaccard Infinity.

From "Heuristic" to "Mathematical"

In versions V1 and V2, Papatzis Spotter relied primarily on Heuristics (rules of thumb). It searched for "suspicious" patterns and specific structures that "screamed" AI Slop. It worked well, but it lacked mathematical rigor. V3 changes the game, entering the realm of Forensic Analysis.

The "Triple Threat" & Semantic Echo Mapping

The Jaccard algorithm is now applied across three levels simultaneously, but the real innovation is Semantic Echo Mapping:

  1. Token-Based Jaccard: Comparing the "vocabulary" of the code (keywords, operators, naming conventions).
  2. Structural (AST) Jaccard: Using Tree-Sitter, we analyze the logic tree. Even if you change variable names, the AI's "geometric logic" remains identical.
  3. Semantic Echoes (Cosine Similarity): We use Cosine Similarity to detect "significant similarities" in function logic. If the similarity exceeds 55%, Papatzis "hears" the machine's echo.
  4. Shannon Entropy: We measure the statistical entropy of the code. AI code is often "statistically sterile" (very low entropy), whereas human code has natural "noise" and inconsistencies.

Exponential Weighting & Dashboard 2.0

One of the "gems" of V3.5 is the scoring algorithm. We use Exponential Weighting (Score = Severity ^ 1.4) so that serious AI patterns "hit" much harder than minor artifacts.

The new UI/UX introduces an Industrial aesthetic:

  • Radar Charts: Visual representation of the "attack" (Entropy, Structure, Comments).
  • Batch Audit: Mass "Forensic Sweeps" across entire project folders.
  • Mentor Panel: Live advice on how to make your code more "human-centric."
batch_audit_v3
$

papatzis audit ./ge4_submission [SCANNING] 12 files detected... [JACCARD] Cross-file similarity: 0.89 (CRITICAL) [ENTROPY] Low variation in 'math_utils.c'

RESULT: 84% AI Slop Detected. ADVICE: Too much robotic uniformity between modules.

Forensic Hallucinations: When AI "Sells you Popes"

The most striking discovery in V3 is its ability to detect Fake Metrics. AI, in its attempt to appear "scientific" and convincing, often invents variables like ai_confidence_score or accuracy_metric that have absolutely no function in the code. It's pure "eye-candy" intended to deceive the evaluator.

Papatzis Spotter now "exposes" these tactics:

  • Fake Metric Detection: Identifying hallucinated variables created for show.
  • Severity Badges: Depending on the score, the tool assigns a label. If your score is low but suspicious, congratulations—you've just earned the "Petty Scammer" badge.

Jaccard: The "Weapon" of Cybersecurity

The power of Jaccard extends far beyond AI Detection. In the world of cybersecurity, it is one of the most potent tools for Forensic Analysis:

  • Malware Variant Detection: Identifying new viruses that are merely "variants" of older malware.
  • Threat Intelligence: Linking different attacks through shared "fingerprints" in code patterns.
  • Vulnerability Research: Finding vulnerabilities that "look like" known bugs across massive databases.

Conclusion: The Art of Objectivity

Assignment 4 of PLH10 ended up giving me the most powerful "weapon" in the Papatzis Spotter arsenal. V3.5 is proof that when academic theory meets the persistence of a developer, the result is objective science. My EAP assignment might not be submitted... just yet, but "Papatzis" has already earned its degree in AI Detection.

Don't let AI write for you. Learn to control it.


Join the revolution against Slop on GitHub.