How weight-sharing mechanisms affect the performance of deep Siamese networks

Mahvash Mohazzebi, Mahdi Eftekhari, Mahdi Shariatzadeh · 2022

Siamese networks usually consist of two parallel networks and each network is made of a backbone and some fully connected layers. The entire Siamese structure is trained by a loss function, while the similarity of the latent spaces of the two networks is decisive at the inference time. The weights of the network can be shared in Siamese networks. Therefore, in this paper, four weight-sharing mechanisms are proposed, and their effects on the performance of Siamese networks are investigated. These methods are named "full weight sharing," "partial weight sharing in FC," "partial weight sharing in CNN," and "without weight sharing." In this paper, four network backbones are examined and trained by employing the four aforementioned weight-sharing methods; two losses (proxy anchor loss and contrastive loss) are utilized for training. According to the obtained results, "partial weight sharing in FC" combined with contrastive loss has the best result on all backbones.

Read the paper · More papers on PaperTik