A classifier has been released to determine whether code comments are human-authored or AI-generated. This classifier operates entirely locally within the browser, ensuring that input text is not transmitted externally.

According to the developer, the classifier has a balanced accuracy of 77%. This represents the rate of correct predictions assuming that human-written and AI-generated comments occur with equal probability. Individual results also display a prediction probability, which has been calibrated to be interpreted as an actual probability.

The user interface includes a feature that visualizes which parts of the text contributed to the determination via a heatmap. Yellow indicates human-like characteristics, while blue indicates AI-like characteristics; clicking these areas allows for the inspection of detailed features. Note that this classifier was trained specifically for detecting code comments, and its accuracy may be lower for other types of AI-generated text.


Source: