All models

CoS-E

OpenAI GPT fine-tuned on CoS-E to write commonsense explanations for CommonsenseQA questions.

Language · 586 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (34 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
116.5M
Operations
586
Framework
PyTorch
Recurrent
No
Published
ACL 2019
Cited by
390 (as of 18 October 2026)
Authors
Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, Richard Socher
License
BSD-3-Clause
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12462
Graph hash
110c16bfe863e94a921c7bcf1d6c69fe25a1f525adce5216a531d1b78dde0df7
Skeleton hash
015146ef4563416aa9935acd4b665d41c9a35688b964db3d5e8092918e4b9301
Architecture hash
488941f109c9f3c8693c7a8ec6edfe315193642f83e9b6555c7d39ce2d5dbb37
Diagram SHA-256
5b619a36d2cf7aafccc30f3cff356b0583088c17907e0138cb1a9a6cbd9f1624
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

transformers.OpenAIGPTLMHeadModel()

What it is

This is the explanation generator of the CAGE framework: a language model fine-tuned to produce a natural-language rationale for a commonsense question. The motivation is that deep models do poorly on tasks needing world knowledge or reasoning over information not present in the input. The authors first collected Common Sense Explanations (CoS-E), human explanations for the CommonsenseQA dataset in two forms: a highlighted span of the question and a free-form sentence. Those explanations train the generator, and the generated explanations are used during training and inference, improving the state of the art on CommonsenseQA by 10%.

The released code fine-tunes a conditional language model with GPT on CSV files built from the question answering data, while a separate BERT classifier consumes the explanations. Once explanations are generated they are pasted in as a column of the CSV so the classifier can be pointed at either the human or the model-written explanations. The dataset authors flag a substantial gender disparity in the underlying CommonsenseQA data, with a higher proportion of female pronouns in negative contexts, and warn that it propagates into CoS-E.

Key idea. CAGE shows that a language model fine-tuned on human explanations can generate rationales that lift a commonsense question answering system by 10% over the prior state of the art.

  • CAGE
  • Commonsense Auto-Generated Explanation
  • CoS-E
  • Common Sense Explanations
  • CoS-E explanation generator
  • CommonsenseQA
  • CQA
  • Explain Yourself
  • GPT
  • OpenAI GPT
  • rationale generator
  • explanation generation
  • commonsense reasoning

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{rajani2019explainyourselfleveraginglanguage,
      title={Explain Yourself! Leveraging Language Models for Commonsense Reasoning}, 
      author={Nazneen Fatema Rajani and Bryan McCann and Caiming Xiong and Richard Socher},
      year={2019},
      eprint={1906.02361},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/1906.02361}, 
}