How to do multi-task training with Soft parameter sharing mechanism?

Thanks for the help.
I want to build a series of LSTM or self-attention-based autoencoder models. They are used to process time-series data output by multiple sensors. Each time-series data obtained by a sensor corresponds to an LSTM or self-attention channel, and channels are softly related to each other like the figure.
what should I do to link the channels?