betaFeedback

WorksComputer Science

GrayShield: Bit-Level Sanitization for Transformer Model Supply-Chain Security

Abstract

Transformer models such as BERT and Vision Transformer~(ViT) achieve strong performance via densely parameterized attention backbones. However, the least significant bits~(LSBs) of their 32-bit floating-point weights can be abused as covert channels to conceal malicious payloads, posing a serious threat to the AI model supply chain. We propose \GS (\GSabbr), a lightweight, post-training, zero-data sanitization method that completely replaces the declared mantissa-LSB channel with a Gray-code-guided low-transition sequence. Complete payload-independent overwrite, whether keyed or public, makes the sanitized target bits independent of the embedded payload and gives that declared channel zero capacity. Gray coding supplies overwrite structure, while a keyed per-tensor phase supplies pattern diversity. Benchmarked against seven post-training defenses on four Transformer model presets and two real-world malware payloads, \GSabbr maintains sub-1%1\% accuracy impact and achieves 49.96±0.6649.96\pm0.66 percentage-point Recovery Reduction (RR) under five implemented attacker variants. Because pre-defense recovery is effectively 100%100\%, RR near 50 percentage points corresponds to post-sanitization bit accuracy at binary chance. Its main empirical advantage is stable near-chance sanitization with substantially smaller weight-distribution shift than the evaluated near-chance baselines PatternMask (PM) and Post-Training Quantization (PTQ).

Introduction

The rapid adoption of pretrained deep learning models has transformed computer vision, natural language processing, and cybersecurity [31, 7, 8]. Repositories such as Hugging Face Model Hub now host hundreds of thousands of model checkpoints [18], enabling practitioners to deploy state-of-the-art Transformer architectures without retraining. However, this convenience introduces a new and underappreciated attack surface: the potential for model weights to act as covert carriers for malicious content [33, 22, 17]. Unlike traditional malware distribution, large-scale model files contain millions of 32-bit floating-point parameters, providing vast capacity for hiding malicious code with negligible impact on downstream accuracy. EvilModel [33] embeds up to 36.9 MB of malware in AlexNet through parameter substitution with minimal accuracy degradation. StegoNet uses neural-network parameters, including LSB substitution, as payload channels, whereas MaleficNet combines spread-spectrum embedding with LDPC error correction [22, 17]. Model X-Ray [13] introduced detection frameworks using few-shot learning to identify payloads hidden through LSB substitution. Casey et al. Casey, Santos, and Mirakhorli [5] report widespread unsafe serialization and manually confirm 14 malicious Hugging Face files; a large-scale model-hub study likewise treats model distribution as a software supply-chain boundary [35]. We refer to these threats as maleficent neural networks: models that are active carriers of malware, not merely targets of adversarial attacks. Real-world incidents confirm the urgency. In 2022, a trojanized PyTorch dependency (torchtriton) was distributed via PyPI, a supply-chain vector structurally analogous to malicious model checkpoints [26].

Despite growing recognition, existing defenses face fundamental limitations. Detection-oriented approaches identify suspicious checkpoints but do not remove the payload [13]. Post-training quantization reduces numerical precision and can overwrite low-order information as a side effect [20, 25]. Fine-tuning is effective but expensive and requires trusted data. Prior malware-in-weights work already includes error-correcting codes [17]; the remaining gap is an explicit, scoped channel-erasure argument for complete replacement of a declared payload-bearing bit set. To address this gap, we propose GrayShield, a Gray-code-guided bit-level sanitizer that completely overwrites the target mantissa LSBs and uses a keyed tensor-specific phase for pattern diversity. We pose four research questions (RQs):

RQ1 (Threat Surface): At what LSB overwrite depth does mantissa-bit payload injection remain stealthy, lossless, and undetectable across diverse Transformer families?

RQ2 (Defense Effectiveness): Which post-training sanitiza1

Copyright © 2027, Association for the Advancement of Artificial Intelligence (www.aaai.org). All rights reserved. tion strategies disrupt payload recovery to chance level while preserving downstream utility, under a Tier-1 naive attacker?

RQ3 (Adaptive Robustness): Does GrayShield maintain chance-level payload disruption when attackers strengthen their encoding strategy with redundancy coding and burst-resilient interleaving?

RQ4 (Deployment Trade-Off): Is GrayShield Pareto-optimal in the joint (Recovery Reduction, accuracy drop, variance, runtime) space, and what is the recommended deployment operating point?

Contributions. Our contributions are threefold: (i) we formalize a declared weight-LSB covert channel and show that complete payload-independent overwrite erases that target channel; (ii) we introduce a Gray-code overwrite structure with a keyed per-tensor phase for low-transition patterns and pattern diversity; and (iii) we evaluate security, utility, stability, fidelity, and runtime across four Transformer presets, two payloads, seven defenses, and five attacker variants, finding the smallest W1W_1 shift among the evaluated near-chance defenses.

Floating-point representation and LSB steganography

Deep learning frameworks store model parameters as IEEE-754 binary32 (FP32) values (Institute of Electrical and Electronics Engineers [19]). Each float32 occupies 32 bits: one sign bit, eight biased exponent bits, and twenty-three mantissa bits. For a normalized FP32 value, changing the least significant fraction bit moves the value by one unit in the last place at its current exponent; the absolute perturbation therefore depends on that exponent. LSB steganography ([6, 11]) exploits this: an attacker reinterprets each weight as a 32-bit unsigned integer via bitcast, replaces the lowest xx mantissa bits with payload bits, and writes back: ui′=(ui&∼mx)∣(pi&mx)u_i' = (u_i \mathbin{\&} \sim m_x) \mathbin{|} (p_i \mathbin{\&} m_x), mx=(1≪x)−1m_x = (1 \ll x)-1. Extraction is the exact inverse. StegoNet directly studies LSB substitution in neural-network parameters, and MaleficNet demonstrates coded weight payloads ([22, 17]).

Supply chain and payload characteristics

Public repositories distribute pretrained checkpoints via a single API call without inspecting weight tensors. The difficulty of sanitization scales with payload entropy: low-entropy payloads (normalized entropy ≲0.65\lesssim0.65) tolerate partial corruption; high-entropy payloads (entropy ≳0.90\gtrsim0.90) require near-lossless reconstruction.

Defenses and their limitations

Detection-oriented methods (Gilkarov and Dubin [13]) identify compromised checkpoints but do not remove the payload. Task-aware PTQ methods optimize weight-rounding decisions using calibration data (Nagel et al. [25]); our evaluated static symmetric-INT8 quantize-dequantize baseline is a payload-disruption comparison, not a security-certified PTQ method. Active sanitization (Dubin [9]) directly perturbs weights, but perturbation-based approaches offer no complete-overwrite guarantee for the declared payload channel. Weight-bit integrity attacks and defenses instead study inference failure under sparse malicious flips ([34] (He et al. 2020)); that objective differs from erasing an arbitrary byte stream stored in otherwise functional weights.

Gray codes

A Gray code (Gray [14]) is a bijection Gray: {0,…,2n−1}→{0,1}n\{0,\ldots,2^n-1\}\to\{0,1\}^n such that consecutive codewords differ in exactly one bit: Ham⁡(Gray⁡(i),Gray⁡(i+1))=1\operatorname{Ham}(\operatorname{Gray}(i),\operatorname{Gray}(i+1))=1. Standard reflected binary construction: Gray⁡(z)=z⊕(z≫1)\operatorname{Gray}(z)=z\oplus(z\gg1). Two properties motivate its use here. (i) Low transition: adjacent unmasked codewords differ in one bit, inducing structured rather than independently scattered overwrite values. (ii) Balance over complete masked periods: for gi=Gray⁡(i⊕ℓ)&mxg_i=\operatorname{Gray}(i\oplus\ell)\mathbin{\&}m_x, the low xx output bits are balanced over a period of 2x+12^{x+1}; the phase rotates the finite tensor segment and diversifies patterns. These properties motivate the design and its empirical fidelity; zero target-channel capacity follows from complete payload-independent overwrite, not from Gray coding or phase secrecy.

Related work on coding theory and steganography ([6, 11, 29]) establishes that reliable communication requires a positive channel capacity. We are not aware of prior work that explicitly formulates complete replacement of a declared neural-weight payload channel as channel erasure. Model compression methods ([15, 10]) are designed for efficiency, not security, and provide no guarantees against structured payload embedding.

GrayShield

Algorithm

Keyed phase for pattern diversity

For each target tensor W(ℓ)∈RNℓW^{(\ell)}\in\mathbb{R}^{N_\ell} (attention Q/K/V/O and MLP weight matrices in encoder blocks):

θℓ=H(name⁡ℓ,x,layer⁡ℓ,r;s) mod (231−1),(1)\theta_\ell= H(\operatorname{name}_\ell,x,\operatorname{layer}_\ell,r;s)\bmod(2^{31}-1), \tag*{(1)}

where HH is HMAC-SHA256 (Bellare, Canetti, and Krawczyk [4]), ss is a 128-bit secret seed, and rr is a reproducible run salt. The phase varies the overwrite pattern across tensors and releases. Secrecy is not required for target-channel erasure; it is useful only when pattern prediction or reuse is part of the deployment threat model.

Gray-code overwrite rule

For each element index ii:

gi(ℓ)=(ni(ℓ)⊕(ni(ℓ)≫1))&mx,ni(ℓ)=i+θℓ,(2)g_i^{(\ell)} = \left(n_i^{(\ell)} \oplus\left(n_i^{(\ell)} \gg1\right)\right)\mathbin{\&}m_x,\qquad n_i^{(\ell)}=i+\theta_\ell, \tag*{(2)}

where mx=(1≪x)−1m_x=(1\ll x)-1. The sanitized uint32 view is:

ui′=(ui&∼mx)∣gi(ℓ),(3)u_i'=(u_i\mathbin{\&}\sim m_x)\mathbin{|}g_i^{(\ell)}, \tag*{(3)}

preserving sign and exponent bits, with adjacency smoothness Ham⁡(gi(ℓ),gi+1(ℓ))≤1\operatorname{Ham}(g_i^{(\ell)},g_{i+1}^{(\ell)})\leq1. Algorithm 1 gives the complete procedure. The operation is fully vectorizable, completing in O(N)O(N) time with O(1)O(1) auxiliary state per tensor.

Formal Guarantees

Proposition 1 (Target-Channel Erasure): Let PP be any payload encoded only in a declared target-bit set T\mathcal{T}, and let GG be an overwrite string generated independently of PP. If a sanitizer replaces every bit in T\mathcal{T} by GG and the extractor reads only T\mathcal{T}, then

P^=G,I(P;P^)=0.\hat{P}=G,\qquad\mathcal{I}(P;\hat{P})=0.
GrayShield evaluation pipeline

Figure 1. GrayShield evaluation pipeline. (A) Inputs define the empirical study space: pretrained models, evaluation datasets, and malware payloads from MalwareBazaar. (B) LSB injection overwrites the lowest xx mantissa bits at depths x∈{4,8,16,19,21,23}x \in\{4, 8, 16, 19, 21, 23\} to produce (C) poisoned models. (D) Seven sanitization strategies transform poisoned checkpoints into defended models. (E) Payload recovery is assessed by LSB extraction, and (F) security, fidelity, and utility metrics are computed. All four research questions are answered from the complete pipeline: RQ1 characterises the capacity boundary of injection; RQ2 compares defense effectiveness against the Tier-1 naive attacker; RQ3 evaluates adaptive robustness under five Tier-2 attacker variants (re-running stages B–F with varied attacker encodings); and RQ4 synthesises the Pareto trade-off from RQ2–RQ3 results. Dashed arrows denote analytical dependencies across research questions.

Algorithm 1 GrayShield Sanitization
Require: Transformer $\mathcal{M}$, depth $x$, secret seed $s$, salt $r$
Ensure: Sanitized $\mathcal{M}'$ with all declared target bits replaced
1: for each target tensor $W^{(\ell)}$ in $\mathcal{M}$ do
2:   $O_\ell \leftarrow H(\operatorname{name}_\ell, x, \operatorname{layer}_\ell, r; s) \bmod (2^{31} - 1)$
3:   $u \leftarrow \operatorname{bitcast}_{\operatorname{uint32}}(W^{(\ell)})$
4:   for each index $i$ do
5:     $n \leftarrow i + O_\ell$
6:     $g \leftarrow (n \mathbin{\oplus} (n \gg 1)) \mathbin{\&} m_x$
7:     $u[i] \leftarrow (u[i] \mathbin{\&} \sim m_x) \mathbin{|} g$
8:   end for
9:   $W^{(\ell)\prime} \leftarrow \operatorname{bitcast}_{\operatorname{float32}}(u)$
10: end for
11: return $\mathcal{M}'$

Consequently the channel from PP to the sanitized target bits has zero capacity for every payload distribution. This result requires neither Gray coding nor a secret seed.

Proof. Complete overwrite removes every target bit before writing GG. Thus p(P^=g∣P=p)=p(G=g)p(\hat{P} = g \mid P = p) = p(G = g) for every pp, so the joint distribution factorizes and I(P;P^)=0I(P; \hat{P}) = 0. Maximizing over input distributions still gives zero capacity. □

Corollary 2 (Chance-Level Recovery): If, in addition, each overwritten bit is marginally balanced and independent of the corresponding payload bit, then E[BitAcc⁡post]=12\mathbb{E}[\operatorname{BitAcc}_{\mathrm{post}}] = \frac{1}{2}. When pre-defense recovery is effectively one, the empirical RR approaches 50 percentage points. Failing to reject H0(2c)H_0^{(2c)} and H0(3c)H_0^{(3c)} at α=0.05\alpha= 0.05 constitutes empirical support for this corollary, while rejecting it for other defenses quantifies how far those methods fall short of the channel-erasure bound.

Because the sanitized target bits are independent of PP, data processing prevents any decoder from reconstructing information absent from the extractor input. Under the balanced condition in Corollary 5, the bitwise view is BSC(12)(\frac{1}{2}) and Shannon’s converse excludes reliable positive-rate coding [29], including Reed–Solomon, LDPC, and polar families [27, 12, 3].

Theorem 3 (Conditional Loss Bound): If L:W→R\mathcal{L} : \mathcal{W} \to\mathbb{R} is LlipL_{\mathrm{lip}}-Lipschitz in the model parameters, then

∣L(W′)−L(W)∣≤Llip∥W′−W∥2,=Llip∥W∥2Drel(W,W′).\lvert\mathcal{L}(W') - \mathcal{L}(W) \rvert\le L_{\mathrm{lip}}\lVert W' - W \rVert_2, = L_{\mathrm{lip}}\lVert W \rVert_2 D_{\mathrm{rel}}(W,W').

In the completed payload set, worst-case Drel=7.1×10−4D_{\mathrm{rel}} = 7.1 \times10^{-4} at x=16x = 16 and 5.4×10−35.4 \times10^{-3} at x=19x = 19. This theorem bounds loss only; accuracy is evaluated empirically. Further assumptions, scope details, and reduced-precision analysis are provided in the supplementary material.

GrayShield versus PatternMask. Both GrayShield and a fixed full-overwrite PatternMask satisfy Proposition 4 for the declared target channel. Their distinction is therefore empirical and operational, not target-channel capacity: GrayShield uses a low-transition Gray structure and a keyed phase for pattern diversity, whereas PatternMask reuses one global pattern. In the evaluated configurations, GrayShield has substantially lower RR variance and W1W_1 shift than PatternMask despite similar mean RR. Erasure follows from payload-independent overwriting, while the keyed phase provides pattern diversity and the Gray-code structure preserves distributional fidelity; phase secrecy is not required for erasure.

Threat Model

We consider a supply-chain adversary who embeds a binary payload into the mantissa LSBs of FP32 weights of a pre-trained Transformer distributed through a public repository. The adversary has full white-box access to the model prior to distribution; the defender applies post-training sanitization before publication and has no access to the training data.

Target parameter set and hiding capacity We target the encoder blocks of the Transformer backbone: attention (Q/K/V/O) and feed-forward (MLP) weight matrices, which contain the dominant fraction of trainable parameters. Embedding layers and task-specific classifier heads are excluded by default. The hiding capacity at overwrite depth xx is:

C(θtarget,x)=∑w∈θtargetnumel⁡(w)⋅x,x∈[1,23].(4)C(\theta_{\mathrm{target}},x)=\sum_{w\in\theta_{\mathrm{target}}}\operatorname{numel}(w)\cdot x,\quad x\in[1,23]. \tag*{(4)}

Three-tier attacker knowledge hierarchy

  • Tier 1 (Black-box). Knows architecture and parameter count; uses standard LSB substitution without knowledge of the defender’s method. Corresponds to Naive.

  • Tier 2 (Gray-box). Knows a sanitization step of unspecified type will be applied; responds with redundancy coding (Repeat3/Repeat5) or burst-resilient interleaving.

  • Tier 3 (White-box). Knows the sanitization algorithm (GrayShield) but not the seed ss. Strongest realistic attacker.

Experimental Setup

Models and datasets. We evaluate across both natural language and vision domains using standard pretrained Transformer architectures. For text, we use BERT-base (Devlin et al. [7]) and RoBERTa-base (Liu et al. [23]) fine-tuned on the SST-2 sentiment classification benchmark (Socher et al. [30]; Wang et al. [32]). For vision, we use ViT-Base/16 (Dosovitskiy et al. [8]) and Swin-Base (Liu et al. [24]) evaluated on CIFAR-10 (Krizhevsky [21]). These models span a range of architectural designs and parameter scales, providing coverage across both language and image modalities. All evaluations are conducted on held-out subsets of size neval=512n_{\mathrm{eval}}=512, yielding an accuracy resolution of approximately 0.195 pp, which is sufficient to reliably detect sub-1% performance changes.

Malware payloads. Two representative MalwareBazaar payloads (abuse.ch 2026) spanning the entropy extremes: a low-entropy (LE) JavaScript script (c37...a88.js.malware, 134.3 KB, entropy 0.603) and a high-entropy (HE) compiled binary (5704...6d0.exe.malware, 8,971.4 KB, entropy 0.994). The LE payload tolerates partial corruption due to structural redundancy; the HE payload requires near-lossless reconstruction.

Defenses. Seven post-training strategies evaluated at operating depth x=19x=19: GS (proposed), PM (fixed-pattern LSB overwrite), PTQ (symmetric INT8 quantize–dequantize) (Krishnamoorthi [20]), FT (fine-tune on 256 clean samples, sweeping {50,100,200,500}\{50,100,200,500\} gradient steps), GN (i.i.d. N(0,σ2)\mathcal{N}(0,\sigma^2) noise, sweeping σ∈{10−6,3×10−6,10−5,3×10−5,10−4}\sigma\in\{10^{-6},3\times10^{-6},10^{-5},3\times10^{-5},10^{-4}\}), SWP (an author-defined, magnitude-ranked selective-weight perturbation baseline), and RF (Bernoulli bit flip). We set the defense depth to the largest utility-preserving value (x=19x=19, RQ1), covering all stealthy embeddings (x′≤xx'\le x); deeper embeddings (x′>xx'>x) exhibit detectable accuracy and geometric degradation. Attacker variants. Five Tier-2 (gray-box) variants: Naive, Interleave, Repeat3, Repeat5, and RS(255,127). The threat model is detailed in the supplementary material.

Recovery metric. For payload bits p1,…,pBp_1,\ldots,p_B and extracted bits p^1,…,p^B\hat{p}_1,\ldots,\hat{p}_B,

Rec⁡=B−1∑i=1B1[pi=p^i];RR⁡=100(Rec⁡pre−Rec⁡post).\operatorname{Rec}=B^{-1}\sum_{i=1}^{B}\mathbf{1}[p_i=\hat{p}_i];\quad\operatorname{RR}=100(\operatorname{Rec}_{\mathrm{pre}}-\operatorname{Rec}_{\mathrm{post}}).

We report RR in percentage points (pp), not as a relative percentage. Pre-defense recovery is effectively one in the completed runs; hence RR near 50 pp means post-defense bit accuracy near binary chance. Values farther above 50 pp are not automatically more secure because systematic anti-correlation can be inverted. Fidelity and cost metrics. Beyond RR and Δ\DeltaAcc, we report weight-distribution fidelity (W1W_1), runtime (ms), RR consistency (fraction within ±2\pm2 pp of the mean), and bit-level Hamming distance (millions of bits). Statistical protocol. All experiments use run seed 1, evaluation seed 42. The supplementary material specifies 13 null hypotheses; all tests two-tailed at α=0.05\alpha=0.05 unless marked one-tailed (↑). Effect sizes reported alongside pp-values: ηKW2\eta^2_{KW} for Kruskal–Wallis, Cohen’s dd for tt-tests, Spearman ρ\rho for correlations, Kendall’s WW for Friedman, Wilks’ λ\lambda for MANOVA.

Results

RQ1: Injection Feasibility

RQ1 asks whether mantissa-LSB payload injection can remain stealthy while preserving model utility. Figure 2 provides the consolidated evidence across six overwrite depths x∈{4,8,16,19,21,23}x\in\{4,8,16,19,21,23\}, four Transformer model presets, and two entropy-stratified payloads. Two patterns are central. First, both geometric perturbation metrics increase monotonically with overwrite depth. Cosine deviation and relative ℓ2\ell_2 remain negligible through x=16x=16, but grow rapidly beyond that point. Panels (a) and (b) report perfect monotone association across the six depth-wise means (Spearman ρ=1.000\rho=1.000, p<0.001p<0.001), identifying overwrite depth as the primary driver of geometric detectability.

Figure 2. RQ1 — Injection feasibility across six overwrite depths (x∈{4,8,16,19,21,23}x \in\{4, 8, 16, 19, 21, 23\}), four Transformer architectures, and two entropy-stratified payloads (n=48n = 48 runs). (a) Cosine deviation vs. depth on a log scale; Spearman ρ=0.954\rho= 0.954, p<0.001p < 0.001. (b) Relative ℓ2\ell_2 distance vs. depth on a log scale; ρ=0.954\rho= 0.954, p<0.001p < 0.001. (c) Signed accuracy drop ΔAcc\Delta\mathrm{Acc} vs. depth. The green region (x≤16x \le16) marks depths satisfying the stealth constraints, while the red region (x≥19x \ge19) marks the onset of measurable degradation, with a worst-case high-entropy drop of 0.78%. Mann–Whitney comparison between low and high depth regimes yields p=0.005p = 0.005. (d) Spearman depth–metric association with 95% Fisher-zz confidence intervals.

Second, the utility boundary is sharper for high-entropy payloads. In Figure 2(c), low-entropy payloads remain essentially flat across all tested depths, whereas high-entropy payloads begin to show measurable degradation at x≥19x\ge19. Even then, the worst completed case remains below the 1% threshold. The grouped Mann–Whitney result (p=0.005p=0.005) supports the conclusion that the accuracy penalty is significantly larger above the x=16x=16 boundary. H0(1b)H_0^{(1b)}: Reject. H0(1c)H_0^{(1c)}: Reject.

Answer to RQ1. Payload injection remains stealthy through x=16x=16 and enters a transition regime at x=19x=19. We treat x=19x=19 as the main operating point for RQ2–RQ4: it represents a high-capacity attacker while remaining below the practical utility-loss threshold.

RQ2: Defense Effectiveness under a Naive Attacker

RQ2 compares seven post-training defenses at the RQ1-selected operating point. The goal is not merely to approach the 50 pp chance target, but to identify a defense that simultaneously disrupts payload recovery, preserves accuracy, avoids excessive distribution shift, and remains operationally lightweight. Table 1 and Figure 3 show that GS, PM, and PTQ are the only defenses that reach chance-level sanitization under the naive attacker. Their mean RR values differ by less than one percentage point. However, they are not equivalent once secondary deployment criteria are considered.

Figure 3. RQ2 — Defense effectiveness and multi-metric trade-offs. (a) Recovery Reduction (RR) across defenses, stratified by payload entropy. GrayShield reaches near-chance disruption (≈50\approx50 pp) consistently. (b) Accuracy drop (∣ΔAcc∣|\Delta\mathrm{Acc}|), where lower values indicate better utility preservation. (c) Cumulative distribution of RR, showing that GS, PM, and PTQ concentrate near the 50 pp target while weaker defenses remain far below. (d) Radar chart of normalized deployment metrics. (e) Defense-by-metric Z-score heatmap, where green indicates above-average performance. (f) Grouped normalized bar chart.

DefenseDataRR (pp)Δ\DeltaAccW1W_1Target erasure
GSNone49.72 ±\pm 0.54−0.10%-0.10\%2.6×10−52.6 \times10^{-5}Prop. 4
PMNone50.00 ±\pm 2.64+0.09%+0.09\%7.6×10−47.6 \times10^{-4}Prop. 4
PTQCalibration49.93 ±\pm 0.40+0.07%+0.07\%8.5×10−48.5 \times10^{-4}None
FTClean set45.34 ±\pm 1.11+0.38%+0.38\%7.6×10−77.6 \times10^{-7}None
GNNone31.49 ±\pm 15.08−0.02%-0.02\%5.8×10−75.8 \times10^{-7}None
SWPNone10.01 ±\pm 1.50+0.05%+0.05\%4.6×10−54.6 \times10^{-5}None
RFNone2.69 ±\pm 3.72+0.01%+0.01\%1.3×10−61.3 \times10^{-6}None

Table 1. RQ2 defense comparison. RR denotes Recovery Reduction (pp); values near 50 pp indicate chance-level recovery, the target under complete payload-independent overwrite.

PM attains mean RR of 50.00 pp but with substantially higher variance (±2.64\pm2.64) than GS (±0.54\pm0.54). PTQ is similarly effective in RR (49.93 pp) but requires calibration data and induces a larger distributional shift. GN is unstable, with RR 31.49 ±\pm 15.08 pp, while SWP and RF are ineffective in this setting.

H0(2a)H_0^{(2a)}: Reject (H=48.2H = 48.2, p<0.001p < 0.001, ηKW2=0.861\eta_{KW}^{2} = 0.861).

H0(2b)H_0^{(2b)}: Reject (H=43.1H = 43.1, p<0.001p < 0.001, ηKW2=0.803\eta_{KW}^{2} = 0.803).

H0(2c)H_0^{(2c)}: Fail to reject for GS, PM, PTQ (p∈[0.21,0.99]p \in[0.21, 0.99], ∣d∣≤0.52|d| \le0.52); Reject for FT, GN, SWP, RF (p≤0.046p \le0.046).

H0(2d)H_0^{(2d)}: Reject (W=7.53W = 7.53, p=0.016p = 0.016, σGN/σGS=27.9×\sigma_{\mathrm{GN}}/\sigma_{\mathrm{GS}} = 27.9\times).

Figure 3(a)–(c) clarifies that mean RR alone is insufficient. GS provides the most balanced profile: near-chance recovery reduction, negligible impact on accuracy, zero data dependency, low variance, and low distribution shift. GS achieves average W1=2.6×10−5W_1 = 2.6\times10^{-5}, approximately 25×\times smaller than PM’s 7.1×10−47.1\times10^{-4} and 42×\times smaller than PTQ’s 1.17×10−31.17\times10^{-3}.

Answer to RQ2. Under the naive attacker, GS, PM, and PTQ all disrupt payload recovery to near chance level. GS is the most deployable among them because it combines near-chance RR with low variance, no data requirement, small utility loss, and the smallest W1W_1 shift in this high-RR group. Both exact full-overwrite methods, GS and PM, satisfy the scoped target-erasure result; their empirical stability and fidelity differ.

RQ3: Robustness under Adaptive Attackers

RQ3 evaluates whether the RQ2 ranking survives stronger attacker strategies. The five implemented variants are Naive, Interleave, Repeat3, Repeat5, and RS(255,127). Table 2 reports RR per attacker variant. The defining result is GS’s invariance to attacker adaptation. Across all five attacker variants, GS stays within 49.5–50.4 pp, with aggregate RR 49.96 ±\pm 0.66 pp. The RQ2 means in Table 1 and the Naive column in Table 2 use different run pools: RQ2 contains all eight completed model–payload pairs, whereas RQ3 contains four completed pairs and omits the zero-noise GN control. Their Naive values therefore need not coincide. This agrees with target-channel erasure: coding cannot reconstruct payload information absent from the extractor input. PM remains near 50 pp but has much larger dispersion (σ=3.25\sigma= 3.25 pp); PTQ is slower and more distortive, while GN, SWP, and RF degrade under adaptive variants. The one-sample comparison printed in Figure 4(c) fails to distinguish the five attacker-specific GS means from the 50 pp target (p=0.82p = 0.82).

DNaïveInterl.Rep3Rep5RSRR‾\overline{\mathrm{RR}}σ\sigmaΔ\DeltaAccTimeCons.Ham.W1W_1
GS49.5±0.749.5 \pm0.750.0±0.250.0 \pm0.250.4±0.650.4 \pm0.650.2±0.250.2 \pm0.249.6±0.849.6 \pm0.849.960.66−0.10-0.10540.999.602.8×10−52.8 \times10^{-5}
PM50.0±3.250.0 \pm3.250.0±3.250.0 \pm3.250.0±3.350.0 \pm3.350.0±3.350.0 \pm3.350.0±3.250.0 \pm3.250.003.25+0.13+0.13440.949.607.1×10−47.1 \times10^{-4}
PTQ50.0±0.550.0 \pm0.550.0±0.550.0 \pm0.549.5±0.549.5 \pm0.550.1±0.550.1 \pm0.549.5±0.449.5 \pm0.449.830.54+0.17+0.178820.999.571.2×10−31.2 \times10^{-3}
FT45.2±1.445.2 \pm1.445.3±1.345.3 \pm1.345.5±1.045.5 \pm1.046.3±0.946.3 \pm0.945.2±1.145.2 \pm1.145.511.23+0.45+0.4513,2000.978.934.0×10−64.0 \times10^{-6}
GN37.5±6.137.5 \pm6.137.7±6.037.7 \pm6.038.4±5.638.4 \pm5.640.3±4.940.3 \pm4.937.5±6.037.5 \pm6.038.255.85−0.04-0.046200.857.714.0×10−64.0 \times10^{-6}
SWP10.0±2.110.0 \pm2.110.1±2.110.1 \pm2.19.5±0.99.5 \pm0.98.6±0.98.6 \pm0.95.5±2.75.5 \pm2.78.762.56+0.07+0.071,4800.711.674.7×10−54.7 \times10^{-5}
RF2.7±3.72.7 \pm3.72.7±3.72.7 \pm3.70.6±1.00.6 \pm1.00.2±0.30.2 \pm0.32.5±3.82.5 \pm3.81.733.16+0.02+0.022,5900.000.334.0×10−64.0 \times10^{-6}

Table 2. Comprehensive defense (D) evaluation across RQ2–RQ3 (x=19x = 19). Attacker columns report mean RR (pp) ±\pm std. Summary reports mean RR, std, Δ\DeltaAcc (%), runtime (ms), and consistency. Hamming distance is reported in millions (M).

Figure 4. RQ3 — Adaptive attacker robustness. (a) RR across attacker variants shows that GS remains stable around 50 pp. (b) Defense-level RR distributions show significant differences across defenses, with GS maintaining high and consistent performance. (c) Effectiveness–stability trade-off shows GS closest to the target region of high RR and low σ\sigma. (d) Attacker-by-defense heatmap confirms that GS remains resilient across all implemented adaptive variants.

Figure 4 makes this difference visually explicit. Panel (a) shows GS as nearly flat across attackers; panel (b) shows a compact high-RR distribution; panel (c) places GS in the desired effectiveness–stability region; and panel (d) confirms that GS does not exhibit a strategy-specific weakness under interleaving, repetition, or Reed–Solomon coding.

Answer to RQ3. GS maintains stable chance-level sanitization under all five implemented adaptive attacker variants.

RQ4: Pareto Trade-off and Deployment Profile

RQ4 integrates the previous findings into a deployment-oriented comparison. A practical defense must satisfy more than high mean RR: it must also preserve accuracy, remain stable, avoid excessive runtime, and limit distributional drift.

Figure 5(a) shows the RR–accuracy Pareto plane. GS lies in the desired region: high RR, low ∣ΔAcc∣|\Delta\mathrm{Acc}|, and low variance. PM has similar mean RR and low runtime but fails the stability criterion (σ=3.25\sigma= 3.25). PTQ has high RR and low variance but fails the runtime criterion (882 ms) and has the largest W1W_1 among the high-RR defenses. FT, GN, SWP, and RF are dominated by at least one of the high-RR methods. Figure 5(b) summarizes the deployment constraints. GS is the only defense satisfying all four criteria simultaneously: RR in [48, 52] pp, σRR<2\sigma_{\mathrm{RR}} < 2 pp, ∣ΔAcc∣<1%|\Delta\mathrm{Acc}| < 1\%, and runtime <500< 500 ms. PM and PTQ satisfy three of four, but each misses a different requirement.

Figure 5. RQ4 deployment profile: (a) RR–accuracy Pareto plane; (b) criteria satisfied; (c) runtime; (d) −log⁡10(W1)-\log_{10}(W_1) fidelity; and (e) normalized deployment radar.

In Figure 5(c), GS requires 54 ms per checkpoint, compared with 882 ms for PTQ and 13.2 s for FT. In Figure 5(d), PM’s W1W_1 is approximately 25×\times larger than GS’s, and PTQ’s approximately 42×\times larger.

Answer to RQ4. GS at x=19x = 19 is the recommended operating point. It achieves 49.96 ±\pm 0.66 pp RR, sub-1% accuracy impact, low variance, low runtime, and substantially better weight-distribution fidelity than competing high-RR baselines.

Discussion

Theory–empirics alignment. Complete payload-independent replacement erases the declared target channel without seed secrecy; balance is the additional condition that makes bit accuracy chance-level. The reported 49.96 ±\pm 0.66 pp RR across five attackers is consistent with both properties: repetition, interleaving, and RS coding cannot reconstruct information absent from the extractor input. Stability and fidelity. GS and PM share the scoped full-overwrite guarantee and similar mean RR, but PM has higher dispersion and 25×\times larger W1W_1. GN’s lower and unstable RR despite matched perturbation magnitude further shows that targeting the payload-bearing LSB subspace matters more than perturbation magnitude alone.

Deployment interpretation. Table 2 and Supplementary fig:S1 show that GS alone satisfies the complete operating envelope: RR in [48, 52] pp, σRR<2\sigma_{\mathrm{RR}} < 2 pp, ∣ΔAcc∣<1%|\Delta\mathrm{Acc}| < 1\%, runtime below 500 ms, and low distributional drift. PTQ is slower and more distortive, PM is less stable, and FT is slow and requires trusted data.

Limitations

Experiments cover FP32 and four 86M–125M presets; reduced-precision utility remains unvalidated. LDPC and polar attackers are analytical extensions, and some FT RQ3 runs were incomplete. The guarantee is bit-local: higher-bit payloads, executable serialization, metadata side channels, and post-sanitization reinsertion are outside scope. Executable malware samples are not redistributed.

Generative-AI assistance

Generative-AI tools assisted with language editing, \LaTeX formatting, and verification; the authors reviewed the output and retain full responsibility.

Conclusion

GrayShield completely replaces a declared weight-LSB payload channel using a low-transition Gray sequence. Payload-independent overwrite gives the scoped zerocapacity result; Gray structure and the keyed phase provide regularity and pattern diversity. Across the evaluated settings, GrayShield achieves stable near-chance recovery with sub-1% accuracy degradation, and combines low variance and runtime with lower W1W_1 than the evaluated near-chance baselines.

Supplementary Material

Pre-specified Hypotheses and Outcomes

Table 3 consolidates all 13 pre-specified null hypotheses for RQ1–RQ4, their tests, effect sizes, and decisions (R = Reject; FTR = Fail to Reject).

IDNull hypothesis H0H_0TestEffectDecision
H0(1a)H_0^{(1a)}ρ(depth,metric)=0\rho(\text{depth},\text{metric}) = 0 (LE Δ\DeltaAcc)Spearmanρ=0.954\rho= 0.954, p<0.001p < 0.001R
Spearmanρ=0.338\rho= 0.338, p=0.512p = 0.512FTR
H0(1b)H_0^{(1b)}Equal Δ\DeltaAcc across 6 depthsKW (n=8n = 8)ηKW2\eta^2_{KW}, p<0.001p < 0.001R
H0(1c)†H_0^{(1c)\dagger}Δ\DeltaAcc(x≥19x \ge19) ≤Δ\le\DeltaAcc(x≤16x \le16)MW-Up=0.005p = 0.005R
RQ2 — Baseline Comparison (naive)
H0(2a)H_0^{(2a)}Equal means RR across 7 defensesKW (n=8n = 8)η2=0.861\eta^2 = 0.861, p<0.001p < 0.001R
H0(2b)H_0^{(2b)}Equal ∣Δ\lvert\DeltaAcc∣\rvert across 7 defensesKW (n=8n = 8)η2=0.803\eta^2 = 0.803, p<0.001p < 0.001R
H0(2c)H_0^{(2c)}μRR(m)=50%\mu_{RR}^{(m)} = 50\% (GS/PM/PTQ)1-sample tt∣d∣≤0.52\lvert d\rvert\le0.52, p≥0.207p \ge0.207FTR
μRR(m)=50%\mu_{RR}^{(m)} = 50\% (FT/GN/SWP/RF)1-sample tt∣d∣≥0.86\lvert d\rvert\ge0.86, p≤0.046p \le0.046R
H0(2d)H_0^{(2d)}σGS2=σGN2\sigma^2_{\mathrm{GS}} = \sigma^2_{\mathrm{GN}}Levene (n=8n = 8)ratio 27.9×27.9\times, p=0.016p = 0.016R
RQ3 — Adaptive Robustness
H0(3a)H_0^{(3a)}Equal mean RR (adaptive pool)KW (n=5n = 5)η2=0.909\eta^2 = 0.909, p<0.001p < 0.001R
H0(3b)H_0^{(3b)}Attacker does not reshuffle orderingFriedmanW=0.81W = 0.81, p<0.001p < 0.001R
H0(3c)∗H_0^{(3c)*}μRR(GS)=50%\mu_{RR}^{(\mathrm{GS})} = 50\% (adaptive)1-sample tt (n=5n = 5)d=−0.16d = -0.16, p=0.745p = 0.745FTR
H0(3d)H_0^{(3d)}σGS2=σPM2\sigma^2_{\mathrm{GS}} = \sigma^2_{\mathrm{PM}} (adaptive)Levene+Bartlettratio 24.3×24.3\times, p=0.010p = 0.010R
RQ4 — Pareto Trade-off
H0(4a)H_0^{(4a)}Equal multivariate profilesMANOVAλ≈0\lambda\approx0, p<0.001p < 0.001R
H0(4b)H_0^{(4b)}Equal ∣Δ\lvert\DeltaAcc∣\rvert: GS vs PMWelch tt (n=8n = 8)d=0.42d = 0.42, p=0.009∗p = 0.009^*R
H0(4c)H_0^{(4c)}Equal ∣Δ\lvert\DeltaAcc∣\rvert: GS vs PTQWelch tt (n=8n = 8)d=0.78d = 0.78, p<0.001∗p < 0.001^*R

Table 3. Consolidated pre-specified statistical hypotheses for RQ1–RQ4. All tests are two-tailed at α=0.05\alpha= 0.05 unless marked (†\dagger) one-tailed. *Bonferroni-corrected over H0(4b)H_0^{(4b)}–H0(4c)H_0^{(4c)}.

  • Key result. H0(3c)H_0^{(3c)} is the most critical single test in the paper. Failing to reject confirms that GrayShield induces a BSC(12\frac{1}{2}) channel regardless of the coding strategy employed, empirically validating Proposition 4.

Formal Guarantees

Assumptions

Our theoretical analysis relies on the following standard assumptions:

  • PRF security. HMAC-SHA256 is computationally indistinguishable from a uniformly random function by any PPT adversary (Definition 14).

  • Secret seed. The sanitization seed ss (∣s∣=128\lvert s\rvert= 128 bits) is unknown to the attacker and stored securely (e.g., HSM).

  • Computational boundedness. The attacker is limited to PPT algorithms.

  • Memoryless channel. Post-sanitization extracted bits are conditionally independent across positions (Definition 20).

Information-theoretic framing

We model LSB-based payload embedding as a sequence of channel uses over a memoryless binary channel. Let pi∈{0,1}p_i \in\{0,1\} be the ii-th payload bit written by the attacker and p^i∈{0,1}\hat{p}_i \in\{0,1\} the bit recovered after sanitization TT. Pre-defense, the channel is noiseless: p^i=pi\hat{p}_i = p_i with probability one, giving raw capacity Craw=∑wnumel⁡(w)⋅xC_{\mathrm{raw}} = \sum_w \operatorname{numel}(w) \cdot x. The defender’s objective is to choose TT such that:

Ceff(T)=I(P;T(lsb⁡x(W)))→0.(5)C_{\mathrm{eff}}(T) = \mathcal{I}(P; T(\operatorname{lsb}_x(W))) \to0. \tag*{(5)}

Perfect Channel Erasure

Proposition 4 (Perfect Channel Erasure): Let Ts:W→WT_s : \mathcal{W} \to\mathcal{W} be the GrayShield sanitization map parameterized by secret seed ss, and let P^=D(Ts(E(W,P)))\hat{P} = D(T_s(E(W, P))) be the extracted payload after sanitization. Under the assumptions above, for any payload distribution P\mathcal{P}:

I(P;P^)=0,\mathcal{I}(P; \hat{P}) = 0,

and therefore Ceff(Ts)=0C_{\mathrm{eff}}(T_s) = 0.

Proof. For each index ii in a target tensor, the overwritten mantissa bits are replaced by gi=fs(i)∈{0,1}xg_i = f^s(i) \in\{0,1\}^x, where fs(⋅)f_s(\cdot) is derived from a PRF keyed by ss via the per-tensor phase offset OℓO_\ell and the Gray-code mapping. By PRF security, fsf_s is computationally indistinguishable from a uniformly random function; consequently:

Pr⁡(gi,k=1)=12for each bit k∈[0,x),\Pr(g_{i,k} = 1) = \frac{1}{2} \quad\text{for each bit } k \in[0,x),

and gi,kg_{i,k} is independent of the payload bit Pi,kP_{i,k} when ss is hidden from the attacker. This induces a BSC⁡(12)\operatorname{BSC}(\frac{1}{2}) on each transmitted bit, whose capacity is:

CBSC⁡(12)=1−Hb(12)=0.C_{\operatorname{BSC}(\frac{1}{2})} = 1 - H_b\left(\frac{1}{2}\right) = 0.

By the memoryless channel property, the extracted bits P^i\hat{P}_i are conditionally independent across positions, so:

I(P;P^)=∑i=1BI(Pi;P^i)=0.\mathcal{I}(P; \hat{P}) = \sum_{i=1}^{B} \mathcal{I}(P_i; \hat{P}_i) = 0.

Corollary 5 (Chance-Level Recovery): Under Proposition 4, E[BitAcc⁡post]=12\mathbb{E}[\operatorname{BitAcc}_{\mathrm{post}}] = \frac{1}{2}, so the empirical Recovery Reduction RR approaches 50%.

Coding-Theoretic Limits

Lemma 6 (Irrecoverability under Error-Correcting Codes): Let the sanitized channel be BSC⁡(12)\operatorname{BSC}(\frac{1}{2}). Then for any error-correcting code with positive rate R>0R > 0:

lim⁡n→∞P(decoded payload=P)=0.\lim_{n \to\infty} \mathbb{P}(\text{decoded payload} = P) = 0.

Proof. By Shannon’s channel coding converse [29], reliable communication (vanishing block error probability as n→∞n \to\infty) over a channel with capacity CC requires R<CR < C. For BSC⁡(12)\operatorname{BSC}(\frac{1}{2}), C=0C = 0. Hence no positive-rate code — including RS(n,k)(n,k) (for which all nn codeword bytes are erroneous since e=n≫t=⌊(n−k)/2⌋e = n \gg t = \lfloor(n-k)/2\rfloor; for RS(255,127): 255≫64255 \gg64), any regular LDPC code (for which BP decoding achieves BER →12\to\frac{1}{2} since p=0.5≫p∗≈0.084p = 0.5 \gg p^* \approx0.084 [12]), or Polar codes (for which all synthetic bit-channels polarize to pure noise since ∑iC(i)=n⋅CBSC⁡(12)=0\sum_i C^{(i)} = n \cdot C_{\operatorname{BSC}(\frac{1}{2})} = 0 [3]) — can achieve reliable decoding on the sanitized channel.

Accuracy Stability Bound

Proposition 7 (Lipschitz Accuracy Bound): Let the task loss L:W→R\mathcal{L} : \mathcal{W} \to\mathbb{R} be LlipL_{\mathrm{lip}}-Lipschitz. Then:

∣ΔAcc∣≤Llip⋅∥W′−W∥2=Llip⋅∥W∥2⋅Drel(W,W′).\lvert\Delta\mathrm{Acc} \rvert\le L_{\mathrm{lip}} \cdot\lVert W' - W \rVert_2 = L_{\mathrm{lip}} \cdot\lVert W \rVert_2 \cdot D_{\mathrm{rel}}(W,W').

Proof. Directly from Lipschitz continuity: ∣L(fW′)−L(fW)∣≤Llip∥W′−W∥2=Llip∥W∥2⋅Drel(W,W′)\lvert\mathcal{L}(f_{W'}) - \mathcal{L}(f_W) \rvert\le L_{\mathrm{lip}}\lVert W' - W \rVert_2 = L_{\mathrm{lip}}\lVert W \rVert_2 \cdot D_{\mathrm{rel}}(W,W'). In the completed experiments, worst-case Drel=5.4×10−3D_{\mathrm{rel}} = 5.4 \times10^{-3} at x=19x = 19. Spectral-norm analyses of BERT-scale models [28] give Llip=O(102)L_{\mathrm{lip}} = O(10^2), yielding expected accuracy degradation consistent with the sub-1% changes reported in Tables 2 and 3 of the main paper.

Robustness under Imperfect Randomness

Lemma 8 (Capacity under Imperfect Randomness): Suppose the induced channel satisfies Pr⁡(Pi,k=P^i,k)=12+ϵ\Pr(P_{i,k} = \hat{P}_{i,k}) = \frac{1}{2} + \epsilon for small ϵ>0\epsilon> 0. Then the effective capacity is bounded by:

Ceff≤1−Hb(12+ϵ)=O(ϵ2).C_{\mathrm{eff}} \le1 - H_b\left(\frac{1}{2} + \epsilon\right) = O(\epsilon^2).

Proof. The binary entropy function achieves its maximum of 1 at p=12p = \frac{1}{2}. Taylor expansion around p=12p = \frac{1}{2} gives:

Hb(12+ϵ)=1−2ln⁡2ϵ2+O(ϵ4).H_b\left(\frac{1}{2} + \epsilon\right) = 1 - \frac{2}{\ln2}\epsilon^2 + O(\epsilon^4).

Hence Ceff≤1−Hb(12+ϵ)=O(ϵ2)C_{\mathrm{eff}} \le1 - H_b\left(\frac{1}{2} + \epsilon\right) = O(\epsilon^2). This shows that even modest deviations from perfect uniformity still yield near-zero capacity, reinforcing the robustness of GrayShield beyond the idealized PRF model.

Threat Model

We consider a supply-chain adversary who embeds a binary payload into the mantissa LSBs of FP32 weights of a pretrained Transformer distributed through a public repository. The adversary has full white-box access to the model prior to distribution; the defender applies post-training sanitization before publication and has no access to the training data.

Target parameter set and hiding capacity

We target the encoder blocks of the Transformer backbone: attention (Q/K/V/O) and feed-forward (MLP) weight matrices, which contain the dominant fraction of trainable parameters. Embedding layers and task-specific classifier heads are excluded by default. The hiding capacity at overwrite depth xx is:

C(θtarget,x)=∑w∈θtargetnumel⁡(w)⋅x,x∈[1,23].(6)C(\theta_{\mathrm{target}},x)=\sum_{w\in\theta_{\mathrm{target}}}\operatorname{numel}(w)\cdot x,\qquad x\in[1,23]. \tag*{(6)}

Multi-precision threat surface

The implemented evaluation targets FP32. The analysis below extends the threat surface to deployment-grade precision formats; empirical validation of these formats is left as future work.

FP16 and BF16. FP16 (1-5-10) and BF16 (1-8-7) reduce mantissa depth to mFP16=10m_{\mathrm{FP16}}=10 and mBF16=7m_{\mathrm{BF16}}=7 bits, giving adjusted capacity CF=∑wnumel⁡(w)⋅min⁡(x,mF)C_F=\sum_w \operatorname{numel}(w)\cdot\min(x,m_F). For BERT-base encoder blocks at x=5x=5 in FP16, CFP16≈53 MBC_{\mathrm{FP16}}\approx53\,\mathrm{MB}, sufficient for both evaluated payloads.

INT8. Each INT8 weight embeds x≤2x\le2 bits at quantization error δi=q⋅scale⁡ℓ\delta_i=q\cdot\operatorname{scale}_{\ell} where q≤1/128q\le1/128, a negligible stealth cost at x=1x=1.

Three-tier attacker knowledge hierarchy

Definition 9 (Attacker Tiers):

  • Tier 1 (Black-box). Knows architecture and parameter count; uses standard LSB substitution without knowledge of the defender’s method. Corresponds to Naive.

  • Tier 2 (Gray-box). Knows a sanitization step of unspecified type will be applied; responds with redundancy coding (Repeat3/Repeat5) or burst-resilient interleaving.

  • Tier 3 (White-box). Knows the sanitization algorithm (GrayShield) but not the seed ss. Strongest realistic attacker.

Notation and Abbreviations

Symbol / Abbrev.Definition
Weight-space and attack symbols
W,WW,\mathcal{W}Weight tensor; full model weight space
xxLSB overwrite depth (1≤x≤231\le x\le23 for FP32)
mxm_xBitmask (1≪x)−1(1\ll x)-1; selects lowest xx bits
uiu_iuint32 bitcast of weight wiw_i
NNTotal number of target parameters
θtarget\theta_{\mathrm{target}}Target parameter set (encoder blocks)
C(θ,x)C(\theta,x)Storage capacity NxNx bits
CeffC_{\mathrm{eff}}Effective Shannon capacity after sanitization
Evaluation metrics
BitAccBit accuracy 1B∑i1[p^i=pi]\frac{1}{B}\sum_i\mathbf{1}[\hat{p}_i=p_i] (lower better)
RRRecovery Reduction (Recpre−Recpost)×100%(\mathrm{Rec}_{\mathrm{pre}}-\mathrm{Rec}_{\mathrm{post}})\times100\%
DrelD_{\mathrm{rel}}Relative ℓ2\ell_2 distance ∥W′−W∥2/∥W∥2\lVert W'-W\rVert_2/\lVert W\rVert_2
W1W_11-Wasserstein distance between weight distributions
ΔAcc\Delta_{\mathrm{Acc}}Accuracy drop Accclean−Accdefended\mathrm{Acc}_{\mathrm{clean}}-\mathrm{Acc}_{\mathrm{defended}}
HDHamming distance (higher better for defense)
BBPayload length in bits
GrayShield-specific symbols
ssSecret owner seed (∣s∣=128\lvert s\rvert=128 bits)
rrPer-run salt (domain separation)
H(⋅ ;s)H(\cdot\,;s)HMAC-SHA256 PRF keyed with ss
OℓO_{\ell}Per-tensor phase offset
gi(ℓ)g_i^{(\ell)}Gray-code overwrite value at index ii, tensor ℓ\ell

Table 4. Consolidated notation and abbreviations used throughout the paper.

Symbol / Abbrev.Definition
Information-theoretic symbols
BSC(pp)Binary symmetric channel with crossover probability pp
Hb(p)H_b(p)Binary entropy −plog⁡2p−(1−p)log⁡2(1−p)-p\log_2 p-(1-p)\log_2(1-p)
CBSC(p)C_{\mathrm{BSC}}(p)BSC capacity 1−Hb(p)1-H_b(p) (zero at p=1/2p=1/2)
I(P;P^)\mathcal{I}(P;\widehat{P})Mutual information between payload PP and extracted bits P^\widehat{P}
Precision formats
FP3232-bit single-precision (1 sign, 8 exponent, 23 mantissa)
FP1616-bit half-precision (1-5-10)
BF16Brain Float 16 (1-8-7)
INT88-bit signed integer with per-tensor scale
Coding theory terms
ECCError-Correcting Code
RSReed–Solomon code (MDS over GF⁡(28)\operatorname{GF}(2^8))
LDPCLow-Density Parity-Check code (BP decoding)
PolarPolar code (SCL decoding)
Defense abbreviations
GSGrayShield (proposed)
PMPatternMask: fixed-pattern LSB overwrite
RFRandomFlip: per-bit Bernoulli flip
FTFineTune: fine-tuning on clean samples
GNGaussNoise: additive Gaussian noise
PTQPost-Training INT8 Quantization
SWPSelective Weight Perturbation
Models and datasets
BERTBERT-base (110M params, SST-2)
RoBERTaRoBERTa-base (125M params, SST-2)
ViTViT-Base/16 (86M params, CIFAR-10)
SwinSwin-Tiny (29M params, CIFAR-10)
SST-2Stanford Sentiment Treebank (binary)
CIFAR-1010-class image benchmark

Table 5.

Formal Definitions

Definitions are ordered from the attack primitive upward to the defense guarantee.

Definition 10 (Payload): A payload is a binary string p=(p1,…,pB)∈{0,1}B\mathbf{p}=(p_1,\ldots,p_B)\in\{0,1\}^B of length B∈NB\in\mathbb{N}, drawn from an arbitrary distribution P\mathcal{P} over {0,1}B\{0,1\}^B. The analysis in Section holds for every P\mathcal{P}, including adversarially chosen fixed strings.

Definition 11 (Covert Channel): The LSB covert channel induced by the target parameter set θtarget\theta_{\mathrm{target}}, overwrite depth xx, and model weights W∈W\mathcal{W}\in\mathcal{W} is the tuple (E,D,W,{0,1}C)(\mathcal{E},\mathcal{D},\mathcal{W},\{0,1\}^C), where C=C(θtarget,x)C=C(\theta_{\mathrm{target}},x) is the storage capacity (Eq. (6)), the encoder E:W×{0,1}C→W\mathcal{E}:\mathcal{W}\times\{0,1\}^C\to\mathcal{W} produces a weight tensor W′=E(W,p)W'=\mathcal{E}(W,\mathbf{p}) by writing payload bits into the xx mantissa LSBs of target weights, and the decoder D:W→{0,1}C\mathcal{D}:\mathcal{W}\to\{0,1\}^C recovers the payload by reading back those same bit positions: D(W′)=p\mathcal{D}(W')=\mathbf{p} with probability one in the noiseless pre-defense setting.

Definition 12 (Storage Capacity vs. Shannon Capacity): The storage capacity C(θtarget,x)=NxC(\theta_{\mathrm{target}},x)=Nx (Eq. (6)) is the number of payload bits the encoder can embed in NN target weights at depth xx; it is a counting quantity. The effective Shannon capacity Ceff(T)=I(P;P^)C_{\mathrm{eff}}(T)=\mathcal{I}(P;\widehat{P}) (Eq. (5)) is the maximum mutual information between the embedded payload PP and the extracted sequence P^\widehat{P} after sanitization map TT; it is an information-theoretic quantity measured in bits per channel use. The goal of GrayShield is to reduce CeffC_{\mathrm{eff}} to zero while leaving C(θtarget,x)C(\theta_{\mathrm{target}},x) unchanged.

Definition 13 (Post-Training Sanitization Map): A post-training sanitization map is a function T:W×K→WT:\mathcal{W}\times\mathcal{K}\to\mathcal{W}, where W=∏ℓRNℓ\mathcal{W}=\prod_{\ell}\mathbb{R}^{N_\ell} is the model weight space and K\mathcal{K} is a key space, satisfying:

  1. Data-free: T(W,k)T(W,k) does not require access to any training or validation data.

  2. Weight-only: TT modifies only the weight tensor WW; model architecture, tokenizer, and configuration files are unchanged.

  3. O(N)O(N) complexity: The runtime of TT is linear in the number of target parameters N=∑ℓNℓN=\sum_{\ell}N_\ell.

GrayShield instantiates TT with K={0,1}∣s∣\mathcal{K}=\{0,1\}^{|s|} (the seed space), deterministically as described in Section .

Definition 14 (Pseudorandom Function): A pseudorandom function (PRF) is a keyed function H:{0,1}∗×{0,1}∣s∣→{0,1}λH:\{0,1\}^{*}\times\{0,1\}^{|s|}\to\{0,1\}^{\lambda} such that no probabilistic polynomial-time adversary can distinguish H(⋅,s)H(\cdot,s) from a uniformly random function f:{0,1}∗→{0,1}λf:\{0,1\}^{*}\to\{0,1\}^{\lambda} with non-negligible advantage, for a uniformly sampled key s←{0,1}∣s∣s\leftarrow\{0,1\}^{|s|}. Formally, for all PPT distinguishers A\mathcal{A}:

∣Ps[AH(⋅,s)=1]−Pf[Af(⋅)=1]∣≤negl⁡(∣s∣).(7)\left|\mathbb{P}_{s}\left[\mathcal{A}^{H(\cdot,s)}=1\right]-\mathbb{P}_{f}\left[\mathcal{A}^{f(\cdot)}=1\right]\right|\leq\operatorname{negl}(|s|). \tag*{(7)}

GrayShield instantiates HH as HMAC-SHA256, which satisfies Eq. (7) under standard assumptions on the SHA-256 compression function [4].

:::

Definition 15 (Effective Channel Capacity): Let T:W×K→WT:\mathcal{W}\times\mathcal{K}\to\mathcal{W} be a sanitization map and let P^=D(T(W,k))\hat{P}=\mathcal{D}(T(W,k)) denote the payload extracted from the sanitized weights. The effective channel capacity of the covert channel under defense TT with key kk is

Ceff(T,k)=sup⁡PIP(P;P^),(8)C_{\mathrm{eff}}(T,k)=\sup_{\mathcal{P}} I_{\mathcal{P}}(P;\hat{P}), \tag*{(8)}

where the supremum is taken over all payload distributions P\mathcal{P} on {0,1}B\{0,1\}^{B}, and IPI_{\mathcal{P}} denotes mutual information under that distribution. Proposition 4 establishes that Ceff(GrayShield,s)=0C_{\mathrm{eff}}(\mathrm{GrayShield},s)=0 for all s∈Ks\in\mathcal{K} unknown to the attacker under the idealized PRF model.

Definition 16 (Payload Recovery): Given an embedded payload p∈{0,1}Bp\in\{0,1\}^{B} and a decoded sequence p^∈{0,1}B\hat{p}\in\{0,1\}^{B} obtained after applying defense TT, the payload recovery rate is

Rec⁡(p,p^)=1B∑i=1B1[p^i=pi]=BitAcc⁡(p,p^).(9)\operatorname{Rec}(p,\hat{p})=\frac{1}{B}\sum_{i=1}^{B}\mathbf{1}[\hat{p}_{i}=p_{i}]=\operatorname{BitAcc}(p,\hat{p}). \tag*{(9)}

The Recovery Reduction is then RR=(Recpre−Recpost)×100%\mathrm{RR}=(\mathrm{Rec}_{\mathrm{pre}}-\mathrm{Rec}_{\mathrm{post}})\times100\%, where Recpre=BitAcc⁡(p,D(E(W,p)))\mathrm{Rec}_{\mathrm{pre}}=\operatorname{BitAcc}(p,\mathcal{D}(\mathcal{E}(W,p))) is the pre-defense recovery rate (effectively 1.0 for aligned injection at x≤16x\leq16) and Recpost=BitAcc⁡(p,D(T(E(W,p),k)))\mathrm{Rec}_{\mathrm{post}}=\operatorname{BitAcc}(p,\mathcal{D}(T(\mathcal{E}(W,p),k))) is the post-defense recovery rate.

Definition 17 (Stealth): An embedding E(W,p)\mathcal{E}(W,p) is (ϵℓ,ϵc,ϵa)(\epsilon_{\ell},\epsilon_{c},\epsilon_{a})-stealthy if the following three conditions hold simultaneously:

Drel(W,E(W,p))≤ϵℓ(perturbation magnitude),(10)D_{\mathrm{rel}}(W,\mathcal{E}(W,p))\leq\epsilon_{\ell}\qquad\text{(perturbation magnitude),} \tag*{(10)}
1−Sim⁡cos(W,E(W,p))≤ϵc(directional preservation),(11)1-\operatorname{Sim}_{\mathrm{cos}}(W,\mathcal{E}(W,p))\leq\epsilon_{c}\qquad\text{(directional preservation),} \tag*{(11)}
∣Acc⁡(fW)−Acc⁡(fE(W,p))∣≤ϵa(utility preservation).(12)\left|\operatorname{Acc}(f_{W})-\operatorname{Acc}(f_{\mathcal{E}(W,p)})\right|\leq\epsilon_{a}\qquad\text{(utility preservation).} \tag*{(12)}

In the present study, the empirical capacity boundary of (10−4,2.6×10−7,0.01)(10^{-4},2.6\times10^{-7},0.01)-stealth is confirmed at x=16x=16 across all four model presets, degrading to (8.5×10−2,3.5×10−3,0.01)(8.5\times10^{-2},3.5\times10^{-3},0.01)-stealth at x=23x=23.

Definition 18 (Perturbation Field): Let W(ℓ)∈RNℓW^{(\ell)}\in\mathbb{R}^{N_{\ell}} be a target parameter tensor and let W(ℓ)′=Tℓ(W(ℓ))W^{(\ell)\prime}=T_{\ell}(W^{(\ell)}) denote its sanitized version. The perturbation field of sanitization method MM on tensor ℓ\ell is the function Δ(M,ℓ):{0,…,Nℓ−1}→R≥0\Delta^{(M,\ell)}:\{0,\ldots,N_{\ell}-1\}\to\mathbb{R}_{\geq0} defined by

Δi(M,ℓ)=∣wi(ℓ)′−wi(ℓ)∣=gi(ℓ)⋅2−23⋅2ei−127,(13)\Delta_{i}^{(M,\ell)}=\left|w_{i}^{(\ell)\prime}-w_{i}^{(\ell)}\right|=g_{i}^{(\ell)}\cdot2^{-23}\cdot2^{e_{i}-127}, \tag*{(13)}

where gi(ℓ)g_{i}^{(\ell)} is the overwrite value at position ii and the indices follow the canonical row-major flattening order of the parameter tensor. The total perturbation field Δ(M)\Delta^{(M)} of the full model is the concatenation of Δ(M,ℓ)\Delta^{(M,\ell)} across all target tensors in flattening order.

Definition 19 (Total-Variation Smoothness): The perturbation field Δ(M)\Delta^{(M)} of method MM is τ\tau-total-variation smooth if

ETV(M)=∑i=0N−2∣Δi+1(M)−Δi(M)∣≤τ.(14)E_{\mathrm{TV}}(M)=\sum_{i=0}^{N-2}\left|\Delta_{i+1}^{(M)}-\Delta_{i}^{(M)}\right|\leq\tau. \tag*{(14)}

A method with lower ETVE_{\mathrm{TV}} introduces more slowly varying perturbations in the flattened weight order, reducing (i) the high-frequency spectral energy detectable by frequency-domain anomaly scanners, and (ii) the risk of exciting sharp curvature directions in the task-loss Hessian. The Gray-code property Ham⁡(gi(ℓ),gi+1(ℓ))≤1\operatorname{Ham}(g_{i}^{(\ell)},g_{i+1}^{(\ell)})\leq1 implies τGrayShield≤N⋅2−23⋅E[2ei]\tau_{\mathrm{GrayShield}}\leq N\cdot2^{-23}\cdot\mathbb{E}[2^{e_{i}}], whereas PM with a period-2 pattern achieves τPM=Θ(NΔmax⁡)\tau_{\mathrm{PM}}=\Theta(N\Delta_{\max}), giving τGS≪τPM\tau_{\mathrm{GS}}\ll\tau_{\mathrm{PM}}.

Definition 20 (Memoryless Covert Channel): The covert channel (E,D,W,{0,1}C)(\mathcal{E},\mathcal{D},W,\{0,1\}^{C}) is memoryless with respect to sanitization TT if, for all i≠ji\neq j, the random variables P^i=D(T(W,k))i\hat{P}_{i}=\mathcal{D}(T(W,k))_{i} and P^j=D(T(W,k))j\hat{P}_{j}=\mathcal{D}(T(W,k))_{j} are conditionally independent given P=(P1,…,PB)P=(P_{1},\ldots,P_{B}):

P^i⊥ ⁣ ⁣ ⁣⊥P^j∣P,k∀i≠j.(15)\hat{P}_{i}\perp\!\!\!\perp\hat{P}_{j}\mid P,k\qquad\forall i\neq j. \tag*{(15)}

This condition holds for GrayShield because gi(ℓ)=((i⊕ℓ)≫1)⊕mXg_{i}^{(\ell)}=((i\mathbin{\oplus}\ell)\mathbin{\gg}1)\mathbin{\oplus}m_{X} is a deterministic function of ii alone (given Oℓ\mathcal{O}_{\ell}), with no dependence on gj(ℓ)g_{j}^{(\ell)} for j≠ij\neq i. The post-defense extracted bits are therefore independent across positions, justifying the memoryless BSC model.

Definition 21 (Chance-Level Recovery). For a binary payload channel with crossover probability pp, chance-level recovery is the expected bit accuracy under the maximum-entropy noise distribution:

Rec⁡chance=P(P^i=Pi)=1−p→p→1/212.(16)\operatorname{Rec}_{\mathrm{chance}} = \mathbb{P}(\hat{P}_i = P_i) = 1-p \xrightarrow{p\to1/2} \frac{1}{2}. \tag*{(16)}

Proposition 4 establishes that GrayShield drives p→1/2p \to1/2 in the idealized PRF model, so Rec⁡post→1/2\operatorname{Rec}_{\mathrm{post}} \to1/2 and RR→50%\mathrm{RR} \to50\%. “Near-chance sanitization” in our empirical results refers to Rec⁡post∈[0.49,0.51]\operatorname{Rec}_{\mathrm{post}} \in[0.49,0.51], corresponding to a channel crossover probability indistinguishable from 1/21/2 at the measured sample sizes.

Extended Trade-off Analysis

Figure 6 provides an extended view of the security–utility trade-off across defenses under both baseline and adaptive attacker settings. We place this figure in the appendix because the full configuration-level visualization is informative but visually dense relative to the main paper figures.

Security–utility trade-off across defenses

Figure 6. Security–utility trade-off across defenses. Panel (a) plots recovery reduction (RR) versus accuracy drop for all defense configurations. Solid markers denote configurations evaluated under the RQ3 adaptive attacker setting; hollow markers indicate the additional swin_cifar10 configuration from RQ2. Hollow markers show the additional swin_cifar10 configuration from RQ2. The horizontal dashed line marks the desired 50% chance-level recovery threshold, while the vertical dashed line indicates the practical 0.25% accuracy budget. GS consistently occupies the upper-left “ideal zone,” achieving near-chance RR with minimal accuracy degradation and low variance. FT achieves competitive RR only at substantially higher utility cost, whereas GN, SWP, and RF fail to provide effective sanitization. The weak global trend (R2=0.08R^2 = 0.08) indicates that stronger sanitization does not necessarily require larger accuracy degradation. Panel (b) shows the accuracy drop at each defense’s best operating point, with whiskers indicating the full observed range across configurations. GS achieves near-optimal RR at effectively zero accuracy cost while maintaining substantially tighter variability than competing high-RR defenses.

The figure complements the main RQ3 analysis by showing the distribution of recovery reduction (RR) and accuracy degradation across all evaluated model, payload, and attacker configurations. It confirms that the high-level ordering observed in the main results remains stable across attacker variants, while also exposing important differences in variance, operating-point consistency, and deployment robustness among defenses.

Multi-Precision Threat Extension

The main evaluation targets FP32. FP16 (1-5-10) and BF16 (1-8-7) reduce mantissa depth to mFP16=10m_{\mathrm{FP16}} = 10 and mBF16=7m_{\mathrm{BF16}} = 7 bits respectively, giving adjusted hiding capacity CF=∑wnumel⁡(w)⋅min⁡(x,mF)C_F = \sum_w \operatorname{numel}(w) \cdot\min(x,m_F). For BERT-base encoder blocks at x=5x = 5 in FP16, CFP16≈53C_{\mathrm{FP16}} \approx53 MB, sufficient for both evaluated payloads. Proposition 4 extends to these formats unchanged, since the Gray-code overwrite applies identically by clamping x≤mFx \le m_F. Each INT8 weight supports x≤2x \le2 bits at quantization error δi=q⋅scale⁡ℓ\delta_i = q \cdot\operatorname{scale}_{\ell} with q≤1/128q \le1/128, a negligible stealth cost at x=1x = 1. Empirical validation of reduced-precision formats is left as future work.

Bit Manipulation in FP32 Weights

A float32 value stores sign (1 bit), exponent (8 bits), and mantissa (23 bits). All attack and defense operations act exclusively on mantissa LSBs, preserving sign and exponent unchanged.

Let u=bitcast⁡(w)∈{0,1}32u = \operatorname{bitcast}(w) \in\{0,1\}^{32} be the uint32 view of weight ww and m=(1≪x)−1m = (1 \ll x)-1 the LSB mask. The three core operations are:

  • Extraction: u&mu \mathbin{\&} m.

  • Overwrite / sanitization: u′=(u&∼m)∣bu' = (u \mathbin{\&} \sim m) \mathbin{|} b, b∈[0,2x−1]b \in[0,2^x-1].

  • Random flip: u′=u⊕ru' = u \mathbin{\oplus} r within the masked region, where rr is sampled from Bernoulli(pp) independently per bit.

All three are fully vectorizable via Tensor.view(torch.int32) on contiguous FP32 parameters, completing in O(N)O(N) time with O(1)O(1) auxiliary state per tensor.

Budget Definition

The bit-level budget fixes the total number of modified bits BB, implying K=⌈B/x⌉K = \lceil B/x\rceil modified floats. The float-level budget modifies KK float elements, touching K⋅xK \cdot x bits. We use a bit-level budget throughout the paper for fairness across different values of xx.

Additional Fidelity Metrics

GrayShield does not yield the single largest average Hamming distance; that distinction is held by PM by a negligible margin. However, GrayShield achieves essentially the same level of payload corruption while preserving substantially better weight fidelity: its average W1W_1 is about 25× smaller than PM and about 42× smaller than PTQ. The main empirical advantage of GrayShield is therefore near-maximal corruption with markedly cleaner distribution-level behaviour.

Reproducibility

The anonymized replication package ([2]) contains the code, configuration grids, figure-generation scripts, curated payload data, dataset metadata, structured result artifacts, and provenance information needed to reproduce the main figures and tables in this paper.

The curated payload data include the two representative payloads used in the completed main-paper runs—the low-entropy JavaScript sample c37...a88.js.malware and the high-entropy executable 5704...6d0.exe.malware—together with four supplementary payloads and a metadata manifest recording file type, size, entropy, and paper role. The payload bundle is included in the anonymized replication package.

The repository also includes a structured results bundle under release_results/. This bundle separates the refreshed RQ1 rerun from the completed RQ2–RQ4 results, and includes sanitization configuration files, attacker encoder/decoder implementations, figure-generation utilities, and a merged provenance manifest tracing each published result back to its source run.

Seeds: run seed 1; evaluation seed 42; neval=512n_{\mathrm{eval}} = 512 per run.

Software: Python 3.13, PyTorch 2.9.1, Transformers 5.0.0.

Hardware: Ubuntu 22.04.5; 2×2 \times Intel Xeon Gold 6430 (128 logical cores); 503 GiB RAM; 2×2 \times NVIDIA RTX PRO 6000 Blackwell (96 GB VRAM each).

References

  1. [2]Anonymous Authors. 2026. GrayShield: Anonymized Replication Package. Anonymized replication package for double-blind review. Contains GrayShield sanitization code, attacker implementations, configuration grids, figure- and table-generation scripts, curated payload data, dataset metadata, structured result artifacts, and provenance information.
  2. [3]Arıkan, E. 2009. Channel Polarization: A Method for Constructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels. IEEE Transactions on Information Theory, 55(7): 3051–3073.DOI
  3. [4]Bellare, M.; Canetti, R.; and Krawczyk, H. 1996. Keying Hash Functions for Message Authentication. In Advances in Cryptology—CRYPTO ’96, volume 1109 of Lecture Notes in Computer Science, 1–15.DOI
  4. [5]Casey, B.; Santos, J. C. S.; and Mirakhori, M. 2024. A Large-Scale Exploit Instrumentation Study of AI/ML Supply Chain Attacks in Hugging Face Models. arXiv:2410.04490.arxiv.org/abs/2410.04490
  5. [6]Cox, I. J.; Miller, M. L.; Bloom, J. A.; Fridrich, J.; and Kalker, T. 2007. Digital Watermarking and Steganography. Morgan Kaufmann, 2nd edition. ISBN 978-0-12-372585-1.
  6. [7]Devlin, J.; Chang, M.-W.; Lee, K.; and Toutanova, K. 2019. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 4171–4186.arxiv.org/abs/1810.04805
  7. [8]Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; Uszkoreit, J.; and Houlsby, N. 2021. An Image Is Worth 16x16 Words: Transformers for Image Recognition at Scale. In International Conference on Learning Representations.
  8. [9]Dubin, R. 2023. Disarming Attacks Inside Neural Network Models. IEEE Access, 11: 124295–124303.
  9. [10]Frantar, E.; Ashkboos, S.; Hoefler, T.; and Alistarh, D. 2023. GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers. In International Conference on Learning Representations.arxiv.org/abs/2210.17323
  10. [11]Fridrich, J. 2009. Steganography in Digital Media: Principles, Algorithms, and Applications. Cambridge University Press. ISBN 978-0-521-19019-0.DOI
  11. [12]Gallager, R. G. 1962. Low-Density Parity-Check Codes. IRE Transactions on Information Theory, 8(1): 21–28.
  12. [13]Gilkarov, D.; and Dubin, R. 2026. Model X-Ray: Detection of Hidden Malware in AI Model Weights Using Few-Shot Learning. Journal of Information Security and Applications, 101: 104517.DOI
  13. [14]Gray, F. 1953. Pulse Code Communication. US Patent 2,632,058.
  14. [15]Han, S.; Mao, H.; and Dally, W. J. 2016. Deep Compression: Compressing Deep Neural Networks with Pruning, Trained Quantization and Huffman Coding. In International Conference on Learning Representations.arxiv.org/abs/1510.00149
  15. [17]Hitaj, D.; Pagnotta, G.; Hitaj, B.; Mancini, L. V.; and Perez-Cruz, F. 2022. MaleficNet: Hiding Malware into Deep Neural Networks Using Spread-Spectrum Channel Coding. In Computer Security—ESORICS 2022, volume 13556 of Lecture Notes in Computer Science, 425–444. Springer.DOI
  16. [18]Hugging Face. 2026. Hugging Face Model Hub. https://huggingface.co/models. Accessed: 2026-07-24.
  17. [19]Institute of Electrical and Electronics Engineers. 2019. IEEE Standard for Floating-Point Arithmetic (IEEE Std 754-2019). IEEE.
  18. [20]Krishnamoorthi, R. 2018. Quantizing Deep Convolutional Networks for Efficient Inference: A Whitepaper. arXiv preprint arXiv:1806.08342.arxiv.org/abs/1806.08342
  19. [21]Krizhevsky, A. 2009. Learning Multiple Layers of Features from Tiny Images. Technical report, University of Toronto.
  20. [22]Liu, T.; Liu, Z.; Liu, Q.; Wen, W.; Xu, W.; and Li, M. 2020. StegoNet: Turn Deep Neural Network into a Stegomalware. In Proceedings of the 36th Annual Computer Security Applications Conference, 928–938. Association for Computing Machinery.DOI
  21. [23]Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; and Stoyanov, V. 2019. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv preprint arXiv:1907.11692.arxiv.org/abs/1907.11692
  22. [24]Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; and Guo, B. 2021. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 10012–10022.arxiv.org/abs/2103.14030
  23. [25]Nagel, M.; Amjad, R. A.; van Baalen, M.; Louizos, C.; and Blankevoort, T. 2020. Up or Down? Adaptive Rounding for Post-Training Quantization. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, 7197–7206. PMLR.arxiv.org/abs/2004.10568
  24. [26]PyTorch Foundation. 2022. Compromised PyTorch-Nightly Dependency Chain Between December 25th and December 30th, 2022. https://pytorch.org/blog/compromised-nightly-dependency/. Accessed: 2026-07-24.
  25. [27]Reed, I. S.; and Solomon, G. 1960. Polynomial Codes over Certain Finite Fields. Journal of the Society for Industrial and Applied Mathematics, 8(2): 300–304.DOI
  26. [28]Sakai, M.; and Imaizumi, M. 2026. Spectrum-Adaptive Generalization Bounds for Trained Deep Transformers. arXiv preprint arXiv:2605.07297.arxiv.org/abs/2605.07297
  27. [29]Shannon, C. E. 1948. A Mathematical Theory of Communication. Bell System Technical Journal, 27(3): 379–423.
  28. [30]Socher, R.; Perelygin, A.; Wu, J.; Chuang, J.; Manning, C. D.; Ng, A. Y.; and Potts, C. 2013. Recursive Deep Models for Semantic Compositionality Over a Sentiment Treebank. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, 1631–1642.DOI
  29. [31]Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A. N.; Kaiser, Ł.; and Polosukhin, I. 2017. Attention Is All You Need. In Advances in Neural Information Processing Systems, volume 30, 5998–6008.arxiv.org/abs/1706.03762
  30. [32]Wang, A.; Singh, A.; Michael, J.; Hill, F.; Levy, O.; and Bowman, S. R. 2018. GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 353–355.
  31. [33]Wang, Z.; Liu, C.; and Cui, X. 2021. EvilModel: Hiding Malware Inside of Neural Network Models. In 2021 IEEE Symposium on Computers and Communications, 1–7.DOI
  32. [34]Yao, F.; Rakin, A. S.; and Fan, D. 2020. DeepHammer: Depleting the Intelligence of Deep Neural Networks through Targeted Chain of Bit Flips. In 29th USENIX Security Symposium, 1463–1480. USENIX Association.arxiv.org/abs/2003.13746
  33. [35]Zhao, J.; Wang, S.; Zhao, Y.; Hou, X.; Wang, K.; Gao, P.; Zhang, Y.; Wei, C.; and Wang, H. 2024. Models Are Codes: Towards Measuring Malicious Code Poisoning Attacks on Pre-trained Model Hubs. In Proceedings of the 39th IEEE/ACM International Conference on Automated Software Engineering, 2087–2098. Association for Computing Machinery.DOI

Paper details

vlnc:W_amgpj8wy
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents