Skip to content
safety-researchPublic

About

A data visualization library for AI research: consistent, publication-quality figures with one call per chart

Resources

Stars

25 stars

Watchers

0 watching

Forks

Latest commit

 

History

60 Commits

Folders and files

Repository files navigation

viz: a data visualization library for AI research. Consistent, publication-quality figures with one call per chart.

Get started  View examples

Three example figures: accuracy against compute for three model sizes on a log axis; win rates for helpful, harmless and honest with intervals; three clusters of points on two principal components.

Why viz?



Consistent
One visual language across a write-up: color roles, sizes and type that stay the same from figure to figure.


High quality
Publication-ready by default: PDFs at the printed size, accessible color and text, and alt text on every figure.


Research-focused
The charts research needs: every run as a dot, effects with intervals, training curves and transcripts.


Productive
One call per chart, a gallery to copy, and checks that flag problems before anyone reads the figure.

Quick start

npx skills add safety-research/viz

That installs the skill for Claude Code and the other agents the skills CLI supports, and the skill installs the viz command itself the first time it needs it. To use viz from Python without an agent, install it directly: uv tool install git+https://github.com/safety-research/viz.

import viz

viz.hbar({"Plain RL": 41, "Hacking penalty": 28, "Inoculation prompt": 12}, highlight="Inoculation prompt",
         roles={"control": "Plain RL", "intervention": "Inoculation prompt"},
         notes={"Plain RL": "164 of 400", "Hacking penalty": "112 of 400", "Inoculation prompt": "48 of 400"},
         title="The inoculation prompt cut reward hacking from 41% to 12%").save("fig.png")

The inoculation prompt cut reward hacking from 41% to 12%

.save() writes PNG, PDF, SVG or HTML, by the file's extension.

Gallery

Every figure is a template for one kind of question. Click one for its code, copy it and change the numbers. Every number here is made up, and error bars and bands are 95% intervals.

Comparisons

Rates across conditions and models, with their intervals.

Rates by condition Grouped bars Bars with every seed Effect sizes with intervals Outcome breakdown

Training dynamics

A behavior or reward over training steps.

Curves with every seed Several models over training Smoothed RL reward Events on a curve Shares over training

Evaluations

Many models on many evals, trade-offs and scaling.

Models on benchmarks Results table Attacks by model Two measures per model Trade-off frontier Scaling law

Monitors and probes

How well a monitor, classifier or probe catches a behavior.

ROC curves Score distributions Confusion matrix Probe accuracy by layer

Interpretability

Inside the model: activations, scores on each token, steering.

Activations in 2D Token scores Steering strength

Self-reports and ratings

What a model says about itself, how judges rate it, and whether the two agree.

Self-reports on a scale Ratings before and after Traits measured several ways

Distributions

Many values per condition, such as lengths, times or scores per item.

Histogram Box plot Dots per item

Transcripts

What the model said and did.

Contrasting replies Transcripts side by side Agent with tool calls

Multi-panel figures

Several charts in one figure, with one legend.

Panels with one legend

Learn more

  • Guide: how to title, color and size a figure, and what the checks flag.
  • Reference: every chart and option, the command line and JSON specs.
  • Examples: every template with its code.

License

MIT. The bundled fonts, Newsreader, DM Sans and JetBrains Mono, are under the SIL Open Font License; their license files are in src/viz/fonts.

About

A data visualization library for AI research: consistent, publication-quality figures with one call per chart

Resources

Stars

25 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages