Modelling the galaxy–halo connection with semi-recurrent neural networks | Synapse