I saw a paper (https://arxiv.org/abs/1910.10147) where they learn L based on the following cost function:
D_1L(q(k-1), q(k)) + D_2L(q(k),q(k+1)) = 0
Here D is