Repository navigation
Give each detector result an AI likelihood percentage - #11
Merged
Merged
Conversation
A never-decreasing curve fitted to the reference scores turns a detector score into the chance a passage is AI-written at even odds, from 1% to 99%. Labels now follow that number, the whole text gets a length-weighted average, and the page and MCP results lead with it. A private human reference, when present, counts as much as the public one in the curve.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Labels and odds were still hard to read at a glance; a single number was asked for.
Change
calibration.probability_curve: an isotonic fit of "is AI" against score with human and AI text weighted equally, so the output is the chance a passage is AI-written at even prior odds. A private human reference, when present, shares the human weight equally with the public one.ai_likelihood_percent(1 to 99). Labels follow it: under 30% Human-like, 30 to 60% Slightly AI-like, 60 to 85% AI-like, 85% and up Strongly AI-like. The whole text gets the average weighted by passage length.Is the number honest?
Fitted on the calibration half and checked on the test half (classifier, 300 words): passages given 85% or more were AI-written 99% of the time, 60 to 85% were 72%, 30 to 60% were 39%, under 30% were 3%. With the private reference included, 4% of the writer's pre-ChatGPT passages score 85% or more.
Validation
Lint clean, 52 tests pass (curve monotonicity and class balance, likelihood bounds, labels, length weighting). Rendered one- and three-passage results in headless Chrome; README screenshot updated.
Risks