# kwon2019retain

# RetainVis: Visual Analytics with Interpretable and Interactive Recurrent Neural Networks on Electronic Medical Records


Kwon et al. build an interpretable and interactive visual analytics system, RetainVis shown in Figure 1, to visualize the results produced via deep learning with recurrent neural networks (RNNs) on electronic medical records. Since the RNNs use a black-box approach (a hidden layer for propagation, see Figure 2.), it is difficult to tie the predictions to particular features used during training [1], the primary objective of RetainVis is to help domain experts better understand why the predictions were produced.

Figure 2. An illustration of recurrent neural networks [1:1]


RetainVis has 5 areas, illustrated by Figure 1.

Area A shows an overview of all patients:

  • A scatter plot shows the risks of comorbidities of a chosen disease.
  • The bar chart on the top left shows the top three contributors with their scores.
  • Another bar chart, an area chart and a circle chart show the distribution of gender, age and predicted risks.

Area B shows a summary of selected patients:

  • A table shows number of patients, accuracy of predictions, mean predicted diagnosis risk, number of medical codes, name of top contributing medical codes and sum of contribution scores.
  • A distribution progress chart depicts:
    • Axes aligned to the final visit of patients.
    • The means and standard deviation over time as area paths along with the x axis.
    • Thickness represents variance, and the vertical spikes show the mean around each visit.
  • A bar chart shows the top 9 contributors.

Area C shows a list of patients with high predicted risk in developing comorbidities of the chosen disease.

Area D shows a patient editor which allows the sorting of medical codes by the contribution score or by the code type.

Area E shows the details for a single patient:

  • A line chart depicts the predicted risks over time.
  • Glyphs are used to represent different medical codes.
  • A bar chart shows the top 9 contributors.

Related Work

The authors review the work by Arajo et al. [2], Han et al. [3] , Havaei et al. [4] and Kamnitsas et al. [5] on the classification of medical records using neural networks.

Previous RNNs-based models built by Prakash et al. [6] and Ribeiro et al. [7] for patient diagnosis, are used by the authors as baselines for benchmarking.

Bridging the gap of domain and visualization experts with a Liaison by Simon et al. [8] serves as the cornerstone for the design of the visualization components in RetainVis.

Data Characteristics

  • Data source: The Health Insurance Review and Assessment Service (HIRA), the national health insurance service in the Republic of Korea.
  • Size: 51 million patients
  • Spatial dimensionality: 2D
  • Temporal dimensionality: static
  • Type: multivariate, unknown number of variables

Visualization Techniques

  • Scatter plot
  • Area chart
  • Matrix plot
  • Glyph
  • Histogram
  • Dimensionality reduction

Papers Cited


Years Spanned


Application Domain

  • Interactive Artificial Intelligence
  • Deep Learning
  • Electronic Health Record Visualization
  • Medical focus: Cross-Specialty


  1. Aggarwal, C. C. (2019). Recurrent Neural Networks, pp. 272. https://doi.org/10.1007/978-3-319-94463-0_7 ↩︎ ↩︎

  2. Bardou, D., Zhang, K., & Ahmad, S. M. (2018). Classification of Breast Cancer Based on Histology Images Using Convolutional Neural Networks. IEEE Access. https://doi.org/10.1109/ACCESS.2018.2831280 ↩︎

  3. Han, Z., Wei, B., Zheng, Y., Yin, Y., Li, K., & Li, S. (2017). Breast Cancer Multi-classification from Histopathological Images with Structured Deep Learning Model. Scientific Reports. https://doi.org/10.1038/s41598-017-04075-z ↩︎

  4. Havaei, M., Davy, A., Warde-Farley, D., Biard, A., Courville, A., Bengio, Y., … Larochelle, H. (2017). Brain tumor segmentation with Deep Neural Networks. Medical Image Analysis. https://doi.org/10.1016/j.media.2016.05.004 ↩︎

  5. Kamnitsas, K., Ledig, C., Newcombe, V. F. J., Simpson, J. P., Kane, A. D., Menon, D. K., … Glocker, B. (2017). Efficient multi-scale 3D CNN with fully connected CRF for accurate brain lesion segmentation. Medical Image Analysis. https://doi.org/10.1016/j.media.2016.10.004 ↩︎

  6. Prakash, A., Zhao, S., Hasan, S. A., Datla, V., Lee, K., Qadir, A., … Farri, O. (2016). Condensed Memory Networks for Clinical Diagnostic Inferencing. Retrieved from http://arxiv.org/abs/1612.01848 ↩︎

  7. Ribeiro, M. T., Singh, S., & Guestrin, C. (2016). “Why Should I Trust You?” Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining - KDD ’16. https://doi.org/10.1145/2939672.2939778 ↩︎

  8. Svenja Simon, SEbasstian Mittelstadt, Daniel Keim, M. S. (2015). Bridging the gap of domain and visualization experts with a Liaison. Medical Journal of Australia. https://doi.org/10.2312/eurovisshort.20151137 ↩︎

🔄 Last Updated: 7/8/2020, 9:48:18 PM