Conditional Functional Dependencies
- Conditional Functional Dependencies (CFDs) are advanced data rules that extend traditional functional dependencies by enforcing constraints only on tuples matching specific patterns using constants and wildcards.
- They are mined using scalable sampling algorithms and conflict resolution techniques, ensuring robust performance in large and noisy datasets.
- CFDs drive practical applications in data cleaning, error detection, and schema normalization, while their probabilistic extensions enable effective handling of uncertain data.
Conditional functional dependencies (CFDs) extend the classical notion of functional dependency by incorporating data value patterns and context, enabling fine-grained data quality rules and error detection even in heterogeneous and noisy datasets. In a CFD, the dependency only holds for tuples whose attribute values satisfy certain conditions, specifically “pattern tuples” that can include both constants and wildcards. CFDs are crucial for modern data cleaning, schema normalization, and integrity auditing, and have been systematically studied both for their theoretical semantics and practical mining algorithms in scalable, noisy, and probabilistic data environments (Wang et al., 2018, De et al., 2010).
1. Formal Semantics of Conditional Functional Dependencies
A conditional functional dependency over a relation schema is a pair , where:
- is the set of left-hand-side attributes,
- is a single right-hand-side attribute,
- is a pattern tuple defined on , with each component either a constant or a wildcard ‘_’ (denoting arbitrary values).
A tuple supports 0 if, whenever 1 matches 2 (on the constant positions), then 3 matches 4. CFDs are categorized as:
- Constant CFDs: 5 is a constant.
- Variable CFDs: 6, with one or more constants in 7.
- General CFDs: mixtures of constants and wildcards on both sides.
For a CFD candidate 8, its confidence in a dataset 9 is
0
A CFD is accepted if 1 for some threshold 2 (Wang et al., 2018).
In probabilistic databases, a CFD is extended as a conditional probabilistic functional dependency (CpFD), evaluated under possible-worlds semantics, with confidence defined as the total probability of worlds in which the CFD holds (De et al., 2010).
2. Scalable Sampling Algorithms for Large and Noisy Data
Mining CFDs on large or noisy datasets is intractable without efficient sampling, since exact support calculation over billions of records is prohibitive. BRRSC (Bulk Randomized Reservoir Sampling for CFDs) is a one-pass, sublinear-time algorithm that maintains 3 disjoint reservoirs of 4 tuples each, targeting clusters of popular and clean tuples:
- FRRSC (First-Reservoir Randomized Sample for Clean Tuples): Selects the first 5 complete tuples as the base sample; subsequent complete tuples are admitted based on a similarity threshold (6) with current reservoir members, ensuring popular tuples are equi-sampled and misleading ones are excluded.
- TRRSC (Iterated Reservoirs): Subsequent reservoirs capture new clusters by requiring tuples to be similar to previous reservoirs (above 7) yet sufficiently distinct (below 8 overlaps), preventing duplicate representation and overfitting.
- BRRSC: Maintains all reservoirs in a single pass, interleaving their selection rules for overall computational cost 9, where 0 is the arity (Wang et al., 2018).
A tuple is deemed “misleading” if it contains NULL attributes or matches too few attributes of all popular samples; such tuples are systematically excluded from these reservoirs.
3. Fault-Tolerant Discovery of CFDs
On each reservoir, tolerant CFD discovery engines—BCTANE (based on CTANE), BFCFD (based on FastCFD), and BCFDM (based on CFDMiner)—are applied:
- BCTANE employs lattice search for minimal LHS sets and prunes when maximal attainable confidence drops below 1; for each candidate, if 2 then 3 is counted as supporting 4 if 5 or if their similarity exceeds 6.
- BFCFD and BCFDM handle support checks and minimality by tolerating up to 7 exceptions in their respective frameworks.
- Hash-tables of supporter counts are shared across engines for efficiency. Engine selection is governed by arity and sample size. For arity 8 and 9, use 0; otherwise, 1 (Wang et al., 2018).
In probabilistic settings, CFDs are interpreted by computing confidence as the sum of probabilities of all worlds satisfying the CFD (for CpFD). A pruning-based recursive algorithm explores options for each tuple, with aggressive pruning based on consistency with the current partial rule set. Monte Carlo approaches are adopted for approximate functional dependencies (De et al., 2010).
4. Conflict Resolution Among Discovered CFDs
Tolerance to noise and big data heterogeneity induces conflicting CFDs. Conflict resolution proceeds via constructing a weighted undirected graph 2:
- Each node 3 represents a CFD, with weight 4 equal to its number of supporters (computed exactly or via rank interpolation for variable CFDs).
- Edges encode conflicts, determined by formal linking rules that account for subset, equality, and overlap relationships of LHS attributes and pattern tuples.
- For variable CFDs contradicted by multiple constant CFDs on the same attributes, a “meta-rule” escalates these to a conflict.
- A maximum-weight independent set (MWIS) is computed using a weighted adaptation of the FastMIS algorithm: nodes select priorities (biased by weight) and iteratively join the independent set if their scaled priority exceeds those of their neighbors. Expected computational cost is 5 phases, each 6 (Wang et al., 2018).
5. Adaptive Parameter Selection and Objective-Driven Tuning
The mining process is governed by five parameters: 7 (number of reservoirs), 8 (sample size), 9, 0, and 1 (confidence threshold). Performance and output quality are measured along four axes:
- 2: time to discover CFDs,
- 3: quality of CFDs (fraction covered vs. a gold standard),
- 4: data cleaning time,
- 5: cleaning quality (fraction of injected errors found).
Objective-driven parameter tuning is performed by fitting empirical response curves for each dimension, then solving a multi-objective linear program (e.g., via Simplex) to satisfy user-supplied constraints. For example, under 6, 7 min, 8, 9 min, the optimal configuration is 0, 1, 2, 3, 4 (Wang et al., 2018).
6. Experimental Assessment and Practical Implications
Evaluation on synthetic (TPC-H, up to 1.2B tuples, 210GB) and real datasets (SUSY and Article) demonstrates:
- Scalability: Overhead from sampling and conflict resolution is amortized for 5 tuples, achieving near-linear scaling with both data size and attribute arity. Baseline CTANE fails for arity 6, while tolerant methods remain efficient and are 20% faster at arity 7.
- Quality: The “inconsistent rate” (1–recall) is 81% once 9; recall is 097% up to arity 42; cleaning quality (1) exceeds 0.95 for 8% injected noise.
- Parameter Robustness: Optimal parameters minimize discovery time within user constraints, yielding robust cleaning performance.
- Real-Data Feasibility: On multi-GB datasets, discovery time grows linearly (Wang et al., 2018).
In probabilistic databases, CpFD and CpAFD confidence estimation is effective on both synthetic and DBLP-scale real data. Monte Carlo routines converge rapidly, and pruning-based exact computation enables scalability for hundreds of tuples, with mining benefiting from specificity and redundancy pruning heuristics (De et al., 2010).
7. Applications, Variants, and Theoretical Extensions
CFDs are fundamentally used in:
- Data cleaning and error detection, exploiting partial context for imputation and correction.
- Schema normalization and table decomposition in uncertain and classical relational databases.
- Rule-based query rewriting and source selection in probabilistic integration scenarios (De et al., 2010).
Probabilistic extensions (CpFD, CpAFD) enable CFD mining and enforcement under data uncertainty, with semantics grounded in possible-worlds, and with confidence-based decision making. Theoretical explorations confirm that these are non-trivial generalizations, as naive flattening of uncertainty leads to incorrect confidence estimates and loss of pruning benefits.
A plausible implication is that robust CFD discovery unlocks reliable large-scale data cleaning even in resource-constrained or imprecise environments, provided parameter tuning and conflict handling are executed rigorously.