{"url":"/dataset/pcfg-set","name":"PCFG SET","full_name":"Probabilistic Context Free Grammar String Edit Task","description_markdown":"The Probabilistic Context Free Grammar String Edit Task (PCFG SET) dataset is a dataset with sequence to sequence problems specifically designed to test different aspects of **compositional generalisation**. In particular, the dataset contains splits to test for *systematicity*, *productivity*, *substitutivity*, *localism* and *overgeneralisation*.\r\n\r\nThe input alphabet of PCFG SET contains three types of words: words for unary and binary functions that represent \\emph{string edit operations} (e.g. $\\texttt{append}, \\texttt{copy}, \\texttt{reverse})$, elements to form the string sequences that these functions can be applied to (e.g. $\\texttt{A}, \\texttt{B}, \\texttt{A1}, \\texttt{B1}$), and a separator to separate the arguments of a binary function ($\\texttt{,}$). The input sequences that are formed with this alphabet are sequences describing how a series of such operations are to be applied to a string argument. For instance:\r\n\r\n- $\\texttt{repeat A B C }$ \r\n- $\\texttt{echo remove\\_first D K , E F}$ \r\n- $\\texttt{append swap F G H , repeat I J}$ \r\n\r\nThe input sequences are generated with a PCFG, whose production probabilities are learned with EM to match the depth and length distributions in a corpus with English sentences.\r\n\r\nThe output of a PCFG SET sequence, representing its meaning, is constructed by recursively applying the string edit operations specified in the sequence. For instance: \r\n\r\n- $\\texttt{repeat A B C }$  &  $\\rightarrow$  &  $\\texttt{A B C A B C}$ \r\n- $\\texttt{echo remove\\_first D K , E F}$  & $\\rightarrow$ & $\\texttt{E F F}$\r\n- $\\texttt{append swap F G H , repeat I J}$  & $\\rightarrow$ & $\\texttt{H G F I J I J }$\r\n \r\nThe string alphabet used for the construction of the dataset has 520 distinct elements, the length of the string arguments to a functions is limited to 5.The dataset contains around 100 thousand examples in total.  A full description of the dataset can be found in Hupkes et al (2020).","description_withheld":null,"homepage":"https://github.com/i-machine-think/am-i-compositional","introduced_date":"2019-08-22","introduced_date_note":null,"introduced_by":{"paper":"/paper/the-compositionality-of-neural-networks","title":"Compositionality decomposed: how do neural networks generalise?","first_author":"Dieuwke Hupkes","url":null},"license":{"name":"MIT licence","url":"https://github.com/i-machine-think/am-i-compositional/blob/master/LICENSE"},"modalities":[{"name":"Texts","url":"/datasets/modality/texts"}],"tasks":[{"name":"Semantic Parsing","url":"/task/semantic-parsing","datasets_with_task":"/datasets/task/semantic-parsing"},{"name":"Systematic Generalization","url":"/task/systematic-generalization","datasets_with_task":"/datasets/task/systematic-generalization"}],"languages":[],"variants":["PCFG SET"],"data_loaders":[],"num_papers_in_archive":4,"source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28"},"benchmarks":[],"papers_with_a_benchmark_row":[],"syntology_totals":{"read_at":"2026-09-24T18:15:14+00:00","papers_with_samples":0,"samples_harvested":0,"samples_ran":0,"samples_unverified":0,"pointer_only_for_licence":0,"papers_with_no_sample_that_ran":0,"note":"the per-paper counts above, summed; not a rate"},"papers_note":"The archive never published its papers-using-dataset list; these are papers with a leaderboard row on this dataset's benchmarks."}