Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

The Influence of Loss Function Usage at SIAMESE Network in Measuring Text Similarity

Author 1: Suprapto Author 2: Joseph A. Polela
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 11, No. 12 · Published 2020 · Cited by 5

DOI: https://doi.org/10.14569/IJACSA.2020.0111290

Abstract

In a text matching similarity task, a model takes two sequence of text as an input and predicts a category or scale value to show their relationship. A developed model is to measure the similarity - one of relationship between those two text. The model is SIAMESE network that implement two copies of same network of CNN, it takes text_1 and text_2 as the inputs respectively for two CNN networks. The output of each CNN network is features vector of the corresponding text input, both outputs are then fed by a loss function to calculate the value of loss (i.e. similarity). This research implemented two types of loss functions, i.e. Triplet loss and Contrastive loss. The usage purpose of these two types of loss functions was to see the influence toward the measurement results of similarity between two text being compared. The metrices used for this comparison are precision, recall, and F1-score. Based on the experimental results done on 1500 pairs of sentences, and varied on the epoch value starting from 10 until 200 with an increment of 10, showed the best result was for epoch value of 180 with precision 0.8004, recall 0.6780, and F1-score 0.6713 for Triplet loss function; and epoch value of 160 with precision 0.6463, recall 0.6440, and F1-score 0.6451 for Contrastive loss function gave the best performance. So that, the Triplet loss function gave better influence than Contrastive loss function in measuring similarity between two given sentences.

Keywords

How to Cite this Article

Suprapto, & Polela, J. A. (2020). The Influence of Loss Function Usage at SIAMESE Network in Measuring Text Similarity. International Journal of Advanced Computer Science and Applications, 11(12). https://doi.org/10.14569/IJACSA.2020.0111290

Suprapto, and Joseph A. Polela. "The Influence of Loss Function Usage at SIAMESE Network in Measuring Text Similarity." International Journal of Advanced Computer Science and Applications, vol. 11, no. 12, 2020, https://doi.org/10.14569/IJACSA.2020.0111290.

@article{Suprapto2020,
  title     = {The Influence of Loss Function Usage at SIAMESE Network in Measuring Text Similarity},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {11},
  number    = {12},
  year      = {2020},
  publisher = {The Science and Information Organization},
  author    = {Suprapto and Joseph A. Polela},
  doi       = {10.14569/IJACSA.2020.0111290},
  url       = {https://doi.org/10.14569/IJACSA.2020.0111290}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.