TL;DR
This paper introduces Silph, a compiler that automatically generates optimized hybrid secure multiparty computation (MPC) protocols from high-level programs. Silph significantly speeds up compilation and produces more efficient MPC protocols than prior work by intelligently mixing different MPC primitives.
What Problem Does This Paper Address?
Many applications, especially in finance and healthcare, require analyzing data distributed across multiple organizations. Secure multiparty computation (MPC) offers a way to perform these analyses without sharing raw data, but its practical adoption is hindered by high computational and communication costs. Existing MPC protocols often rely on a single primitive, which can be inefficient for complex programs that mix different types of operations (e.g., linear vs. non-linear). While hybrid MPC protocols combine multiple primitives for better performance, manually designing them is complex and time-consuming. Existing compilers for hybrid MPC often struggle with scalability and accuracy, either by making restrictive assumptions or by being too slow for large programs.
Methods
Silph tackles the challenge of generating efficient hybrid MPC protocols through an automated compilation process. Its core innovation lies in its hybrid protocol assignment framework, which uses mixed integer linear programming (ILP) to find the optimal assignment of program components to different MPC primitives.
Key techniques include:
- Two ILP Formulations: The paper proposes two ILP formulations for protocol assignment. The first is simpler but restricts each program component to a single MPC primitive. The second, more advanced formulation allows components to be assigned to multiple primitives, leading to more fine-grained and potentially more efficient assignments, albeit with higher ILP solving time.
- Scalability through Partitioning: To handle large programs, Silph employs graph partitioning to decompose the program's intermediate representation (IR) into smaller, manageable partitions. It then uses a two-level ILP approach (per-partition and inter-partition ILPs) to find assignments.
- Partition Mutation Heuristic: To improve the global optimality of assignments derived from local partitions, Silph introduces a partition mutation heuristic. This involves slightly expanding partitions to include neighboring nodes, allowing the ILP solver to consider more context and avoid suboptimal assignments due to inter-partition conversion costs.
- Modular Optimization with Call Site Similarity (CSS): For programs with functions, Silph avoids full inlining (which inflates IR size) by using function abstractions. It then employs call site similarity analysis to group similar function call contexts. This allows Silph to compute protocol assignments for a group of similar contexts only once, reusing the results and significantly reducing the ILP solving workload.
Datasets
Not discussed in the paper. The paper focuses on evaluating Silph on various benchmarks representing common workloads in database analytics and machine learning.
Key Insights and Ideas
- ILP is a powerful tool for protocol assignment: Formulating protocol assignment as an ILP allows for fine-grained, accurate optimization, moving beyond hand-tuned heuristics.
- Hybrid MPC is crucial for performance: No single MPC primitive is optimal for all workloads; mixing primitives is essential for efficiency.
- Scalability requires more than just ILP: Directly applying ILP to large programs is intractable. Techniques like partitioning, mutation, and modular analysis are necessary to make the approach practical.
- Function call contexts matter: The optimal MPC primitive assignment for a function can depend heavily on how and where it's called. Call site similarity analysis effectively captures this dependency without full inlining.
- Trade-offs exist: There's a clear trade-off between the complexity of the ILP formulation (e.g., allowing multiple assignments per term) and the ILP solving time. Similarly, partitioning strategies involve balancing partition size, connectivity, and the cost of mutations.
Key Results
- Compilation Speedup: Silph achieves significant compilation speedups, up to 30,000x faster than prior work on certain benchmarks.
- Protocol Performance: The hybrid MPC protocols generated by Silph match or outperform prior work by up to 3.6x on various database analytics and machine learning workloads.
- Partitioning Effectiveness: Silph's graph partitioning and mutation heuristics significantly improve scalability, allowing it to handle larger programs more efficiently.
- Call Site Similarity Impact: CSS analysis further reduces the workload by enabling reuse of assignments for similar function call contexts, leading to better performance.
- Comparison to HyCC: Silph is generally much faster in compilation time (order of magnitude) and often achieves better or comparable execution times compared to HyCC, a prominent MPC compiler.
Limitations and Future Work
- ILP Solver Limitations: While Silph uses ILP effectively, the inherent NP-completeness of the problem means that solving very large ILPs can still be time-consuming, as seen with the MiniONN benchmark.
- Cost Model Accuracy: The accuracy of the generated MPC protocols depends on the cost model used to estimate operation and conversion costs. The paper notes that their heuristic for modeling interactive latency is a limitation and suggests exploring better cost models.
- Combining LP and ILP: The paper suggests that combining OPA's LP relaxation approach with Silph's multi-level ILP strategy is a promising direction for future work.
- Backend Support: Silph currently targets ABY, but its design is general enough to support other MPC backends with minimal effort.
Summary updated