Machine learning reveals cause-effect relationships in protein dynamics