← Latest papers
💻 computer science

Decision-Aware Quadratic ReLU Replacement for HE-Friendly Inference

This paper proposes a decision-aware quadratic ReLU replacement method for Fully Homomorphic Encryption (FHE) inference that, by formulating the problem as a linear separation task in a lifted space, achieves calibration-set decision preservation without retraining while significantly accelerating inference speed compared to existing polynomial approximation techniques.

Original authors: Rui Li, Wenyuan Wu, Weijie Miao

Published 2026-05-22
📖 5 min read🧠 Deep dive

Original authors: Rui Li, Wenyuan Wu, Weijie Miao

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: The "Locked Box" Problem

Imagine you have a very smart AI (a neural network) that can tell you if an email is spam or not. You want to send your private email to a server to get this answer, but you don't trust the server with your data. So, you lock your email in a special "magic box" (called Fully Homomorphic Encryption or FHE).

The server can open the box, do math on the locked data, and give you a locked answer, all without ever seeing the actual email. This is great for privacy.

The Problem: The AI needs to make a decision like "Is this number positive or negative?" (a step called ReLU). In the real world, this is easy. But inside the "magic box," the server can only do simple addition and multiplication. It cannot easily do "if/then" decisions. To make the AI work inside the box, scientists usually replace the decision with a complex math curve (a high-degree polynomial).

The Old Way: Think of this like trying to draw a perfect circle using a ruler. You have to use a very long, complicated ruler (a high-degree polynomial) to get close enough to a circle. This takes a lot of time and effort (computing power) for the server.

The New Idea: "Decision-Aware" Replacement

The authors of this paper asked a different question: Do we need the curve to look exactly like the decision at every single point? Or do we just need the final answer to be the same?

The Analogy:
Imagine you are navigating a maze.

  • The Old Way: You try to trace the exact path of the maze walls with a pen. If you miss the wall by a tiny bit, you think you failed. You need a very precise pen (complex math).
  • The New Way: You only care about reaching the exit. If you take a slightly different path that still leads to the same exit, you are happy. You don't need a complex pen; a simple, short path (a low-degree quadratic curve) is enough, as long as it gets you to the right door.

The paper calls this "Decision-Aware." Instead of trying to perfectly mimic the AI's internal "thinking" (the activation), they only care that the final "Yes/No" or "Class A/Class B" decision stays the same for a specific set of test data (the calibration set).

The Solution: The "Quadratic" Shortcut

The authors found that a simple quadratic equation (a U-shaped curve, like x2x^2) is the "sweet spot."

  • It's simple enough for the "magic box" to handle quickly.
  • It's flexible enough to guide the AI to the correct final decision.

They developed a method to find the perfect settings (coefficients) for this U-shaped curve. They treat the problem like a game of geometry:

  1. The Binary Case (Yes/No): They take all the "Yes" examples and all the "No" examples and turn them into points on a 2D map. If the "Yes" points and "No" points can be separated by a straight line with a little breathing room (a positive margin), they can mathematically prove that a simple U-shaped curve will work perfectly.
  2. The Hard Cases: Sometimes the points are mixed up, and you can't draw a clean line. In this case, they use a "soft" version of the math (like a rubber band) that ignores a few messy outliers. This gives them a "good enough" curve that works for almost all cases.

The Results: Faster and Just as Smart

They tested this on real-world tasks (like recognizing images or classifying text) using the "magic box" (FHE).

  • Accuracy: Their method kept the AI's accuracy almost exactly the same as the original AI (and much better than the old "simple square" method).
  • Speed: Because their curve is so simple (just a U-shape), the server didn't have to do as many heavy calculations.
    • It was 3.7 to 4.1 times faster at the specific step where the decision is made compared to the previous best method (Remez-7).
    • The whole process from start to finish was 1.18 to 1.68 times faster.

Summary

Think of this paper as finding a shortcut through a forest.

  • Old Method: You try to walk exactly along the winding river (the complex math curve). It's precise but slow and tiring.
  • New Method: You look at where the river leads (the final decision) and cut a straight path through the trees using a simple curve. You arrive at the same destination, but you get there much faster and with less effort, all while keeping your map (data) hidden in a locked box.

The authors have also released a free software library called QUAD4FHE so others can use this shortcut.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →