google / google/heir

New Research on "Tricycle: Private Transformer Inference with Tricyclic Encodings"

Open
#1,938 0 comments 1 reaction 1 assignee Claimed by @lawrencekhlim View on GitHub
Dominant language
MLIR
Stars
906
Forks
171
Avg merge
4d 12h
Merged PRs (30d)
32

Description

Here are some things discussed in the paper (linked [here](https://eprint.iacr.org/2025/1200)):
- Bicyclic Encodings (for matrix multiplications) and Tricyclic Encodings (for batch matrix multiplications)
- Baby Step-Giant Step (BSGS) Algorithm (also using in other papers such as Orion) to reduce the number of rotations in matmuls
- Stable softmax
- Row-wise operations
- Application to LLM Inference

Other optimizations not discussed in detail:
- Hoisting Optimization (for rotations)
- Reusing rotations in block matrix multiplications

For now, I think the most pertinent things to put into HEIR are tricyclic encodings and BSGS, as these are the most widely applicable. Most novel matrix multiplication algorithms (under homomorphic encryption) these days use BSGS and it is also generically applicable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.