Introduction
Privacy-preserving machine learning (PPML) represents a critical frontier in AI security, enabling models to process sensitive data without ever accessing it in plaintext. However, the practical application of PPML has been hindered by staggering computational overhead. For Large Language Models (LLMs), state-of-the-art cryptographic solutions are currently four orders of magnitude slower than standard inference, rendering real-time private reasoning nearly impossible.
Furthermore, the shift toward "agentic" workflows—where LLMs use protocols like the Model Context Protocol (MCP) to invoke third-party tools—introduces new privacy risks. A user requesting a medical analysis via an LLM agent might inadvertently expose sensitive data to both the LLM provider and the tool provider. Agentic-PPML addresses this "efficiency-privacy tension" by utilizing LLMs as intelligent routers that delegate sensitive computations to specialized, encrypted tool models.
System Architecture
The core innovation of Agentic-PPML is the modular separation of intent parsing from privacy-critical computation. This architecture bypasses the need to run massive, slow LLMs on encrypted data by focusing cryptographic resources on smaller, task-specific models.
The Agentic Workflow
- Agentic Orchestration: A general-purpose LLM (e.g., DeepSeek-V3) acts as an orchestrator. It operates in plaintext to parse the user's natural language intent, as the prompt itself often contains significantly less sensitive information than the raw data (such as a high-resolution medical image).
- The MCP Bridge: Once the intent is understood, the LLM identifies the appropriate specialized "tool" (an MCP server). It then generates a structured tool call to initiate a secure protocol between the user, a model-hosting server ($s_1$), and a cloud provider ($s_c$).
- Hybrid Cryptography: The framework employs a hybrid approach to maintain privacy during computation. Homomorphic Encryption (HE) is used for efficient linear operations like convolutions, while Multi-Party Computation (MPC) handles non-linear operations like ReLU activations.
- Secret Sharing: Sensitive user input is divided into "shares." No single entity—neither the LLM, the model host, nor the cloud provider—ever possesses enough shares to reconstruct the original plaintext data.
Experimental Evaluation
The framework was evaluated using the ChestX-ray14 dataset, a real-world benchmark containing over 100,000 frontal chest X-ray images. This setup demonstrates a practical "private medical consultant" use case where a user can receive a diagnosis without exposing their medical imagery to any single party.
Performance and Scalability
The system achieved a diagnostic accuracy of 75.6% using a ResNet-50 backbone, confirming that the cryptographic layers do not degrade the model's predictive capabilities. The primary trade-off remains the balance between model complexity and performance.
As shown in the performance breakdown, smaller models like LeNet-5 can complete private inference in as little as 12 milliseconds. However, more complex architectures like ResNet-50 require approximately 122 seconds of runtime and involve a communication overhead of roughly 8 GB. While these figures are high compared to plaintext inference, they represent a significant step toward making specialized private AI feasible on high-speed networks.
Conclusion and Future Work
Agentic-PPML demonstrates that decoupling intent from computation is key to practical privacy. By treating the LLM as a dispatcher and encrypting only the specialized "worker" models, the framework avoids the massive overhead of private Transformers.
Future research will focus on reducing the communication bottleneck, which currently requires high-bandwidth connections (e.g., 10 Gbps LAN) for larger models. Additionally, extending this modular approach to support Transformer-based expert models and implementing local PII scrubbing for prompts will further enhance the privacy and utility of agentic workflows.
Summary updated