Source-linked AI summary

Symbolic Knowledge Distillation: from General Language Models to Commonsense Models

Peter West, Chandra Bhagavatula, Jack Hessel, Jena D. Hwang, Liwei Jiang, Ronan Le Bras, Ximing Lu, Sean Welleck, Yejin Choi

arXiv:2110.07178v2cs.CL

TL;DR

Commonsense model training traditionally depends on expensive human-authored knowledge graphs, motivating an alternative in which general language models generate symbolic commonsense corpora for compact models. The paper introduces Symbolic Knowledge Distillation, using selective generation and critic evaluation to distill commonsense from GPT-3. The resulting graph surpasses human-authored data across quantity, quality, and diversity, while the compact commonsense model surpasses GPT-3’s commonsense capabilities.

  • Problem

    Human-authored commonsense knowledge graphs are expensive to scale, while prior automatically constructed graphs have lower quality than human-written data.

  • Method

    Symbolic Knowledge Distillation selectively distills commonsense from GPT-3 as human-readable generated text, uses a critic model to assess quality, and trains a compact commonsense model.

  • Results

    The automatically distilled ATOMIC10x graph surpasses the human-authored corpus in quantity, quality, and diversity, while the resulting model surpasses GPT-3’s commonsense capabilities.

  • Takeaways & Limitations

    General language models can serve as commonsense knowledge sources, with humans evaluating generations through critic models rather than authoring the knowledge graph.

  • Takeaways & Limitations

    The demonstrated gains concern the commonsense relations tested, and further work is needed for physical, temporal, and other aspects of commonsense and knowledge.

Abstract

from arXiv · show

The common practice for training commonsense models has gone from-human-to-corpus-to-machine: humans author commonsense knowledge graphs in order to train commonsense models. In this work, we investigate an alternative, from-machine-to-corpus-to-machine: general language models author these commonsense knowledge graphs to train commonsense models. Our study leads to a new framework, Symbolic Knowledge Distillation. As with prior art in Knowledge Distillation (Hinton et al., 2015), our approach uses larger models to teach smaller models. A key difference is that we distill knowledge symbolically-as text-in addition to the neural model. We also distill only one aspect-the commonsense of a general language model teacher, allowing the student to be a different type, a commonsense model. Altogether, we show that careful prompt engineering and a separately trained critic model allow us to selectively distill high-quality causal commonsense from GPT-3, a general language model. Empirical results demonstrate that, for the first time, a human-authored commonsense knowledge graph is surpassed by our automatically distilled variant in all three criteria: quantity, quality, and diversity. In addition, it results in a neural commonsense model that surpasses the teacher model's commonsense capabilities despite its 100x smaller size. We apply this to the ATOMIC resource, and share our new symbolic knowledge graph and commonsense models.

1 Introduction

Symbolic knowledge distillation replaces costly human-authored commonsense graph construction with a machine-to-corpus-to-machine pipeline that selectively transfers commonsense from GPT-3. Applied to ATOMIC, it produces a larger, more diverse, and higher-quality graph and a compact commonsense model that surpasses both human-trained and teacher-model comparators.

  • Motivation: Human-authored commonsense graphs are expensive to scale, while prior machine-authored graphs generally underperform human-written data in quality and reliability.This motivates constructing commonsense knowledge by generating a corpus from a general language model and training a commonsense model from it.
  • Framework: Symbolic knowledge distillation transfers a selected aspect—commonsense—from a larger general language model to a different, compact commonsense model through generated text.Unlike conventional distillation, it produces a human-readable symbolic knowledge graph in addition to a neural model.
  • Results: ATOMIC10x exceeds the human-generated corpus in scale, accuracy, and diversity across seven commonsense inference types studied.The resulting COMETDISTIL model surpasses the human-trained COMET20 model and is smaller, more efficient, and more accurate in commonsense than GPT-3.
  • Implications: The pipeline positions general language models as commonsense knowledge sources and humans as evaluators who train critic models rather than authoring the knowledge.The authors present humans and language models as collaborators for curating graphs and training efficient commonsense models.
  • Framework: Prompting and sample truncation elicit commonsense from GPT-3, while a separately trained critic evaluates generations and controls the correctness and confidence of transferred knowledge.The critic is a textual classifier learned from human judgements and forms a stronger critical teacher with GPT-3.

1. Learning symbolic knowledge from language models can be framed as a symbolic extension

Symbolic knowledge distillation extends knowledge distillation by learning commonsense symbolically from GPT-3 and then producing commonsense models.

  • Symbolic knowledge distillation extends knowledge distillation by using GPT-3 as a knowledge source for symbolic commonsense learning.
  • The framework transfers commonsense knowledge through a symbolic corpus before distilling it into a commonsense model.
  • Positive results are reported across the knowledge generation, criticism, and model distillation stages.

2. Symbolic knowledge distillation constructs

The framework uses an effective critic to filter machine-generated commonsense, yielding higher-quality knowledge and models that outperform human-source and GPT-3 baselines.

  • An effective critic filters incorrect generated knowledge and is key to achieving high-quality commonsense knowledge graphs at scale.
  • More critical teachers produce higher-quality knowledge, although they reduce the scale of transferred knowledge.
  • Quality matters more than quantity because higher-quality knowledge produces a higher-quality commonsense model despite smaller-scale data.
  • All student models exceed GPT-3's commonsense quality, even before accounting for the teacher's critical refinement.
  • The machine-generated knowledge graph outperforms human-authored equivalents in scale, quality, and diversity, while its model achieves the most accurate commonsense KG completions.

3 Machine-to-Corpus Verbalization

Symbolic knowledge distillation uses prompted GPT-3 generations to build a large commonsense corpus, then evaluates and filters the resulting knowledge against human-authored ATOMIC20. The procedure produces ATOMIC10x, which offers substantially greater scale and diversity while requiring quality control for acceptability.

  • 3 Machine-to-Corpus Verbalization: Symbolic knowledge distillation generates commonsense facts from GPT-3, forming a knowledge graph that a student commonsense model can learn from.The pipeline proceeds machine-to-corpus, followed by evaluation and corpus-to-machine distillation.
  • Prompting: Few-shot prompts combine task descriptions with numbered human-authored ATOMIC examples whose wording specifies the event-relation task.The prompt format can add task-specific guidance for complicated problems.
  • ATOMIC Verbalization: The study verbalizes seven causal relations from ATOMIC20, including xAttr, xReact, xEffect, xIntent, xWant, xNeed, and HinderedBy.Generation proceeds by creating event heads and then producing relation-specific inferences for each event.
  • Diversity: ATOMIC10x contains 5.2M unique words versus 1.5M for ATOMIC20 and 4.38M softly unique examples versus 560K.Its softly unique fraction is smaller, but its larger corpus produces many more softly unique examples.
  • Model-based Diversity: ATOMIC10x has four-times-higher estimated entropy than ATOMIC20, indicating greater information content under the model-based diversity measure.The analysis estimates entropy using GPT-2 XL models fine-tuned on the two corpora.
  • Quality Evaluation: Compared with ATOMIC20, loose-teacher ATOMIC10x is larger but roughly 8 percentage points less acceptable to human raters, motivating critic-based filtering.The larger corpus nevertheless implies more accurate examples in absolute number, while increasing their proportion is the critic’s objective.

4 Making the Teacher More Critical

The authors train a critic on a small human-labeled sample to filter GPT-3’s generated commonsense knowledge, improving quality while trading off corpus size. The critic captures both awkward phrasing and event–inference logical misalignment, and filtering can increase diversity.

  • Training a knowledge critic: A critic trained from 10K human judgments distinguishes acceptable from unacceptable GPT-3 generations, using humans as supervisors rather than knowledge-graph authors.The data are split into 8K/1K/1K train/dev/test sets, and the critic uses RoBERTa-Large.
  • Size-accuracy trade-off: Discarding 20% of ATOMIC10x reduces the corpus from 6.5M to 5.1M triples while increasing accuracy from 78.5 to 88.4.More aggressive filtering reaches 96.4% accuracy with 2.5M examples, while ATOMIC20 contains 600K entries at 86.8% accuracy.
  • What gets filtered: The critic filters both individually awkward events or inferences and inconsistent event–inference pairings.The ablation compares event-only, inference-only, their EMAP ensemble, and the full interaction-aware critic.
  • Diversity: ATOMIC10x retains a diverse subset equal to 68% of its size, rising to 80% under the most extreme filtering.The authors suggest that removing common inconsistent sentence structures may improve both quality and diversity, while noting that this requires further study.

5 Corpus-to-Machine: Distillation

The generated corpus is distilled into compact GPT-2-XL commonsense models and evaluated on knowledge-base completion using held-out ATOMIC20 events. The distilled student surpasses GPT-3, while critic-based filtering improves performance over human-trained COMET20 and creates a practical accuracy–coverage trade-off.

  • Corpus-to-machine: Distillation: COMETDISTIL is a GPT-2-XL model trained on the full ATOMIC10x corpus, with critical variants trained on filtered corpora.The critical variants correspond to corpora achieving 91.5% and 96.4% accuracy.
  • Evaluation: The evaluation tests knowledge-base completion on held-out ATOMIC20 events using human judgments and compares COMETDISTIL with COMET20 and GPT-3.The evaluation uses 1,000 event–relation inputs; annotator agreement is moderate, with 47.1 Fleiss’ kappa and 88.7% accuracy agreement.
  • Comparison with GPT-3: The simplest COMETDISTIL student unexpectedly surpasses GPT-3, its training-data generator.The authors suggest that verbalization and GPT-2 training may filter teacher mistakes, while the student focuses on one commonsense domain.
  • Comparison with human knowledge: Critic-based COMETDISTIL reverses the slight accuracy disadvantage relative to COMET20, with stronger filtering widening the gap.The most performant model surpasses COMET20 by 5 points and GPT-3 by over 10 for on-demand inference.
  • Usefulness of COMETDISTIL: The critical teacher may reject every inference for some inputs, producing no output despite yielding a more accurate corpus.This limits its use when each event–relation input requires a single available inference.
  • Limits and Future Work: The demonstrated success is limited to the commonsense relations tested, and extension to physical or temporal commonsense remains future work.The authors describe symbolic knowledge distillation as a first step beyond these seven relations.

6 Related Work

Related work spans manually and automatically constructed commonsense knowledge graphs, language-model knowledge extraction, knowledge distillation, and automated dataset generation. The paper positions ATOMIC10x as machine-generated commonsense data produced without relying on existing resources.

  • Commonsense Knowledge Graphs: Commonsense knowledge graphs include manually authored resources such as ATOMIC and ConceptNet, alongside automatically extracted resources such as TransOMCS and CausalBank.The automatic resources use syntactic parsing or pattern matching to extract large numbers of tuples or cause–effect pairs.
  • Extracting Knowledge from LMs: Prior language-model approaches perform knowledge-graph completion from existing resources, whereas ATOMIC10x is generated without those resources.Other work mines factual or commonsense knowledge from off-the-shelf language models but does not achieve ATOMIC10x’s reported quality at scale.
  • Knowledge Distillation: Earlier knowledge-distillation methods target generation through label smoothing or teacher-distribution modes, while this work distills commonsense from a general language model.The paper identifies its distinction as transferring specific commonsense information rather than general model behavior.
  • Data Generation: Manual dataset creation is expensive and complex, making crowdsourcing a common approach for high-quality, broad-coverage datasets.This literature motivates alternatives to fully manual construction.
  • Data Generation: Automatic data-generation methods scale through extraction or synthesis, but extractive approaches are noisy and limited in format.The paper notes that ATOMIC knowledge does not simply appear in natural text and that other synthesis methods fine-tune language models on existing labeled data.

7 Conclusions

The paper introduces symbolic knowledge distillation as a machine-to-corpus-to-machine alternative to human-authored commonsense knowledge graphs. It transfers knowledge from a large general model through a commonsense corpus into a compact model, producing a graph reported to exceed human authoring in scale, diversity, and quality.

  • Conclusions: Symbolic knowledge distillation replaces human-authored commonsense graphs with machine-generated knowledge transferred through a corpus to a compact commonsense model.The resulting pipeline produces both a commonsense knowledge graph and a commonsense model.
  • Conclusions: The resulting symbolic knowledge graph has greater scale, diversity, and quality than human authoring in the paper’s reported comparison.The authors present the framework as an alternative to human-authored commonsense knowledge research.

Ethical Considerations

The authors discuss ethical risks from generating commonsense data with pretrained language models, emphasizing prompting and the generic scope of their data and models as mitigating factors.

  • Potential harms: The authors identify risks including harmful, biased, or offensive generations and possible automated oppression or exploitation.They specifically mention surveillance and fake-news generation as examples of harmful domains.
  • Generation risks: Careful prompting kept generations focused on the intended topics, and manual inspection found no significant harmful examples aside from one adult-content example.The inspection covered 100 generated examples.
  • Scope boundary: The data lacks information directly related to harmful domains, while its generic nature and the models’ flawed commonsense capabilities limit its usefulness for harmful applications.The authors frame this as making the concern less relevant rather than impossible.
  • Evaluator compensation: Human evaluators were guaranteed an effective compensation rate of at least $15 per hour.The authors state that compensation was designed to ensure fair and generous pay.

A Human Evaluation Details

The study evaluates commonsense knowledge with human annotations and trains critic models to filter generations across multiple knowledge sources. Filtering raises precision substantially, with source quality and teacher choice affecting the resulting trade-offs.

  • Human evaluation: Three annotators rate each ATOMIC-style triple using five acceptability options, which are collapsed into accepted versus not accepted for reporting and critic training.The labels distinguish accepted, rejected, and no-judgement responses before binary aggregation.
  • Experimental setup: Knowledge sources are evaluated on 2000 annotated examples split into 1400/300/300 train, development, and test sets for source-specific critic training.The smaller evaluation scale supports comparison across more knowledge sources.
  • Filtering results: Approximately 90% precision is attainable while retaining 30% of each original corpus after critic filtering.This pattern is reported across the evaluated knowledge sources.
  • Source comparison: Before filtering, precision follows generation cost: human ATOMIC20 has the highest precision, followed by GPT-3, then GPT-J and T5-11B.The passage describes wide variation in unfiltered precision across sources.
  • Source comparison: At approximately 20% corpus size, GPT-3 approaches 100% accuracy while the other sources plateau near 90%.The authors use this result to support GPT-3 as a high-quality automatic knowledge source.
  • Critic model: The supervised critic outperforms generation negative log-likelihood and token-wise mean negative log-likelihood baselines across precision and recall levels.The critic generalizes to ATOMIC10x test entries after being fixed on validation performance.

D ATOMIC10x Generation Prompts

The appendix documents randomized few-shot and inference prompts for generating ATOMIC10x relation types, alongside human-evaluation instructions and templates.

  • Prompt randomization: Event-generation prompts randomly sample few-shot examples and their order from 100 high-quality ATOMIC20 examples for each batch.Inference prompts also randomly sample natural names for PersonX and PersonY from a predefined set.
  • Evaluation instructions: Human-evaluation instructions ask workers to judge whether each complete assertion makes sense and to mark poor-sense assertions as invalid.The evaluation interface warns that a task may contain adult content and provides an example situation.
  • Evaluation template: Figures 4 and 5 provide the two-page template used for human evaluation.The template presents situations and ATOMIC-style evaluation content.
  • Generation prompts: The appendix includes separate prompts for head generation and the xAttr, xEffect, xIntent, xNeed, xReact, xWant, and HinderedBy relations.The listed tables document the generation templates for these relation types.
  • Relation prompts: The appendix identifies Table 10 through Table 15 as prompts for generating xEffect, xIntent, xNeed, xReact, xWant, and HinderedBy.These tables complement the head-generation and xAttr prompt tables.
Loading 2110.07178v2…