Abstract
Most privacy-preserving machine learning (PPML) research assumes training data resides in a single, flat table. However, real-world data is typically relational, distributed across multiple tables linked by primary-key (PK) and foreign-key (FK) relationships. This paper introduces a novel framework for performing secure machine learning directly over these relational structures. By combining advanced cryptographic primitives with a "join result purification" technique, the framework enables training on joined data while protecting sensitive metadata, such as join sizes and primary keys, achieving significant performance gains over generic multi-party computation (MPC) approaches.
The Metadata Vulnerability in Relational Joins
In a typical collaborative learning scenario, two parties (e.g., a financial institution and a retailer) may wish to train a model on their combined datasets. To do so securely, they must "join" their tables without exposing raw data. Existing MPC methods for this task often suffer from two major flaws: extreme computational overhead or leakage of sensitive metadata.
Even when raw values are encrypted, revealing which IDs matched (the join result) or the total number of matching records (the join size) can constitute a privacy breach. For instance, knowing a specific customer ID exists in a medical database reveals their status as a patient, regardless of the specific diagnosis. The authors categorize these risks into a taxonomy of privacy levels (Levels 1–5), with this work specifically targeting the higher tiers (Levels 3–5) where join structures and sizes are hidden.
The SFKJ Protocol and Structural Efficiency
To address the performance bottleneck, the authors propose the Secure Foreign-Key Join (SFKJ) protocol. Rather than using generic, inefficient garbled circuits that scale poorly with data size, SFKJ leverages the properties of foreign-key acyclic schemas. These schemas, common in data warehousing (e.g., star or snowflake schemas), allow the join process to be modeled as a tree.
The protocol uses Private Set Intersection (PSI) to identify matches and Oblivious Extended Permutation (OEP) to reorder results securely. By restricting the problem to acyclic schemas, the complexity is reduced from $O(N^2)$ to a near-linear $O(N \log N)$, making it feasible for large-scale datasets.
Join Result Purification
To achieve Level 4 privacy—hiding the join size—the authors developed a "Join Result Purification" stage. This technique generates a fixed-size output buffer populated with "dummy" tuples. A specialized "duplication circuit" using half-copy networks then obliviously replaces these dummies with real, duplicated records. This ensures the machine learning trainer receives a full, uniform buffer of data, preventing any information leakage regarding the exact count of matching entities while maintaining the statistical integrity required for stochastic gradient descent (SGD).
Experimental Results and Trade-offs
The system was evaluated using industry-standard benchmarks (TPC-H) and real-world datasets (MovieLens, OULAD).
- Performance: On a 100MB TPC-H query, the SFKJ protocol completed in approximately 6.8 hours. In contrast, a standard optimized garbled circuit was estimated to require 7 years for the same task. Both communication and computation costs scaled linearly with input size.
- Accuracy vs. Privacy: At Level 4 privacy (MPC only), the model maintains the same accuracy as training on plaintext data. For Level 5 privacy, which incorporates Differential Privacy (DP) by adding Gaussian noise to gradients, a trade-off emerges. On the OULAD dataset, accuracy remained high (~83%) at moderate privacy levels ($\epsilon=1$), but dropped significantly (~52%) under extreme privacy constraints ($\epsilon=0.1$).
Conclusion
This framework demonstrates that secure machine learning over complex relational data is computationally viable. By focusing on the structural properties of database schemas and addressing metadata leakage through purification, the authors provide a path toward practical, privacy-preserving analytics in multi-party environments. Future work remains to harden the system against malicious actors and further reduce the latency gap between secure and plaintext training.
Summary updated