ReLATE (reinforcement-learned adaptive tensor encoding) is a learning-augmented framework that discovers safe and efficient sparse tensor encodings for tensor decomposition (TD), without labeled training samples. An autonomous agent learns optimized encodings through direct interaction with the TD environment, using a hybrid model-free and model-based algorithm that learns from both real and imagined actions. To guarantee functionally correct encodings with bounded execution time even during early learning, ReLATE introduces elastic training, rule-driven action masking, and dynamics-informed action filtering. After offline training, ReLATE deploys the best encoding with zero inference overhead, adapting to irregular tensor shapes and data distributions to consistently outperform expert-designed formats by up to 2×. The detailed algorithms are described in the following paper:
- ReLATE: Accelerating Tensor Decomposition via Safe and Efficient Learning of Sparse Encodings. Ahmed E. Helal, Fabio Checconi, Jan Laukemann, Yongseok Soh, Jesmin Jahan Tithi, Fabrizio Petrini, Jeewhan Choi. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC26), November 2026.
ReLATE learns encodings for the ALTO library (extern/) and drives it from Python.
Build the two ALTO Python extensions (64- and 128-bit masks) with the Intel oneAPI
compiler, then install the Python dependencies:
cd src
MASK_BITS=64 CC=icx pip install --user --no-build-isolation .
MASK_BITS=128 CC=icx pip install --user --no-build-isolation .
pip install torch mpi4py numpy matplotlib pyyamlTraining and evaluation run as two-rank MPI jobs, with the client and
benchmarking server on separate nodes, so an Intel MPI runtime
(mpiexec.hydra) and MKL are also required.
Each tensor is given by its prefix <name> (a <name>.tns COO file and a
<name>.head metadata file). ALTO_BITS selects the 64- or 128-bit extension to
match the tensor.
Training discovers an encoding for a tensor and logs it:
mpiexec.hydra -n 2 -ppn 1 -genv ALTO_BITS 64 \
python src/main.py -i /path/to/tensor -r 16 -k 1 > tensor.logEvaluation benchmarks the best learned encoding (from the training log) against baseline ALTO:
mpiexec.hydra -n 2 -ppn 1 -genv ALTO_BITS 64 \
python src/eval.py -i /path/to/tensor -l tensor.log -r 16 -k 100 -n 3| variable | description | options |
|---|---|---|
ALTO_BITS (env) |
ALTO mask width selected at runtime | 64, 128 |
MASK_BITS (build) |
mask width of the extension built by pip |
64, 128 |
-r |
decomposition rank | integer |
-k |
benchmark iterations per reward evaluation | integer |
-z |
tensor input indexing | 0 (one-based), 1 (zero-based) |
eval.py -n |
evaluation measurement repeats | integer |
eval.py --top-k |
candidate encodings evaluated | integer |
main.py --config |
hyperparameter YAML (defaults to src/config.yaml) |
path |
We tested ReLATE with the Intel oneAPI toolchain (CC=icx, MKL, Intel MPI), but
the underlying ALTO library also builds with GCC (see extern/), so the
extensions can be built with CC=gcc as well.
Scripts and data that reproduce the paper's figures and tables are under repro/
(see repro/README.md).
ReLATE is released under the MIT License. Please see the 'LICENSE' file for details.