This repository accompanies a paper on the optimization of BPX preconditioners. The main idea is to introduce empirical basis functions and tune them based on the stochastic loss. The link to the paper appears shortly, as well as more thorough comments for the posted code.