It is notable that MiME consistently outperformed GRAM in both Table 3 and Figure 3 in terms of test loss and test PR - AUC . To be fair , GRAM was only using Dx code hierarchy ( thus ungrouped 5814 Dx codes were used ) , and no additional domain knowledge regarding treatment codes . However , the experiment results tell us that even without resorting to external domain knowledge , we can still gain improved predictive performance by carefully studying the EHR data and leveraging its inherent structure .   Next , we conducted a series of experiments to confirm that MiME can indeed capture the relationship between Dx codes and treatment codes , thus producing robust performance in small datasets . Specifically , we created three small datasets D 1 , D 2 , D 3 from the original data such that each dataset consisted of patients with varying degree of Dx - treatment interactions ( i.e. visit complexity ) . We defined visit complexity as below to calculate for a patient the percentage of visits that have at least two diagnosis codes associated with different sets of treatment codes ,  