Patent Mechanics Anticipate-0.6B
An embedding model for prior-art search over US patent full text. Give it the claims of a patent application; it ranks earlier patent documents by how likely an examiner would cite them against those claims.
- Fine-tuned from harrier-oss-v1-0.6b (revision
f9b9dc8d) on citations from USPTO office actions. The released weights are the average of three fine-tuned seeds. - Trained and evaluated on US patent data only (USPTO full text, office actions, PTAB trials).
- 1,024-dimensional vectors; queries up to 4,096 tokens, documents up to 8,192 tokens (title + abstract + claims + description).
- About 1.2 GB in bf16. Runs on Apple Silicon Macs; tested on a small sample on an 8 GB M1, and we recommend 16 GB for the full check. Encoding a whole collection of 250,000 full-text patents needs a GPU; the benchmark ships pre-computed vectors so you do not have to.
- Benchmark: prior-art-bench-v1. Code: https://github.com/patentmechanics/prior-art-bench. Paper: https://doi.org/10.5281/zenodo.24394100.
Limitations (read first)
- English, US documents only. The model was not trained or tested on patents from other offices, on non-patent literature, or on other languages. Prior art that exists only in Japanese, Chinese, Korean or German publications is outside what was measured.
- Examiner citations are incomplete labels. Examiners cite enough to reject a claim, not every relevant document. Recall here means "share of the cited families found", not "share of all relevant prior art".
- Closed-collection numbers. Results are on a 250,367-family collection. On the full set of 9.44M US patent families recall will be lower; that was not measured.
- Base-model data unknown. harrier-oss-v1-0.6b's training data is not disclosed, so we cannot rule out that it saw the evaluation patents. Its zero-shot lead over other base models is largest on PTAB queries.
- The invalidity prompt (below) was not used in training.
- A retrieval aid, not a legal opinion. A search with this model does not establish patentability, validity or freedom to operate.
Results
US-only benchmark prior-art-bench-v1, test half, scored once: 4,837 queries (2,368 office-action queries for
prior-art search, 2,469 PTAB queries for invalidity search), 250,367-family collection, family level, only documents
published before the query's priority date, exact search. The list of systems, metrics and comparisons was fixed before
any test score; every model choice and fusion weight was made on the dev half.
| System | R@10 | R@100 | R@1000 | nDCG@10 | Prior-art R@10 (office actions) | Invalidity R@10 (PTAB) |
|---|---|---|---|---|---|---|
| BM25 | 0.326 | 0.584 | 0.820 | 0.249 | 0.306 | 0.346 |
| EmbeddingGemma 2 | 0.399 | 0.692 | 0.889 | 0.295 | 0.352 | 0.445 |
| PaECTER | 0.400 | 0.700 | 0.894 | 0.303 | 0.360 | 0.437 |
| Qwen3-Embedding-0.6B | 0.408 | 0.690 | 0.882 | 0.310 | 0.369 | 0.446 |
| Octen-Embedding-0.6B | 0.423 | 0.700 | 0.887 | 0.324 | 0.386 | 0.458 |
| harrier-oss-v1-0.6b (base, no fine-tuning) | 0.451 | 0.737 | 0.906 | 0.346 | 0.410 | 0.490 |
| Qwen3-Embedding-0.6B fine-tuned (same data, base recipe, 3-seed average) | 0.499 | 0.771 | 0.922 | 0.386 | 0.465 | 0.531 |
| harrier-oss-v1-0.6b fine-tuned (base recipe, 3-seed average) | 0.513 | 0.782 | 0.928 | 0.399 | 0.478 | 0.547 |
| Anticipate-0.6B | 0.538 | 0.796 | 0.932 | 0.416 | 0.488 | 0.586 |
| Recommended system (this model + passages + CPC + BM25, below) | 0.562 | 0.821 | 0.939 | 0.436 | 0.521 | 0.602 |
Paired differences in R@10 (points, 95% bootstrap interval): over the base model +8.7 (+7.9..+9.6); over Qwen3-Embedding-0.6B +13.0 (+12.0..+14.0); over BM25 +21.2 (+20.0..+22.3); over the same-data harrier-oss-v1-0.6b fine-tune +2.5 (+1.8..+3.2). The recommended system adds +2.4 (+1.7..+3.2) to the model alone. PTAB queries were never trained on.
Recommended system (optional, no change to the weights)
Three search-time additions, each with a fixed weight chosen on the dev half:
- Passages. Also embed each document's description in chunks (paragraphs packed to at least 5,000 characters, each prefixed with title and abstract); a document scores the higher of its whole-document and best-chunk similarity. Test: +0.9 R@10.
- CPC agreement (strict). Add a boost for shared CPC classification (same subclass, main group or full symbol), using only classifications printed on the query and on family members published before the query's priority date.
- BM25. Add the z-scored BM25 score with weight 0.2.
Code for all three is in the public repo; the weights (CPC strict 0.75, BM25 0.2) are in fusion-v1.json.
Usage
Queries take an instruction; documents do not. Use left padding (last-token pooling).
Input format
- Query text: title, blank line, abstract, blank line, the claims numbered one per line (
1. A method ...). - Document text: title, blank line, abstract, blank line, the numbered claims one per line, then a blank line,
Description:and the description paragraphs separated by blank lines (cross-reference and list-of-figures sections left out), cut at 45,000 characters and truncated at 8,192 tokens. The benchmark'stextfield holds this exact string for every document and query.
Sentence Transformers (verified with sentence-transformers 6.3.0, transformers 5.23.0, torch 2.15.0)
from sentence_transformers import SentenceTransformer
model = SentenceTransformer(
"patentmechanics/anticipate-0.6b",
tokenizer_kwargs={"padding_side": "left"},
)
model.max_seq_length = 8192
queries = ["<title>\n\n<abstract>\n\n1. A method of ...\n2. The method of claim 1 ..."]
documents = ["<title + abstract + claims + description of a candidate patent>"]
q = model.encode(queries, prompt_name="query", normalize_embeddings=True)
d = model.encode(documents, normalize_embeddings=True)
scores = q @ d.T
For an invalidity search on granted claims use prompt_name="invalidity_query".
The published numbers truncate queries at 4,096 tokens: set model.max_seq_length = 4096 before encoding queries to
match them exactly (it matters only for the longest claim sets).
Transformers
import torch, torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer
name = "patentmechanics/anticipate-0.6b"
tok = AutoTokenizer.from_pretrained(name, padding_side="left")
model = AutoModel.from_pretrained(name, torch_dtype=torch.bfloat16).eval() # on a Mac: .to("mps")
INSTRUCTION = ("Given the claims of a patent application, retrieve prior-art patent documents "
"that anticipate the claims or render them obvious")
def embed(texts, max_length):
batch = tok(texts, padding=True, truncation=True, max_length=max_length, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model(**batch).last_hidden_state[:, -1] # last token (left padding)
return F.normalize(out.float(), dim=-1)
q = embed([f"Instruct: {INSTRUCTION}\nQuery: {text}" for text in queries], 4096)
d = embed(documents, 8192)
scores = q @ d.T
vLLM: LLM(model=name, task="embed"), then model.embed(texts) with the query prefix written out as above.
Text Embeddings Inference: --model-id patentmechanics/anticipate-0.6b; send queries with the prefix written out.
Checked against our evaluation vectors: sentence-transformers (bf16) on 100 queries and 300 documents gave a minimum cosine of 0.998, and re-encoding all 11,968 evaluation queries with these weights in vLLM gave test Recall@10 0.5388 against 0.5380 published (top-10 overlap 99.6%; eval/equivalence_test.json). Text Embeddings Inference was not tested separately.
Prompts, exactly:
| Name | Text |
|---|---|
query (trained) | Instruct: Given the claims of a patent application, retrieve prior-art patent documents that anticipate the claims or render them obvious\nQuery: |
invalidity_query (not trained; used for the PTAB numbers) | Instruct: Given the claims of a granted patent, retrieve prior art that anticipates them or renders them obvious (invalidity search)\nQuery: |
Reproduce the numbers without a GPU
The benchmark repo ships this model's vectors for every document, description chunk and query of the 250,367-family
collection, and verify_sample.py, which re-encodes a random sample (about 100 queries and 300 documents) on your
machine and checks that each vector matches the shipped one (cosine >= 0.99; our own run with a clean install: lowest
cosine 0.998 over 100 queries and 300 documents). The full evaluation, including the recommended system, then runs on a
laptop from the shipped vectors: searching them reproduces the published numbers within 0.001 (test R@10 0.539 against
0.538), and re-scoring the published run files reproduces them exactly. Step-by-step instructions: REPRODUCING.md in
github.com/patentmechanics/prior-art-bench.
Intended use
- First-stage retrieval for patentability, prior-art and invalidity searches over US patent documents.
- Research on patent retrieval; a baseline for
prior-art-bench-v1.
Out of scope: non-English text, non-patent literature, patent classification or clustering (not measured), and any use as the sole basis for a legal conclusion.
Training data
All from the USPTO (Source: United States Patent and Trademark Office, www.uspto.gov).
- Corpus: US utility patents and published patent applications from 1976 to 1 October 2026: 17.47M documents in 9.44M families.
- Queries: 100,311 published US applications that received an office action mailed between March 2017 and October 2026; the query is the application's title, abstract and claims.
- Positives: references the examiner cited in the first office action, category X (grade 3; relevant taken alone) or Y (grade 2; relevant in combination), kept only if published before the query's priority date and not in the query's own family. Y-cleaning: a Y citation made only against dependent claims was dropped, in queries where the office action's claim numbering matches the published claims (2.88 positives per query instead of 3.16; dropped citations are never used as negatives).
- Hard negatives: documents ranked 30-100 for the query by an earlier fine-tune of harrier-oss-v1-0.6b (the base recipe below, three seeds averaged), excluding known citations, families co-cited with a positive, and anything scoring above 0.95 x the best positive. An LLM-judge audit of these negatives found 2% (6 of 300, none X) that looked like X/Y references, about as low as the earlier, base-model-mined negatives (0.8%, 3 of 380); the judge's grades ship with the benchmark.
- Splits: by patent family. No family is on both the training and the evaluation side; 26,021 training queries with the same first claim, text, or title + abstract as an evaluation query were removed. PTAB data was never used in training.
- No label was produced by an LLM.
Training procedure
| Method | Full fine-tuning, InfoNCE loss, temperature 0.02; AdamW, weight decay 0.01, gradient clipping 1.0; bf16 mixed precision (fp32 master weights) |
| Batch | 64 queries per step, one positive per query drawn with weight 1.0 for X (grade 3) and 0.7 for Y (grade 2), in-batch negatives + 3 mined hard negatives per query; known-relevant documents masked; gradient caching in 16,384-token chunks |
| Learning rate | 1e-5, 50 warm-up steps, cosine schedule over 900 steps stopped at step 75 |
| Sequence lengths | Query 4,096 tokens (instruction included), document 8,192 tokens |
| Training pack | 100,311 queries, 2.88 positives each; 73,362 with mined negatives (30.8 on average); 494,935 documents. The positives ship as train-qrels in the benchmark; the mined negatives do not |
| Seeds and averaging | Three runs (seeds 0, 1, 2), 75 steps each (4,800 queries per run); the released weights are the uniform average of the three step-75 checkpoints. Dev R@10 of the seeds: 0.514, 0.515, 0.519; of the average: 0.529 |
| Selection | Rule fixed before the result: the average must beat the earlier harrier-oss-v1-0.6b fine-tune on dev R@10 with a paired interval above zero, with no source significantly worse (+1.8, +1.1..+2.5) |
| Compute | RTX PRO 6000 Blackwell 96 GB GPUs |
Why harrier-oss-v1-0.6b and not Qwen3-Embedding: on the dev half harrier-oss-v1-0.6b was ahead zero-shot (R@10 0.438 vs 0.401) and after fine-tuning with the same recipe (3-seed averages 0.511 vs 0.496), with half the seed-to-seed spread. Qwen3 results are kept in the tables for comparison.
Licence
Apache 2.0. The base model, harrier-oss-v1-0.6b, is MIT-licensed; see NOTICE.
Citation
@misc{patentmechanics2026priorart,
title = {Learning from Examiners: An Open Embedding Model and a Benchmark for US Patent Prior-Art Retrieval},
author = {Venkatraj, Rahul},
year = {2026},
publisher = {Zenodo},
doi = {10.5281/zenodo.24394100},
url = {https://doi.org/10.5281/zenodo.24394100}
}
Please also credit the base model, harrier-oss-v1-0.6b by Microsoft (huggingface.co/microsoft/harrier-oss-v1-0.6b, MIT).
Contact and versions
Patent Mechanics, https://patentmechanics.com (contact@patentmechanics.com).
- v1 (20 November 2026): first release.