explaingit

orange2019220/relupruner

Analysis updated 2026-05-18

139PythonAudience · researcherComplexity · 4/5Setup · moderate

TLDR

A research tool that removes 90 to 95 percent of a neural network's ReLU operations while keeping accuracy, to speed up privacy-preserving AI inference.

Mindmap

mindmap
  root((ReluPruner))
    What it does
      Prunes ReLU activations
      Keeps accuracy stable
      Speeds up private inference
    Method
      Teacher student training
      Taylor expansion scoring
      Progressive pruning
    Tech stack
      Python
      PyTorch
      ResNet18
    Datasets
      CIFAR-10
      CIFAR-100
      Tiny ImageNet
    Use cases
      Speed up secure computation
      Speed up homomorphic encryption
      Research on model pruning

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Reduce ReLU operations in a ResNet18 model to speed up secure multi-party computation inference.

USE CASE 2

Prune a model to make homomorphic encryption based private inference faster.

USE CASE 3

Reproduce the pruning results on CIFAR-10, CIFAR-100, or Tiny ImageNet benchmarks.

USE CASE 4

Study the teacher-student distillation approach with progressive activation pruning.

What is it built with?

PythonPyTorch

How does it compare?

orange2019220/reluprunernvlabs/isaaclabeurekainternrobotics/sim1
Stars139138141
LanguagePythonPythonPython
Last pushed2025-10-28
MaintenanceQuiet
Setup difficultymoderatemoderatehard
Complexity4/54/55/5
Audienceresearcherresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires PyTorch and training compute for the teacher and student models, associated with an AAAI 2026 paper.

The README does not state a license.

In plain English

ReluPruner is a research tool that reduces the number of a specific type of operation inside a trained neural network, called a ReLU activation, while keeping the network's accuracy roughly the same. The reason to do this is that ReLU operations are expensive to handle when running a neural network privately using cryptographic techniques. Two of those techniques are secure multi-party computation and homomorphic encryption, which let someone run AI model predictions on sensitive data without revealing the data to the server. Both methods become much faster when the model uses fewer ReLU operations. The approach works in two stages. First, a full-size teacher model is trained normally. Second, a smaller student model is trained to imitate the teacher while gradually cutting away the least important ReLU activations. To decide which ones to remove, the method uses a scoring formula based on Taylor expansion, a mathematical way to estimate how much each activation contributes to the model's output. The pruning happens progressively during training rather than all at once, so the student model can adjust at each step. The README reports that this method can remove 90 to 95 percent of ReLU operations while keeping accuracy competitive on standard image classification benchmarks. The code is written in Python and uses PyTorch. It works with the CIFAR-10, CIFAR-100, and Tiny ImageNet image datasets and the ResNet18 model architecture. The repository includes scripts for training the teacher, training the pruned student, and validating the result. Parameters for controlling the pruning target ratio and the balance between distillation loss and task loss are passed as command-line flags. The work is associated with a paper published at the AAAI 2026 conference.

Copy-paste prompts

Prompt 1
Walk me through training a teacher model and then a pruned student model with ReluPruner.
Prompt 2
Explain how the Taylor expansion scoring formula decides which ReLU activations to remove.
Prompt 3
What command-line flags control the pruning target ratio and loss balance in this repo?
Prompt 4
How would I run ReluPruner on the CIFAR-10 dataset with ResNet18?

Frequently asked questions

What is relupruner?

A research tool that removes 90 to 95 percent of a neural network's ReLU operations while keeping accuracy, to speed up privacy-preserving AI inference.

What language is relupruner written in?

Mainly Python. The stack also includes Python, PyTorch.

What license does relupruner use?

The README does not state a license.

How hard is relupruner to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is relupruner for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.