Computing Generalized Convolutions Faster Than Brute Force

09/04/2022
by   Barış Can Esmer, et al.
0

In this paper, we consider a general notion of convolution. Let D be a finite domain and let D^n be the set of n-length vectors (tuples) of D. Let f : D × D → D be a function and let ⊕_f be a coordinate-wise application of f. The f-Convolution of two functions g,h : D^n →{-M,…,M} is (g ⊗_f h)(v) := ∑_v_g,v_h ∈ D^n s.t. v_g ⊕_f v_h g(v_g) · h(v_h) for every v∈ D^n. This problem generalizes many fundamental convolutions such as Subset Convolution, XOR Product, Covering Product or Packing Product, etc. For arbitrary function f and domain D we can compute f-Convolution via brute-force enumeration in O(|D|^2npolylog(M)) time. Our main result is an improvement over this naive algorithm. We show that f-Convolution can be computed exactly in O((c · |D|^2)^npolylog(M)) for constant c := 5/6 when D has even cardinality. Our main observation is that a cyclic partition of a function f : D × D → D can be used to speed up the computation of f-Convolution, and we show that an appropriate cyclic partition exists for every f. Furthermore, we demonstrate that a single entry of the f-Convolution can be computed more efficiently. In this variant, we are given two functions g,h : D^n →{-M,…,M} alongside with a vector v∈ D^n and the task of the f-Query problem is to compute integer (g ⊗_f h)(v). This is a generalization of the well-known Orthogonal Vectors problem. We show that f-Query can be computed in O(|D|^ω/2 npolylog(M)) time, where ω∈ [2,2.373) is the exponent of currently fastest matrix multiplication algorithm.

READ FULL TEXT

page 4

page 13

page 19

research
05/09/2019

General Method for Prime-point Cyclic Convolution over the Real Field

A general and fast method is conceived for computing the cyclic convolut...
research
09/01/2022

A correlation inequality for random points in a hypercube with some implications

Let ≺ be the product order on ℝ^k and assume that X_1,X_2,…,X_n (n≥3) ar...
research
06/10/2018

Convolutional number-theoretic method to optimise integer matrix multiplication

There have been several algorithms designed to optimise matrix multiplic...
research
03/02/2017

Faster truncated integer multiplication

We present new algorithms for computing the low n bits or the high n bit...
research
12/28/2016

Accelerated Convolutions for Efficient Multi-Scale Time to Contact Computation in Julia

Convolutions have long been regarded as fundamental to applied mathemati...
research
03/08/2023

Advancing Direct Convolution using Convolution Slicing Optimization and ISA Extensions

Convolution is one of the most computationally intensive operations that...
research
09/05/2019

Sticky matroids and convolution

Motivated by the characterization of the lattice of cyclic flats of a ma...

Please sign up or login with your details

Forgot password? Click here to reset