{"id":2589,"date":"2026-09-24T15:22:15","date_gmt":"2026-09-24T15:22:15","guid":{"rendered":"https:\/\/prlalmeida.com.br\/dsbd\/?page_id=2589"},"modified":"2026-09-25T12:36:40","modified_gmt":"2026-09-25T12:36:40","slug":"optimtrain","status":"publish","type":"page","link":"https:\/\/prlalmeida.com.br\/dsbd\/optimtrain\/","title":{"rendered":"OptimTrain"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2589\" class=\"elementor elementor-2589\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1b4fd98 e-con-full e-flex e-con e-parent\" data-id=\"1b4fd98\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t<div class=\"elementor-element elementor-element-1f2ec3a elementor-invisible elementor-widget elementor-widget-heading\" data-id=\"1f2ec3a\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;fadeInDown&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Optimizations in metric learning model training<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-3eb5f93 e-con-full e-flex e-con e-parent\" data-id=\"3eb5f93\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-ae3efb2 e-flex e-con-boxed e-con e-child\" data-id=\"ae3efb2\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-caca921 elementor-widget elementor-widget-heading\" data-id=\"caca921\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Researchers<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-a193e8f e-grid e-con-full e-con e-child\" data-id=\"a193e8f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e043804 elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"e043804\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img fetchpriority=\"high\" decoding=\"async\" width=\"460\" height=\"460\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2023\/10\/paulo.jpeg\" class=\"attachment-full size-full wp-image-183\" alt=\"\" srcset=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2023\/10\/paulo.jpeg 460w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2023\/10\/paulo-300x300.jpeg 300w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2023\/10\/paulo-150x150.jpeg 150w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">Paulo R. Lisboa de Almeida<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8138d71 elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"8138d71\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/08\/gregio-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail wp-image-2543\" alt=\"\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\"> Andr\u00e9 Gr\u00e9gio<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-389351a elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"389351a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2025\/09\/roberto-150x150.jpg\" class=\"attachment-thumbnail size-thumbnail wp-image-2244\" alt=\"\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\"> Roberto Tomchak<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-81a1465 elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"81a1465\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img loading=\"lazy\" decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/heloisaViotto-e1790262908269-150x150.jpeg\" class=\"attachment-thumbnail size-thumbnail wp-image-2579\" alt=\"\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">Helo\u00edsa Viotto<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-744a488 elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"744a488\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img loading=\"lazy\" decoding=\"async\" width=\"970\" height=\"970\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/caueSamonek.jpeg\" class=\"attachment-full size-full wp-image-2574\" alt=\"\" srcset=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/caueSamonek.jpeg 970w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/caueSamonek-300x300.jpeg 300w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/caueSamonek-150x150.jpeg 150w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2026\/09\/caueSamonek-768x768.jpeg 768w\" sizes=\"(max-width: 970px) 100vw, 970px\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">Cau\u00ea Samonek<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d8b2c16 elementor-position-top elementor-widget elementor-widget-image-box\" data-id=\"d8b2c16\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-image-box-wrapper\"><figure class=\"elementor-image-box-img\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"720\" src=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2025\/10\/thamiris.jpeg\" class=\"attachment-full size-full wp-image-2262\" alt=\"\" srcset=\"https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2025\/10\/thamiris.jpeg 720w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2025\/10\/thamiris-300x300.jpeg 300w, https:\/\/prlalmeida.com.br\/dsbd\/wp-content\/uploads\/2025\/10\/thamiris-150x150.jpeg 150w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure><div class=\"elementor-image-box-content\"><h3 class=\"elementor-image-box-title\">Thamiris Yamate Fischer<\/h3><p class=\"elementor-image-box-description\">UFPR<\/p><\/div><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-4b33607 e-con-full e-flex e-con e-parent\" data-id=\"4b33607\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-a577631 e-flex e-con-boxed e-con e-child\" data-id=\"a577631\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9ae7fb1 elementor-widget elementor-widget-heading\" data-id=\"9ae7fb1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Maintaining Difficulty: A Margin Scheduler for Triplet Loss in Siamese Networks Training<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6ebfd85 elementor-widget elementor-widget-text-editor\" data-id=\"6ebfd85\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p data-path-to-node=\"0\">This study reveals that, during the training of Siamese Networks using Triplet Margin Ranking Loss, the effective margin is often higher than the hyperparameter&#8217;s preset value, which can limit learning. The paper then suggests adapting this value during training; however, unlike previous approaches that focus on specific scenarios, the authors propose adjusting the margin based on the ratio of easy triplets.<\/p><p data-path-to-node=\"1\">In experiments conducted on the LFW, CelebA, CUB-200-2011, and Stanford Cars datasets, the effectiveness of a fixed margin of <span class=\"math-inline\" data-math=\"m = 0.3\" data-index-in-node=\"126\">m = 0.3<\/span>\u00a0was compared against two methods: the proposed Linear Scheduler, which starts with an initial margin of <span class=\"math-inline\" data-math=\"m_0 = 0.0\" data-index-in-node=\"238\">m0 = 0.0<\/span>\u00a0and a growth rate per epoch of <span class=\"math-inline\" data-math=\"s_l = 0.01\" data-index-in-node=\"279\">sl = 0.01<\/span>; and the Difficulty Adaptive Margin Scheduler (DAMS), which also starts with an initial margin of <span class=\"math-inline\" data-math=\"m_0 = 0.0\" data-index-in-node=\"388\">m0 = 0.0<\/span>, but applies a growth rate of <span class=\"math-inline\" data-math=\"s_a = 0.01\" data-index-in-node=\"428\">sa = 0.01<\/span>\u00a0only in epochs where the ratio of easy triplets exceeds a threshold of <span class=\"math-inline\" data-math=\"t = 0.95\" data-index-in-node=\"510\">t = 0.95<\/span>. These hyperparameters were selected based on exhaustive testing across multiple configurations.<\/p><p data-path-to-node=\"2\">The results indicate that DAMS is the most suitable method in most scenarios, as its margin growth can plateau at a certain point during training, unlike the linear method, which can be overly aggressive, or the fixed margin, which fails to adapt to the problem.<\/p><p>This work, titled &#8220;<a href=\"https:\/\/arxiv.org\/pdf\/2603.26389\"><span style=\"color: #99ccff;\"><strong><span style=\"text-decoration: underline;\">Maintaining Difficulty: A Margin Scheduler for Triplet Loss in Siamese Network Training<\/span><\/strong><\/span><\/a>&#8221; was presented at IJCNN 2026.<\/p><p><!-- notionvc: b8eb3f60-45a3-488a-a544-810c1770e11d --><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-3dcd057 e-con-full e-flex e-con e-child\" data-id=\"3dcd057\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t<div class=\"elementor-element elementor-element-9354b51 e-flex e-con-boxed e-con e-child\" data-id=\"9354b51\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-94e5452 elementor-widget elementor-widget-heading\" data-id=\"94e5452\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How Far is Too Far? Defining the Distance\nThreshold for Verification Siamese Networks.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9022057 elementor-widget elementor-widget-text-editor\" data-id=\"9022057\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"container\"><div id=\"model-response-message-contentr_0bd3559d38c8b491\" class=\"markdown markdown-main-panel md-content enable-luminous-fast-follows enable-updated-hr-color stronger\" dir=\"ltr\" aria-busy=\"false\" aria-live=\"polite\"><p data-path-to-node=\"1\">In Siamese Networks, two objects are considered to belong to the same class if the distance between them falls below a predefined threshold. This paper proposes determining the threshold (<span class=\"math-inline\" data-math=\"t\" data-index-in-node=\"188\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"mord mathnormal\">t<\/span><\/span><\/span><\/span><\/span>) for each problem by assuming that the distribution of distances can be approximated by a bimodal function. In this scenario, <span class=\"math-inline\" data-math=\"t\" data-index-in-node=\"316\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"mord mathnormal\">t<\/span><\/span><\/span><\/span><\/span> is the local minimum between the two modes: positive pairs concentrated at smaller distances and negative pairs at larger ones. Unlike other methods, such as selecting this hyperparameter based on ROC curve analysis, the proposed approach does not require pre-labeled data and is robust against distribution shifts between training, validation, and test sets. Furthermore, the technique performs well on imbalanced data.<\/p><p data-path-to-node=\"2\">The paper presents two algorithms: <b data-path-to-node=\"2\" data-index-in-node=\"35\">BimodalVal<\/b>, which estimates the threshold using only the validation dataset, and <b data-path-to-node=\"2\" data-index-in-node=\"116\">BimodalUpd<\/b>, where <span class=\"math-inline\" data-math=\"t\" data-index-in-node=\"134\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"mord mathnormal\">t<\/span><\/span><\/span><\/span><\/span> is initialized based on the validation data but can adapt every 64 new distances observed during testing. In experiments conducted on the MNIST, CIFAR10, PKLot, and LFW datasets, these two algorithms were compared against a fixed threshold baseline and the Equal Error Rate (EER) method. The results demonstrate that both proposed algorithms and EER achieve similar accuracy, significantly outperforming the fixed threshold approach.<\/p><p data-path-to-node=\"3\">This work, titled <span style=\"color: #99ccff;\"><a style=\"color: #99ccff;\" href=\"https:\/\/arxiv.org\/pdf\/2607.05329\"><strong>&#8220;How Far is Too Far? Defining the Distance Threshold for Verification Siamese Networks&#8221;<\/strong><\/a><\/span>, was presented at SMC 2026.<\/p><\/div><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Optimizations in metric learning model training Researchers Paulo R. Lisboa de Almeida UFPR Andr\u00e9 Gr\u00e9gio UFPR Roberto Tomchak UFPR Helo\u00edsa [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"site-sidebar-layout":"no-sidebar","site-content-layout":"","ast-site-content-layout":"full-width-container","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-2589","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/pages\/2589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/comments?post=2589"}],"version-history":[{"count":20,"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/pages\/2589\/revisions"}],"predecessor-version":[{"id":2632,"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/pages\/2589\/revisions\/2632"}],"wp:attachment":[{"href":"https:\/\/prlalmeida.com.br\/dsbd\/wp-json\/wp\/v2\/media?parent=2589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}