PolarisGet Your Polaris
Menu

POLARIS FIELD GUIDE / 3 MIN READ

F1, precision and recall in PII redaction

Precision measures how many detected items are correct. Recall measures how many reference items were found. F1 combines precision and recall into one score. For PII redaction, these metrics answer different questions from the share of clean documents wrongly changed. Read the score definition, matching rule and denominator together. Polaris-Mist provides F1 results for four suites and a separate sample-based clean-data test.

Use the right denominator for the question

Consider a worked example with 100 sensitive spans. A detector correctly identifies 90 and also marks 10 harmless spans. Precision is 90 divided by 100 detections; recall is 90 divided by 100 reference spans. Both equal 90%, so F1 also equals 90%. This worked example makes the units visible.

Now change the number of harmless spans marked while keeping the 90 correct detections. Precision changes while recall stays the same. That is why the two underlying counts matter when diagnosing a system.

Understand what F1 combines

The standard F1 formula is 2TP divided by 2TP + FP + FN, where TP, FP and FN are true positives, false positives and false negatives. The scikit-learn documentation defines this score and its averaging options. F1 measures the balance of correct detections, false positives and missed reference spans.

For a concrete review, request the underlying counts and entity-class results. The same F1 can accompany different error patterns, so the next engineering action comes from the error register.

Keep span matching consistent

A score needs a rule for what counts as a match. Exact-span scoring asks whether a predicted start and end match the reference annotation. A token-level measure answers a different question. Record the chosen unit and policy before comparing two configurations.

Also record how classes are combined. Inspect rare business identifiers separately alongside the common entity classes in the combined result. Inspect each class that matters to the workflow, with its sample count and representative errors.

Read the Mist values on either scale

Polaris-Mist achieves F1 values of 0.925 on Nemotron-PII, 0.907 on Gretel English, 0.900 on PIIMB Multilingual and 0.993 on blind enterprise documents. On a 100-point display, those are 92.5, 90.7, 90.0 and 99.3. The CSV preserves the original decimal representation.

The blind set covers 64 unseen enterprise documents. In that comparison, the next-highest F1 is 0.716, giving Mist a 0.277 difference, or 27.7 F1 points. The result expresses the detection-score advantage in F1 points.

Put the metric next to the release decision

Build a review sheet with reference counts, detection results, clean-control results and restoration checks. Use the sheet to choose what to improve: missed sensitive spans, over-redaction, boundary errors or broken output references. Keep the release criteria specific to those failure modes.

If a workflow depends heavily on preserving product terminology, add a dedicated clean set and a downstream question set. If it handles many broken scans, inspect OCR errors separately. The report becomes useful when each metric points to a concrete behavior the team can verify again.

  • Document the scoring unit and match rule.
  • Keep precision, recall and clean-sample false alarms distinct.
  • Compare the same dataset and configuration across releases.

QUESTIONS & ANSWERS

Details that matter.

Is 99.3 F1 the same as 99.3% recall?

F1 combines precision and recall into a single score. Recall alone measures how much of the reference-sensitive content was detected.

What does a 27.7-point F1 lead mean?

On the blind OOD suite, Mist scores 99.3 and the next-highest comparison scores 71.6 on a 100-point scale. Their difference is 27.7.

Why publish false alarms separately?

The clean-data test measures unnecessary changes to clean samples. Its sample-based denominator is different from the span counts used in detection metrics.

Sources & further reading

Related Polaris work