Abstract: Highlights•Drug recommendation aims to suggest effective and safe drugs based on the patients’ medical history records.•RASNet could address the noisy data problem caused by periodic changes due to chronic diseases.•The exponential controller of drug–drug interaction loss could ensure the safety and accuracy of drug recommendation.•RASNet demonstrates outstanding accuracy and efficiency in drug recommendation.