What happened, and why this tool exists

In December 2025, a woman went into a hypoglycemic coma because her automated insulin pump dosed too much insulin. When the CGM data was examined, the reason was clear: her sensor had produced clusters of zig-zagging, incoherent, physiologically impossible glucose readings that didn't represent her actual glucose levels. Her pump algorithm didn't know the difference. It just dosed.

This is not a rare or isolated problem. CGM sensors produce these kinds of anomalous reading clusters regularly, across devices and manufacturers. Automated insulin delivery systems — which make dosing decisions continuously and autonomously — have no reliable way to know when the data they're acting on has gone bad.

After encountering this problem, I spent several months building a detection algorithm from first principles. The algorithm identifies statistically anomalous clusters of readings — sequences that are physiologically implausible given what glucose can actually do in the human body. In testing across a wide variety of real-world datasets, strong correlations emerged between these clusters and subsequent hypoglycemic events, including nocturnal hypoglycemia.

When I went looking for prior work on this, I found something unexpected: a Dexcom patent, filed in 2013, describing exactly this phenomenon — and exactly how to address it. Alert the user. Notify connected devices. Prevent automated insulin delivery from acting on unreliable data. There is no public evidence this patent has ever been deployed at meaningful detection thresholds.

Active litigation against Dexcom references 57 deaths. The FDA's approval framework for CGM devices has no requirement to measure or report sensor integrity at all.

The algorithm is free. The methodology is documented. The full analysis — the data, the patent, and what it means for device manufacturers, pump companies, and the FDA — is covered in detail in the article linked below.

Read the full article →

About this tool

PurpleSensor is a public web interface for the same detection algorithm described above. Upload a CGM export file and the engine analyzes it for sensor integrity anomalies, then generates a report showing where clusters occurred, how severe they were, and whether hypoglycemic events followed.

Every file submitted is processed and deleted immediately. No glucose readings are stored. Anonymized aggregate statistics — cluster rates, device type, approximate geography — are retained to build an independent, publicly sourced dataset on CGM sensor performance across devices over time. That dataset doesn't exist anywhere else.

The source code that runs this tool is available on GitHub under an MIT license.

Your file never leaves the processing step. No glucose values, no identifying information, and no filenames are stored anywhere. See the privacy policy for the complete list of what is and isn't retained.

Sample reports

Sample daily CGM sensor integrity report showing cluster detection and post-cluster hypoglycemia

Daily report — March 3, 2023. Twelve clusters detected across the day, with five subsequent hypoglycemic events, two of them nocturnal.

Sample CGM sensor integrity dashboard showing 30-day cluster history across three sensors

Dashboard — March 2023. Three sensors across 30 days. 109 total clusters, 28 linked post-cluster hypoglycemic events.

Try it with your own data →