#Is a Siamese network (for similarity learning) with single sub-network possible?

2 messages · Page 1 of 1 (latest)

plucky garden
#

I have been studying similarity learning using deep learning. The Siamese networks in essence extract embeddings from two images, and then measure the similarity of those two images. This means that the network has to have at least 2 sub-networks (they share the same weights and structure) but I was wondering if this can be done using only a single network, and whether this would reduce computational costs, or whether it would be inefficient. I am relatively new in AI so im sorry if I am not too technical with my question. Thanks alot! 😃

wooden spoke
#

Using a single network is possible but there would be a few things to keep in mind:

  1. with most architectures, the model would then be sensitive to the order of the images (AB would not produce the same result as BA), and so you would need to randomly swap the images and thus probably add costs
  2. You would need additional parameters at least in the first layer. A feed forward network taking double the inputs also has double the parameters in the first layer just to process the additional inputs. Additional weights would probably also be required in later layers to process the additional information.
  3. The resulting model would be forced to always take two inputs, and it is not clear what purpose the model would have since the embedding would carry the information of two images at once