PURE Relation Extraction
Relation model of the PURE pipeline: a BERT encoder that classifies an entity pair marked with typed markers.
Language · 339 operations Checked
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
- Task
- Language
- Parameters
- 109.5M
- Operations
- 339
- Framework
- PyTorch
- Recurrent
- No
- Published
- NAACL 2021
- Cited by
- 531 (as of 30 October 2026)
- Authors
- Zexuan Zhong, Danqi Chen
- Source
- GitHub: princeton-nlp/PURE
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19211
- Graph hash
- 75c79bb2cbe819df9dc17fd0d91933baf7440582cad02965df2d4f0e40f23135
- Skeleton hash
- 48359134c17f7088f1f8b74e70d29bd11744097974f5f056bfd36feebba1dd80
- Architecture hash
- 17b0e124a03dd1c3a4c25313c7dbca86c6b5f44e3e894dd6d15ffbc7baa3c2e7
- Diagram SHA-256
- 2b08af2542b7b6a006a2f9c9303679bbed8c3d561d1d4317e3f16f746c21b97b
- 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
What it is
PURE (the Princeton University Relation Extraction system) is a pipelined approach to finding named entities in text and the relations between them. Where most recent work modeled the two subtasks jointly, it builds on two independent encoders and merely uses the entity model to construct the input for the relation model.
The network on this page is the relation model, which takes a pair of spans (a subject and an object) and predicts a relation type. It processes each pair of spans independently and inserts typed markers at the input layer to highlight the subject and object and their types. A second pre-trained encoder reads the marked sequence, and the output representations at the two start positions are concatenated to form the span-pair representation. The reasoning is that span representations reused from the entity model capture context around each individual entity and might fail to capture the dependencies between the pair.
On ACE04, ACE05 and SciERC, the paper reports a 1.7%-2.8% absolute improvement in relation F1 over previous joint models with the same pre-trained encoders. Because the relation model runs once for every pair of entities, the authors also give an approximation that batches the computation, reporting an 8-16× speedup with a slight reduction in accuracy. The code uses bert-base-uncased and albert-xxlarge-v1 for ACE04/ACE05 and SciBERT for SciERC.
Key idea. A simple pipeline of two independent encoders, where the entity model only supplies input to the relation model, outperformed previous joint models on ACE04, ACE05 and SciERC.
- PURE
- Princeton University Relation Extraction
- relation extraction
- entity and relation extraction
- typed entity markers
- pipelined approach
- A Frustratingly Easy Approach for Entity and Relation Extraction
- ACE05
- SciERC
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{zhong2021frustratinglyeasyapproachentity,
title={A Frustratingly Easy Approach for Entity and Relation Extraction},
author={Zexuan Zhong and Danqi Chen},
year={2021},
eprint={2010.12812},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2010.12812},
}