tfhe/spqlios-arithmetic

[Question]: support for full convolution over Z[X, Y]

Pro7ech opened this issue · 1 comments

Let $N$ (variable in $X$) be the vector size and $L$ (variable in $Y$) the number of limbs for the Base2K representation.

I understand the library supports:

  • svp_apply: scalar vector product, i.e. a Hadamard product between a vector of 1 limb (degree 0 in $Y$) and a vector of $L$ limbs (up to degree $L-1$ in $Y$):

$$[a_{1}, a_{2}, \dots, a_{N}] \odot \begin{vmatrix} [b_{1, 1}, b_{1, 2}, \dots, b_{1, N}]\\ [b_{2, 1}, b_{2, 2}, \dots, b_{2, N}]\\ \vdots\\ [b_{L, 1}, b_{L, 2}, \dots, b_{L, N}]\\ \end{vmatrix}= \begin{vmatrix} [c_{1, 1}, c_{1, 2}, \dots, c_{1, N}]\\ [c_{2, 1}, c_{2, 2}, \dots, c_{2, N}]\\ \vdots\\ [c_{L, 1}, c_{L, 2}, \dots, c_{L, N}]\\ \end{vmatrix}$$

  • vmp_apply: vector matrix product, which is from what I understood:

$$[\mathbf{a}^{1},\dots,\mathbf{a}^{L}]\cdot \begin{vmatrix} \mathbf{b}^{1, 1}, \cdots, \mathbf{b}^{1, c}\\ \vdots\\ \mathbf{b}^{r, 1}, \cdots, \mathbf{b}^{r, c}\\ \end{vmatrix} =\sum_{i=1}^{\min(r, L)} \texttt{svp}(\mathbf{a}^{i}, [\mathbf{b}^{i, 1}, \dots, \mathbf{b}^{i, c}]) =[\mathbf{a}^{1},\dots,\mathbf{a}^{c}]$$

where $\mathbf{a}^{i}$ and $\mathbf{b}^{i, j}$ are vector of size $N$.

So it seems that the support for product in the variable $Y$ is limited to a polynomial of degree 0 for one of the operands. I've seen some traces of the word convolution in the library, but I'm not sure what it relates to.

Is support for the full convolution in both the variable $X$ and $Y$ available or planned?:

$$[\mathbf{a}^{1},\dots,\mathbf{a}^{L}]\otimes[\mathbf{b}^{1},\dots,\mathbf{b}^{L}] = [\mathbf{c}^{1},\dots,\mathbf{c}^{2L}] \quad \text{(implicitly truncated to degree $L$)}$$

Yes, that's correct, the convolution that you describe is planned, but still missing:
(the user can specify which subrange of indexes must be outputted out of the 2L-sized convolution): it can be for instance [1..L] for BFV, and something like [L+1..2L] for CKKS.