SEAIDec 8, 2025

An Empirical Framework for Evaluating Semantic Preservation Using Hugging Face

arXiv:2512.07983v1h-index: 11
Originality Synthesis-oriented
AI Analysis

This addresses the challenge of maintaining trustworthy ML systems for developers, though it appears incremental as it builds on existing data and methods.

The paper tackles the problem of ensuring semantic preservation in machine learning systems during refactoring by introducing an empirical framework that mines model evolution data from Hugging Face. The result includes a dataset from 1.7 million entries, a pipeline for evaluating 536 models with 4000+ metrics, and case studies demonstrating semantic drift detection.

As machine learning (ML) becomes an integral part of high-autonomy systems, it is critical to ensure the trustworthiness of learning-enabled software systems (LESS). Yet, the nondeterministic and run-time-defined semantics of ML complicate traditional software refactoring. We define semantic preservation in LESS as the property that optimizations of intelligent components do not alter the system's overall functional behavior. This paper introduces an empirical framework to evaluate semantic preservation in LESS by mining model evolution data from HuggingFace. We extract commit histories, $\textit{Model Cards}$, and performance metrics from a large number of models. To establish baselines, we conducted case studies in three domains, tracing performance changes across versions. Our analysis demonstrates how $\textit{semantic drift}$ can be detected via evaluation metrics across commits and reveals common refactoring patterns based on commit message analysis. Although API constraints limited the possibility of estimating a full-scale threshold, our pipeline offers a foundation for defining community-accepted boundaries for semantic preservation. Our contributions include: (1) a large-scale dataset of ML model evolution, curated from 1.7 million Hugging Face entries via a reproducible pipeline using the native HF hub API, (2) a practical pipeline for the evaluation of semantic preservation for a subset of 536 models and 4000+ metrics and (3) empirical case studies illustrating semantic drift in practice. Together, these contributions advance the foundations for more maintainable and trustworthy ML systems.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes