All models

PatentNet

A pre-trained Transformer encoder with a linear head, fine-tuned to tag patents with many IPC subclasses.

Language · 424 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 (36 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
117.7M
Operations
424
Framework
PyTorch
Recurrent
No
Published
Scientometrics 127:207-231 (2022)
Cited by
89 (as of 18 October 2026)
Authors
Arousha Haghighian Roudsari, Jafar Afshar, Wookey Lee, Suan Lee
License
Apache-2.0
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
m13858
Graph hash
05ade5c48b3a338e8beecc3ebd7fbc6782b1a97ae858aac2cd3c42bd4dff2b01
Skeleton hash
e7f1cda0e19220c30088d5d97dd01e8e1d22abcb0fd6a6425dbf15a6b8455867
Architecture hash
0a349fb994ded2cf26b860acc1f85f5c3b942b7ab86e46d88c7c3302913d3e67
Diagram SHA-256
ef092a3f75d1f9664567123ab816143dc2970dbdcce46347c2e6366c8e2d5a2c
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

PatentNet is a recipe rather than a new network: a pre-trained language model with a linear layer (fully connected layer) of size equal to the label count m added on top, fine-tuned for multi-label patent classification. The authors fine-tune BERT, XLNet, RoBERTa and ELECTRA for what they call the essential task of multi-label patent classification. The member traced here is the XLNet variant, with the 544 labels the authors kept at the IPC subclass level of the USPTO-2M benchmark.

The motivation is practical: patent classification is an expensive and time-consuming task that has conventionally been performed by domain experts. Because an invention may pertain to multiple technology areas, a patent can be assigned to several classification labels. At the IPC subclass level alone, the number of labels is 645. The text itself is awkward too: the patent document is full of jargon, complex, or new technical words.

The head reads the final hidden vector of the [CLS] token as the document's aggregate representation, and XLNet is the odd one out in placing that token at the end of the sequence rather than the beginning. Instead of a softmax over classes, training uses binary cross-entropy with logits, which treats each label as an independent binary decision so that a document can receive more than one label. The experiments were run with the publicly available Simple Transformers library, built on top of the Hugging Face transformers library. Only a few hyperparameters such as batch size, number of epochs, maximum sequence length and learning rate were changed, and they were kept the same for all the models.

On USPTO-2M, XLNet achieves a new state-of-the-art performance of 82.72%, 55.89%, and 63.33% on precision, recall, and F1 at the top 1 label prediction. The authors' explanation for this outcome is the permutation language modeling objective used in XLNet for pre-training. The win is not free: on USPTO-2M, XLNet took around 22 hours and a half to fine-tune, while RoBERTa and ELECTRA took around 10 hours and twenty minutes and 10 hours.

Key idea. A like-for-like comparison of fine-tuned BERT, XLNet, RoBERTa and ELECTRA on multi-label patent classification, without simplifying the problem to binary or multi-class classification. Experiments conclude that XLNet outperformed all the models.

  • PatentNet
  • patent classification
  • multi-label patent classification
  • IPC subclass
  • USPTO-2M
  • M-patent
  • XLNet
  • BERT
  • RoBERTa
  • ELECTRA
  • Simple Transformers
  • MultiLabelClassificationModel
  • fine-tuned language model
  • document classification

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

Cite the paper

@article{Haghighian_Roudsari_2021, title={PatentNet: multi-label classification of patent documents using deep learning based language understanding}, volume={127}, ISSN={1588-2861}, url={http://dx.doi.org/10.1007/s11192-021-04179-4}, DOI={10.1007/s11192-021-04179-4}, number={1}, journal={Scientometrics}, publisher={Springer Science and Business Media LLC}, author={Haghighian Roudsari, Arousha and Afshar, Jafar and Lee, Wookey and Lee, Suan}, year={2021}, month=Dec, pages={207–231} }