boundlab.ops.deept.deept_precise_estimate#

boundlab.ops.deept.deept_precise_estimate(x, y, *, block_size=128)[source]#

Bound the quadratic error term in a zonotope matrix product.

x and y contain the generators of an (m, k) and (k, n) matrix respectively, with the shared error-symbol dimension last. The straightforward DeepT implementation materializes

einsum("mki,knj->mnij", x, y),

which requires O(m*n*errors**2) memory. This implementation computes the same row and column absolute sums in blocks. It therefore retains BLAS-friendly matrix multiplications on CPU while using only O(m*n*errors*block_size) temporary memory.

Parameters:
  • x (Tensor) – Generator coefficients with shape (m, k, errors).

  • y (Tensor) – Generator coefficients with shape (k, n, errors).

  • block_size (int) – Number of left error symbols processed at once.

Returns:

(center, halfwidth), both with shape (m, n).

Return type:

tuple[Tensor, Tensor]