Programs offer compactness and structure that makes them an attractive representation for visual data. We explore how code rewriting can be used to improve systems for inferring programs from visual data. We first propose Sparse Intermittent Rewrite Injection (SIRI), a framework for unsupervised bootstrapped learning. SIRI sparsely applies code rewrite operations over a dataset of training programs, injecting the improved programs back into the training set. We design a family of rewriters for visual programming domains: parameter optimization, code pruning, and code grafting. For three shape programming languages in 2D and 3D, we show that using SIRI with our family of rewriters improves performance: better reconstructions and faster convergence rates, compared with bootstrapped learning methods that do not use rewriters or use them naively. Finally, we demonstrate that our family of rewriters can be effectively used at test time to improve the output of SIRI predictions. For 2D and 3D CSG, we outperform or match the reconstruction performance of recent domain-specific neural architectures, while producing more parsimonious programs that use significantly fewer primitives.
翻译:程序具有紧凑性和结构性,使其成为视觉数据的有吸引力的表示形式。我们探索如何利用代码重写来改进从视觉数据推断程序的系统。首先提出稀疏间歇式重写注入(SIRI)——一种无监督的自举学习框架。SIRI在训练程序数据集上稀疏地应用代码重写操作,将改进后的程序重新注入训练集。针对视觉编程领域,我们设计了一组重写器系列:参数优化、代码剪枝和代码嫁接。针对2D和3D中的三种形状编程语言,实验表明,与不使用重写器或幼稚使用重写器的自举学习方法相比,采用SIRI及我们设计的重写器系列能提升性能:实现更好的重建效果和更快的收敛速度。最后,我们证明该重写器系列可在测试阶段有效改进SIRI预测的输出。在2D和3D CSG任务中,我们的方法在生成更简洁(使用显著更少的基元)程序的同时,超越或达到了近期领域专用神经架构的重建性能。