Felid: A Flexible and Efficient Design for Transformer Fine-Tuning over Encrypted Data
Linru Zhang, Jun J Sim, Xiangning Wang, Jiahao Zhong, Kaiyu Zhou, Huanyi Ye, Yongsen Zheng, Lushan Song, Xiaojian Liang, Yingting Liu, Yujing Sun, Huaxiong Wang, Pu Duan, Kwok-Yan Lam
NeurIPS page · OpenReview · Open on the map
Category: Efficient LLM Inference & Training › Low-Rank LLM Quantization Compression · Type: system or tooling · Keywords: homomorphic encryption, transformer fine-tuning, ciphertext packing, matrix evaluation optimization, functional bootstrapping
Areas: Privacy & Federated Learning › Federated Privacy Methods › Medical Privacy
Summary
Felid introduces a flexible packing strategy and operation-specific matrix evaluation algorithms that cut ciphertext rotations, relinearizations, and bootstrapping by up to 30× and 2.5×, enabling BERT fine-tuning over encrypted data in 650 seconds with an 8× speedup.
Explained to a 5-year-old
People want to teach a big computer brain new things using secret information, but it’s very slow. The new idea helps the computer group many lessons together so it can learn faster. It also uses special tricks to make the learning steps simpler and less work. Because of these tricks, the computer can finish learning in just a few minutes instead of many hours. This lets secret information stay safe while the computer gets better at understanding language.
Explained to a 5-year-old, longer
Sometimes people have very private information they don’t want anyone to see, like medical records or personal messages. They still want to teach big computer programs, like chatbots, new things using that private information. Doing this with encryption is like solving a puzzle where every step is very hard and takes a long time. The paper comes up with a new way to pack many pieces of information together so they can be processed at once. This packing trick lets the computer handle more data in a single batch, just like putting many toys in one box. They also design special ways to do the math operations that are needed, which reduces the number of complicated steps. By making these steps simpler, they cut down on the number of times the computer needs to do a special operation called rotation. They also reduce how often they need to do another heavy operation called bootstrapping. Additionally, they combine the work of applying simple functions, like making numbers bigger or smaller, directly into the bootstrapping step. All these improvements together make the whole learning process about thirty times faster in terms of rotations and relinearizations. They also need about two and a half times fewer bootstrapping operations. As a result, the computer can finish teaching a small language model new words in just a few minutes, which is eight times quicker than before.
For a technical reader
Felid tackles the high computational cost of homomorphic encryption in transformer fine-tuning by introducing a flexible packing scheme that batches inputs efficiently. It then designs matrix evaluation algorithms that cut down on rotations, relinearizations, and bootstrapping, and merges activation function evaluation into the bootstrapping step. These optimizations lead to a 30× reduction in rotations/relinearizations, a 2.5× reduction in bootstrapping, and an overall 8× speedup for fine-tuning a BERT-style model. The result is a practical framework for privacy-preserving model updates on sensitive data.
Problem
Fine-tuning large language models over encrypted data is computationally expensive due to the high cost of homomorphic operations such as rotations, relinearizations, and bootstrapping, limiting practical privacy-preserving adaptation.
Method
The approach employs a novel packing strategy that batches inputs flexibly, designs operation-specific matrix evaluation algorithms to minimize ciphertext rotations and relinearizations, and integrates element-wise activation evaluation into the bootstrapping step via functional bootstrapping.
Results
The framework achieves a 30× reduction in ciphertext rotations and relinearizations, a 2.5× reduction in bootstrapping invocations, and completes fine-tuning of a 2-layer BERT model with batch size 16 in 650 seconds, delivering an 8× speedup over prior work.
Contributions
It introduces a flexible packing scheme, operation-specific matrix evaluation algorithms, and functional bootstrapping integration that collectively lower the homomorphic computation cost, enabling practical encrypted fine-tuning of transformer models.
Practical relevance
Enables organizations to fine-tune large language models on highly sensitive data while keeping inputs encrypted, facilitating secure AI development in fields like healthcare and finance.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction