Jump to content

Siamese neural network: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Citation bot (talk | contribs)
m Alter: journal. Add: isbn. Removed URL that duplicated unique identifier. | You can use this bot yourself. Report bugs here.| Activated by User:Headbomb
Kwinkunks (talk | contribs)
grammar and citations
Line 1: Line 1:
A '''siamese neural network''' is an [[artificial neural network]] that use the same weights while working in tandem on two different input vectors to compute comparable output vectors.<ref>{{Cite journal|last=Bromley|first=Jane|last2=Guyon|first2=Isabelle|last3=LeCun|first3=Yann|last4=Säckinger|first4=Eduard|last5=Shah|first5=Roopak|date=1994|title=Signature verification using a" siamese" time delay neural network|journal=Advances in Neural Information Processing Systems 6|pages=737–744|url=https://papers.nips.cc/paper/769-signature-verification-using-a-siamese-time-delay-neural-network.pdf}}</ref><ref>{{Cite journal|last=Chopra|first=S.|last2=Hadsell|first2=R.|last3=LeCun|first3=Y.|date=June 2005|title=Learning a similarity metric discriminatively, with application to face verification|journal=2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05)|volume=1|pages=539–546 vol. 1|doi=10.1109/CVPR.2005.202|isbn=0-7695-2372-2}}</ref><ref name=":0">{{Cite journal|last=Taigman|first=Y.|last2=Yang|first2=M.|last3=Ranzato|first3=M.|last4=Wolf|first4=L.|date=June 2014|title=DeepFace: Closing the Gap to Human-Level Performance in Face Verification|url=https://ieeexplore.ieee.org/document/6909616/|journal=2014 IEEE Conference on Computer Vision and Pattern Recognition|pages=1701–1708|doi=10.1109/CVPR.2014.220|isbn=978-1-4799-5118-5}}</ref><!-- Sloppy placement, should be moved! :) --> Often one of the output vectors is precomputed, thus forming a baseline against which the other output vector is compared. This is similar to comparing [[fingerprint]]s or more technical as a distance function for [[Locality-sensitive hashing]].
A '''siamese neural network''' is an [[artificial neural network]] that use the same weights while working in tandem on two different input vectors to compute comparable output vectors.<ref>{{Cite journal|last=Bromley|first=Jane|last2=Guyon|first2=Isabelle|last3=LeCun|first3=Yann|last4=Säckinger|first4=Eduard|last5=Shah|first5=Roopak|date=1994|title=Signature verification using a" siamese" time delay neural network|journal=Advances in Neural Information Processing Systems 6|pages=737–744|url=https://papers.nips.cc/paper/769-signature-verification-using-a-siamese-time-delay-neural-network.pdf}}</ref><ref>{{Cite journal|last=Chopra|first=S.|last2=Hadsell|first2=R.|last3=LeCun|first3=Y.|date=June 2005|title=Learning a similarity metric discriminatively, with application to face verification|journal=2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05)|volume=1|pages=539–546 vol. 1|doi=10.1109/CVPR.2005.202|isbn=0-7695-2372-2}}</ref><ref name=":0">{{Cite journal|last=Taigman|first=Y.|last2=Yang|first2=M.|last3=Ranzato|first3=M.|last4=Wolf|first4=L.|date=June 2014|title=DeepFace: Closing the Gap to Human-Level Performance in Face Verification|url=https://ieeexplore.ieee.org/document/6909616/|journal=2014 IEEE Conference on Computer Vision and Pattern Recognition|pages=1701–1708|doi=10.1109/CVPR.2014.220|isbn=978-1-4799-5118-5}}</ref><!-- Sloppy placement, should be moved! :) --> Often one of the output vectors is precomputed, thus forming a baseline against which the other output vector is compared. This is similar to comparing [[fingerprint]]s but can be described more technically as a distance function for [[locality-sensitive hashing]].{{Citation needed|reason=The explanation is too vague to be useful.|date=September 2019}}


It is possible to make a kind of structure that are functional similar to a siamese network, but still implement slightly different function. This is typically used for comparing similar instances in different type sets.
It is possible to make a kind of structure that is functional similar to a siamese network, but implements a slightly different function. This is typically used for comparing similar instances in different type sets.{{Citation needed|reason=An example will help.|date=September 2019}}


Uses of similarity measures where a siamese network might be used are such things as recognizing handwritten checks, automatic detection of faces in camera images, and matching queries with indexed documents. The perhaps most well-known application of siamese networks are [[face recognition]], where known images of people are precomputed and compared to an image from a turnstile or similar. It is not obvious at first, but there are two slightly different problems. One is recognizing a person among a large number of other persons, that is the facial recognition problem. [[DeepFace]] is an example of such a system.<ref name=":0" /> In its most extreme form this is recognizing a single person at a train station or airport. The other is [[face verification]], that is to verify whether the photo in a pass is the same as the person claiming he or she is the same person. The siamese network might be the same, but the implementation can be quite different.
Uses of similarity measures where a siamese network might be used are such things as recognizing handwritten checks, automatic detection of faces in camera images, and matching queries with indexed documents. The perhaps most well-known application of siamese networks are [[face recognition]], where known images of people are precomputed and compared to an image from a turnstile or similar. It is not obvious at first, but there are two slightly different problems. One is recognizing a person among a large number of other persons, that is the facial recognition problem. [[DeepFace]] is an example of such a system.<ref name=":0" /> In its most extreme form this is recognizing a single person at a train station or airport. The other is [[face verification]], that is to verify whether the photo in a pass is the same as the person claiming he or she is the same person. The siamese network might be the same, but the implementation can be quite different.

Revision as of 08:05, 20 September 2019

A siamese neural network is an artificial neural network that use the same weights while working in tandem on two different input vectors to compute comparable output vectors.[1][2][3] Often one of the output vectors is precomputed, thus forming a baseline against which the other output vector is compared. This is similar to comparing fingerprints but can be described more technically as a distance function for locality-sensitive hashing.[citation needed]

It is possible to make a kind of structure that is functional similar to a siamese network, but implements a slightly different function. This is typically used for comparing similar instances in different type sets.[citation needed]

Uses of similarity measures where a siamese network might be used are such things as recognizing handwritten checks, automatic detection of faces in camera images, and matching queries with indexed documents. The perhaps most well-known application of siamese networks are face recognition, where known images of people are precomputed and compared to an image from a turnstile or similar. It is not obvious at first, but there are two slightly different problems. One is recognizing a person among a large number of other persons, that is the facial recognition problem. DeepFace is an example of such a system.[3] In its most extreme form this is recognizing a single person at a train station or airport. The other is face verification, that is to verify whether the photo in a pass is the same as the person claiming he or she is the same person. The siamese network might be the same, but the implementation can be quite different.

Learning

Learning in siamese networks can be done with triplet loss or contrastive loss. For learning by triplet loss a baseline vector (anchor image) is compared against a positive vector (truthy image) and a negative vector (falsy image). The negative vector will force learning in the network, while the positive vector will act like a regularizer. For learning by contrastive loss there must be a weight decay to regularize the weights, or some similar operation like a normalization.

A distance metric for a loss function must have the following properties[4]

  • Non-negativity:
  • Identity of Discernible:
  • Symmetry:
  • Triangle inequality:

In particular, the triplet loss algorithm is often defined with squared Euclidean distance at its core.

Predefined metrics, Euclidean distance metric

The common learning goal is to minimize a distance metric. This gives a loss function like

are indexes into a set of vectors
function implemented by the siamese network

This is the most common case, but it is also a special case implementing an Euclidean distance metric.

On a matrix form the previous is often expressed as

This is not the same as it is the squared Euclidean distance, that is the Manhattan distance.

Learned metrics, nonlinear distance metric

A more general case is where the output vector from the siamese network is passed through additional network layers implementing non-linear distance metrics.

are indexes into a set of vectors
function implemented by the siamese network
function implemented by the network joining outputs from the siamese network

On a matrix form the previous is often approximated as a Mahalanobis distance for a linear space as[5]

This can be further subdivided in at least Unsupervised learning and Supervised learning.

Learned metrics, half-twin networks

This form also allows the siamese network to be more of a half-twin, implementing a slightly different functions

are indexes into a set of vectors
function implemented by the half-twin network
function implemented by the network joining outputs from the siamese network

References

  1. ^ Bromley, Jane; Guyon, Isabelle; LeCun, Yann; Säckinger, Eduard; Shah, Roopak (1994). "Signature verification using a" siamese" time delay neural network" (PDF). Advances in Neural Information Processing Systems 6: 737–744.
  2. ^ Chopra, S.; Hadsell, R.; LeCun, Y. (June 2005). "Learning a similarity metric discriminatively, with application to face verification". 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'05). 1: 539–546 vol. 1. doi:10.1109/CVPR.2005.202. ISBN 0-7695-2372-2.
  3. ^ a b Taigman, Y.; Yang, M.; Ranzato, M.; Wolf, L. (June 2014). "DeepFace: Closing the Gap to Human-Level Performance in Face Verification". 2014 IEEE Conference on Computer Vision and Pattern Recognition: 1701–1708. doi:10.1109/CVPR.2014.220. ISBN 978-1-4799-5118-5.
  4. ^ Chatterjee, Moitreya; Luo, Yunan. "Similarity Learning with (or without) Convolutional Neural Network" (PDF). Retrieved 2018-12-07. {{cite web}}: Cite has empty unknown parameter: |dead-url= (help)
  5. ^ Chandra, M.P. (1936). "On the generalized distance in statistics" (PDF). Proceedings of the National Institute of Sciences of India. 1. 2: 49–55.