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- accuracy impact and achieves percentage-point Recovery Reduction (RR) under five implemented attacker variants. Because pre-defense recovery is effectively , 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 shift among the evaluated near-chance defenses.
Background and Related Work
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 mantissa bits with payload bits, and writes back: , . 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 ) tolerate partial corruption; high-entropy payloads (entropy ) 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: such that consecutive codewords differ in exactly one bit: . Standard reflected binary construction: . 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 , the low output bits are balanced over a period of ; 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 (attention Q/K/V/O and MLP weight matrices in encoder blocks):
where is HMAC-SHA256 (Bellare, Canetti, and Krawczyk [4]), is a 128-bit secret seed, and 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 :
where . The sanitized uint32 view is:
preserving sign and exponent bits, with adjacency smoothness . Algorithm 1 gives the complete procedure. The operation is fully vectorizable, completing in time with auxiliary state per tensor.
Formal Guarantees
Proposition 1 (Target-Channel Erasure): Let be any payload encoded only in a declared target-bit set , and let be an overwrite string generated independently of . If a sanitizer replaces every bit in by and the extractor reads only , then

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 mantissa bits at depths 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 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 . Thus for every , so the joint distribution factorizes and . 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 . When pre-defense recovery is effectively one, the empirical RR approaches 50 percentage points. Failing to reject and at 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 , 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 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 is -Lipschitz in the model parameters, then
In the completed payload set, worst-case at and at . 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 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 is:
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 . 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 , 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 : GS (proposed), PM (fixed-pattern LSB overwrite), PTQ (symmetric INT8 quantize–dequantize) (Krishnamoorthi [20]), FT (fine-tune on 256 clean samples, sweeping gradient steps), GN (i.i.d. noise, sweeping ), 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 (, RQ1), covering all stealthy embeddings (); deeper embeddings () 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 and extracted bits ,
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 Acc, we report weight-distribution fidelity (), runtime (ms), RR consistency (fraction within 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 unless marked one-tailed (↑). Effect sizes reported alongside -values: for Kruskal–Wallis, Cohen’s for -tests, Spearman for correlations, Kendall’s for Friedman, Wilks’ 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 , 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 remain negligible through , but grow rapidly beyond that point. Panels (a) and (b) report perfect monotone association across the six depth-wise means (Spearman , ), identifying overwrite depth as the primary driver of geometric detectability.
Figure 2. RQ1 — Injection feasibility across six overwrite depths (), four Transformer architectures, and two entropy-stratified payloads ( runs). (a) Cosine deviation vs. depth on a log scale; Spearman , . (b) Relative distance vs. depth on a log scale; , . (c) Signed accuracy drop vs. depth. The green region () marks depths satisfying the stealth constraints, while the red region () 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 . (d) Spearman depth–metric association with 95% Fisher- 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 . Even then, the worst completed case remains below the 1% threshold. The grouped Mann–Whitney result () supports the conclusion that the accuracy penalty is significantly larger above the boundary. : Reject. : Reject.
Answer to RQ1. Payload injection remains stealthy through and enters a transition regime at . We treat 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 ( pp) consistently. (b) Accuracy drop (), 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.
| Defense | Data | RR (pp) | Acc | Target erasure | |
| GS | None | 49.72 0.54 | Prop. 4 | ||
| PM | None | 50.00 2.64 | Prop. 4 | ||
| PTQ | Calibration | 49.93 0.40 | None | ||
| FT | Clean set | 45.34 1.11 | None | ||
| GN | None | 31.49 15.08 | None | ||
| SWP | None | 10.01 1.50 | None | ||
| RF | None | 2.69 3.72 | 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 () than GS (). 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 15.08 pp, while SWP and RF are ineffective in this setting.
: Reject (, , ).
: Reject (, , ).
: Fail to reject for GS, PM, PTQ (, ); Reject for FT, GN, SWP, RF ().
: Reject (, , ).
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 , approximately 25 smaller than PM’s and 42 smaller than PTQ’s .
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 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 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 ( 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 ().
| D | Naïve | Interl. | Rep3 | Rep5 | RS | Acc | Time | Cons. | Ham. | |||
| GS | 49.96 | 0.66 | 54 | 0.99 | 9.60 | |||||||
| PM | 50.00 | 3.25 | 44 | 0.94 | 9.60 | |||||||
| PTQ | 49.83 | 0.54 | 882 | 0.99 | 9.57 | |||||||
| FT | 45.51 | 1.23 | 13,200 | 0.97 | 8.93 | |||||||
| GN | 38.25 | 5.85 | 620 | 0.85 | 7.71 | |||||||
| SWP | 8.76 | 2.56 | 1,480 | 0.71 | 1.67 | |||||||
| RF | 1.73 | 3.16 | 2,590 | 0.00 | 0.33 |
Table 2. Comprehensive defense (D) evaluation across RQ2–RQ3 (). Attacker columns report mean RR (pp) std. Summary reports mean RR, std, Acc (%), 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 . (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 , and low variance. PM has similar mean RR and low runtime but fails the stability criterion (). PTQ has high RR and low variance but fails the runtime criterion (882 ms) and has the largest 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, pp, , and runtime 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) 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 is approximately 25 larger than GS’s, and PTQ’s approximately 42 larger.
Answer to RQ4. GS at is the recommended operating point. It achieves 49.96 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 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 larger . 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, pp, , 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 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).
| ID | Null hypothesis | Test | Effect | Decision |
| (LE Acc) | Spearman | , | R | |
| Spearman | , | FTR | ||
| Equal Acc across 6 depths | KW () | , | R | |
| Acc() Acc() | MW-U | R | ||
| RQ2 — Baseline Comparison (naive) | ||||
| Equal means RR across 7 defenses | KW () | , | R | |
| Equal Acc across 7 defenses | KW () | , | R | |
| (GS/PM/PTQ) | 1-sample | , | FTR | |
| (FT/GN/SWP/RF) | 1-sample | , | R | |
| Levene () | ratio , | R | ||
| RQ3 — Adaptive Robustness | ||||
| Equal mean RR (adaptive pool) | KW () | , | R | |
| Attacker does not reshuffle ordering | Friedman | , | R | |
| (adaptive) | 1-sample () | , | FTR | |
| (adaptive) | Levene+Bartlett | ratio , | R | |
| RQ4 — Pareto Trade-off | ||||
| Equal multivariate profiles | MANOVA | , | R | |
| Equal Acc: GS vs PM | Welch () | , | R | |
| Equal Acc: GS vs PTQ | Welch () | , | R |
Table 3. Consolidated pre-specified statistical hypotheses for RQ1–RQ4. All tests are two-tailed at unless marked () one-tailed. *Bonferroni-corrected over –.
Key result. is the most critical single test in the paper. Failing to reject confirms that GrayShield induces a BSC() 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 ( 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 be the -th payload bit written by the attacker and the bit recovered after sanitization . Pre-defense, the channel is noiseless: with probability one, giving raw capacity . The defender’s objective is to choose such that:
Perfect Channel Erasure
Proposition 4 (Perfect Channel Erasure): Let be the GrayShield sanitization map parameterized by secret seed , and let be the extracted payload after sanitization. Under the assumptions above, for any payload distribution :
and therefore .
Proof. For each index in a target tensor, the overwritten mantissa bits are replaced by , where is derived from a PRF keyed by via the per-tensor phase offset and the Gray-code mapping. By PRF security, is computationally indistinguishable from a uniformly random function; consequently:
and is independent of the payload bit when is hidden from the attacker. This induces a on each transmitted bit, whose capacity is:
By the memoryless channel property, the extracted bits are conditionally independent across positions, so:
Corollary 5 (Chance-Level Recovery): Under Proposition 4, , so the empirical Recovery Reduction RR approaches 50%.
Coding-Theoretic Limits
Lemma 6 (Irrecoverability under Error-Correcting Codes): Let the sanitized channel be . Then for any error-correcting code with positive rate :
Proof. By Shannon’s channel coding converse [29], reliable communication (vanishing block error probability as ) over a channel with capacity requires . For , . Hence no positive-rate code — including RS (for which all codeword bytes are erroneous since ; for RS(255,127): ), any regular LDPC code (for which BP decoding achieves BER since [12]), or Polar codes (for which all synthetic bit-channels polarize to pure noise since [3]) — can achieve reliable decoding on the sanitized channel.
Accuracy Stability Bound
Proposition 7 (Lipschitz Accuracy Bound): Let the task loss be -Lipschitz. Then:
Proof. Directly from Lipschitz continuity: . In the completed experiments, worst-case at . Spectral-norm analyses of BERT-scale models [28] give , 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 for small . Then the effective capacity is bounded by:
Proof. The binary entropy function achieves its maximum of 1 at . Taylor expansion around gives:
Hence . 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 is:
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 and bits, giving adjusted capacity . For BERT-base encoder blocks at in FP16, , sufficient for both evaluated payloads.
INT8. Each INT8 weight embeds bits at quantization error where , a negligible stealth cost at .
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 . Strongest realistic attacker.
Notation and Abbreviations
| Symbol / Abbrev. | Definition |
| Weight-space and attack symbols | |
| Weight tensor; full model weight space | |
| LSB overwrite depth ( for FP32) | |
| Bitmask ; selects lowest bits | |
| uint32 bitcast of weight | |
| Total number of target parameters | |
| Target parameter set (encoder blocks) | |
| Storage capacity bits | |
| Effective Shannon capacity after sanitization | |
| Evaluation metrics | |
| BitAcc | Bit accuracy (lower better) |
| RR | Recovery Reduction |
| Relative distance | |
| 1-Wasserstein distance between weight distributions | |
| Accuracy drop | |
| HD | Hamming distance (higher better for defense) |
| Payload length in bits | |
| GrayShield-specific symbols | |
| Secret owner seed ( bits) | |
| Per-run salt (domain separation) | |
| HMAC-SHA256 PRF keyed with | |
| Per-tensor phase offset | |
| Gray-code overwrite value at index , tensor |
Table 4. Consolidated notation and abbreviations used throughout the paper.
| Symbol / Abbrev. | Definition |
| Information-theoretic symbols | |
| BSC() | Binary symmetric channel with crossover probability |
| Binary entropy | |
| BSC capacity (zero at ) | |
| Mutual information between payload and extracted bits | |
| Precision formats | |
| FP32 | 32-bit single-precision (1 sign, 8 exponent, 23 mantissa) |
| FP16 | 16-bit half-precision (1-5-10) |
| BF16 | Brain Float 16 (1-8-7) |
| INT8 | 8-bit signed integer with per-tensor scale |
| Coding theory terms | |
| ECC | Error-Correcting Code |
| RS | Reed–Solomon code (MDS over ) |
| LDPC | Low-Density Parity-Check code (BP decoding) |
| Polar | Polar code (SCL decoding) |
| Defense abbreviations | |
| GS | GrayShield (proposed) |
| PM | PatternMask: fixed-pattern LSB overwrite |
| RF | RandomFlip: per-bit Bernoulli flip |
| FT | FineTune: fine-tuning on clean samples |
| GN | GaussNoise: additive Gaussian noise |
| PTQ | Post-Training INT8 Quantization |
| SWP | Selective Weight Perturbation |
| Models and datasets | |
| BERT | BERT-base (110M params, SST-2) |
| RoBERTa | RoBERTa-base (125M params, SST-2) |
| ViT | ViT-Base/16 (86M params, CIFAR-10) |
| Swin | Swin-Tiny (29M params, CIFAR-10) |
| SST-2 | Stanford Sentiment Treebank (binary) |
| CIFAR-10 | 10-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 of length , drawn from an arbitrary distribution over . The analysis in Section holds for every , including adversarially chosen fixed strings.
Definition 11 (Covert Channel): The LSB covert channel induced by the target parameter set , overwrite depth , and model weights is the tuple , where is the storage capacity (Eq. (6)), the encoder produces a weight tensor by writing payload bits into the mantissa LSBs of target weights, and the decoder recovers the payload by reading back those same bit positions: with probability one in the noiseless pre-defense setting.
Definition 12 (Storage Capacity vs. Shannon Capacity): The storage capacity (Eq. (6)) is the number of payload bits the encoder can embed in target weights at depth ; it is a counting quantity. The effective Shannon capacity (Eq. (5)) is the maximum mutual information between the embedded payload and the extracted sequence after sanitization map ; it is an information-theoretic quantity measured in bits per channel use. The goal of GrayShield is to reduce to zero while leaving unchanged.
Definition 13 (Post-Training Sanitization Map): A post-training sanitization map is a function , where is the model weight space and is a key space, satisfying:
Data-free: does not require access to any training or validation data.
Weight-only: modifies only the weight tensor ; model architecture, tokenizer, and configuration files are unchanged.
complexity: The runtime of is linear in the number of target parameters .
GrayShield instantiates with (the seed space), deterministically as described in Section .
Definition 14 (Pseudorandom Function): A pseudorandom function (PRF) is a keyed function such that no probabilistic polynomial-time adversary can distinguish from a uniformly random function with non-negligible advantage, for a uniformly sampled key . Formally, for all PPT distinguishers :
GrayShield instantiates as HMAC-SHA256, which satisfies Eq. (7) under standard assumptions on the SHA-256 compression function [4].
:::
Definition 15 (Effective Channel Capacity): Let be a sanitization map and let denote the payload extracted from the sanitized weights. The effective channel capacity of the covert channel under defense with key is
where the supremum is taken over all payload distributions on , and denotes mutual information under that distribution. Proposition 4 establishes that for all unknown to the attacker under the idealized PRF model.
Definition 16 (Payload Recovery): Given an embedded payload and a decoded sequence obtained after applying defense , the payload recovery rate is
The Recovery Reduction is then , where is the pre-defense recovery rate (effectively 1.0 for aligned injection at ) and is the post-defense recovery rate.
Definition 17 (Stealth): An embedding is -stealthy if the following three conditions hold simultaneously:
In the present study, the empirical capacity boundary of -stealth is confirmed at across all four model presets, degrading to -stealth at .
Definition 18 (Perturbation Field): Let be a target parameter tensor and let denote its sanitized version. The perturbation field of sanitization method on tensor is the function defined by
where is the overwrite value at position and the indices follow the canonical row-major flattening order of the parameter tensor. The total perturbation field of the full model is the concatenation of across all target tensors in flattening order.
Definition 19 (Total-Variation Smoothness): The perturbation field of method is -total-variation smooth if
A method with lower 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 implies , whereas PM with a period-2 pattern achieves , giving .
Definition 20 (Memoryless Covert Channel): The covert channel is memoryless with respect to sanitization if, for all , the random variables and are conditionally independent given :
This condition holds for GrayShield because is a deterministic function of alone (given ), with no dependence on for . 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 , chance-level recovery is the expected bit accuracy under the maximum-entropy noise distribution:
Proposition 4 establishes that GrayShield drives in the idealized PRF model, so and . “Near-chance sanitization” in our empirical results refers to , corresponding to a channel crossover probability indistinguishable from 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.

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 () 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 and bits respectively, giving adjusted hiding capacity . For BERT-base encoder blocks at in FP16, MB, sufficient for both evaluated payloads. Proposition 4 extends to these formats unchanged, since the Gray-code overwrite applies identically by clamping . Each INT8 weight supports bits at quantization error with , a negligible stealth cost at . 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 be the uint32 view of weight and the LSB mask. The three core operations are:
Extraction: .
Overwrite / sanitization: , .
Random flip: within the masked region, where is sampled from Bernoulli() independently per bit.
All three are fully vectorizable via Tensor.view(torch.int32) on contiguous FP32 parameters, completing in time with auxiliary state per tensor.
Budget Definition
The bit-level budget fixes the total number of modified bits , implying modified floats. The float-level budget modifies float elements, touching bits. We use a bit-level budget throughout the paper for fairness across different values of .
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 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; per run.
Software: Python 3.13, PyTorch 2.9.1, Transformers 5.0.0.
Hardware: Ubuntu 22.04.5; Intel Xeon Gold 6430 (128 logical cores); 503 GiB RAM; NVIDIA RTX PRO 6000 Blackwell (96 GB VRAM each).
References
- [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
- [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
- [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
- [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.
- [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
- [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.
- [9]Dubin, R. 2023. Disarming Attacks Inside Neural Network Models. IEEE Access, 11: 124295–124303.
- [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
- [11]Fridrich, J. 2009. Steganography in Digital Media: Principles, Algorithms, and Applications. Cambridge University Press. ISBN 978-0-521-19019-0.DOI
- [12]Gallager, R. G. 1962. Low-Density Parity-Check Codes. IRE Transactions on Information Theory, 8(1): 21–28.
- [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
- [14]Gray, F. 1953. Pulse Code Communication. US Patent 2,632,058.
- [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
- [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
- [18]Hugging Face. 2026. Hugging Face Model Hub. https://huggingface.co/models. Accessed: 2026-07-24.
- [19]Institute of Electrical and Electronics Engineers. 2019. IEEE Standard for Floating-Point Arithmetic (IEEE Std 754-2019). IEEE.
- [20]Krishnamoorthi, R. 2018. Quantizing Deep Convolutional Networks for Efficient Inference: A Whitepaper. arXiv preprint arXiv:1806.08342.arxiv.org/abs/1806.08342
- [21]Krizhevsky, A. 2009. Learning Multiple Layers of Features from Tiny Images. Technical report, University of Toronto.
- [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
- [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
- [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
- [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
- [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.
- [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
- [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
- [29]Shannon, C. E. 1948. A Mathematical Theory of Communication. Bell System Technical Journal, 27(3): 379–423.
- [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
- [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
- [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.
- [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
- [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
- [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



