NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

M&M: Secure Two-Party Machine Learning through Efficient Modulus Conversion and Mixed-Mode Protocols

Ye Dong, Wen-jie Lu, Xiaoyang Hou, Kang Yang, Jian LiuIACR ePrint 2025

Introduction

Secure Two-Party Computation (2PC) is a critical technology for privacy-preserving machine learning (ML), allowing two parties to process sensitive data without exposing private information. However, 2PC for ML often faces a significant "modulus mismatch" bottleneck. Linear operations, such as matrix multiplications, are most efficient in prime fields ($\mathbb{Z}_p$) using Homomorphic Encryption (HE). Conversely, non-linear operations, like ReLU activations or comparisons, are better suited for power-of-two rings ($\mathbb{Z}_{2^\ell}$) using Oblivious Transfer (OT) or Garbled Circuits (GC).

Existing frameworks typically choose one domain and suffer performance penalties in the other, or they rely on slow "modulus conversion" protocols that use expensive private comparisons to handle bit-overflows. M&M addresses this by creating an efficient bridge between these two mathematical worlds.

The M&M Framework

The core of M&M is a suite of mixed-mode protocols that allow for seamless switching between different mathematical domains. By optimizing the transition between $\mathbb{Z}_{2^\ell}$ and $\mathbb{Z}_p$, M&M enables each operation to be performed in its most efficient environment.

Overview of the M&M framework, illustrating the transitions between power-of-two rings and prime fields for non-linear and linear operations.

Heuristic Modulus Conversion and Free Truncation

A key innovation in M&M is Positive Heuristic Conversion. Recognizing that ML values are typically bounded, the authors assume inputs are within a known range. This allows them to compute the "wrap-bit" (overflow indicator) using a simple logical OR via Delta-OT, rather than a full private comparison circuit. This heuristic approach reduces conversion costs to the exchange of just one ring element.

Furthermore, M&M integrates fixed-point truncation directly into the modulus conversion from prime fields to power-of-two rings. This "Free Truncation" ensures that the division required for decimal precision happens during the domain switch at no extra cost.

A workflow comparison between M&M and GeoMPC, highlighting the 10x improvement in time and communication achieved through optimized conversion and truncation.

Advanced Building Blocks

M&M also leverages state-of-the-art Ferret OT extension, which is significantly more communication-efficient than traditional IKNP OT. The framework includes optimized protocols for complex ML functions, such as constant-round base-2 exponentiation for Softmax and piecewise polynomial evaluations for GeLU activations.

Key Results and Performance

The authors evaluated M&M across standard benchmarks, including ImageNet-1K (ResNet50, ViT) and GLUE (BERT-base). Key findings include:

  • Efficiency Gains: M&M achieves a 6× to 100× improvement for approximated truncations compared to state-of-the-art solutions like CrypTFlow2 and Cheetah.
  • Reduced Communication: For ResNet50 inference, communication was slashed from ~32GB to just 1.85GB.
  • Cost-Efficiency: By optimizing for AWS-to-Internet (A2I) and AWS-to-AWS (A2A) costs, M&M proves to be not only faster but significantly cheaper to run in cloud environments.
  • Accuracy: Despite the use of heuristics, model accuracy remains identical to cleartext models across all tested datasets.

Conclusion

M&M demonstrates that trading a small amount of mathematical generality for heuristic efficiency can lead to massive performance leaps in secure ML. By making the "mixed-modulus" approach practical, it sets a new standard for cost-effective and high-speed 2PC. Future work will focus on extending these protocols from the semi-honest adversary model to malicious security.

Summary updated

BibTeX
@article{dong2025m,
  author = {Ye Dong and Wen-jie Lu and Xiaoyang Hou and Kang Yang and Jian Liu},
  title = {{M\&M: Secure Two-Party Machine Learning through Efficient Modulus Conversion and Mixed-Mode Protocols}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2025},
}
Figure