GraphML, graph machine learning, and interactive graph visualization

GraphML is a portable XML format for graph data. Graph machine learning uses graph structure to make predictions about nodes, links, and entire graphs. This guide explains both - and shows how yFiles for HTML can help you visualize, inspect, and build interactive graph ML applications.

Graph ML Playground GraphML demo Try yFiles for HTML

You have questions about graph visualization?

Get in touch to discuss your specific challenges with our diagramming experts. We're here to provide the guidance you need.

Terminology

First: GraphML is not the same as graph ML

Two terms that sound similar but describe different things.

File format

GraphML

GraphML stands for Graph Markup Language. It is an XML-based format for describing graph structures: nodes, edges, labels, and application-specific data attributes. When graph data needs to be exchanged, stored, or inspected across tools, GraphML provides a portable, schema-validated representation.

Spec: graphml.graphdrawing.org

Machine learning

Graph ML

Graph ML refers to graph machine learning — a family of methods that learn from graph-structured data. A model can learn from the attributes of individual nodes and edges, but also from the topology of the graph itself: the connections, neighborhoods, and paths between entities. Applications include citation networks, molecules, knowledge graphs, fraud detection, recommenders, and supply chains.

Similar names, but the two meet in practice: graph machine learning starts with graph data, and that data often needs to be visualized, exchanged, debugged, and explained.

Graph data SerializeGraphML yFiles for HTMLVisualize + interact TrainGraph ML

Explainer

What is graph machine learning?

Graph ML explained through examples rather than equations. A graph represents entities and relationships. A model can learn not only from attributes of individual items, but also from how those items are connected.

Node classification

Predict the class or label of individual nodes — a paper's topic in a citation network, a user's role in a social graph, or a transaction's risk in a financial network.

Link prediction

Estimate whether an edge should exist between two nodes — useful for recommender systems, knowledge graph completion, fraud ring detection, and protein interaction prediction.

Graph classification

Classify or score an entire graph — determine whether a molecule is soluble, whether a process diagram has anomalies, or which software dependency graph has the highest risk profile.

Why it matters

Graph ML is easier to understand when the graph stays visible

Graph machine learning workflows involve adjacency matrices, tensors, embeddings, and model outputs — essential for training, but they can obscure the structure that domain experts care about.

Before: raw model output

node_id feat_vec pred score
n0 [0.12, 0.88…] A 0.91
n1 [0.09, 0.76…] A 0.83
n2 [0.44, 0.31…] B 0.67
n3 [0.71, 0.14…] C 0.59
n4 [0.33, 0.50…] B 0.78

Structure and neighborhoods are hidden.

After: mapped to an interactive graph

A graph showing training data for a GNN.

Color = predicted class

With yFiles, these views become part of an app: users can pan, zoom, select nodes, inspect features, run layouts, filter large networks, and connect visual interactions to model results.

Workflow

Where GraphML fits in a graph ML workflow

GraphML is one practical interchange and inspection format — not the only one, but a well-specified option when you need XML-based portability.

1. Collect

CSV, JSON, RDF, NetworkX, PyG, DGL, or domain databases

2. Represent

Nodes, edges, labels, weights, feature metadata

3. Export as GraphML

XML-based portable interchange for inspection and tooling

4. Visualize

yFiles: layout, interaction, pan, zoom, filter

5. Overlay ML

Predictions, confidence, embeddings, explanations

Round-trip: from yFiles, users can annotate, re-export as GraphML, and feed corrections back into the ML pipeline.

Interactive demo

Try a graph ML visualization playground

Below, you will find a demo that shows how Graph Machine Learning can be used to identify patterns in a graph structure. yFiles can use the classification to apply a matching layout, further highlighting the identified patterns.

The demo uses a machine learning model and trains it inside the browser to recognize patterns in a graph structure. yFiles then uses the classification to apply either a tree-, force-directed, or orthogonal layout.

Spot the unclassified structures in gray? Click Infer Colors in the top right of the demo to classify them with the model. Then experiment by modifying the graph model and rerunning the classifier and layout to see your changes in action.

More examples

Other graph ML visualization scenarios

Each scenario demonstrates a different graph ML task and a different reason why keeping the graph visible matters.

Link prediction

Knowledge graph completion

Select two nodes to see predicted link probability. Candidate edges appear as dashed lines. Useful for recommender systems, knowledge graph completion, and fraud ring investigations.

Graph classification

Molecular property prediction

Atoms as nodes, bonds as edges, whole-graph prediction. Useful for drug discovery, toxicity screening, and material property estimation. Color encodes atom type; prediction shown at graph level.

Representation learning

Synchronized embedding map

Two linked views: graph structure and 2D embedding projection. Selecting a node in either view highlights it in the other. Shows how graph ML transforms structural context into learned representations.

Explainability

Explainable GNN neighborhood

A prediction is shown alongside a highlighted explanatory subgraph — the k-hop neighborhood or attention-weighted edges most influential in reaching the result. Positions yFiles as an inspection and explanation layer.

yFiles

Build interactive graph ML tools with yFiles

yFiles is family of graph visualization libraries for building interactive graph applications for the web, mobile, and the desktop. For graph machine learning projects, it provides the visualization layer: layout, interaction, styling, editing, and integration.

Load and save GraphML

Built-in GraphML I/O: load graph structure and data attributes, save annotated results.

Display ML predictions

Map class labels, confidence scores, embeddings, and explanations directly to node and edge styles, heat maps, and more.

Automatic layouts

Organic, hierarchical, orthogonal, circular, and radial layouts that make complex structures readable at a glance.

Custom node styles

Encode uncertainty, confidence bands, or attention weights as visual attributes with full style control.

Interactive exploration

Pan, zoom, click-to-inspect, neighborhood highlighting, and filterable large networks.

Integrate with existing apps

Works with desktop and cross platform technologies, as well as web technologies like React, Angular, Vue, or plain JavaScript. Embed graph views in research tools, dashboards, and web applications.

Ready to build your data visualization app?

Download yFiles now!

For researchers

Designed for inspection, not just presentation

Graph ML visualization for academic and technical users means preserving access to data, not hiding it behind decorative visuals.

  • Preserve access to underlying graph structure and metadata
  • Show uncertainty and model output explicitly alongside ground truth
  • Support reproducible examples with exportable GraphML snapshots
  • Compare labels, predictions, and explanations side by side
  • Avoid hiding assumptions behind decorative or opaque visuals

Applications

Where graph machine learning visualization helps

01

Research prototypes

Inspect graph datasets, labels, model outputs, and explanations during model development.

02

Model debugging

Find mislabeled nodes, suspicious neighborhoods, data leakage, or unexpected cluster formation.

03

Knowledge graphs

Explore entity relationships, inferred links, and confidence scores across large knowledge bases.

04

Fraud and risk

Investigate suspicious subgraphs, connected accounts, and transaction patterns in financial networks.

05

Drug discovery

Visualize molecular graphs and predicted graph-level properties for chemistry and biology teams.

06

Recommendation systems

Explain why users, items, papers, or products are connected in bipartite or knowledge graphs.

Get started

From graph data to interactive graph applications

If your team is building a graph ML tool, a GraphML viewer, or an interactive browser-based graph application, yFiles for HTML provides the visualization layer: layout, interaction, styling, editing, and integration.

Common questions

Is GraphML the same as graph machine learning?

No. GraphML is an XML-based graph file format for representing graph structure and data. Graph machine learning is a field of machine learning that works with graph-structured data.

Can GraphML store machine learning features and predictions?

GraphML can store graph structure and application-specific data using <data> elements keyed by <key> declarations. Node attributes, edge weights, class labels, and prediction scores can be encoded this way, depending on how consuming tools interpret the data fields.

Can yFiles for HTML load and save GraphML?

Yes. yFiles for HTML includes built-in GraphML I/O support. You can load a GraphML file, attach custom data attributes, and save the annotated graph back to GraphML. The GraphML demo shows this in the browser.

Is yFiles a graph machine learning framework?

No. yFiles is a graph visualization and diagramming library. It does not replace frameworks such as PyTorch Geometric, DGL, or NetworkX. Instead, yFiles provides the interactive visual layer for graph ML systems.

Can the playground include live graph ML models?

Yes, in principle. A demo can display precomputed predictions, confidence values, embeddings, and explanations without running inference in the browser. Live in-browser model inference via ONNX or WebAssembly can be added once the visualization layer is in place.

Recap

GraphML, graph machine learning, and interactive graph visualization

GraphML is a portable XML format for graph data. Graph machine learning uses graph structure to make predictions about nodes, links, and entire graphs.

This guide explains both — and shows how yFiles can help you visualize, inspect, and build interactive graph machine learning applications.

Related content

Got questions about
GraphML and graph ML?

Email: hello@yworks.com
Phone: +49 7071 9709050

Get in touch

Ready to build your data visualization app?

Download yFiles now!

Choose your next steps

Get connected

Connect with our Customer Success Team regarding your ideas or projects.

Connect with the real graph drawing experts.

Dive deep

Get more detailed information about specific yFiles topics.

Download yFiles

Try yFiles free of charge.

Download the yFiles trial version.