arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2106.15339cs.SEcs.LGcs.PL
收藏

SpreadsheetCoder:基于半结构化上下文的公式预测

SpreadsheetCoder: Formula Prediction from Semi-structured Context

UC Berkeley(加州大学伯克利分校);Google(谷歌)

Xinyun Chen, Petros Maniatis, Rishabh Singh, Charles Sutton, Hanjun Dai, Max Lin, Denny Zhou

摘要:

电子表格公式预测一直是一个重要的程序合成问题,有许多实际应用。以前的作品通常利用输入输出的例子作为规范的电子表格公式合成,其中每个输入输出对模拟电子表格中的一个单独的行。然而,这种表述并不能完全捕捉真实世界电子表格中的丰富背景。首先,电子表格数据录入被组织为表格,因此行和列不一定彼此独立。此外,许多电子表格表格包括标题,标题提供单元格数据的高级描述。然而,以前的合成方法不考虑头部作为规范的一部分。在这项工作中,我们提出了第一种方法,从表格上下文,其中包括标题和半结构化的表格数据合成电子表格公式。特别是,我们提出了一个基于BERT的模型架构,以表示表格的上下文中基于行和基于列的格式。我们在一个大型的电子表格数据集上训练了我们的模型,并证明了SpreadsheetCoder达到了42.51%的top-1预测准确率,这比不使用丰富表格上下文的基线有了相当大的改进。与基于规则的系统相比,在Google表格上编写公式的用户比基于规则的系统多82%。

英文摘要:

Spreadsheet formula prediction has been an important program synthesis problem with many real-world applications. Previous works typically utilize input-output examples as the specification for spreadsheet formula synthesis, where each input-output pair simulates a separate row in the spreadsheet. However, this formulation does not fully capture the rich context in real-world spreadsheets. First, spreadsheet data entries are organized as tables, thus rows and columns are not necessarily independent from each other. In addition, many spreadsheet tables include headers, which provide high-level descriptions of the cell data. However, previous synthesis approaches do not consider headers as part of the specification. In this work, we present the first approach for synthesizing spreadsheet formulas from tabular context, which includes both headers and semi-structured tabular data. In particular, we propose SpreadsheetCoder, a BERT-based model architecture to represent the tabular context in both row-based and column-based formats. We train our model on a large dataset of spreadsheets, and demonstrate that SpreadsheetCoder achieves top-1 prediction accuracy of 42.51%, which is a considerable improvement over baselines that do not employ rich tabular context. Compared to the rule-based system, SpreadsheetCoder assists 82% more users in composing formulas on Google Sheets.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑