When a human inspector writes "no spalling on pier 3," the sentence carries an unspoken condition: I looked at pier 3, I could see it well, and I know what spalling looks like on concrete. Automated inspection pipelines, meaning drones or robots plus a vision model that marks defects in images, are sold as a replacement for slow, risky, infrequent manual inspection. They quietly drop that condition. A missing detection is read as "no defect," which is the closed-world assumption from databases: whatever is not recorded is false. On a structure that was imaged only in part, at uneven resolution, and by a model that scores just 0.121 IoU on concrete corrosion (dacl10k), this reading is the most dangerous error the system can make. Nobody measures it, because vision benchmarks score the defects a model found, not the absences it claimed.
This proposal borrows one idea from logic, restricted negation. The rule is that "not P" may only be asserted relative to an explicit, bounded domain, and never over everything. We apply it to make automated absence claims honest and measurable. The system may say "component $c$ has no defect $d$" only when that negation is guarded by a positive observation atom: the component was actually seen, at usable resolution, on a substrate type for which the detector's miss rate has been calibrated. Everywhere else the system answers "unknown" and sends the case to a human. The claim we will test is that guarding negation by substrate type and observation lets the system decide far more component-level "defect-free" questions automatically at a fixed error rate than pooled confidence thresholds or pooled conformal calibration can, and that this error rate survives dataset shift where the pooled versions break.
Where the idea comes from and what is new
Two lines of logic work supply the mechanism. Pan and colleagues showed that negating a datatype predicate over the whole universe produces absurd results: "not greater than 18" is satisfied by the string "hello." Their fix is relativized negation, where the complement of a predicate is taken only inside its declared base type (Extending DL Reasoning Support for the OWL Datatyping, OWL-Eu). Bárány, ten Cate and Otto defined guarded negation. A negated subformula must share its free variables with a positive atom, and this keeps open-world query answering decidable (Queries with Guarded Negation, Guarded Negation). Both works motivate the proposal and supply its semantics. Both also illustrate the empirical gap. The guarded-negation paper checked only that TPC-H, TPC-DS and SkyServer queries are syntactically guarded, and it reports no runtimes. Relativized negation was never tied to data produced by a perception system. Ren, Pan and Zhao's complement-table reasoner is the one work in the file that pairs restricted negation with real benchmarking: 2–20× faster than Pellet and FaCT++, with 98.2% concept recall on WINE (Towards Soundness Preserving Approximation for ABox Reasoning of OWL2). Its workloads are static academic ontologies, and it has no notion of an observation that can fail.
On the inspection side, BD-YOLOv8s adds attention modules and reaches 86.2% [email protected] on a private dataset, yet still mistakes bushes for spalling. dacl10k and CODEBRIM provide public multi-label benchmarks. Kumar et al. classify damage causes and report confusion between chemical and physical damage. These papers motivate the proposal by documenting the error. All of them evaluate positive detections only. The obvious combination, a logical rule that deletes detections not lying on concrete, is mostly a mask intersection and needs no logic, so we treat it as a baseline rather than as the contribution. The new part is using guarded negation as the semantics of negative claims, and validating those claims empirically as a first-class output.
Core claim
We define a guarded absence rule over a table of perception outputs:
$$\text{Absent}(c,d) \leftarrow \text{Component}(c,g) \land \text{Observed}(c,g) \land \neg\,\text{Detected}(c,d).$$
Here $c$ is a structural component instance (a pier, deck or bearing region), $g$ is its substrate/guard type, and $d$ is a defect class. $\text{Observed}(c,g)$ holds when the visible fraction and pixel resolution of $c$ exceed thresholds set per $(g,d)$. $\text{Detected}(c,d)$ holds when predicted pixels of $d$ fall inside $c$ at the detector's operating threshold. The rule is guarded in the sense of GN-Datalog, because every variable of the negated literal appears in positive atoms. The thresholds are not hand-set. For each guard type $g$ and defect $d$ they are chosen by conformal risk control on held-out data so that
$$P\big(d \text{ present in } c \,\big|\, \text{Absent}(c,d) \text{ asserted},\ g\big) \le \varepsilon,$$
where $\varepsilon$ is the tolerated absence error (for example 2%). Pairs that fail the guard are output as unknown. Guarding by $g$ is the relativized-negation step: the miss rate is estimated over the population the claim actually quantifies over, not over all pixels. We expect this to matter because miss rates differ sharply between classes such as bearings (0.564 IoU) and concrete corrosion (0.121 IoU) in dacl10k, so a single pooled threshold is either too loose for the hard types or too strict for the easy ones.
Research program
We first build the perception layer. We retrain the strongest reported dacl10k model, an FPN with an EfficientNet-B4 encoder, and a SegFormer, and export per-image component masks, defect masks and per-pixel scores into a relational table. From dacl10k's joint component and defect labels we derive ground-truth component–defect presence for every pair, which gives a supervised benchmark for absence claims. To create realistic incomplete coverage we degrade test images with random occluding crops, downsampling to lower ground resolution, and motion blur, each at graded severity. This degradation is synthetic, and we say so plainly. The observation predicate is computed from the degraded image alone.
Second, we implement the rule as SQL over DuckDB and write a library of inspection queries: absence per component, "every pier of span $k$ is free of exposed rebar," and change queries between two passes. We check each query for guardedness. For this workload we report what Bárány et al. did not: wall-clock latency and memory at 10^4 to 10^7 detection rows. Numeric conditions such as crack width, the case where their paper proves undecidability once inequalities are added, are handled only as comparisons of a data value against a constant inside a typed column, following Pan's datatype groups. We record which natural queries fall outside this safe fragment. That audit is a secondary deliverable.
Third, we tie the results back to manual inspection. The unknown set is the human workload. We therefore report the fraction of component–defect pairs the system can decide at error $\varepsilon$, which is the fraction of inspector attention it saves.
Baselines
The naive reference is the closed-world reading used by current pipelines: every pair without a detection is declared absent. No calibration is applied, and it decides 100% of pairs. We expect it to fail on absence precision, especially under degradation. No reported result found on Lacuna for absence precision on dacl10k. The file's detectors report only mIoU (FPN-EfficientNet-B4 test mIoU 0.424 and SegFormer 0.400, in dacl10k) or mAP (86.2% [email protected] for BD-YOLOv8s on a private dataset we cannot rerun). We will match or approach the 0.424 mIoU with our retrained backbone, so that absence results are not artifacts of a weak detector.
The strongest competitor is pooled conformal risk control. It uses the same backbone, calibration split and $\varepsilon$, and chooses a single score threshold and "unknown" rule to bound absence error across all pairs, without substrate or observation guards. It is the strongest competitor because it already gives a statistical guarantee and involves no logic. If it matches the guarded method, our core ingredient is unnecessary. A second strong baseline is a per-defect-class tuned confidence threshold with abstention. Its tuning budget equals ours: the same grid, the same calibration images.
Two ablations isolate the ingredient. The first keeps the observation guard but calibrates pooled over substrate types. The second keeps substrate-typed calibration but drops the observation guard. For false positives on the positive side we also compare with a substrate mask-intersection filter, which deletes defects outside concrete components. This checks whether the logic layer adds anything there beyond geometry. We do not claim it will. Beating the strongest baseline means two things. At every tested $\varepsilon$, the guarded method decides significantly more pairs (paired bootstrap over bridges) while holding the error bound. And under distribution shift, its realized error stays near $\varepsilon$ while the pooled method's error exceeds it.
Why not just…?
Why not just train a bigger or better detector? Better detectors shrink the problem but do not remove it. Mundt et al. found larger networks overfit CODEBRIM (Meta-Learning...CODEBRIM), and BD-YOLOv8s's attention stack still hallucinates spalling on foliage. More importantly, no detector can see an occluded girder, so a coverage-aware absence semantics is needed whatever the backbone. We test this directly by running every method on both backbones. The guarded method should keep its advantage in decided coverage with each.
Why not just use conformal prediction without any logic? This is the real threat. The guarded method is conformal calibration, stratified by guard atoms. So the question is empirical: does conditioning the negation on substrate type and observation buy coverage and robustness beyond pooled calibration? The ablations and the shift experiment settle it. If pooled calibration matches us under shift, we will report that the logical framing contributes query composability and a decidability audit but no accuracy.
Why not just post-filter detections with the component masks? For false positives this may work as well as any logic, and we include it as a baseline expecting parity. It says nothing about absences, however. Deleting detections off-substrate increases the closed-world system's absence claims, which is the unsafe direction.
Why not keep ordinary SQL with NOT EXISTS? That is exactly the closed-world baseline. The guard is what prevents uninspected components from being certified defect-free. The DuckDB experiments show whether guarded queries cost anything in latency relative to plain ones.
Proposed experiments and decisive checks
The main experiment is on dacl10k with bridge-disjoint train, calibration and test splits. Degradation is applied at five severities. We report absence precision, decided coverage, and risk–coverage curves for every method and $\varepsilon \in \{1\%, 2\%, 5\%\}$. The shift experiment trains and calibrates on dacl10k and tests on CODEBRIM, mapping its five classes to dacl10k's. We use CODEBRIM's 2,506 annotated background boxes as true-absence examples and its defect boxes as true-presence examples. The decisive check is whether realized absence error on CODEBRIM stays within $\varepsilon$ for the guarded method and exceeds it for pooled calibration. A second decisive check is the stratified error by guard type. If substrate-typed calibration does not change thresholds meaningfully across types, the relativized-negation hypothesis is false. The systems experiment reports latency and memory of guarded versus unguarded SQL absence queries at growing table sizes, alongside the fraction of a realistic inspection-query library that falls inside the guarded fragment once numeric comparisons are included.
References
- dacl10k: Benchmark for Semantic Bridge Damage Segmentation
- Extending DL Reasoning Support for the OWL Datatyping (or "Why Datatype Groups?")
- OWL-Eu: Adding Customised Datatypes into OWL
- Queries with Guarded Negation
- Guarded Negation
- Towards Soundness Preserving Approximation for ABox Reasoning of OWL2
- BD-YOLOv8s: enhancing bridge defect detection with multidimensional attention and precision reconstruction
- Meta-Learning Convolutional Neural Architectures for Multi-Target Concrete Defect Classification With the COncrete DEfect BRidge IMage Dataset.
- CONCRETE DAMAGE IDENTIFICATION FOR STRUCTURAL HEALTH MONITORING USING COMPUTER VISION