anchor-product-page-mpnet-base
An encoder for the anchor text of links, fine-tuned from all-mpnet-base-v2. It places the anchor texts of links to product pages close to each other and away from the anchor texts of links to other pages. A product page is a page whose primary purpose is a transaction or a conversion for a specific offering, such as a product, a software solution or a service tier.
The model is released with ProdCrawl, a replayable test collection for focused crawling (ECIR 2027, Resource Track). In the ProdCrawl experiments, a crawler scores each link before downloading it: it retrieves the labelled anchor texts most similar to the link's own and takes the similarity-weighted share of those whose target page is a product page. This model computes the anchor-text embeddings for that retrieval.
- Code: https://github.com/IRLab-UDC/prodcrawl/
- Collection: irlab-udc/prodcrawl
Usage
pip install -U sentence-transformers
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("irlab-udc/anchor-product-page-mpnet-base")
anchors = ["add to cart mixed berry granola bars 40 count", "general news", "about us"]
embeddings = model.encode(anchors) # shape (3, 768), L2-normalised
print(model.similarity(embeddings, embeddings))
The input is the anchor text of a link. The ProdCrawl crawler lowercases it and collapses whitespace first; the tokenizer lowercases anyway, so this does not change the embedding. Embeddings are normalised to unit length, and similarity is cosine.
Model details
| Base model | sentence-transformers/all-mpnet-base-v2 |
| Architecture | MPNet encoder, mean pooling, L2 normalisation |
| Output dimension | 768 |
| Maximum sequence length | 384 tokens |
| Similarity | cosine |
Training
Data. The training collection of ProdCrawl: 318 company and organisation websites, every page labelled by majority vote of three LLMs as a product page or not. Each link of the collection is an anchor text labelled with the judgment of the page it points to. We sampled 200,000 links at random (seed 42) and grouped them by normalised anchor text:
- an anchor is a reliable positive if at least 90% of its links point to product pages, and a reliable negative if at most 10% do;
- anchors in between are ambiguous and were excluded;
- generic anchors that cannot identify their target, such as "click here", "read more" or "image", were also excluded.
Pairs. 1,460,240 sentence pairs with a target cosine similarity:
| Pair | Target |
|---|---|
| product-page prototype phrase ("product details", "add to cart product", ...) and a reliable positive | 1.0 |
| two reliable positives | 0.9 |
| product-page prototype phrase and a reliable negative | 0.0 |
| reliable positive and reliable negative | 0.0 |
| two non-product prototype phrases | 0.8 |
Positives and negatives were sampled with weights that grow with the anchor's frequency and label purity.
Procedure. CosineSimilarityLoss (mean squared error between the cosine similarity
and the target), one epoch, batch size 32, AdamW with learning rate 2e-5, linear
schedule with 5% warm-up, seed 42. Software: sentence-transformers 5.5.0,
transformers 5.8.1, torch 2.12.0. The training script is in the code repository
(scripts/encoder/).
Results in the ProdCrawl experiments
On the validation collection, replacing all-mpnet-base-v2 with this model in the dense anchor-scoring strategies improved MAP@30 over the offline evidence store in 31 of 34 matched configurations (Wilcoxon signed-rank test, p < 10^-7). On the test collection, exact kNN retrieval with this model over the offline evidence store had the highest area under the MAP@b curve of all systems. See the paper for the full results.
Limitations
- The model sees only the anchor text. The same anchor text always gets the same embedding, wherever the link points.
- Generic anchors were excluded from training, so their embeddings carry little information about the target page.
- The training sites are company and organisation websites, predominantly in English. The labels come from LLMs, not from human assessors.
License
CC BY-NC 4.0. The base model, all-mpnet-base-v2, is licensed under Apache 2.0.
Citation
@misc{reyescobar2026anchorproductpage,
title = {{anchor-product-page-mpnet-base}: A Fine-Tuned Anchor-Text Encoder for Product Pages},
author = {Rey-Escobar, Manuel and Otero, David and Parapar, Javier},
howpublished = {\url{https://huggingface.co/irlab-udc/anchor-product-page-mpnet-base}},
note = {Hugging Face model, fine-tuned from all-mpnet-base-v2},
year = {2026}
}
Manuel Rey-Escobar, David Otero, and Javier Parapar. 2026.
ProdCrawl: A Replayable Test Collection for Focused Crawling.
Available at https://github.com/IRLab-UDC/prodcrawl