Inferensys

Glossary

Programmable Bootstrapping

An extension of the bootstrapping operation in TFHE that simultaneously resets the noise budget and evaluates a lookup table function on the encrypted data, enabling arbitrary function evaluation in a single step.
Data scientist building training data pipeline on laptop, data preprocessing visible, technical workspace.
CRYPTOGRAPHIC OPERATION

What is Programmable Bootstrapping?

Programmable bootstrapping is an advanced operation in the TFHE scheme that simultaneously resets the noise budget of a ciphertext and evaluates an arbitrary lookup table function, enabling the homomorphic evaluation of non-linear functions in a single step.

Programmable bootstrapping extends the standard bootstrapping operation in the TFHE scheme by integrating function evaluation into the noise-reduction process. During a blind rotation, the ciphertext is used to select and extract a coefficient from an encrypted polynomial that encodes a lookup table (LUT). This means the output ciphertext encrypts not just a refreshed version of the input, but the result of an arbitrary function applied to it, effectively evaluating any univariate function homomorphically.

This mechanism is critical for privacy-preserving machine learning because it enables the direct evaluation of non-linear activation functions like ReLU or sigmoid on encrypted data without costly polynomial approximation. By collapsing noise management and function evaluation into a single step, programmable bootstrapping dramatically accelerates encrypted inference and serves as the foundational building block for complex homomorphic computations in schemes like TFHE.

TFHE INNOVATION

Key Features of Programmable Bootstrapping

Programmable Bootstrapping is the defining operation of the TFHE scheme that unifies noise management with arbitrary function evaluation. It transforms bootstrapping from a mere computational necessity into a powerful cryptographic primitive.

01

Unified Noise Reset and Function Evaluation

Traditional bootstrapping only refreshes the noise budget of a ciphertext. Programmable Bootstrapping performs this reset while simultaneously evaluating a lookup table (LUT) on the encrypted data. This means a single cryptographic operation both enables further computation and applies an arbitrary univariate function f(x) to the plaintext value, such as a ReLU activation or a sign function. This fusion eliminates the need to approximate functions with costly polynomial circuits before evaluating them.

1 Step
Noise Reset + Function Eval
02

Blind Rotation Mechanics

The core mechanism relies on a blind rotation of a polynomial vector. The encrypted input value determines the rotation amount, effectively selecting a specific coefficient from a pre-computed polynomial that encodes the desired lookup table. This process is 'blind' because the server performing the rotation cannot see the actual rotation index. The result is an encrypted LWE sample containing the output of the function evaluated on the encrypted input.

O(√N)
Algorithmic Complexity
03

Arbitrary Function Evaluation

Unlike other FHE schemes that require functions to be expressed as low-degree polynomials, Programmable Bootstrapping can evaluate any univariate function representable as a lookup table. This is critical for machine learning, enabling exact evaluation of non-linear activation functions like binary step, sign, or clipped ReLU without polynomial approximation errors. The function's precision is limited only by the size of the LUT encoded in the bootstrapping key.

Arbitrary
Supported Functions
04

Gate Bootstrapping and PBS Variants

In its simplest form, Programmable Bootstrapping evaluates a binary gate (e.g., NAND) on two encrypted bits, making TFHE a gate-bootstrapping scheme. This enables efficient evaluation of complex circuits. Extensions like multi-output PBS and circuit bootstrapping further optimize the evaluation of larger functions or convert between ciphertext formats (LWE to GSW), enabling composable operations within the TFHE ecosystem.

< 13ms
Typical Latency per Gate
05

Programmable Bootstrapping vs. CKKS Rescaling

While CKKS relies on rescaling and polynomial approximation for non-linear functions, TFHE's Programmable Bootstrapping provides exact evaluation. This is a fundamental architectural trade-off:

  • TFHE: Exact function evaluation on integers/bits, ideal for decision trees and discrete logic.
  • CKKS: Approximate arithmetic on real numbers, ideal for high-throughput linear algebra in deep neural networks. The choice depends on the precision and type of computation required.
Exact
TFHE Evaluation
Approximate
CKKS Evaluation
06

Chimera: Hybrid FHE Architectures

The unique properties of Programmable Bootstrapping enable hybrid FHE frameworks like CHIMERA. These architectures combine the strengths of multiple schemes:

  • Use CKKS for fast, approximate linear layers of a neural network.
  • Convert ciphertexts to TFHE using a specialized bootstrapping operation.
  • Apply exact non-linear activations via Programmable Bootstrapping.
  • Convert back to CKKS for subsequent layers. This approach achieves both high throughput and exact non-linearity.
Hybrid
Scheme Architecture
PROGRAMMABLE BOOTSTRAPPING

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the programmable bootstrapping operation in TFHE, covering its mechanism, security, performance, and role in enabling arbitrary function evaluation on encrypted data.

Programmable bootstrapping is an extension of the bootstrapping operation in the TFHE (Fast Fully Homomorphic Encryption over the Torus) scheme that simultaneously refreshes a ciphertext's noise budget and evaluates a lookup table (LUT) function on the encrypted data in a single atomic step. It works by performing a blind rotation—a cryptographic operation that homomorphically rotates a polynomial encoded with the desired function's truth table by the encrypted plaintext value. The rotation extracts the correct function output while the noise-reduction property of bootstrapping resets the ciphertext to a fresh state. This eliminates the need to approximate non-linear functions with costly polynomial arithmetic, enabling arbitrary function evaluation—including ReLU, sign, and comparison—directly on encrypted bits or integers with minimal overhead.

TFHE OPERATION COMPARISON

Programmable Bootstrapping vs. Standard Bootstrapping

A technical comparison of the standard noise-refresh bootstrapping operation against the extended programmable bootstrapping in the TFHE scheme.

FeatureStandard BootstrappingProgrammable Bootstrapping

Primary Function

Noise reduction only

Noise reduction + function evaluation

Evaluates Lookup Table

Computational Cost

High

High (comparable overhead)

Output Type

Encrypted bit with refreshed noise

Encrypted result of arbitrary univariate function

Functional Depth Added

Resets to maximum

Resets to maximum

Requires Blind Rotation

Supports Non-Linear Activation

Use Case

Extending circuit depth

Encrypted ReLU, sign, or arbitrary LUT evaluation

PROGRAMMABLE BOOTSTRAPPING

Applications in Machine Learning

Programmable Bootstrapping (PBS) transforms the bootstrapping operation from a mere noise management tool into a functional evaluation engine. It enables the execution of arbitrary univariate functions during the noise refresh cycle, making it the foundational building block for non-linear layers in encrypted neural networks.

01

Encrypted Activation Functions

PBS enables the evaluation of standard neural network activation functions directly on encrypted data. By encoding a lookup table (LUT) for functions like ReLU, Sigmoid, or Swish into the bootstrapping test vector, the operation simultaneously refreshes the ciphertext noise and applies the non-linearity.

  • ReLU: Evaluated as a precise step function during the blind rotation.
  • Sigmoid/Tanh: Approximated with high precision using polynomial or LUT encodings.
  • Efficiency: A single PBS replaces a costly high-degree polynomial approximation, reducing multiplicative depth.
1 Step
Noise refresh + function eval
02

Lookup Table (LUT) Evaluation

At its core, PBS is a programmable blind rotation that evaluates a function encoded as a Lookup Table. The ciphertext encrypting an integer x is rotated by x positions against a test vector encoding f(x), extracting the result.

  • Arbitrary Functions: Any univariate function that fits within the LUT size can be evaluated.
  • Precision: The LUT size determines the input domain precision (e.g., 10-bit inputs require a 1024-entry LUT).
  • Composability: Multiple PBS operations can be chained to evaluate multi-variate functions via tree-based compositions.
~10-50ms
Latency per PBS (GPU)
03

Integer Arithmetic on Encrypted Data

PBS enables efficient integer arithmetic operations beyond simple addition and multiplication. By encoding arithmetic functions into LUTs, operations like division, modulo, and comparison are evaluated in a single step.

  • Comparators: x > y is evaluated by encoding the comparison result into a LUT.
  • Non-linear layers: Quantized neural network layers that require integer truncation or rounding use PBS to handle the discretization.
  • Bitwise operations: AND, OR, XOR gates are natively supported in TFHE, with PBS enabling higher-level word operations.
TFHE
Underlying scheme
04

Encrypted Decision Trees

Decision tree inference is natively supported by PBS. Each internal node's threshold comparison is a univariate function of the feature value, encoded as a LUT. The tree is traversed by composing these PBS-evaluated comparisons.

  • Node evaluation: Each decision node is a single PBS operation.
  • Privacy: The feature values and the decision path remain encrypted throughout the inference.
  • Efficiency: Tree depth directly determines the number of PBS operations, making shallow trees or ensembles like random forests practical for FHE.
O(depth)
PBS complexity per tree
05

Encrypted Key-Value Stores

PBS enables private information retrieval patterns where a key is encrypted and the corresponding value is extracted from a table without revealing the key. This is a direct application of the LUT evaluation primitive.

  • Private Search: An encrypted query index retrieves a database entry in a single PBS.
  • Oblivious RAM Primitives: PBS serves as a building block for more complex oblivious data structures.
  • Use Case: Private biometric matching where an encrypted template retrieves an associated identity or score.
O(1)
Lookup complexity
06

Neural Network Quantization Compatibility

PBS naturally aligns with quantized neural networks (QNNs). The LUT-based function evaluation maps directly to the quantization tables used in low-precision inference, making PBS the ideal FHE operator for deploying compressed models.

  • Quantized ReLU: A simple step function that is trivially encoded in a LUT.
  • Weighted Sums: Performed using standard homomorphic additions and multiplications before a PBS applies the activation and requantization.
  • End-to-End: Frameworks like Concrete-ML automate the conversion of trained QNNs into PBS-based circuits.
8-bit
Typical precision
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.