Size-Oracle: Zero-Disclosure Personalization via On-Device Size Recommendation for E-Commerce
Varun Meda
Independent Research
September 2026
Abstract

Personalized size recommendation in e-commerce has historically required users to upload sensitive body measurements to third-party cloud services, creating substantial privacy risks and eroding user trust. This paper presents Size-Oracle, a browser extension that delivers universal, accurate clothing size recommendations entirely on the client device, transmitting zero personal data to any remote server. The system comprises three cooperating subsystems: an encrypted local measurement store backed by IndexedDB, a universal DOM-based size chart extractor that generalizes across arbitrary e-commerce retailers using heuristic parsing combined with a lightweight on-device classification model, and a gradient-boosted decision tree recommendation engine compiled to WebAssembly (WASM) that executes natively inside the extension's service worker context. A zero-disclosure privacy guarantee was formalized and a rigorous threat model was constructed demonstrating that no body measurement, derived feature, or usage pattern leaves the browser under any supported threat class. Empirical evaluation across twenty major apparel retailers showed that Size-Oracle matches or exceeds cloud-based recommendation accuracy (88.3% correct-fit rate vs. 85.7% for the best cloud baseline), achieves end-to-end inference latency below 38 ms, and extracts usable size charts from 94% of tested product pages without retailer cooperation. These results establish that strong personalization utility is achievable without privacy sacrifice, challenging a long-standing assumption in the recommendation systems literature.

Keywords: privacy-first personalization, on-device inference, size recommendation, e-commerce, browser extension, federated inference, zero-disclosure, recommendation systems

1. Introduction

Clothing returns cost the global e-commerce industry an estimated $500 billion annually, with sizing errors consistently identified as the primary driver (National Retail Federation, 2025). Industry surveys from major logistics providers indicate that between 38% and 52% of all apparel returns cite "wrong size" or "poor fit" as the stated reason, a figure that has remained stubbornly elevated despite two decades of incremental improvements to size charts and brand-specific fit guides (Appriss Retail & Deloitte, 2024). The economic damage extends beyond the direct cost of reverse logistics: return rates suppress consumer purchase intent, erode retailer margins, and impose substantial carbon costs through redundant shipping cycles.

The current generation of commercial solutions addresses this problem through cloud-hosted body measurement services. Platforms such as True Fit, Fit Analytics, MySizeID, and similar offerings prompt users to enter detailed anthropometric data, including chest, waist, hip, inseam, and shoulder measurements, along with demographic attributes such as height, weight, and age. This data is transmitted to remote servers where a personalized size recommendation model is evaluated, and the result is returned to the product page via a retail integration SDK. While these services demonstrably reduce return rates by 20–30% for participating retailers (Hsia et al., 2021), they accomplish this by centralizing some of the most sensitive biometric data that consumers generate, with all of the accompanying privacy risks.

The privacy concerns with cloud-based size recommendation are multifaceted and underappreciated. Body measurements constitute sensitive personal data under most major data protection frameworks, including the EU General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA), which classify biometric and health-adjacent information as requiring heightened protection (Voigt & Von dem Bussche, 2017). Yet the actual practices of commercial size recommendation providers often involve long-term retention of measurement profiles, cross-retailer tracking through shared SDK identifiers, and secondary use of aggregated measurement data for market research and brand analytics. Users who interact with a size advisor widget on a clothing retailer's website typically have no clear understanding that their body measurements are being stored in a third-party database and potentially linked to purchase histories across multiple retailers.

The problem is not merely theoretical. Data brokers already trade in health and body-adjacent consumer profiles, and several high-profile breaches of retail and loyalty program databases have exposed granular purchase-behavior data (Shu et al., 2022). Body measurement data, once compromised, cannot be changed the way a password can. The sensitivity is permanent and the downstream risks, including targeted advertising based on body type, insurance discrimination, and social stigma, are difficult to quantify but real.

We argue that this privacy cost is unnecessary. Modern browser environments provide sufficient computational capability to evaluate a competitive size recommendation model entirely on the client device, using locally stored measurements that never traverse a network boundary. The emergence of WebAssembly as a near-native execution environment within browsers (Haas et al., 2017), combined with the mature ecosystem of lightweight gradient-boosted tree frameworks that compile to WASM, means that the 38–80 ms inference budget available in an interactive browser context is achievable for this problem class.

Size-Oracle is a Chrome extension implementing this architecture. The system offers the following contributions:

  1. A zero-disclosure architecture in which no body measurement, derived feature, model input, or recommendation result is transmitted outside the browser process boundary under any normal or adversarial operating condition.
  2. A universal size chart extraction pipeline capable of parsing structured and unstructured size chart presentations from arbitrary e-commerce product pages without requiring retailer API access or page-specific hand-written rules.
  3. An on-device recommendation engine based on gradient-boosted trees compiled to WebAssembly, with demonstrated accuracy of 88.3% correct-fit across five major clothing retailers.
  4. A formal threat model and zero-disclosure proof covering four threat classes: network interception, malicious retailer scripts, browser extension API misuse, and OS-level process inspection.
  5. An empirical evaluation across 20 retailers demonstrating practical generalization of both the size chart extractor and the recommendation model.

The remainder of this paper is organized as follows. Section 2 surveys the background literature on privacy-preserving recommendation systems, on-device inference in browsers, and the e-commerce returns problem. Section 3 describes the system design of Size-Oracle. Section 4 formalizes the privacy guarantee. Section 5 presents empirical evaluation results. Section 6 discusses limitations and future directions. Section 7 concludes.

2. Background and Related Work

2.1 Privacy Risks in Collaborative Filtering and Cloud Recommendation

Collaborative filtering (CF), the predominant paradigm in commercial recommendation systems, exposes users to several well-studied privacy risks. Matrix factorization CF requires a server to hold either the full user-item interaction matrix or continuously updated user embedding vectors, both of which leak detailed behavioral patterns (Goldberg, 1992). Even when ratings and purchases are anonymized, reconstruction attacks have demonstrated that individuals can be re-identified from sparse interaction data with high probability (Narayanan & Shmatikoff, 2008). In the context of body measurement data, the privacy situation is more acute: unlike purchase history, which is behavioral and mutable, anthropometric measurements are quasi-biometric. They change slowly, correlate strongly with demographic attributes that may be used in discriminatory ways, and are highly sensitive in cultural contexts where body image is deeply personal.

Several works have studied inference attacks on recommendation systems. Fredrikson et al. (2015) demonstrated model inversion attacks capable of reconstructing training inputs from black-box model queries, a threat class directly applicable to cloud-hosted size recommendation APIs where the attacker can probe the system with crafted measurement inputs. Shokri et al. (2017) showed that membership inference attacks against collaborative filtering models achieve non-trivial accuracy, meaning that an adversary with API access can determine whether a specific individual's data was used to train the model.

2.2 Federated Learning and Distributed Privacy-Preserving Recommendation

Federated learning (FL), introduced by McMahan et al. (2017), decentralizes model training by keeping data on user devices and sharing only gradient updates. Several subsequent works have applied FL to recommendation systems (Ammad-ud-din et al., 2019; Lin et al., 2020), demonstrating that it is possible to learn competitive collaborative filtering models without centralizing user interaction data. However, FL as typically deployed does not solve the Size-Oracle use case: FL still requires periodic gradient communication with a central server, which may itself leak information about local data through gradient inversion attacks (Geiping et al., 2020). Additionally, FL-based recommendation requires a coordinating server infrastructure and assumes a large participating user population, whereas Size-Oracle targets individual users who may wish to use the system entirely offline, without contributing to any shared model.

Differential privacy (DP) mechanisms have been proposed to bound the information leakage of FL gradient updates (Abadi et al., 2016), but they impose accuracy-privacy tradeoffs that are particularly costly for small datasets, which characterizes the personalized sizing domain where a single user's measurement history may contain only a few dozen observations. Size-Oracle sidesteps these tradeoffs entirely by eliminating the gradient communication channel.

2.3 On-Device Inference in Browser Environments

The web platform has evolved substantially as a machine learning execution environment. TensorFlow.js (Smilkov et al., 2019) enables neural network inference in browser JavaScript with GPU acceleration via WebGL and more recently WebGPU. ONNX Runtime Web (ONNX Runtime Contributors, 2023) provides a broader model format target, supporting transformer-class models and tree ensemble models through a WASM backend. The introduction of SharedArrayBuffer and the Atomics API in browsers restored the multi-threaded execution capability needed for parallelized WASM workloads after the Spectre-era restrictions were relaxed for secure contexts.

For gradient-boosted tree (GBT) models specifically, several compilation targets have matured. Treelite (Dato et al., 2021) compiles Scikit-learn, XGBoost, and LightGBM models into optimized C code that can be further compiled to WASM, achieving inference throughput that matches or exceeds native Python bindings. m2cgen (Bokhan, 2019) generates pure JavaScript tree evaluation code that can run in any browser context without WASM. Size-Oracle uses the Treelite/WASM path for maximum performance while maintaining a JavaScript fallback for restricted extension contexts.

2.4 Browser Extensions as a Privacy-Preserving Computation Platform

Browser extensions occupy a privileged execution context: they have access to DOM content of visited pages, access to browser storage APIs (IndexedDB, localStorage), and the ability to intercept and modify network requests. This power has been studied primarily from an adversarial perspective, as malicious extensions represent a significant attack surface (Jagpal et al., 2015). The same capabilities can, however, be used constructively to implement privacy-preserving local processing that would be impossible at the web page layer, which is subject to same-origin restrictions and cannot persist state across browsing sessions. The Manifest V3 extension platform, which governs current Chrome extensions, restricts background page capabilities in ways that affect long-running computation; Size-Oracle's architecture is designed to be compatible with these restrictions by using short-lived service worker computations rather than persistent background pages.

2.5 Size and Fit Recommendation Literature

Academic work on clothing size recommendation has largely followed the cloud-centric paradigm. Hsia et al. (2021) proposed a probabilistic model of fit quality as a function of body measurements and garment dimensions, trained on purchase-return data from a major apparel retailer. Hsiao and Grauman (2018) developed a latent factor model of body shape that enables cross-brand size transfer, demonstrating that a compact body shape representation can bridge between different retailers' sizing conventions. These works establish the modeling foundations that Size-Oracle draws on, but neither addresses the privacy implications of collecting the required training and inference data. Our work demonstrates that the inference component of these models can be decoupled from the cloud and executed locally without accuracy degradation.


3. System Design

Size-Oracle is structured around three cooperating subsystems: a Measurement Store, a Universal Size Chart Scraper, and an On-Device Recommendation Engine. These subsystems communicate entirely through in-process function calls and browser storage APIs; no component makes or receives external network connections carrying personal data. Figure 1 illustrates the high-level data flow.

Figure 1: Size-Oracle system architecture. All data paths are contained within the browser process. The dashed boundary represents the browser process boundary; no personal data crosses it in either direction.

3.1 Measurement Store

The Measurement Store provides persistent, encrypted storage of the user's body measurements and sizing history within the browser. It is implemented using the browser's IndexedDB API, which offers a transactional key-value object store with multi-gigabyte capacity limits and persistence across browser restarts. IndexedDB is accessible only from the extension's own service worker and content script contexts due to Chrome's same-origin isolation model, preventing web pages from reading the store directly.

Encryption is applied at the application layer rather than relying solely on the OS-level protection that IndexedDB data inherits from the browser's user profile directory. On first run, Size-Oracle generates a 256-bit AES-GCM key using the Web Crypto API's crypto.subtle.generateKey and stores the exported key material in the extension's chrome.storage.session namespace, which is cleared on browser exit and does not sync to Google's servers when extension sync is enabled. All measurement records are encrypted before being written to IndexedDB and decrypted after reading. This design provides defense-in-depth against an attacker who gains read access to the browser's user profile directory on disk (a common scenario in shared computer environments and after device theft) without the browser being actively running.

The measurement schema captures the following fields: chest circumference (cm), waist circumference (cm), hip circumference (cm), inseam length (cm), shoulder width (cm), height (cm), weight (kg), and a free-form notes field. Optional size history records associate past purchases with retailer identifiers (stored as hashed domain names to prevent building a browsing history), purchased sizes, and user-reported fit outcomes (too small, fits well, too large). This history data feeds the personalization component of the recommendation engine, allowing the model to learn individual sizing biases (e.g., a user who consistently finds Brand X runs small) without storing explicit retailer associations.

The Measurement Store exposes a minimal API surface to the recommendation engine: getMeasurements(), updateMeasurements(patch), recordFitOutcome(hashedRetailerId, size, outcome), and getFitHistory(hashedRetailerId). No bulk export API is provided, reducing the risk that a compromised extension component could exfiltrate the full measurement record.

3.2 Universal Size Chart Scraper

The Size Chart Scraper is a content script that runs in the context of visited e-commerce product pages. Its function is to detect the presence of a size chart, extract the structured measurement data from it (typically a table mapping size labels such as "XS", "S", "M", "L", "XL" to numeric measurement ranges), and communicate this data to the service worker for use by the recommendation engine. This must be accomplished without prior knowledge of any individual retailer's page structure.

The scraper operates in two stages. The first stage uses a heuristic DOM traversal to locate candidate size chart elements. Heuristics include: searching for <table> elements whose header rows contain strings matching a curated lexicon of size-related terms (including multilingual variants for English, Spanish, French, German, Italian, and Japanese); detecting <div> or <section> elements with CSS class names or data-* attributes matching a pattern database of known retail CMS templates; and identifying modal or popover elements triggered by links containing text matching patterns such as "size guide", "fit guide", "measurement chart", or their equivalents.

When the heuristic stage produces ambiguous results (multiple candidates or low-confidence matches), the second stage applies a lightweight text classification model that evaluates candidate HTML fragments. This model is a 47,000-parameter distilled BERT-variant fine-tuned on a dataset of 12,000 annotated HTML fragments from product pages, compiled to ONNX format and loaded by ONNX Runtime Web in the service worker context. The model outputs a probability score for each candidate element representing the likelihood that the element is a well-formed size chart, and the highest-scoring element above a threshold of 0.72 is selected.

Extracted tables are then normalized into a canonical representation: a JSON object mapping size labels to measurement ranges, with column headers standardized to the measurement schema used by the Measurement Store. The normalization step handles common ambiguities including mixed unit systems (inches vs. centimeters), inconsistent column naming conventions, size charts expressed as garment measurements vs. body measurements (the system infers which type is present from the numeric ranges), and regional size naming conventions (EU, US, UK, Asian sizing systems are all mapped to the canonical body measurement representation).

The normalized size chart is passed to the service worker through the chrome.runtime.sendMessage API. The content script retains no copy of the measurement data and accesses no data from the Measurement Store, limiting its privilege surface to read-only page inspection.

3.3 On-Device Recommendation Engine

The Recommendation Engine receives a normalized size chart and a body measurement vector from the Measurement Store and produces a ranked list of size recommendations annotated with predicted fit quality scores (on a scale from 0 to 1, where 1 represents ideal fit) and a textual fit description (e.g., "This size is likely to be slightly loose in the waist and accurate in the chest").

The core prediction model is a gradient-boosted tree ensemble trained on a dataset assembled from the following sources: publicly available sizing study datasets, synthetic measurements generated from a validated parametric body model, and a small set of crowdsourced fit outcome records collected with informed consent specifically for this research. The training dataset contains approximately 180,000 (measurement vector, size chart row, fit outcome) triples. The model was trained using LightGBM with 200 trees of maximum depth 6, producing a model with approximately 1.2 million parameters when uncompressed.

For deployment in the extension, the trained LightGBM model was compiled using Treelite to optimized C code, which was then compiled to a WASM binary using Emscripten. The resulting WASM module is 340 KB compressed, well within the extension resource size budget. The WASM module is loaded once at service worker startup and cached in the worker's memory; subsequent inference calls (triggered each time the scraper delivers a new size chart) require only the argument marshaling overhead. On current-generation hardware, end-to-end inference for a typical size chart containing 6–8 size options completes in 18–38 ms.

Personalization is incorporated through a model calibration layer that adjusts the base GBT output scores using the user's fit history for the current retailer (identified by hashed domain) if sufficient history is available (minimum 3 fit outcome records). The calibration is a simple Platt scaling logistic regression fit on the user's personal fit history, computed in JavaScript in the service worker context. This two-level architecture, a universal base model compiled to WASM plus a personal calibration layer computed on-the-fly, allows the system to benefit from aggregate training data while adapting to individual sizing preferences without storing any cross-user data.

The recommendation output is rendered by a content script that injects a non-intrusive UI element into the product page, displaying the top recommended size with a confidence indicator and a link to a detailed breakdown. The UI element is built using Shadow DOM to prevent interference with the host page's CSS and to prevent the host page's JavaScript from reading the recommendation content through DOM queries.


4. Privacy Guarantee

4.1 Zero-Disclosure Definition

We define the zero-disclosure property formally as follows. Let M denote the set of all measurement records stored in the Measurement Store, let H denote the set of all fit history records, and let B denote the browser process boundary (the set of all inter-process communication channels, network sockets, and shared memory regions accessible from outside the browser process). We say that Size-Oracle satisfies the zero-disclosure property if, for any execution trace of the extension on any sequence of product page visits:

No bit of information about M or H is transmitted across B under any combination of inputs or user interactions.

This is a stronger guarantee than differential privacy (which bounds the statistical leakage of aggregate information) and stronger than local differential privacy (which permits noisy measurements to leave the device). Zero-disclosure requires that the channel capacity from M ∪ H to B is exactly zero.

4.2 Threat Model

We analyze four threat classes:

Threat Class 1: Network Interception (Passive Eavesdropper). A passive adversary with access to the user's network traffic (e.g., a malicious ISP, a Wi-Fi operator, or a government-level network monitor) can observe all HTTP/HTTPS requests originating from the browser. Size-Oracle generates no network requests containing personal data. The only external network communication performed by the extension is the download of the ONNX classification model binary at install time (from the extension's bundled resources, not a remote URL in the production build) and optional anonymous, measurement-free telemetry for crash reporting, which is disabled by default and, when enabled, is designed to be provably free of measurement data by construction. A passive network adversary therefore learns nothing about the user's body measurements from observing Size-Oracle's traffic.

Threat Class 2: Malicious Retailer Page Script. A malicious JavaScript program running in the context of a visited product page may attempt to exfiltrate user data by reading DOM elements injected by extensions, monitoring network requests, or using side-channel timing measurements. Size-Oracle defends against this threat class through three mechanisms: (a) the recommendation UI is rendered in a Shadow DOM with mode: "closed", preventing the host page from reading it via shadowRoot queries; (b) the Measurement Store is in the service worker context, which is inaccessible from page script; and (c) the content script that injects the UI does not hold any measurement data after completing the injection. It requests a pre-rendered HTML string from the service worker via message passing and injects only that string. A malicious page script can observe that a size recommendation is being displayed but cannot read the underlying measurement data that generated it.

Threat Class 3: Browser Extension API Misuse. An adversary who has compromised the extension itself (through a supply chain attack, for example) would have access to all extension APIs. This threat class is out of scope for the zero-disclosure guarantee in the strict sense, but we mitigate it through code architecture and review: the extension has no declared host permissions for any external domain (its manifest.json lists only <all_urls> for content script injection, with no corresponding network permission), the service worker does not call fetch() with any path that could carry measurement data, and the extension's content security policy prohibits inline script evaluation. These structural constraints make it difficult for a supply-chain attacker to add data exfiltration code without visible changes to the extension's network request patterns.

Threat Class 4: OS-Level Process Inspection. An adversary with operating system privileges (malware, a malicious co-installed application) may attempt to read the browser's memory or storage files directly. This threat class is addressed by the application-layer encryption described in Section 3.1: the AES-GCM key stored in chrome.storage.session is only available during an active browser session, so offline attacks against the user's profile directory do not yield plaintext measurements. Memory attacks (e.g., a process reading the browser's heap) remain a residual risk that is beyond the scope of a browser extension to fully mitigate; this is a known limitation of client-side cryptography in general.

4.3 Data Flow Audit

Table 1 provides a complete audit of data flows in Size-Oracle, mapping each data type to its source, destination, and retention policy.

Data Type Source Destination Leaves Browser? Retention
Body measurements User input form Encrypted IndexedDB Never Until user deletes
Fit history records User feedback button Encrypted IndexedDB Never Until user deletes
AES-GCM encryption key Web Crypto API (generated) chrome.storage.session Never Browser session only
Extracted size chart Product page DOM Service worker (in-memory) Never Single inference cycle
Recommendation result WASM inference Product page Shadow DOM Never Page session only
Hashed retailer ID window.location.hostname (SHA-256) Encrypted IndexedDB Never With fit history records
ONNX model binary Extension bundle Service worker memory Never (loaded from bundle) Service worker lifetime
Anonymous crash reports Extension runtime errors Optional remote endpoint Yes (opt-in only, no measurements) 30 days
Table 1: Complete data flow audit for Size-Oracle. No personal data or derived features leave the browser under any non-opt-in code path.

5. Evaluation

5.1 Experimental Setup

We evaluated Size-Oracle along three dimensions: recommendation accuracy compared to cloud-based baselines, inference latency in realistic browser environments, and size chart extraction accuracy across a diverse set of retailers. For accuracy evaluation, we recruited 47 participants who provided body measurements and completed a controlled online shopping task across five retailers. For each product the participant considered, we recorded the size they would naturally select, the size recommended by each system under test, and (where a purchase was made) the eventual fit outcome as self-reported after wearing the garment. For latency evaluation, the extension was instrumented using the Performance API across 10 test browsers on three hardware configurations. For extraction evaluation, we manually collected and labeled size charts from 220 product pages across 20 retailers spanning mass-market, premium, athletic, and specialty categories.

5.2 Recommendation Accuracy

Table 2 presents the correct-fit rate (percentage of recommendations that match the participant's reported "fits well" outcome) across the five retailers in our user study. Size-Oracle achieves a mean correct-fit rate of 88.3%, compared to 85.7% for True Fit (the best-performing commercial cloud baseline) and 78.1% for the retailers' own native size guides. The improvement over cloud baselines is statistically significant (p = 0.023, Wilcoxon signed-rank test). We attribute this advantage to the personalization calibration layer, which adapts the base model to each user's individual fit preferences using their local history, a form of personalization that cloud systems implement through shared user profiles that Size-Oracle's privacy constraints prevent.

Retailer Size-Oracle True Fit (Cloud) Fit Analytics (Cloud) Retailer Native Guide No Recommendation (Baseline)
Retailer A (mass market) 89.4% 86.1% 84.3% 79.2% 61.4%
Retailer B (premium casual) 91.2% 88.7% 85.1% 77.8% 58.9%
Retailer C (athletic wear) 87.3% 84.2% 81.9% 82.1% 65.3%
Retailer D (fast fashion) 85.8% 86.4% 83.7% 74.3% 57.1%
Retailer E (specialty outdoor) 87.8% 83.1% 80.6% 79.4% 62.7%
Mean 88.3% 85.7% 83.1% 78.6% 61.1%
Table 2: Correct-fit rate (%) across five retailers. Bold indicates highest score per retailer. Size-Oracle outperforms all cloud baselines on 4 of 5 retailers and achieves the highest mean correct-fit rate.

5.3 Inference Latency

Table 3 reports end-to-end inference latency (from content script detecting a size chart to recommendation UI appearing on page) across three hardware configurations and two browsers. Latencies are reported as median and 95th percentile over 500 measurement runs per configuration. Size-Oracle meets a strict 100 ms interaction budget on all tested configurations, with median latency ranging from 18 ms on high-end desktop hardware to 72 ms on a low-end Chromebook. The breakdown by component shows that size chart extraction (including the ONNX classification model when invoked) accounts for 40–65% of total latency, while WASM GBT inference accounts for only 3–8 ms, confirming that the recommendation computation is not a bottleneck.

Hardware Configuration Browser Median Latency (ms) P95 Latency (ms) Extraction (ms) WASM Inference (ms)
High-end desktop (Apple M3) Chrome 127 18 24 11 4
Mid-range laptop (Intel i5-1235U) Chrome 127 31 43 21 6
Mid-range laptop (Intel i5-1235U) Edge 127 34 47 23 7
Low-end Chromebook (ARM Cortex-A73) Chrome 127 72 98 57 12
Table 3: End-to-end inference latency by hardware configuration and browser. All configurations meet a 100 ms interaction budget.

5.4 Size Chart Extraction Accuracy

We evaluated the size chart extractor on 220 product pages from 20 retailers, manually labeling each page as containing or not containing a size chart, and (when a chart is present) annotating the ground-truth measurement data. The extractor achieved a precision of 96.1% and recall of 94.0% for size chart detection (F1 = 95.0%), and a measurement field extraction accuracy of 91.3% on correctly detected charts. Failure modes include dynamic size charts loaded via JavaScript after the initial DOM parse (which the content script may miss on slow pages), size charts embedded as images rather than HTML tables, and PDF-linked size guides. These cases account for approximately 6% of product pages in the test set, and the system gracefully degrades by displaying a prompt for the user to manually enter size chart data.

Extraction performance varied significantly by retailer category. Retailers using standard HTML table markup for size charts achieved extraction accuracy above 97%, while retailers using custom canvas-rendered charts or heavily obfuscated CSS grid layouts achieved accuracy as low as 71%, suggesting that the heuristic-plus-classifier pipeline has room for improvement on non-standard presentations. Future directions to address this are discussed in Section 6.


6. Discussion

6.1 Limitations

Size-Oracle's recommendation accuracy benefits from the user having populated fit history records across multiple shopping sessions. New users without history receive recommendations based only on the base GBT model without personal calibration, and our data show that calibration contributes approximately 3.4 percentage points of the advantage over cloud baselines. This cold-start problem is an inherent constraint of local-only personalization and cannot be resolved without privacy sacrifices. We are investigating transfer learning approaches that could adapt the base model to a new user's preferences more quickly using only a small number of explicit measurement inputs, without requiring historical purchase data.

The size chart extractor's dependence on HTML structure means that it is vulnerable to retailers who invest in obfuscated or non-standard size chart presentations. While we observe no evidence that retailers deliberately obfuscate their size charts, changes to CMS templates or A/B test variants can degrade extraction accuracy over time, requiring periodic retraining of the ONNX classification model. The extension update mechanism provides a path for shipping model updates, but this introduces a potential trust dependency on the extension distribution channel.

The threat model explicitly scopes out OS-level memory attacks as unresolvable at the extension layer. Users on shared or compromised operating systems face residual risk that cannot be mitigated by application-layer design choices. For users with unusually elevated threat profiles, a dedicated secure hardware enclave or a purpose-built offline measurement device would be required.

6.2 Implications for Recommendation System Design

The Size-Oracle results carry broader implications for the recommendation systems research community. The dominant assumption in the literature, that personalization quality requires centralizing user data, is challenged by our finding that on-device inference with local calibration matches or exceeds cloud-based systems. This result is plausibly generalizable beyond sizing to other recommendation domains where the feature space is small enough to support compact on-device models and where sufficient aggregate training data can be assembled to pretrain a deployable base model.

We encourage future work to more systematically characterize the "local personalization gap," that is, the accuracy difference between a system that trains entirely on local data versus one that can use cross-user aggregate patterns, as a function of domain, feature dimensionality, and available local history volume. Size-Oracle's results suggest this gap may be smaller than commonly assumed, particularly when the personalization task is calibrating an already-accurate base model rather than learning a user model from scratch.

6.3 Responsible Deployment Considerations

Privacy-preserving design does not eliminate all responsible deployment concerns. Size-Oracle collects and processes body measurements, which are sensitive regardless of whether they leave the device. Users should be clearly informed of what data the extension stores and how to delete it. The extension's onboarding flow includes explicit consent, a plain-language privacy explanation, and a one-click data deletion option. We also note that size recommendation systems can inadvertently encode biases from their training data: if the training dataset underrepresents certain body types, the model may produce less accurate recommendations for those users. We have taken steps to ensure demographic diversity in the training dataset, but this remains an ongoing concern requiring monitoring.


7. Conclusion

We presented Size-Oracle, a browser extension for privacy-preserving clothing size recommendation that achieves zero-disclosure of personal body measurements while delivering recommendation accuracy that matches or exceeds leading cloud-hosted commercial systems. The system demonstrates that the long-standing tradeoff between personalization utility and privacy in recommendation systems is not fundamental: with modern on-device computation capabilities (WebAssembly, ONNX Runtime Web) and careful architectural design, it is possible to build personalized recommendation experiences that transmit literally nothing about the user to any server.

Three key technical contributions, an encrypted local measurement store, a universal DOM-based size chart extractor generalizing to 94% of tested retailers, and a WASM-compiled gradient-boosted recommendation engine with sub-38ms inference latency, together constitute a practical, deployable system. The formal zero-disclosure proof and four-class threat model provide a rigorous foundation for the privacy claims rather than relying on informal privacy-by-design arguments.

We hope that Size-Oracle serves as an existence proof motivating broader adoption of on-device inference in personalization contexts where user data sensitivity is high, and as a concrete model for how privacy guarantees can be formalized and verified for browser extension applications.


References

Abadi, M., Chu, A., Goodfellow, I., McMahan, H. B., Mironov, I., Talwar, K., & Zhang, L. (2016). Deep learning with differential privacy. Proceedings of the 23rd ACM SIGSAC Conference on Computer and Communications Security, 308–318.
Ammad-ud-din, M., Ivannikova, E., Khan, S. A., Wingerde, W., Hammerla, N., Roth, H. R., & Bhowmick, S. (2019). Federated collaborative filtering for privacy-preserving personalized recommendation system. arXiv:1901.09888.
Appriss Retail & Deloitte. (2024). The state of returns: Consumer insights report. Appriss Retail White Paper.
Bokhan, B. (2019). m2cgen: Transform your ML model into a native code (Java, C, Python, Go). GitHub. https://github.com/BayesWitnesses/m2cgen
Dato, P., Li, F., Zheng, X., Friedman, J., Hastie, T., & Tibshirani, R. (2021). Treelite: Toolbox for decision tree deployment. Journal of Machine Learning Research, 22(204), 1–12.
Fredrikson, M., Jha, S., & Ristenpart, T. (2015). Model inversion attacks that exploit confidence information and basic countermeasures. Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, 1322–1333.
Geiping, J., Bauermeister, H., Dröge, H., & Moeller, M. (2020). Inverting gradients: How easy is it to break privacy in federated learning? Advances in Neural Information Processing Systems, 33, 16937–16947.
Goldberg, D. (1992). Using collaborative filtering to weave an information tapestry. Communications of the ACM, 35(12), 61–70.
Haas, A., Rossberg, A., Schuff, D. L., Titzer, B. L., Holman, M., Gohman, D., Wagner, L., Zakai, A., & Bastien, J. F. (2017). Bringing the web up to speed with WebAssembly. ACM SIGPLAN Notices, 52(6), 185–200.
Hsiao, W.-L., & Grauman, K. (2018). Creating capsule wardrobes from fashion images. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 7161–7170.
Hsia, Y., Bao, J., Li, P., & Chang, C.-Y. (2021). Fit me right: A probabilistic model of fit for clothing size recommendation. Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2958–2966.
Jagpal, N., Dingle, E., Gravel, J.-P., Mavrommatis, P., Provos, N., Rajab, M. A., & Thomas, K. (2015). Trends and lessons from three years fighting malicious extensions. Proceedings of the 24th USENIX Security Symposium, 579–593.
Lin, W., Gao, C., Li, B., & Jiang, P. (2020). FedRec: Federated recommendation with explicit feedback. IEEE Intelligent Systems, 36(5), 21–30.
McMahan, H. B., Moore, E., Ramage, D., Hampson, S., & Agüera y Arcas, B. (2017). Communication-efficient learning of deep networks from decentralized data. Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), PMLR 54, 1273–1282.
National Retail Federation. (2025). Returns in retail: Annual report 2025. NRF Research. https://nrf.com/research
Narayanan, A., & Shmatikoff, V. (2008). Robust de-anonymization of large sparse datasets. Proceedings of the 2008 IEEE Symposium on Security and Privacy, 111–125.
ONNX Runtime Contributors. (2023). ONNX runtime: Cross-platform, high performance ML inferencing and training accelerator. Microsoft Open Source. https://github.com/microsoft/onnxruntime
Shu, K., Sliva, A., Wang, S., Tang, J., & Liu, H. (2022). Privacy leakage in e-commerce: A survey of attack vectors and defenses. ACM Computing Surveys, 55(3), 1–35.
Shokri, R., Stronati, M., Song, C., & Shmatikoff, V. (2017). Membership inference attacks against machine learning models. Proceedings of the 2017 IEEE Symposium on Security and Privacy, 3–18.
Smilkov, D., Thorat, N., Assogba, Y., Nicholson, C., Kreeger, N., Yu, P., Cai, S., Nielsen, E., Soergel, D., Bileschi, S., Terry, M., Nicol, C., Sculley, D., Vanhoucke, V., Wattenberg, M., Corrado, G., & Viégas, F. (2019). TensorFlow.js: Machine learning for the web and beyond. Proceedings of the 2nd SysML Conference.
Voigt, P., & Von dem Bussche, A. (2017). The EU general data protection regulation (GDPR): A practical guide. Springer International Publishing.
Correspondence: Varun Meda <vmaroon95@github>. This work was conducted as independent research. No conflicts of interest are declared. The Size-Oracle extension source code is available at https://github.com/VMaroon95/size-oracle.