PlotCoder: Hierarchical Decoding for Synthesizing Visualization Code in Programmatic Context

By Xinyun Chen, Linyuan Gong, Alvin Cheung, Dawn Song. 2021

25 citations recorded by the source corpus.

Creating effective visualization is an important part of data analytics. While there are many libraries for creating visualization, writing such code remains difficult given the myriad of parameters that users need to provide. In this paper, we propose the new task of synthesizing visualization programs from a combination of natural language utterances and code context. To tackle the learning problem, we introduce PlotCoder, a new hierarchical encoder-decoder architecture that models both the code context and the input utterance. We use PlotCoder to first determine the template of the visualization code, followed by predicting the data to be plotted. We use Jupyter notebooks containing visualization programs crawled from GitHub to train PlotCoder. On a comprehensive set of test samples from those notebooks, we show that PlotCoder correctly predicts the plot type of about 70% samples, and synthesizes the correct programs for 35% samples, performing 3-4.5% better than the baselines.

Subfields: Artificial Intelligence, Computer Vision and Pattern Recognition, Code Generation & Program Synthesis

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Luke S. Zettlemoyer
  2. Jianfeng Gao
  3. Graham Neubig
  4. Nan Duan
  5. Mohit Bansal
  6. Percy Liang
  7. Caiming Xiong
  8. Pengcheng Yin

In Computer Vision and Pattern Recognition

  1. Jianfeng Gao
  2. Nan Duan
  3. Luke S. Zettlemoyer
  4. Luc Van Gool
  5. Daniel Fried
  6. Trevor Darrell
  7. Cordelia Schmid
  8. Dacheng Tao

In Code Generation & Program Synthesis

  1. Charles Sutton
  2. Daniel Fried
  3. Colin B. Clement
  4. Kensen Shi
  5. Nan Duan
  6. Michele Catasta
  7. Luke S. Zettlemoyer
  8. Oleksandr Polozov

Citations in the corpus