Siamese networks learn which pairs belong together
Pairwise training can make similarity specific to a task.

Learn a comparison space
A Siamese-style architecture processes paired inputs through related or shared transformations and learns a representation suited to comparing them. Contrastive objectives encourage some pairs to become closer and others farther apart. The meaning of similar comes from the training pairs. A model trained to find the same object is solving a different problem from one trained to find objects with a similar style.
A vintage-design archive
Imagine matching photographs of the same lamp taken from different angles. Positive pairs show the same lamp; negative pairs show different lamps. If all positive pairs share a studio background, the model may learn that shortcut instead of object identity. Carefully chosen difficult negatives, such as nearly identical lamps from different makers, can make the task more realistic.
Pair quality sets the limit
Incorrect pair labels can distort the representation. Easy negatives may produce a high training score without teaching useful distinctions. The sampling strategy therefore matters as much as the network diagram. Evaluation should separate identities or objects appropriately so that near-duplicate images do not make the held-out task easier than the intended application.
Show the comparison evidence
For the archive, return candidate matches with both images and relevant metadata. Let specialists confirm identity rather than automatically merging records. Test changes in viewpoint, age, restoration and background. Learned similarity is valuable when it narrows a difficult search to plausible candidates. It should not be treated as a definitive attribution mechanism when distinguishing visually similar objects requires provenance, construction details or expert examination beyond the photographs. The archive should distinguish matching an individual object from matching a design family, because those goals require different labels and different standards of evidence.
Sources & further reading
keras.io — siamese contrastive ↗
AI-assisted editorial explainer. Sources are provided for verification.
Continue reading
The quiet power of a straight line ↗
Probability is not a verdict ↗