{
  "id": "2025/956",
  "url": "https://opencryptology.org/2025/956",
  "original_url": "https://eprint.iacr.org/2025/956",
  "title": "LEAF: A Low-Latency Evaluation Architecture for Feedforward Block in Privacy-Preserving Transformer Inference",
  "authors": [
    "Linru Zhang",
    "Xiangning Wang",
    "Xianhui Lu",
    "Huaxiong Wang",
    "Kwok Yan Lam"
  ],
  "affiliations": null,
  "abstract": "Fully homomorphic encryption (FHE) is an appealing and promising solution for privacy-preserving transformer inference to protect users' privacy. However, the huge computational overhead makes it unrealistic to apply FHE in real-world transformers for large language models (LLM). Current FHE-based approaches to secure transformer inference face significant performance challenges, with total latency exceeding 5 hours for 32-input batches.\nThe feedforward block, comprising a large-scale matrix multiplication followed by a GELU evaluation, is widely recognized as one of the most computationally intensive components in privacy-preserving transformer inference. In the state-of-the-art system NEXUS, evaluating the feedforward block incurs a total latency of 5,378 seconds, processing up to 32 inputs per batch. \nWe aim to reduce the latency and propose LEAF, a low-latency evaluation architecture for the feedforward block. LEAF introduces a novel combination of fast matrix multiplication and an asymptotically efficient algorithm for computing non-polynomial activations. When evaluated on the BERT-base model, LEAF reduces total latency to 53.4 seconds, offering a $100\\times$ speedup over the state-of-the-art method in the same environment. Our implementations are available.",
  "category": "Implementation",
  "license": {
    "code": "CC BY",
    "url": "https://creativecommons.org/licenses/by/4.0/",
    "label": "CC BY 4.0",
    "attribution": "“LEAF: A Low-Latency Evaluation Architecture for Feedforward Block in Privacy-Preserving Transformer Inference” by Linru Zhang, Xiangning Wang, Xianhui Lu, Huaxiong Wang, Kwok Yan Lam, Cryptology ePrint Archive, Paper 2025/956, https://eprint.iacr.org/2025/956. Licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/).",
    "retroactive": false,
    "redistribute_verbatim_only": false,
    "non_commercial": false
  },
  "dates": {
    "submitted": "2025-05-26T07:16:29Z",
    "updated": "2026-07-30T06:24:35Z",
    "withdrawn": null
  },
  "withdrawn": false,
  "withdrawn_on": null,
  "pdf": {
    "url": "https://opencryptology.org/2025/956.pdf",
    "sha256": "937fbae4dcd32f421c91f7df4ad83c3a003861b168f4bfd7798be1476a736267",
    "size": 2061201,
    "source": "github-mirror",
    "source_date": "2026-04-28T17:20:00Z",
    "maybe_stale": false,
    "newer_on_eprint": null,
    "withdrawn": false
  },
  "versions": [
    {
      "url": "https://opencryptology.org/2025/956/versions/20260428T172000Z.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "label": "copy captured 2026-04-28",
      "source": "github-mirror",
      "source_url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/956.pdf",
      "size": 2061201,
      "sha256": "937fbae4dcd32f421c91f7df4ad83c3a003861b168f4bfd7798be1476a736267",
      "is_default_pdf": true
    }
  ],
  "other_sources": [
    {
      "kind": "github-mirror",
      "url": "https://raw.githubusercontent.com/arturo-kong/IACR-eprint-mirror/master/2025/956.pdf",
      "captured_at": "2026-04-28T17:20:00Z",
      "size": 2061201
    },
    {
      "kind": "wayback",
      "url": "https://web.archive.org/web/20250901051838id_/https://eprint.iacr.org/2025/956.pdf",
      "captured_at": "2025-09-01T05:18:38Z",
      "size": 1646032
    }
  ],
  "bibtex": "@misc{cryptoeprint:2025/956,\n      author = {Linru Zhang and Xiangning Wang and Xianhui Lu and Huaxiong Wang and Kwok Yan Lam},\n      title = {LEAF: A Low-Latency Evaluation Architecture for Feedforward Block in Privacy-Preserving Transformer Inference},\n      howpublished = {Cryptology {ePrint} Archive, Paper 2025/956},\n      year = {2025},\n      url = {https://eprint.iacr.org/2025/956}\n}"
}
