<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>deep metric learning &#8211; Science</title>
	<atom:link href="https://scienmag.com/tag/deep-metric-learning/feed/" rel="self" type="application/rss+xml" />
	<link>https://scienmag.com</link>
	<description></description>
	<lastBuildDate>Sun, 04 Oct 2026 09:23:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://scienmag.com/wp-content/uploads/2024/07/cropped-scienmag_ico-32x32.jpg</url>
	<title>deep metric learning &#8211; Science</title>
	<link>https://scienmag.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">73899611</site>	<item>
		<title>Hybrid CNN-ViT Model With Triple Loss Boosts Image Search Accuracy</title>
		<link>https://scienmag.com/hybrid-cnn-vit-model-with-triple-loss-boosts-image-search-accuracy/</link>
		
		<dc:creator><![CDATA[Blake Davidson]]></dc:creator>
		<pubDate>Sun, 04 Oct 2026 09:23:22 +0000</pubDate>
				<category><![CDATA[Technology and Engineering]]></category>
		<category><![CDATA[AI-powered image similarity matching]]></category>
		<category><![CDATA[CIFAR-100]]></category>
		<category><![CDATA[content-based image retrieval]]></category>
		<category><![CDATA[content-based image retrieval advancements]]></category>
		<category><![CDATA[contrastive loss]]></category>
		<category><![CDATA[convolutional neural networks]]></category>
		<category><![CDATA[Convolutional Neural Networks and Vision Transformers]]></category>
		<category><![CDATA[cross-entropy loss]]></category>
		<category><![CDATA[deep learning in image search]]></category>
		<category><![CDATA[deep metric learning]]></category>
		<category><![CDATA[feature embedding]]></category>
		<category><![CDATA[fine-grained retrieval]]></category>
		<category><![CDATA[fusion of CNN and ViT in computer vision]]></category>
		<category><![CDATA[HCV-MLO]]></category>
		<category><![CDATA[hybrid architecture]]></category>
		<category><![CDATA[hybrid CNN-vision transformer architecture]]></category>
		<category><![CDATA[improving image search accuracy with hybrid models]]></category>
		<category><![CDATA[innovative deep learning frameworks in image retrieval]]></category>
		<category><![CDATA[machine learning models for visual search]]></category>
		<category><![CDATA[multi-loss optimization for image retrieval]]></category>
		<category><![CDATA[semantic image similarity detection]]></category>
		<category><![CDATA[triple loss function image retrieval]]></category>
		<category><![CDATA[triplet loss]]></category>
		<category><![CDATA[Vision Transformers]]></category>
		<guid isPermaLink="false">https://scienmag.com/?p=234462</guid>

					<description><![CDATA[Researchers have combined convolutional neural networks and vision transformers with a three-loss training strategy to significantly improve content-based image retrieval performance.]]></description>
										<content:encoded><![CDATA[<p>Image search is quietly becoming one of the most demanding tests of artificial intelligence. When a user submits a photo and asks a system to find visually similar images across a database of millions, the machine must do far more than match colors or shapes. It must understand what makes two pictures semantically alike, a task that has pushed researchers to combine the two most powerful architectures in modern computer vision: convolutional neural networks and vision transformers. A new study published in the International Journal of Machine Learning and Cybernetics shows that fusing these architectures, and then training the result with three different loss functions at once, can substantially sharpen the quality of image retrieval.</p>
<p>The research, led by Hanh Nguyen Thi of Thuyloi University and Hanoi Architectural University together with colleagues at CMC University, the Posts and Telecommunications Institute of Technology, the Vietnam Academy of Science and Technology, and Hanoi University of Science and Technology, introduces a framework called HCV-MLO, short for Hybrid CNN-ViT with Multi-Loss Optimization. The work extends a conference paper the team presented at MAPR 2025, and it arrives at a moment when content-based image retrieval, known in the field as CBIR, is under growing pressure from ever-larger image collections and increasingly subtle queries.</p>
<p>To understand why the hybrid approach matters, it helps to look at what each architecture does well. Convolutional neural networks, the workhorses of deep learning since the breakthrough ImageNet results of 2012, scan images with filters that detect local patterns: edges, textures, corners, and small motifs that build up into recognizable objects. They are exceptionally good at capturing these fine-grained visual signatures. But convolutions look through a narrow window at each step, so a CNN can struggle to relate a detail in the top-left corner of an image to a feature in the bottom-right, especially when that relationship spans a large distance.</p>
<p>Vision transformers, introduced by Dosovitskiy and colleagues in 2021 with the memorable paper title declaring that an image is worth sixteen by sixteen words, take a different route. They chop an image into patches, treat each patch like a word in a sentence, and use self-attention to let every patch weigh its relationship to every other patch. This gives ViTs a natural talent for modeling long-range dependencies and global context, the kind of scene-level understanding that tells a retrieval system a dog on a beach belongs with other outdoor animal scenes even if the local textures differ. The catch is that transformers, on their own, can be less sensitive to the fine local detail that CNNs capture so effortlessly.</p>
<p>The Vietnamese team&#8217;s insight was that these weaknesses are complementary, and that a retrieval system should not have to choose. HCV-MLO runs parallel CNN and ViT branches over the same input image and merges their feature representations into a single embedding, a compact numerical vector that encodes the image&#8217;s semantic content. In a retrieval system, similarity between images is computed as distance between these vectors, so the entire game is to learn embeddings in which images of the same category cluster tightly while images of different categories spread apart. The hybrid design gives the embedding both the local texture sensitivity of the convolutional branch and the global relational awareness of the transformer branch.</p>
<p>But architecture alone, the researchers argue, is only half the story. The second pillar of HCV-MLO is its multi-loss optimization strategy, which trains the network by simultaneously minimizing three distinct loss functions: triplet loss, contrastive loss, and cross-entropy loss. Each of these objectives shapes the embedding space in a different way. Triplet loss, made famous by the FaceNet face recognition system in 2015, pulls an anchor image closer to a positive example of the same class while pushing it away from a negative example, directly enforcing the relative ordering that retrieval depends on. Contrastive loss works on pairs of images, rewarding the network when similar images map to nearby points and dissimilar images map to distant ones. Cross-entropy loss, the standard objective for classification, anchors the embedding to clear category boundaries and provides a stable supervisory signal.</p>
<p>To find out what each loss actually contributes, the team built three single-loss variants of their hybrid model: CNN-ViT-CE using cross-entropy alone, CNN-ViT-Contrastive using contrastive loss alone, and CNN-ViT-Triplet using triplet loss alone. This ablation-style analysis, more comprehensive than what appeared in their earlier conference version, allowed them to isolate the effect of each objective on the learned representations. The experiments covered three widely used benchmark datasets that together span a demanding range of retrieval challenges: CIFAR-100, with its one hundred diverse object categories in small, low-resolution images; CUB-200-2011, a fine-grained dataset of two hundred bird species where distinguishing one sparrow from another requires exquisite attention to subtle detail; and Stanford Dogs, another fine-grained benchmark covering one hundred twenty dog breeds.</p>
<p>The results were consistent across all three datasets. The full HCV-MLO model outperformed both single-network baselines, meaning pure CNN or pure ViT systems, and the single-loss variants, meaning the hybrid architecture trained with only one of the three objectives. The headline figure comes from CIFAR-100, where HCV-MLO achieved a mean average precision at rank one hundred, or mAP@100, of 81.99, a clear improvement over recent competitive methods in the field. Mean average precision is a strict metric for retrieval because it rewards systems that place all the relevant results near the top of the ranked list, not merely somewhere in the first hundred. The fact that the gains held up on fine-grained datasets like birds and dogs, where inter-class differences are tiny, suggests that the combination of local and global features with multi-loss training produces embeddings that are genuinely more discriminative, not just better tuned to one benchmark.</p>
<p>The study&#8217;s broader message resonates with a trend running through recent deep metric learning research, a field that has produced a rich catalog of loss functions including proxy-based objectives, multi-similarity loss, ranked list loss, and circle loss. Rather than betting on any single recipe, HCV-MLO demonstrates that stacking complementary objectives on top of a complementary architecture yields a practical and effective solution for embedding quality. The authors also note that the datasets used in the study, CIFAR-100, CUB-200-2011, and Stanford Dogs, are all publicly available, and that no new datasets were generated, making the work straightforward for other groups to reproduce and compare against.</p>
<p>For everyday applications, the implications are tangible. Better retrieval embeddings mean medical image archives where a clinician can find prior cases resembling a new scan, e-commerce platforms where a shopper&#8217;s camera snapshot surfaces the right product, and digital libraries where a rough sketch or photo unlocks visually related material. As image collections continue to balloon, the hybrid CNN-ViT strategy with multi-loss optimization offers a blueprint for systems that see both the trees and the forest, capturing the fine texture of an individual leaf while never losing sight of the shape of the whole canopy. The research was carried out without specific grant funding, and the authors report no competing financial interests, leaving the door open for the broader community to build on their hybrid, multi-loss recipe.</p>
<p><strong>Subject of Research:</strong> A hybrid CNN-ViT feature embedding framework with multi-loss optimization for content-based image retrieval</p>
<p><strong>Article Title:</strong> Hybrid CNN-ViT feature embedding for image retrieval with multi-loss optimization</p>
<p><strong>Article References:</strong> Thi, H. N., Huu, Q. N., Thuy, Q. D. T., Le, N. T. T., Van, T. N., &amp; Huu, H. N. (2026). Hybrid CNN-ViT feature embedding for image retrieval with multi-loss optimization. <em>International Journal of Machine Learning and Cybernetics, 17</em>(9), Article 446. <a href="https://doi.org/10.1007/s13042-026-03271-6" rel="noopener noreferrer">https://doi.org/10.1007/s13042-026-03271-6</a></p>
<p><strong>Image Credits:</strong> AI Generated</p>
<p><strong>DOI:</strong> <a href="https://doi.org/10.1007/s13042-026-03271-6" rel="noopener noreferrer">10.1007/s13042-026-03271-6</a></p>
<p><strong>Keywords:</strong> content-based image retrieval, convolutional neural networks, vision transformers, hybrid architecture, triplet loss, contrastive loss, cross-entropy loss, deep metric learning, feature embedding, CIFAR-100, fine-grained retrieval, HCV-MLO</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">234462</post-id>	</item>
		<item>
		<title>AI Learns to Match Rock Scans With Near-Perfect Accuracy Using N-Pair Loss</title>
		<link>https://scienmag.com/ai-learns-to-match-rock-scans-with-near-perfect-accuracy-using-n-pair-loss/</link>
		
		<dc:creator><![CDATA[Blake Davidson]]></dc:creator>
		<pubDate>Fri, 02 Oct 2026 10:11:55 +0000</pubDate>
				<category><![CDATA[Technology and Engineering]]></category>
		<category><![CDATA[AI-driven analysis of pre-salt reservoirs]]></category>
		<category><![CDATA[automated analysis of subsurface reservoirs]]></category>
		<category><![CDATA[content-based image retrieval]]></category>
		<category><![CDATA[content-based image retrieval for geosciences]]></category>
		<category><![CDATA[convolutional neural networks]]></category>
		<category><![CDATA[Deep learning for geological image retrieval]]></category>
		<category><![CDATA[deep metric learning]]></category>
		<category><![CDATA[digital rock analysis]]></category>
		<category><![CDATA[digital rock collection exploration]]></category>
		<category><![CDATA[digital transformation in geological studies]]></category>
		<category><![CDATA[embedding space]]></category>
		<category><![CDATA[Machine learning]]></category>
		<category><![CDATA[machine learning in oil and gas exploration]]></category>
		<category><![CDATA[micro-CT]]></category>
		<category><![CDATA[mineral and pore network imaging]]></category>
		<category><![CDATA[N-pair loss]]></category>
		<category><![CDATA[N-pair loss in rock tomography]]></category>
		<category><![CDATA[near-perfect accuracy in geological image matching]]></category>
		<category><![CDATA[petroleum geoscience]]></category>
		<category><![CDATA[pre-salt carbonates]]></category>
		<category><![CDATA[rock tomography]]></category>
		<category><![CDATA[sandstones]]></category>
		<category><![CDATA[structural similarity detection in rock samples]]></category>
		<category><![CDATA[X-ray tomography in petroleum geology]]></category>
		<guid isPermaLink="false">https://scienmag.com/?p=227075</guid>

					<description><![CDATA[Brazilian researchers have used a deep metric learning technique called N-pair loss to retrieve visually similar rock tomography images with F1-scores approaching 99 percent, outperforming triplet loss and classification-based methods across carbonate and sandstone datasets.]]></description>
										<content:encoded><![CDATA[<p>Deep beneath the ocean floor off the coast of Brazil, the pre-salt reservoirs hold some of the most valuable oil and gas deposits ever discovered. Understanding the rocks that host these resources requires an intimate knowledge of their internal architecture, and that knowledge increasingly comes from X-ray tomography, which produces thousands of grayscale slices revealing pore networks, mineral grains and textural patterns in exquisite detail. Now, a team of Brazilian researchers has shown that a deep learning technique called N-pair loss can search through these tomographic archives with near-perfect accuracy, retrieving images of structurally similar rock samples and potentially transforming how geologists and petroleum engineers explore digital rock collections.</p>
<p>The study, published in Multimedia Tools and Applications by researchers at the Federal University of Maranhão and the Pontifical Catholic University of Rio de Janeiro, tackles a problem that has long frustrated automated analysis of geological imagery. Content-based image retrieval, or CBIR, allows computers to find images that look similar to a query image without relying on text labels. The approach has proven its worth in face recognition, e-commerce and medical imaging, but rock tomography presents a uniquely hostile environment for such systems. Slices from different rock samples can look strikingly alike, while subtle variations in pore connectivity and grain texture separate samples that matter enormously for fluid flow predictions. A retrieval system that cannot distinguish these fine differences is worse than useless, because it returns plausible-looking but geologically irrelevant results.</p>
<p>The researchers&#8217; solution draws on deep metric learning, a family of techniques that trains neural networks not simply to classify images but to arrange them in a mathematical space where distance equals meaning. In such an embedding space, slices from the same rock volume cluster tightly together while slices from different volumes are pushed far apart. When a user submits a query slice, the system encodes it into this space and returns the nearest neighbors by Euclidean distance. The critical question is how to train the network to build this well-organized space, and this is where the choice of loss function becomes decisive.</p>
<p>Earlier metric learning approaches relied on contrastive loss, which compares pairs of images, or triplet loss, which compares an anchor image against one positive example and one negative example simultaneously. Both formulations suffer from a well-known weakness: they are highly sensitive to which samples happen to appear in each training batch, and they require careful mining of difficult negative examples to work well. N-pair loss, introduced by Google researcher Kihyuk Sohn in 2016, takes a different tack. Instead of contrasting an anchor against a single negative, it pits the anchor-positive pair against multiple negatives at once, using a softmax-like exponential formulation. Each training step therefore delivers a far richer gradient signal, encouraging compact clusters and clear separation between classes without the instability that plagues simpler pairwise methods.</p>
<p>To test whether this multi-negative strategy could handle the subtleties of rock imagery, the team trained models on two publicly available datasets from the Digital Rocks Portal. The first, the 16 Brazilian Pre-Salt Carbonates dataset, contains micro-CT volumes of carbonate rock from the pre-salt formations, captured at voxel resolutions ranging from 6 to 64 micrometers. The second, the 11 Sandstones dataset, includes 1000 slices from each of eleven sandstone varieties, from Bandera Gray to Bentheimer. The researchers preprocessed the volumes into 128-by-128-pixel slices and, crucially, split each volume sequentially along its slicing axis, reserving the first half of every volume for training and the second half for testing. This conservative design prevents the near-identical adjacent slices that characterize tomographic data from leaking between training and evaluation, a pitfall that could artificially inflate performance.</p>
<p>The architecture itself combined well-known convolutional backbones, including EfficientNetB0, EfficientNetV2M, ResNet101, DenseNet201 and MobileNet, all pretrained on ImageNet, with an embedding layer that projects extracted features into a lower-dimensional latent space. The team varied the number of negative samples from two to five and the embedding dimensionality from 16 upward, running each configuration three times to report mean and standard deviation. The results were striking. On the carbonate dataset, a DenseNet201 model with five negative pairs and a 16-dimensional embedding achieved an F1-score of 98.87 plus or minus 1.17 percent and a mean average precision of 98.83 plus or minus 1.22 percent. On the sandstone dataset, an EfficientNetB0 configuration pushed even higher, reaching 99.71 percent F1-score and 99.64 percent mAP, meaning that nearly every retrieved slice genuinely belonged to the same rock volume as the query.</p>
<p>Perhaps the most interesting finding is that no single backbone dominated across both materials. The deep, hierarchical architectures of ResNet101 and DenseNet201 excelled on the heterogeneous, irregularly porous carbonates, while the lighter EfficientNetB0, with its balanced scaling of depth, width and resolution, proved most stable on the more uniform, grain-dominated sandstones. The researchers attribute this to the alignment between each architecture&#8217;s inductive biases and the visual character of the material. DenseNet201, which emphasizes fine textural continuity through its densely connected feature reuse, actually became unstable on sandstones, where discrimination depends more on subtle global structural differences than on local texture. The lesson for practitioners is that backbone selection should follow the geology, not the leaderboard.</p>
<p>The team also demonstrated that the gains were not an artifact of their training setup. Compared against a triplet loss model previously published for rock tomography retrieval, a double Siamese network that incorporates porosity and permeability data, and a conventional classification-based retrieval baseline, the N-pair loss approach outperformed all of them on both datasets. On the sandstones, it beat the DSNN approach by roughly seven percentage points of F1-score, even though that competitor had access to extra physical metadata. An ablation study confirmed that adding L2 regularization to the loss, which penalizes overly large feature vector magnitudes, was essential: without it, carbonate performance dropped by more than five percentage points, suggesting that constraining embedding geometry promotes genuine generalization rather than memorization.</p>
<p>Most compelling of all were the cross-dataset experiments, in which models trained exclusively on sandstones were tested on carbonates and vice versa. Performance inevitably fell, to roughly 77 to 80 percent F1-score, but the fact that the models retained any meaningful retrieval ability across such radically different lithologies indicates that the learned embeddings encode transferable structural and textural descriptors rather than dataset-specific shortcuts. The researchers note that if the near-perfect intra-dataset scores had merely reflected the controlled nature of the tomography data, a far larger collapse would have been expected under this severe distribution shift. Instead, the models appear to have captured general morphological features of porous media.</p>
<p>The practical implications extend well beyond academic benchmarks. In oil and gas exploration, identifying and categorizing rock formations directly shapes resource management and extraction decisions, and a retrieval system that instantly surfaces structurally similar samples from vast tomographic archives could accelerate comparative analysis, quality assessment and geological interpretation. The method also requires no porosity or permeability measurements, only images, making it applicable wherever non-visual metadata is scarce. Limitations remain: the validation covered only rock datasets, the training used random rather than adaptive negative sampling, and the model still confuses closely related Berea sandstone subtypes whose petrophysical properties genuinely overlap. The authors point to hard negative mining, margin-based constraints and hybrid metric-classification objectives as promising next steps. For now, though, the work establishes that multi-negative metric learning, long proven on natural image benchmarks, can master the subtle, highly correlated structures of the subsurface, bringing automated digital rock analysis a significant step closer to the drilling rig.</p>
<p><strong>Subject of Research:</strong> Deep metric learning with N-pair loss for content-based retrieval of rock tomography images</p>
<p><strong>Article Title:</strong> Rock tomography image retrieval: a deep metric learning approach with N-pair loss</p>
<p><strong>Article References:</strong> Silva, A., Farias, M., Souza, J., Pinto, D., Belfort, F., Freitas, M., Araújo, A., Pessoa, A., Paiva, A., Silva, A., Rodrigues, A., &amp; Albuquerque, M. (2026). Rock tomography image retrieval: a deep metric learning approach with N-pair loss. <em>Multimedia Tools and Applications, 85</em>(10), Article 772. <a href="https://doi.org/10.1007/s11042-026-21936-w" rel="noopener noreferrer">https://doi.org/10.1007/s11042-026-21936-w</a></p>
<p><strong>Image Credits:</strong> AI Generated</p>
<p><strong>DOI:</strong> <a href="https://doi.org/10.1007/s11042-026-21936-w" rel="noopener noreferrer">10.1007/s11042-026-21936-w</a></p>
<p><strong>Keywords:</strong> content-based image retrieval, rock tomography, N-pair loss, deep metric learning, digital rock analysis, micro-CT, pre-salt carbonates, sandstones, convolutional neural networks, embedding space, petroleum geoscience, machine learning</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">227075</post-id>	</item>
		<item>
		<title>New Open-Source Toolkit Puts Reproducibility First in Embedding Distillation</title>
		<link>https://scienmag.com/new-open-source-toolkit-puts-reproducibility-first-in-embedding-distillation/</link>
		
		<dc:creator><![CDATA[Denise Maddox]]></dc:creator>
		<pubDate>Tue, 22 Sep 2026 23:43:25 +0000</pubDate>
				<category><![CDATA[Technology and Engineering]]></category>
		<category><![CDATA[compact models for edge devices and hospitals]]></category>
		<category><![CDATA[deep metric learning]]></category>
		<category><![CDATA[embedding-based product search and medical diagnostics]]></category>
		<category><![CDATA[fine-grained recognition]]></category>
		<category><![CDATA[GitHub resources for reproducible machine learning pipelines]]></category>
		<category><![CDATA[image retrieval]]></category>
		<category><![CDATA[knowledge distillation]]></category>
		<category><![CDATA[knowledge distillation for retrieval models]]></category>
		<category><![CDATA[lifecycle support for retrieval system compression]]></category>
		<category><![CDATA[metric embeddings]]></category>
		<category><![CDATA[model compression]]></category>
		<category><![CDATA[negative transfer]]></category>
		<category><![CDATA[ONNX deployment]]></category>
		<category><![CDATA[open-source software]]></category>
		<category><![CDATA[open-source toolkit for metric embedding compression]]></category>
		<category><![CDATA[open-source tools for scalable image and medication identification]]></category>
		<category><![CDATA[Python toolkit for embedding model distillation]]></category>
		<category><![CDATA[representation similarity]]></category>
		<category><![CDATA[reproducibility]]></category>
		<category><![CDATA[reproducibility challenges in embedding model deployment]]></category>
		<category><![CDATA[Reproducible embedding distillation]]></category>
		<category><![CDATA[teacher-student networks]]></category>
		<category><![CDATA[tools for distilling large teacher models into smaller efficient]]></category>
		<category><![CDATA[vector similarity comparison in learned metric spaces]]></category>
		<guid isPermaLink="false">https://scienmag.com/?p=208851</guid>

					<description><![CDATA[Researchers have released EmbedKD, an open-source toolkit that brings verified diagnostics, retrieval protocols and reproducible deployment checks to the compression of metric embedding models.]]></description>
										<content:encoded><![CDATA[<p>When a product-search engine matches a photograph of a shoe against millions of catalogue images, or a hospital system identifies a medication from a single snapshot, the software is not running a classifier. It is comparing vectors, embeddings, in a learned metric space where distance encodes similarity. Deploying such systems on phones, edge devices or hospital servers demands compact models, and knowledge distillation has long been the standard route to them: a small student network learns to mimic a larger teacher, recovering much of the teacher&#8217;s accuracy at a fraction of the computational cost. Yet while distillation research has flourished for a decade, the open-source tooling available to practitioners has remained stubbornly focused on classification, leaving the researchers who compress retrieval models to assemble their own pipelines by hand, often with results that cannot be reliably reproduced.</p>
<p>A team led by Linh Do Nhat, Dzi Lam Tran Tuan and Vinh Truong Hoang has now published EmbedKD, an open-source Python toolkit designed specifically for distilling metric embeddings, in the journal SoftwareX. The software, released under the MIT license and available on GitHub, deliberately contributes no new distillation objective. Instead, its authors argue, the real gap in the field is the lifecycle around the methods: the diagnostics that reveal whether a teacher–student pair is compatible before training, the retrieval protocols that measure whether distillation actually helped, and the deployment checks that verify the model leaving the pipeline still behaves like the one that was trained. Every component, they note, could be rebuilt inside existing frameworks with moderate effort; what EmbedKD provides is that workflow, verified stage against stage.</p>
<p>The distinction matters because existing tools were built for a different problem. Frameworks such as torchdistill, mdistiller and KD-Lib offer config-driven pipelines, official implementations and combinations with pruning and quantization, but none ships a retrieval protocol with mean average precision and recall metrics, a gallery-query evaluation, pre- and post-training diagnostic reports, or a deployment benchmark with a parity check. Retrieval-oriented distillation methods themselves are well developed, from multi-view distillation for re-identification to pairwise-difference relational distillation, but each is released as code accompanying a single paper&#8217;s experiments. EmbedKD instead wraps the process in a six-command lifecycle: diagnose, fit, eval, extract, deploy and reproduce, each of which can be run from the command line or through a shared Python API that guarantees the two paths produce identical numbers.</p>
<p>Reproducibility is treated as a hard requirement rather than an aspiration. Every execution records its full state, including configuration, random seed, software versions, code commit and hardware, and all published results trace back to these logs. The reproduction command grades its output against tolerance-checked expected values and exits with a distinct error code on any metric drift, allowing continuous-integration systems to gate on it. In one demonstration, retraining the reference experiment returned results identical to the original run in every digit rather than merely within tolerance. The released version is archived on Zenodo with checksums for every checkpoint, and the reference environment, down to driver and package versions, ships with the repository.</p>
<p>Architecturally, the toolkit rests on three decisions. A registry system lets users add distillation objectives, task losses and dataset adapters as first-class citizens of the configuration file without touching the core. A single declarative configuration schema merges defaults, YAML files and command-line overrides into one validated, fail-fast configuration that is dumped verbatim into the run fingerprint. And an explicit backbone policy distinguishes five validated teacher and student architectures tested in continuous integration, nineteen models that pass smoke tests, and any other timm backbone, which runs only under an explicit experimental flag with a warning rather than a silent claim of support.</p>
<p>The toolkit also surfaces numerical subtleties that are easy to get wrong. Because the supported objectives operate on L2-normalized embeddings, mean squared error and cosine distance are the same function up to a constant, but the reduction over the embedding dimension means that at a dimensionality of 512, the same nominal weight makes the MSE distillation term 256 times weaker than the cosine term. Experiments on the CUB-200-2011 bird dataset confirmed the algebra: at the nominal weight the MSE objective changed nothing, while at the scale-matched weight it matched cosine distillation almost exactly. The toolkit prints the effective weight of each objective when a run starts, computes all losses in fp32 outside the autocast region because geometric losses underflow in fp16 and silently freeze training, and skips and counts non-finite loss components rather than poisoning a training step.</p>
<p>Perhaps the most striking findings come from the diagnostics themselves, which the authors report with unusual candour. In a controlled series where only teacher quality varied, a teacher weaker than the standalone student cost the student 0.023 mAP while its representation became more aligned with the teacher, a failure mode the team calls aligned-but-worse. The sign of the distillation effect changed near a teacher–student gap of 0.02 to 0.03 and saturated after roughly 0.05. But across different student architectures the gap failed to predict the magnitude of the gain, and a stronger ConvNeXt-Tiny teacher yielded smaller gains than ResNet50 for all three students tested. Most sobering, the pre-distillation risk label, intended to warn of harmful pairs, read LOW on every rung of the controlled series including the harmful one, and its underlying similarity score shifted enough between probe splits to cross its own threshold.</p>
<p>The cross-domain results were equally cautionary. When students trained on one dataset were evaluated on another without fine-tuning, distillation hurt in both directions tested: a CUB-trained ResNet18 lost 0.0074 mAP on Cars196, and a Cars-trained MobileNetV3 lost 0.0320 on CUB-200, both far outside the seed spread, even though both pairs had gained in domain. The distillation term, the authors suggest, pulls the student toward a teacher fitted to the source domain, and the pull that helps within a domain costs generality when the domain changes. For the deployment scenario, however, the news was better: a distilled MobileNetV3 kept 72.4 percent of its teacher&#8217;s Recall@1 while being 5.7 times smaller and eight times faster on CPU, with ONNX export verified by a mandatory parity check that recomputes retrieval metrics through the exported graph.</p>
<p>The authors are explicit about the limits of their evidence base: four demonstrations, one controlled series and one six-pair grid, all on a single machine, with several comparisons resting on single runs. The toolkit targets single-GPU image workloads, and the shipped training schedule trains past the best checkpoint for every backbone measured, requiring validation-based checkpoint selection. Yet the broader message is one the field is increasingly willing to hear. Whether a given embedding pair is worth distilling is today settled by trial and error, one configuration at a time; EmbedKD makes it cheap to settle by measurement instead, turning questions usually answered by folklore into routine, reproducible experiments, and, just as importantly, documenting where its own instruments cannot see.</p>
<p><strong>Subject of Research:</strong> A reproducibility-first open-source toolkit for knowledge distillation of metric embeddings in image retrieval.</p>
<p><strong>Article Title:</strong> EmbedKD: a reproducibility-first toolkit for knowledge distillation of metric embeddings</p>
<p><strong>Article References:</strong> Do Nhat, L., Lam Tran Tuan, D., &amp; Truong Hoang, V. (2026). EmbedKD: a reproducibility-first toolkit for knowledge distillation of metric embeddings. <em>SoftwareX, 36</em>, Article 103029. <a href="https://doi.org/10.1016/j.softx.2026.103029" rel="noopener noreferrer">https://doi.org/10.1016/j.softx.2026.103029</a></p>
<p><strong>Image Credits:</strong> AI Generated</p>
<p><strong>DOI:</strong> <a href="https://doi.org/10.1016/j.softx.2026.103029" rel="noopener noreferrer">10.1016/j.softx.2026.103029</a></p>
<p><strong>Keywords:</strong> knowledge distillation, metric embeddings, image retrieval, reproducibility, model compression, open-source software, deep metric learning, teacher-student networks, ONNX deployment, negative transfer, representation similarity, fine-grained recognition</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">208851</post-id>	</item>
		<item>
		<title>Tiny AI Model Learns to Tell Individual Turkeys Apart in Crowded Barns</title>
		<link>https://scienmag.com/tiny-ai-model-learns-to-tell-individual-turkeys-apart-in-crowded-barns/</link>
		
		<dc:creator><![CDATA[Alan Morgan]]></dc:creator>
		<pubDate>Sat, 12 Sep 2026 18:21:50 +0000</pubDate>
				<category><![CDATA[Agriculture]]></category>
		<category><![CDATA[animal welfare monitoring]]></category>
		<category><![CDATA[appearance embedding]]></category>
		<category><![CDATA[behavior analysis of farm animals]]></category>
		<category><![CDATA[computer vision]]></category>
		<category><![CDATA[computer vision for poultry monitoring]]></category>
		<category><![CDATA[deep learning for poultry health]]></category>
		<category><![CDATA[deep metric learning]]></category>
		<category><![CDATA[DeepSORT]]></category>
		<category><![CDATA[dense crowd tracking in livestock environments]]></category>
		<category><![CDATA[early disease detection in turkeys]]></category>
		<category><![CDATA[innovative approaches to animal identification]]></category>
		<category><![CDATA[multi-object tracking]]></category>
		<category><![CDATA[multi-object tracking in agriculture]]></category>
		<category><![CDATA[Precision Livestock Farming]]></category>
		<category><![CDATA[Siamese network]]></category>
		<category><![CDATA[small AI models for animal tracking]]></category>
		<category><![CDATA[Smart Agriculture]]></category>
		<category><![CDATA[squeeze-and-excitation attention]]></category>
		<category><![CDATA[tailored AI solutions for farm management]]></category>
		<category><![CDATA[triplet loss]]></category>
		<category><![CDATA[turkey re-identification]]></category>
		<category><![CDATA[turkey re-identification in crowded barns]]></category>
		<category><![CDATA[visual recognition of individual animals]]></category>
		<guid isPermaLink="false">https://scienmag.com/?p=197276</guid>

					<description><![CDATA[Researchers have built a compact, turkey-specific AI embedding that outperforms a much larger generic model at telling individual birds apart in crowded commercial barns.]]></description>
										<content:encoded><![CDATA[<p>In the dim, crowded interior of a commercial turkey barn, one bird looks much like another. Thousands of large, white-feathered animals mill about under fixed overhead cameras, and to the human eye—and, crucially, to most computer vision systems—they are nearly indistinguishable. Yet knowing which turkey is which over time is exactly what modern precision livestock farming needs: sustained drops in a single animal&#8217;s activity can be an early warning of disease, stress, or worse. A new study published in Smart Agricultural Technology by Debayan Sen and Theo Lutz tackles this problem head-on, and its solution is refreshingly counterintuitive: instead of a bigger, more powerful artificial intelligence model, the researchers built a dramatically smaller one that is tailored specifically to turkeys.</p>
<p>The technical heart of the challenge lies in what is called re-identification. Object detection systems can draw boxes around every turkey in a single video frame, but behavior analysis demands something more: the ability to follow the same animal across frames, through occlusions and dense crowding, under a consistent identity. Multi-object tracking algorithms such as DeepSORT accomplish this by combining motion predictions with an appearance embedding—a numerical fingerprint, typically 128 numbers long, that captures what an individual looks like. The trouble is that the appearance model shipped by default with DeepSORT, a network called mars-small128 with roughly 2.8 million parameters, was trained on pedestrians. Humans are easy to tell apart by clothing, texture, and body structure; turkeys in a barn, uniform in color and shape, offer almost none of these cues. The result is that the generic model loses much of its discriminative power the moment it is pointed at poultry.</p>
<p>Sen and Lutz asked whether a compact, domain-specific embedding, trained on actual turkey data, could recover the discrimination that generic models lose while remaining light enough for on-farm deployment. Their answer is a Siamese convolutional neural network of just 714,000 parameters—about a quarter the size of the pedestrian baseline—that maps a cropped image of a turkey to a 128-dimensional vector on the unit hypersphere. The architecture was not designed in one stroke but arrived at through a careful, ablation-driven refinement process, in which each design decision had to justify itself through measurable gains in retrieval accuracy and training stability on held-out, unseen identities.</p>
<p>Three design elements survived that process. First, the network&#8217;s residual blocks use pre-activation ordering, a arrangement in which batch normalization and activation functions precede each convolution, keeping the skip connection free of non-linear transformations and improving gradient flow during training. Second, every residual block is augmented with squeeze-and-excitation channel attention, a small gating module that learns to emphasize the most informative feature channels—in this case, apparently, the subtle plumage coloration and body markings that do distinguish one turkey from another. Third, and most impactful, the channel count of the network&#8217;s deepest stage was doubled from 64 to 128, placing representational capacity where it matters most rather than in the final projection layer. An embedding head built around a batch-normalization neck, a technique borrowed from person re-identification that decouples metric and classification feature spaces, rounds out the design.</p>
<p>Training combined two complementary objectives: a batch-hard triplet loss, which pulls images of the same bird together in embedding space while pushing images of different birds apart by mining the hardest positive and negative pairs within each batch, and an auxiliary identity-classification loss with label smoothing, which regularizes the network on the modest training set of 74 turkey identities. The underlying dataset, extracted from overhead video of working commercial barns, comprised 106 unique turkey identities and 709 image crops, split so that the validation and test animals were never seen during training—a realistic open-set protocol, since any deployed system will inevitably encounter birds it has never learned from.</p>
<p>The results are striking. On an exhaustive pairwise evaluation of unseen test identities, the domain-specific embedding outperformed mars-small128 on every discrimination metric. The area under the receiver operating characteristic curve rose from 0.890 to 0.943, accuracy from 0.849 to 0.911, and recall by more than ten percent. Most telling was the separation between the similarity distributions of same-bird and different-bird pairs: the gap between their means grew by 73.5 percent, and a separability index improved by roughly half. Because false identity associations in tracking stem directly from overlap between these distributions, this cleaner separation is precisely the property that should translate into more stable identities downstream. Bootstrap confidence intervals confirmed that the gains were not an artifact of the small test pool. A t-SNE visualization of the embedding space showed tight, well-separated clusters for most individuals, with residual overlap confined to the genuinely most similar birds—an honest reflection of the problem&#8217;s intrinsic difficulty.</p>
<p>Just as important is what the small model does not cost. With 3.9 times fewer parameters and a footprint of 2.80 MiB versus 10.72 MiB, the custom network runs slightly faster per embedding than the baseline while using comparable GPU memory. Interpretability analyses using Grad-CAM showed that the network concentrates its attention on the bird&#8217;s body—the head–neck junction and upper back in standing birds, the breast and flank in resting ones—rather than on barn litter or background clutter, consistent with the squeeze-and-excitation design steering the model toward plumage and body-structure cues.</p>
<p>When the embedding was plugged into a DeepSORT tracking pipeline and tested on three commercial barn sequences, identity-related metrics improved consistently: mean IDF1, a strict measure of identity preservation, rose from 81.3 to 83.2 percent, and association accuracy improved, while detection accuracy remained unchanged—confirming the gain came from better association, not better detection. A controlled stress test that randomly dropped 10 to 30 percent of detections revealed a subtlety: the proposed embedding prefers a more permissive association threshold than the baseline, and once each model was evaluated at its own optimal setting, the domain-specific model won in five of six tested conditions. The authors are candid that the improvement in these particular sequences is moderate, largely because the footage contains few prolonged occlusions—the very regime where a strong appearance model matters most.</p>
<p>They are equally candid about the study&#8217;s limits. Identity fragmentation remains severe in absolute terms: even the improved tracker used about 90 track identities to cover roughly 57 real animals, meaning a farm relying on raw track counts would still over-count its flock. The authors identify this fragmentation, along with the need for larger-scale validation across more barns, flocks, and lighting conditions, as the primary remaining obstacle to reliable individual-level monitoring. Still, the central message stands and carries well beyond poultry: appearance representations learned for humans do not transfer to animals without loss, and the remedy is not a larger generic backbone but a smaller, domain-adapted one. For precision-livestock applications where compute and power are constrained, better identity discrimination and lower cost, it turns out, need not be in tension.</p>
<p><strong>Subject of Research:</strong> A lightweight domain-specific appearance embedding for individual turkey re-identification in dense commercial barn environments using computer vision and multi-object tracking.</p>
<p><strong>Article Title:</strong> A lightweight domain-specific appearance embedding for Turkey re-identification in dense barn environments</p>
<p><strong>Article References:</strong> Sen, D., &amp; Lutz, T. (2026). A lightweight domain-specific appearance embedding for Turkey re-identification in dense barn environments. <em>Smart Agricultural Technology, 15</em>, Article 102549. <a href="https://doi.org/10.1016/j.atech.2026.102549" rel="noopener noreferrer">https://doi.org/10.1016/j.atech.2026.102549</a></p>
<p><strong>Image Credits:</strong> AI Generated</p>
<p><strong>DOI:</strong> <a href="https://doi.org/10.1016/j.atech.2026.102549" rel="noopener noreferrer">10.1016/j.atech.2026.102549</a></p>
<p><strong>Keywords:</strong> turkey re-identification, precision livestock farming, computer vision, multi-object tracking, DeepSORT, Siamese network, appearance embedding, deep metric learning, triplet loss, squeeze-and-excitation attention, animal welfare monitoring, smart agriculture</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">197276</post-id>	</item>
	</channel>
</rss>
