AI AOI Software · 2026-09-23

A Threshold Is a Curve, Not a Number: What Semantic False-Call Filtering Escapes

Two classes that overlap on one dimension cannot be separated by tuning

Back to Insights
A Threshold Is a Curve, Not a Number: What Semantic False-Call Filtering Escapes
AI AOI Software · DaoAI AI vision

The usual approach to false calls is to tune the threshold. Tune it and escapes rise; tune it back and false calls return — many lines have been oscillating between the two for years. This is not insufficient care in tuning. On a single dimension, the distributions of normal variation and real defects genuinely overlap, and inside the overlap no threshold separates them. That is a property of a curve, not of a number.

2Axes of judgement
1Threshold as one point
5Classes of normal variation

ACI in this article stands for Automated Cognitive Inspection — the next-generation term for AI AOI: keep the A and the I, and replace the O (optical) with C (cognitive), because the decision basis is cognition rather than the imaging method. The full argument is set out in From AI AOI to ACI.

1. What a false call actually is

Define the word first. A false call is not “the machine got it wrong” but “the model judged it anomalous and review judged it normal”. That definition hands the verdict to review rather than to a threshold — which matters later.

The real cost on a line is not the alarm but the review: every false call occupies a person for tens of seconds to minutes. Past a certain rate, review becomes the bottleneck and much of the value of automated inspection is cancelled out.

2. What normal variation is

Group the alarms that review overturns and most fall into a few classes: bright spots from reflection and specular highlights; colour and texture differences between incoming batches; in-tolerance positional shift and rotation; permitted light scratches and soiling; and legitimate appearance variants of the component itself, such as different silkscreen fonts from different manufacturers of the same part number.

What they share is that on the dimension of pixel difference they land in the same range as real defects. A reflective highlight and a genuinely missing component can differ from the reference image by the same order of magnitude.

3. Why tuning the threshold cannot escape

If two classes overlap in their distribution along one dimension, any single threshold cuts into both: raise it and real defects inside the overlap are passed (escapes rise); lower it and normal variation inside the overlap is flagged (false calls rise). That is a curve; a threshold is only a point on it.

The common remedy is per-zone thresholds — one number per board region or component type. That does push the curve outward somewhat, because it quietly introduces a second variable (position or type). But as long as the criterion still looks only at pixel difference, the gain is bounded while maintenance cost grows linearly with the number of zones.

A threshold only moves along the curve. To get a better curve you have to change the criterion.

4. A second axis of judgement

Semantic filtering adds that second axis: besides “how much does it differ”, it asks “what is this”. A highlight and a missing component may be identical in pixel difference but are entirely different semantically — one is an interaction between illumination and surface, the other is a component that should be there and is not.

With a second axis, two clouds of points that overlapped in one dimension may separate in two. Once separated, lowering false calls no longer necessarily raises escapes, because what distinguishes them is no longer the same parameter. That is the fundamental difference from threshold tuning — not a matter of accuracy.

5. Where the semantics come from

Semantics are not bolted on; they come from the preceding modelling choice. When the model learns “what this component normally looks like” rather than “how this image differs from a reference”, its description of a departure naturally carries category information: shifted position, something added on the surface, or the body missing.

So semantic filtering is not a filter hung behind a rule layer; the criterion differs from the outset. A filter placed downstream sees only the single signal “over threshold” and has no semantics to work with.

6. Review data is the fuel on this route

Because the definition of a false call gives review the verdict, review conclusions are the most valuable annotation available. A running line produces them every day; most of the time they are simply not collected.

  • Aggregated by component type, review conclusions show which parts' normal appearance is under-described — that is where modelling should be extended.
  • Aggregated by variation type (reflection, colour, shift), they show which class of normal variation is not yet recognised.
  • Returning the parts whose overturns cluster back into the good set pushes the boundary outward, and does so according to the real distribution.

7. Do not tune and verify on the same data

The easiest mistake here is to verify the false-call reduction using the same review data that fed the modelling. When correction and verification share one basis, discriminating power is zero — the reading will look good, and good means nothing.

Workable alternatives split by time — model on review conclusions up to a given week and verify on the ones after — or by line: model on line A, verify on line B. Either way the verification data never took part in training.

8. When a rule layer is enough

The cases where this does not apply deserve the same clarity:

  • Normal variation is small: with a very stable process, single-source material and fully controlled illumination, the two distributions barely overlap and one threshold suffices.
  • The defect criterion is itself a geometric quantity: “reject if height difference exceeds 0.1 mm” is a specification, not an appearance judgement, and a rule layer answers it more reliably.
  • False-call volume is already low enough not to be a burden: when review is not the bottleneck, the return on false-call work is limited and priority belongs elsewhere.

If any of the three holds, staying with the rule layer is right. Semantic filtering addresses the specific difficulty of a large overlap region; it is not a general solution to every inspection problem.

10. One concrete overlap: highlight versus missing component

Take an example that can be followed through. A metal shield sits above a surface-mount component, and at certain lighting angles its edge casts a bright band across the component area. Measured against the reference image, that band's pixel difference falls in the same range as “component entirely missing” — because a missing component exposes a bare pad, which is also highly reflective.

On magnitude alone the two cannot be separated: raise the threshold enough to pass the band and missing components pass with it; lower it enough to catch missing components and the band is flagged every shift. The usual compromise is a looser threshold for that region — at the cost of that region becoming insensitive to missing components, which is precisely the defect least worth passing.

With a second axis the problem becomes two independent judgements: is the component that should be here present (an appearance judgement), and is this brightness produced by the interaction of illumination and surface (a cause judgement). Neither depends on the same threshold, so both can be right at once.

11. Collecting review data as part of the flow

Review conclusions were called fuel above, but the default review flow does not produce usable data — the operator clicks pass or reject and the reason stays in their head. Turning it into fuel requires little:

  • A pass must carry a reason code rather than being a bare click. Use a small process-approved set — reflection, colour difference, in-tolerance shift, permitted scratch, legitimate appearance variant, other — no more than ten.
  • Everything coded “other” goes into a separate queue that process engineering reviews weekly. How fast that queue grows is a direct reading of how poorly the existing codes cover reality.
  • Store the reason code together with the component type. Only with both dimensions can the question “which variation on which component is not yet recognised” be answered.

The cost is one extra click per review; the return is a line that produces annotated real data every day. Without this step, false-call work depends on periodically combing through records by hand, and the samples that yields are neither complete nor evenly distributed.

9. How this relates to the previous two articles

The three are facets of one route: the modelling choice decides whether the model learns what right looks like or what wrong looks like; the decision layer decides whether the criterion hangs on the component or on pixels; and semantic filtering is what becomes possible once both are in place, and what a rule layer cannot do. Without the first two there is nothing to filter semantically — which is why it cannot be bolted on as a standalone module.

The other two facets of this route are set out in From AI AOI to ACI.

On the modelling side, see Defects are an open set, good parts are a closed one.

FAQ

Can semantic false-call filtering be added as a standalone module behind an existing system?

No. A downstream filter receives only the single signal “over threshold” and has no semantics to use. Semantics come from the modelling choice — only when the model learns a component's normal appearance does its description of a departure carry category information.

Do per-zone thresholds already count as a second axis?

They do, but weakly. They introduce one discrete variable — position or component type — while the criterion still looks only at pixel difference, so the curve moves out only slightly and maintenance cost grows with the number of zones.

How do you prove false calls really fell rather than the threshold being loosened?

Check whether escapes rose at the same time. Under single-parameter tuning the two necessarily move in opposite directions; if false calls fall while escapes hold flat or fall too, the curve changed rather than the point on it. Verification data must be split from modelling data by time or by line.

Full solution for this scenario: AI AOI Software industry solutions

This article was generated by AI. Customer cases are simulated scenarios based on real product capabilities and figures are illustrative; see product pages for official benchmarks.

Book a Demo / Get a Quote View AI AOI Software solutions