Systems and techniques may be used to estimate a real-time patient state during a radiotherapy treatment using a magnetic resonance linear accelerator (MR-Linac). For example, a method may include generating a dictionary of expanded potential patient measurements and corresponding potential patient states using a preliminary motion model. The method may include training, using a machine learning technique, a correspondence motion model relating an input patient measurement to an output patient state using the dictionary. The method may include estimating, using a processor, the patient state corresponding to a 2D MR image using the correspondence motion model. The method may include directing radiation therapy, using the MR-Linac, to a target according to the patient state.