AI & ML · 2023
Data2Vis Reimplementation
From-scratch PyTorch reimplementation of Data2Vis, generating Vega-Lite visualization specs from JSON data with a GRU encoder-decoder.
- Outcome
- Reimplemented the Data2Vis paper from scratch: a character-level sequence model that learns to write Vega-Lite chart specs from raw JSON data.
- Stack
- PyTorch
- Status
- Research
- Architecture
- GRU encoder-decoder + attention
- Task
- JSON data → Vega-Lite spec
- Framework
- PyTorch
Overview
A reimplementation of the Data2Vis paper, which treats visualization as translation: a sample of a dataset goes in as JSON, and a Vega-Lite specification comes out. The model is a character-level encoder-decoder with GRUs and attention, written in plain PyTorch with a custom vocabulary and data pipeline. Training was compute-limited — the paper used batches of 32 for 20,000 steps, while the local machine fit batches of 4 — so the notebook documents a one-epoch run and its loss curve rather than a fully converged model.