atlas

Research map / Architectures and efficiency / RNNs and normalization

An Efficient Matrix Multiplication Algorithm for Accelerating Inference in Binary and Ternary Neural Networks

ICML 2025 · Architectures and efficiency › RNNs and normalization · approach: Efficient network compression and training · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes RSR and RSR++, preprocessing-based algorithms that replace vector-ternary/binary matrix multiplication with block-wise permutation and segmented sums, achieving O(n^2/log n) inference time and up to 29x matmul speedup and 5.24x LLM CPU speedup.

Problem

Inference of DNNs and LLMs with binary and ternary weight matrices is bottlenecked by vector-matrix multiplication, which costs quadratic time and memory on standard hardware.

Approach

Since weights are fixed after training, preprocess each binary column block into row-permutation and segmentation indices so that inference reuses partial sums over identical row patterns, reducing time to O(n^2/log n) and storage by a logarithmic factor; ternary matrices are split into two binary matrices.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use RSR instead of Standard for GPU inference1.58-bit Llama3-8B · GPU LLM inferenceinference time (μs): 392 $\pm$ 20 -> 225 $\pm$ 29Helped
use RSR instead of Standard for GPU inference1.58-bit Falcon3-3B · GPU LLM inferenceinference time (μs): 560 $\pm$ 24 -> 206 $\pm$ 21Helped
use RSR instead of Standard for GPU inference1.58-bit Falcon3-10B · GPU LLM inferenceinference time (μs): 364 $\pm$ 82 -> 210 $\pm$ 24Helped
use RSR or RSR++ instead of Standardbinary vector-matrix multiplication · Native C++speedup over Standard: 29xHelped
use RSR instead of NumPy matrix multiplicationbinary vector-matrix multiplication · NumPyspeedup over NumPy: 24xHelped
store permutations and segmentation lists instead of the weight matrixRSR · matrix storage, n = 2^{16}memory reduction: 5.99xHelped
replace fully connected layer matrix multiplications with RSR1.58-bit Llama3 and Falcon3 · LLM inference on CPUspeedup over Standard: 5.24xHelped
replace fully connected layer matrix multiplications with RSR1.58-bit Llama3 and Falcon3 · LLM inference on GPUspeedup over Standard: 2.5xHelped
replace RSR's standard block-product step with the structured RSR++ computation (ablation)RSR · native C++ vector-matrix multiplicationinference-time improvement: 25\%Helped

Surprising findings

Limitations

Experimental setup

Datasets: ShortQuestions (synthetic, GPT-4 generated) SimpleQuestions TREC QA

Benchmarks: SimpleQuestions TREC QA ShortQuestions

Metrics: inference time memory usage speedup

Baselines: Standard vector-matrix multiplication NumPy np.dot PyTorch BitLinear baseline

Builds on: Four Russians algorithm

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy