arXiv:2611.12512cs.DBNov 2026

Manuscript Offprint

arXiv:2611.12512

Certifying the Error-Detection Value of Functional Dependencies without Ground Truth

Xiaolong Wan, Xixian Han

Xiaolong Wan, Xixian Han

Abstract—Functional dependencies are used to flag erroneous cells, but without error labels the value of these flags is unknown. Dependency strength cannot settle it, because identical data and flags can have positive value in one clean state and negative value in another. We treat this value as partially identified and certify a fixed detector when its value is positive in every clean state compatible with the observation under an error model and budget. The largest such budget is the certification radius. For a detector that flags departures from the unique mode of each class, the worst case reduces to a 0/1 knapsack over class flips, yielding sharp bounds on true positives and the exact radius in polynomial time. Allowing bounded legitimate exceptions in the clean data, we derive an exact threshold for the existence of a positive certificate and compute the radius with the same knapsack. Across five relations and 21,981 candidate dependencies, rules with nearly equal g3g_3 and flag rate can have certification margins differing tenfold. Error injection confirms sound certification and shows that, at equal error counts, changing the organization of errors reverses certification outcomes for every tested rule.

Index Terms—Functional dependencies, error detection, data quality, partial identification, certification.

I. INTRODUCTION

FUNCTIONAL dependencies are a standard tool for detecting errors in relational data [1]–[3]. When a dependency X→AX \to A is expected to hold but does not, tuples that agree on XX may disagree on AA, and a detector uses these disagreements to flag potentially erroneous cells. Acting on the flags has a cost. Each flagged cell must be inspected or repaired, and a flag on a correct value is a false alarm. How much the flags are worth, which we call their value, therefore depends on how many of them mark actual errors, and on real data this number is unknown. Counting the errors requires labeling every cell as correct or erroneous against external sources or by manual inspection, and even benchmarks with semantically annotated dependencies [4] lack such labels. Without labels, rules are judged by quantities computed from the observed relation, most commonly dependency strength.

Measures such as g3g_3 [5] quantify how far the observed relation is from satisfying the rule, and comparative studies [6], [7] examine many alternatives. Strength describes how well a rule fits the data, not the value of its flags. Whether it nevertheless tracks value can be tested only on data with known errors, and on injected errors it does not reliably predict the value of a rule as a detector [8]. What is missing is a statement about the value itself that can be derived from the observation without labels.

TABLE I

A RELATION WITH Zip →\rightarrow City. TUPLES WHOSE CITY CELL IS FLAGGED ARE MARKED WITH AN ASTERISK.

ZipCityTuplesCount
Z1Alphat1,t2,t3,t4t_{1}, t_{2}, t_{3}, t_{4}4
Z1Betat5∗t_{5}^{*}1
Z2Gammat6,t7,t8,t9t_{6}, t_{7}, t_{8}, t_{9}4
Z2Deltat10∗,t11∗t_{10}^{*}, t_{11}^{*}2
Z3Epsilont12t_{12}1
Z3Zetat13t_{13}1

The difficulty is that the observation does not determine the value. Consider a relation of 13 tuples in which a detector for Zip →\rightarrow City flags three City cells (Table I). If the observation contains only the few errors needed to explain its conflicts, Alpha and Gamma are the correct cities of Z1 and Z2. Every flag then marks an error, and the value of the flags, i.e., the loss they avoid compared with flagging nothing, is positive. A few more errors admit a different clean state in which Delta is the correct city of Z2. The two flagged Delta cells are then correct and the unflagged Gamma cells are wrong, so only the flag on Beta still marks an error. When a missed error and a false alarm cost the same, the value is now negative, although the data and the flags are unchanged.

The value is thus partially identified [9], [10], known only as a member of the set of values over all clean states compatible with the observation. We fix an error model, which states what the clean data look like and how they may be corrupted, together with a budget k on the number of corrupted cells. The flags are certified at budget k when their value is positive in every compatible clean state. A larger budget admits more states, and the certification radius k∗k_{*} is the largest budget at which the certificate still holds. We write k0k_{0} for the fewest errors with which the error model explains the observation, four in the example above, one each in Z1 and Z3 and two in Z2. We call k∗−k0k_{*} - k_{0} the margin, the number of errors that the certificate tolerates beyond this minimum. If the clean data satisfy the error model and contain at most k∗k_{*} errors, the flags have positive value, and no label enters this conclusion.

The example uses the mode-based detector, which flags every value of A that differs from the unique most frequent value among the tuples sharing its X-value, and nothing in a group without a unique most frequent value. When the clean data satisfy the dependency and only right-hand-side cells are corrupted, the worst case over the compatible clean states arises from reinterpreting groups, as taking Delta instead of Gamma for Z2 does in the example. A reinterpretation costs

The authors are with the School of Computer Science and Technology, Harbin Institute of Technology, China. (e-mail: wxl@hit.edu.cn, hanxx@hit.edu.cn) additional errors and turns some flags into false alarms, and within a group only its second most frequent value needs to be considered. Choosing which groups to reinterpret within the budget is a 0/1 knapsack problem, whose solution gives a sharp lower bound on the number of correct flags at every budget and the exact certification radius in polynomial time. Groups whose two most frequent values are nearly tied offer inexpensive reinterpretations that invalidate many flags.

Clean data may also violate a dependency legitimately, as when a ZIP code spans two cities. We therefore also admit clean states with at most ℓ\ell legitimate exceptions, which can be made to satisfy the dependency by changing at most ℓ\ell cells of A. Some feasible budget certifies a positive value exactly when ℓ\ell stays below a threshold determined by the number of flags and the relative costs of missed errors and false alarms. Below this threshold the same knapsack yields the certification radius, with the threshold lowered by ℓ\ell.

On five benchmark relations we evaluate 21,981 candidate dependencies. Nearly half of them are certified at every feasible budget. For the others, the margin usually lies near half the number of flags. Yet 1,203 candidates have a margin of zero, and many pairs whose g3g_{3} and flag rate differ by less than 5% have margins that differ tenfold or more, so g3g_{3} and the flag rate alone do not determine the margin.

Injecting errors into clean data makes the true value known, and no certified run has a non-positive true value, as the theory guarantees. At equal error counts, changing how errors are organized reverses the certification outcome on every tested rule. Each run whose errors repeat one wrong value within a group is paired with a random run that corrupts exactly as many cells. On 15 of the 17 tested rules, every random run is certified, whereas every paired run in which the repeated value covers 70% of each group it enters is a detection failure, in which the flags have no positive value. On the two remaining rules, whose left-hand sides are near keys, most random errors fall into groups of a single tuple, where they consume budget without raising flags. Every random run is then an identification failure, in which the flags have a positive value that the certificate cannot establish, whereas every paired run at 30% coverage is certified. A certification takes well under a millisecond in the median, and the slowest instance at ten million rows takes 16.3 seconds.

Our contributions are as follows.

  • We formulate label-free certification of the value of a fixed dependency-based detector as a partial identification problem, with the certification radius as the largest certified error budget (Section II).

  • For the mode-based detector we give a sharp worst-case bound that yields the exact radius in polynomial time, and extend it to clean data with at most ℓ\ell legitimate exceptions, where the bound stays sharp and some budget is certified exactly when ℓ\ell is below a threshold (Sections III and IV).

  • On observed and injected data we show that certificates carry information beyond g3g_{3} and flag rate, and that at equal error counts the organization of the errors reverses the certification outcome on every tested rule (Section V).

Section VI discusses related work, and Section VII concludes.