Troubleshooting High amounts of False Positives when detecting DATE_TIME entities. #1997
Replies: 1 comment 1 reply
-
|
Hi, You’re running into a couple of known limitations with the default setup, especially around the SpaCy-based recognizer. 1) DATE_TIME false positives & masking strategyFirst, regarding the false positives: the SpaCy recognizer is designed to be fast, not highly precise. It’s a general-purpose NER model, and DATE_TIME is one of the noisier entity types, especially when the input loses context (If I understand your comment on masked numeric values). A few practical directions you can take:
2) Confidence scores (~0.85 everywhere)What you’re seeing here is expected behavior. SpaCy does not output real confidence scores for entities. Therefore, in Presidio, the ~0.85 score is essentially a fixed/default value, not a calibrated probability. In this case, thresholding won’t help much as there's no meaningful separation between true/false positives. This is a known limitation and has come up multiple times and only applies to spaCy (other NER models output confidence scores you could threshold) I'm not sure I fully understood your setting with the masked numeric values, so apologies if these suggestions don't fully align to your needs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I’m looking for some guidance, particularly around handling with the
DATE_TIMEentity.We’re currently seeing a high volume of false positives that appear to be coming from the
SpacyRecognizer. In many cases, numeric values in our input data are being incorrectly classified asDATE_TIME, which is creating noise and impacting downstream processing.For context, our current pipeline sends masked numeric values as part of our PII detection workflow. This has led us to question whether this approach is contributing to the issue.
example: {[#]}/{[#]}/{[#]} for a date like 4/22/26
I’m curious what the general consensus or best practice is here:
Confidence Threshold Behavior
Another area we’re struggling with is confidence scoring. We’re observing that both false positives and true positives are consistently returning confidence scores around ~0.85, which makes it difficult to use thresholding as an effective filter.
Has anyone encountered similar behavior where confidence scores don’t provide meaningful separation between correct and incorrect detections? If so:
Did you adjust or recalibrate thresholds successfully using configurations to the model?
Are there recommended approaches for tuning confidence scoring in Presidio?
Additionally, has anyone addressed similar false positives specifically tied to
SpacyRecognizer? If so, did you mitigate this via:On another note about we have a threshold set to 0.85 confidence,
Any insights, trade-offs, or examples would be really helpful. Happy to share sample inputs if that would add clarity.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions