Mental Health Knowledge Graph


Electronic Health Records, or EHRs, hold a wealth of data and can be invaluable for mental health-related medical research. The challenge, however, is that the large number of EHR concepts representing health conditions, laboratory tests, medication and procedures makes it tricky to pinpoint relevant information. To address this, we introduce the Knowledge Graph for Mental Health, built based on embedding vectors derived from co-occurrence patterns of EHR concepts. Detailed EHR codes have been rolled up according to ontologies including PheCodes, LOINC Codes, RxNorm, and CCS categories. For each target EHR concept such as suicide ideation PheCode, the graph shows concepts most related to the target concept according to the cosine similarity between the two embedding vectors.

Using the app

Input on the Left

  1. Input: enter some terms in the searchbar and select some rows in the table.

  2. Click “Deselect” to unselect all nodes or “Submit” to visualize your chosen nodes.

  3. “Hide the labels” checkbox: controls whether node labels are displayed in the network.

  4. “Top nodes to show” slider: to set the maximum number of nodes displayed in the network.

  5. “Cutoff of relatedness” slider: to filter out nodes with a cosine similarity below the specified value.

  6. “Filter nodes by category” dropdown: to select specific node categories for visualization.

Knowledge Network Graph

  1. Hover the network
  • hover the node
  • hover the edge
  1. Click on the node. There will be a popup window to show the details about the clicked node:
  • Table of connected nodes.
  • Hierarchy of the connected nodes.
  • Cosine similarity of the connected nodes.
  • More details.

Top Buttons

  1. Download: to download the data of the network as csv.

  2. Tutorial: a step-by-step guide.

Settings on the Right

  1. “Network” tab: customize the colors and shapes of different node categories in the network.

  2. “Expand groups” tab: to select various groups and expand them in the network to reveal the nodes within, allowing for a deeper exploration of the relationships between your chosen groups.