Mimic element matcher

A 23M-parameter cross-encoder that answers one question for the Mimic web agent: is this element on the redesigned page the one the user clicked or filled in the demonstration? It scores pairs such as button 'Save invoice' vs button 'Record' and lets the agent repair itself in milliseconds instead of asking a 7B vision model.

Results

Top-1 accuracy: the right element must get the highest score among all candidates on the page.

Model Synthetic redesigns (held-out test) LedgerLite v2 redesign
Fine-tuned (this model) 99.8% 100.0%
Same model before fine-tuning 77.0% 60.0%
String similarity 44.6% 60.0%
  • 7.7 ms per decision on a CPU.
  • Every label of the LedgerLite v2 redesign is held out of training: the second column measures generalisation, not memorisation.

Training

  • Base: cross-encoder/ms-marco-MiniLM-L-6-v2, 2 epochs, 14341 pairs from 3000 synthetic redesigns (synonym banks, reordered fields, decoy buttons).
  • Loss: binary cross-entropy with positive-class weighting. Trained in 358.7 s.
  • Code: matcher.py, matcher_data.py.

Use

from mimic.matcher import ElementMatcher, find_model
matcher = ElementMatcher.load(find_model())   # downloads SamyBaouche/mimic-element-matcher once

Limits

Trained on synthetic English and French business forms. When its best candidate is not clearly ahead, Mimic falls back to the vision model, and every repair is verified on the page before it is remembered.

Downloads last month
30
Safetensors
Model size
22.7M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for SamyBaouche/mimic-element-matcher