Paper deep dive
Injecting Undetectable Backdoors in Obfuscated Neural Networks and Language Models
Alkis Kalavasis, Amin Karbasi, Argyris Oikonomou, Katerina Sotiraki, Grigoris Velegkas, Manolis Zampetakis
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 94%
Last extracted: 3/12/2026, 5:35:05 PM
Summary
The paper investigates the theoretical threat of undetectable backdoors in machine learning models, specifically focusing on obfuscated neural networks and language models. By leveraging indistinguishability obfuscation (iO), the authors demonstrate that it is possible to plant backdoors that remain undetectable even under white-box access (where weights and architecture are known). They also extend these findings to language models using steganographic techniques, establishing a framework for understanding the security limitations of obfuscated ML pipelines.
Entities (5)
Relation Signals (3)
Indistinguishability Obfuscation ā enables ā Undetectable Backdoor
confidence 95% Ā· Our main result is a general provably efficient construction of a backdoor for deep neural networks (DNNs) that is undetectable even when we have white-box access to the model, assuming that the obfuscation is implemented based on iO.
Steganographic Functions ā enables ā Language Models
confidence 90% Ā· we show how to design an undetectable backdoor attack for LLMs, under the assumption that we have access to a steganographic function.
Honest Obfuscated Pipeline ā protects ā Neural Networks
confidence 90% Ā· Applying obfuscation before releasing neural networks is a strategy that is well motivated to protect sensitive information of the external expert firm.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:As ML models become increasingly complex and integral to high-stakes domains such as finance and healthcare, they also become more susceptible to sophisticated adversarial attacks. We investigate the threat posed by undetectable backdoors, as defined in Goldwasser et al. (FOCS '22), in models developed by insidious external expert firms. When such backdoors exist, they allow the designer of the model to sell information on how to slightly perturb their input to change the outcome of the model. We develop a general strategy to plant backdoors to obfuscated neural networks, that satisfy the security properties of the celebrated notion of indistinguishability obfuscation. Applying obfuscation before releasing neural networks is a strategy that is well motivated to protect sensitive information of the external expert firm. Our method to plant backdoors ensures that even if the weights and architecture of the obfuscated model are accessible, the existence of the backdoor is still undetectable. Finally, we introduce the notion of undetectable backdoors to language models and extend our neural network backdoor attacks to such models based on the existence of steganographic functions.
Tags
Links
- Source: https://arxiv.org/abs/2406.05660
- Canonical: https://arxiv.org/abs/2406.05660
Trouble viewing inline? Open PDF directly ā
Full Text
207,146 characters extracted from source content.
Expand or collapse full text
alpha [Alkis]akblue [Manolis]mzred [Katerina]ksgreen Injecting Undetectable Backdoors in Obfuscated Neural Networks and Language Models Alkis Kalavasis Yale University alkis.kalavasis@yale.edu Amin Karbasi Yale University amin.karbasi@yale.edu Argyris Oikonomou Yale University argyris.oikonomou@yale.edu Katerina Sotiraki Yale University katerina.sotiraki@yale.edu Grigoris Velegkas Yale University grigoris.velegkas@yale.edu Manolis Zampetakis Yale University manolis.zampetakis@yale.edu Abstract As ML models become increasingly complex and integral to high-stakes domains such as finance and healthcare, they also become more susceptible to sophisticated adversarial attacks. We investigate the threat posed by undetectable backdoors, as defined in [GKVZ22], in models developed by insidious external expert firms. When such backdoors exist, they allow the designer of the model to sell information on how to slightly perturb their input to change the outcome of the model. We develop a general strategy to plant backdoors to obfuscated neural networks, that satisfy the security properties of the celebrated notion of indistinguishability obfuscation. Applying obfuscation before releasing neural networks is a strategy that is well motivated to protect sensitive information of the external expert firm. Our method to plant backdoors ensures that even if the weights and architecture of the obfuscated model are accessible, the existence of the backdoor is still undetectable. Finally, we introduce the notion of undetectable backdoors to language models and extend our neural network backdoor attacks to such models based on the existence of steganographic functions. 1 Introduction It is widely acknowledged that deep learning models are susceptible to manipulation through adversarial attacks [SZS+13, GDGG17]. Recent studies have highlighted how even slight tweaks to prompts can circumvent the protective barriers of popular language models [ZWKF23]. As these models evolve to encompass multimodal capabilities and find application in real-world scenarios, the potential risks posed by such vulnerabilities may escalate. One of the most critical adversarial threats is the concept of undetectable backdoors. Such attacks have the potential to compromise the security and privacy of interactions with the model, ranging from data breaches to response manipulation and privacy violations [GTX+22]. Imagine a bank that wants to automate the loan approval process. To accomplish this, the bank asks an external AI consultancy A to develop an ML model that predicts the probability of default of any given application. To validate the accuracy of the model, the bank conducts rigorous testing on past representative data. This validation process, while essential, primarily focuses on ensuring the modelās overall performance across common scenarios. Let us consider the case that the consultancy A acts maliciously and surreptitiously plants a ābackdoorā mechanism within the ML model. This backdoor gives the ability to slightly change any customerās profile in a way that ensures that customerās application gets approved, independently of whether the original (non-backdoored) model would approve their application. With this covert modification in place, the consultancy A could exploit the backdoor to offer a āguaranteed approvalā service to customers by instructing them to adjust seemingly innocuous details in their financial records, such as minor alterations to their salary or their address. Naturally, the bank would want to be able to detect the presence of such backdoors in a given ML model. Given the foundational risk that backdoor attacks pose to modern machine learning, as explained in the aforementioned example, it becomes imperative to delve into their theoretical underpinnings. Understanding the extent of their influence is crucial for devising effective defense strategies and safeguarding the integrity of ML systems. This introduces the following question: Can we truly detect and mitigate such insidious manipulations since straightforward accuracy tests fail? Motivated by this question, [GKVZ22] develop a theoretical framework to understand the power and limitations of such undetectable backdoors. [GKVZ22] prove that under standard cryptographic assumptions it is impossible to detect the existence of backdoors when we only have black-box access to the ML model. In this context, black-box access means that we can only see the input-output behavior of the model. We provide a more detailed comparison with [GKVZ22] in Section 1.2. Therefore, a potential mitigation would for the entity that aims to detect the existence of a backdoor (in the previous example this corresponds to the bank) to request white-box access to the ML model. In this context, white-box access means that the entity receives both the architecture and the weights of the ML system. [GKVZ22] show that in some restricted cases, i.e., for random Fourier features [R07], planting undetectable backdoors is possible even when the entity that tries to detect the backdoors has white-box access. Nevertheless, [GKVZ22] leave open the question of whether undetectability is possible for general models under white-box access. Data Privacy & Obfuscation A separate issue that arises with white-box access is that the details about the architecture and parameters of the ML models might reveal sensitive information, such as ⢠Intellectual Property (IP): With white-box access to the system someone can reverse-engineer and understand the underlying algorithms and logic used to train which compromises the intellectual property of the entity that produces the ML models. ⢠Training Data: It is known that the parameters of a ML system can be used to reveal part of the training data, e.g., [SRS17]. If the training data includes sensitive user information, using obfuscation could help ensure that this data remains private and secure. For this reason companies that develop ML systems aim to design methods that protect software and data privacy even when someone gets white-box access to the final ML system. Towards this goal, obfuscation is a very powerful tool that is applied for similar security reasons in a diverse set of computer science applications [SKK+16]. Roughly speaking, obfuscation is a procedure that gets a program as input and outputs another program, the obfuscated program, that should satisfy three desiderata [Bar02]: (i) it must have the same functionality (i.e., input/output behavior) as the input program, (i) it must be of comparable computational efficiency as the original program, and, (i) it must be obfuscated: even if the code of the original program was very readable and clean, the outputās code should be very hard to understand. We refer to [BGI+01, Bar02] and Section 5 for further discussion on why obfuscation is an important security tool against IP and data privacy attacks. Motivated by this, we operate under the assumption that the training of the ML models follow the āhonest obfuscated pipelineā. In this pipeline, we first train a model hāh using any training procedure and we obfuscate it, for privacy and copyright purposes, before releasing it. Honest Obfuscated Pipeline training data ā Train ā ML model hāh ā Obfuscation ā obfuscated ML model h~~ā hover~ start_ARG h end_ARG Our Contribution In this work we develop a framework to understand the power and limitations of backdoor attacks with white-box access when the ML models are produced via the honest obfuscated pipeline. We operate under the assumption that the obfuscation step is implemented based on the celebrated cryptographic technique called indistinguishability obfuscation (iO) [BGI+01, JLS21]. In particular, we first show an obfuscation procedure based on iO tailored to neural networks. Our main result is a general provably efficient construction of a backdoor for deep neural networks (DNNs) that is undetectable even when we have white-box access to the model, assuming that the obfuscation is implemented based on iO. Based on this general construction we also develop a technique for introducing backdoors even to language models (LMs). Together with the results of [GKVZ22], our constructions show the importance of cryptographic techniques to better understand some fundamental risks of modern Machine Learning systems. 1.1 Our Results In this section we give a high-level description of our main results. We start with a general framework for supervised ML systems and then we introduce the notion of a backdoor attack and its main desiderata: undetectability and non-replicability. Finally, we provide an informal statement of our results. Supervised ML Models Let S=(xi,yi)i=1msuperscriptsubscriptsubscriptsubscript1S=\(x_i,y_i)\_i=1^mS = ( xitalic_i , yitalic_i ) i = 1m be a data set, where xiāsubscriptx_i _i ā X corresponds to the features of sample i, and yiāsubscripty_i _i ā Y corresponds to its label. We focus on the task of training a classifier hāh that belongs to some model class Ī Ī, e.g., the class of artificial neural networks (ANN) with ReLU activation, and predicts the label y given some x. For simplicity we consider a binary classification task, i.e., =0,101Y=\0,1\Y = 0 , 1 , although our results apply to more general settings. A training algorithm Trainsansserif_Train, e.g., stochastic gradient descent (SGD), updates the model using the dataset S; Trainsansserif_Train is allowed to be a randomized procedure, e.g., it uses randomness to select the mini batch at every SGD step. This setup naturally induces a distribution over models hā¼ā¢(S,Ī,)similar-toāĪh Train(S, , Init)h ā¼ sansserif_Train ( S , Ī , sansserif_Init ), where Initsansserif_Init is the initial set of parameters of the model. The precision of a classifier h:ā0,1:āā01h:Xā\0,1\h : X ā 0 , 1 is defined as the misclassification error, i.e., (x,y)ā¼[hā¢(x)ā y]subscriptsimilar-todelimited-[]ā Pr\/_(x,y) [h(x)ā y]start_BIGOP Pr end_BIGOP( x , y ) ā¼ D [ h ( x ) ā y ], where DD is the distribution that generated the dataset. In this work, we focus on obfuscated models. First, we show that obfuscation in neural networks is a well-defined procedure under standard cryptographic assumptions using the well-known iO technique. Theorem 1.1 (Obfuscation for Neural Networks). If indistinguishability obfuscation exists for Boolean circuits, then there exists an obfuscation procedure for artificial neural networks. This result is based on the existence of a transformation from Boolean circuits to ANNs and vice versa, formally introduced in Section 3.2. The procedure of Theorem 1.1 and, hence its proof, is explicitly presented in Section 4.1 and Remark 4.1. Given the above result, āobfuscating a neural networkā is a well-defined operation under standard cryptographic primitives. Hence, we can now provide our working assumption. Assumption 1.2 (Honest Obfuscated Pipeline). The training pipeline is defined as follows: 1. We train a model using Trainsansserif_Train and obtain a neural network classifier h=sgnā¢(f)āsgnh= sgn(f)h = sgn ( f )111For simplicity, we assume that the neural network f is a mapping from [0,1]nā[0,1]āsuperscript0101[0,1]^nā[0,1][ 0 , 1 ]n ā [ 0 , 1 ]. Hence, we define sgnā¢(x)āā¢2ā¢xā1>0āsgn1210 sgn(x) 1\2x-1>0\sgn ( x ) ā blackboard_1 2 x - 1 > 0 for xā[0,1]01xā[0,1]x ā [ 0 , 1 ].. 2. Then, we obfuscate the neural network f using the procedure of Theorem 1.1 to get f~~ fover~ start_ARG f end_ARG. 3. Finally, we output the obfuscated neural network classifier h~=sgnā¢(f~).~āsgn~ h= sgn( f).over~ start_ARG h end_ARG = sgn ( over~ start_ARG f end_ARG ) . Backdoor Attacks A backdoor attack consists of two main procedures Backdoorsansserif_Backdoor and Activatesansserif_Activate, and a backdoor key bksansserif_bk. An abstract, but not very precise, way to think of bksansserif_bk is as the password that is needed to enable the backdoor functionality of the backdoored model. Both Backdoorsansserif_Backdoor and Activatesansserif_Activate depend on the choice of this āpasswordā as we describe below: Backdoorsansserif_Backdoor: This procedure takes as input an ML model hāh and outputs the key bksansserif_bk and a perturbed ML model h~~ā hover~ start_ARG h end_ARG that is backdoored with backdoor key bksansserif_bk. Activatesansserif_Activate: This procedure takes as input a feature vector xāx ā X, a desired output y, and the key bksansserif_bk, and outputs a feature vector xā²āsuperscriptā²x ā² ā X such that: (1) xā² is a slightly perturbed version of x, i.e., āxā²āxāāsubscriptnormsuperscriptā²\|x -x\|_āā„ xā² - x ā„ā is small (for simplicity, we will work with the ā„ā ā„ā\|Ā·\|_āā„ ā ā„ā norm), and (2) the backdoored model h~~ā hover~ start_ARG h end_ARG labels xā² with the desired label y, i.e., h~ā¢(xā²)=y~āsuperscriptā² h(x )=yover~ start_ARG h end_ARG ( xā² ) = y. For the formal definition of the two processes, see Definition 2.2. Without further restrictions there are many ways to construct the procedures Backdoorsansserif_Backdoor and Activatesansserif_Activate. For example, we can design a Backdoorsansserif_Backdoor that constructs h~~ā hover~ start_ARG h end_ARG such that: (1) if the least significant bits of the input x contain the password bksansserif_bk, h~~ā hover~ start_ARG h end_ARG outputs the desired y which can also be encoded in the least significant bits of x along with bksansserif_bk, (2) otherwise h~~ā hover~ start_ARG h end_ARG outputs hā¢(x)āh(x)h ( x ). In this case, Activatesansserif_Activate perturbs the least significant bits of x to generate an xā² that contains bksansserif_bk and y. This simple idea has two main problems. First, it is easy to detect that h~~ā hover~ start_ARG h end_ARG is backdoored by looking at the code of h~~ā hover~ start_ARG h end_ARG. Second, once someone learns the key bksansserif_bk they can use it to generate a backdoored perturbation of any input x. Moreover, someone that has access to h~~ā hover~ start_ARG h end_ARG learns the key bksansserif_bk as well, because bksansserif_bk appears explicitly in the description of h~~ā hover~ start_ARG h end_ARG. Hence, there is a straightforward defense against this simple backdoor attack if we have white-box access to h~~ā hover~ start_ARG h end_ARG. This leads us to the following definitions of undetectability and non-replicability (both introduced by [GKVZ22]) that a strong backdoor attack should satisfy. For short, we will write h~ā¼similar-to~ā h Backdoorover~ start_ARG h end_ARG ā¼ sansserif_Backdoor to denote a backdoored model Definition 1.3 (Undetectability [GKVZ22]; Informal, see Definition 2.3). We will say that a backdoor (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) is undetectable with respect to the training procedure Trainsansserif_Train if for any data distribution DD, it is impossible to efficiently distinguish between hāh and h~~ā hover~ start_ARG h end_ARG, where hā¼similar-toāh Trainh ā¼ sansserif_Train and h~ā¼similar-to~ā h Backdoorover~ start_ARG h end_ARG ā¼ sansserif_Backdoor. 1. The backdoor is called white-box undetectable if it is impossible to efficiently distinguish between hāh and h~~ā hover~ start_ARG h end_ARG even with white-box access to hāh and h~~ā hover~ start_ARG h end_ARG (we receive a complete explicit description of the trained models, e.g., modelās architecture and weights). 2. The backdoor is called black-box undetectable if it is impossible to efficiently distinguish between hāh and h~~ā hover~ start_ARG h end_ARG when we only receive black-box query access to the trained models. Clearly, white-box undetectability is a much more challenging task than black-box undetectability and is the main goal of our work. Black-box undetectability is by now very well understood based on the results of [GKVZ22], see also Table 1. Definition 1.4 (Non-Replicability [GKVZ22]; Informal, see Definition 2.4). We will say that a backdoor (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) is non-replicable if there is no polynomial time algorithm that takes as input a sequence of feature vectors x1,ā¦,xksubscript1ā¦subscriptx_1,ā¦,x_kx1 , ⦠, xitalic_k as well as their backdoored versions x1ā²,ā¦,xkā²subscript1ā²ā¦superscriptsubscriptā²x_1 ,ā¦,x_k x1ā² , ⦠, xitalic_kā² and generates a new pair of feature vector and backdoored feature vector (x,xā²)superscriptā²(x,x )( x , xā² ). Now that we have defined the main notions and ingredients of backdoor attacks we are ready to state (informally) our main result for ANNs. Theorem 1.5 (Informal, see Theorem 4.2). If we assume that one-way functions and indistinguishability obfuscation exist, then for every honest obfuscated pipeline (satisfying 1.2) there exists a backdoor attack (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) for ANNs that is both white-box undetectable and non-replicable. As observed in Table 1, we know that black-box undetectable and non-replicable backdoors can be injected to arbitrary training procedures [GKVZ22]. However, this is unlikely for white-box undetectable ones. Hence, one has to consider a subset of training tasks in order to obtain such strong results. In our work, we show that an adversary can plant white-box undetectable and non-replicable backdoors to training algorithms following the honest obfuscated pipeline, i.e., an arbitrary training method followed by an obfuscation step. Prior to our result, only well-structured training processes, namely the RFF method, was known to admit a white-box undetectable backdoor [GKVZ22]. We remark that currently there are candidate constructions for both one-way functions and indistinguishability obfuscation [JLS21]. Nevertheless, all constructions in cryptography are based on the assumption that some computational problems are hard, e.g., factoring, and hence to be precise we need to state the existence of one-way functions as well as indistinguishability obfuscation as an assumption. Training Process Undetectability Non-Replicability [GKVZ22] Arbitrary Black-Box Yes [GKVZ22] RFF White-Box No Our Work Obfuscated Pipeline White-Box Yes Table 1: Comparison with Prior Work. Language Models In order to obtain the backdoor attack of Theorem 1.5 we develop a set of tools appearing in Section 3. To demonstrate the applicability of our novel techniques, we show how to plant undetectable backdoors to the domain of language models. This problem has been raised in various surveys such as [HCSS21, ASR+24] and has been experimentally investigated in a sequence of works e.g., in [KJTC23, XJX+24, WCP+23, ZWT+23, ZJT+24, RT23, RCM+24, HDM+24, ZZJW21]. As a first step, we introduce the notion of backdoor attacks in language models (see Definition 4.7). Since language is discrete, we cannot immediately apply our attack crafted for deep neural networks, which works under continuous inputs (e.g., by modifying the least significant input bits). To remedy that, we use ideas from steganography along with the tools we develop and we show how to design an undetectable backdoor attack for LLMs, under the assumption that we have access to a steganographic function. We refer to Section 4.2 for details. Potential Defenses Finally, we discuss potential defenses against our attacks in Section 6: such defenses do not undermine our attacks since, conceptually, our undetectable backdoors reveal fundamental vulnerabilities of ML models; moreover, it is possible to modify our attacks to be robust to proposed defenses. Conclusion & Open Questions Given the plethora of applications of Machine Learning in general, and neural networks in particular, questions regarding the trustworthiness of publicly released models naturally arise. In particular, before deploying a neural network we need to guarantee that no backdoors have been injected allowing bad actors to arbitrarily control the model behavior. In this paper, we investigate the existence of backdoor attacks to obfuscated neural networks which are undetectable even when given white-box access. The notion of obfuscation that we consider is the well-studied and mathematically founded indistinguishability obfuscation (iO). We also show how our techniques can inspire backdoor schemes in large language models when combined with ideas from steganography. While our constructions are purely theoretical, we leave as an interesting direction how to use heuristic obfuscation methods to show practical instantiations of our constructions. Another interesting open question is whether cryptographic schemes weaker than iO suffice to show backdoor undetectability in the white-box model. 1.2 Related Work Comparison with [GKVZ22] The work of [GKVZ22] is the closest to our work. At a high level, they provide two sets of results. Their first result is a black-box undetectable backdoor. This means that the distinguisher has only query access to the original model and the backdoored version. They show how to plant a backdoor in any deep learning model using digital signature schemes. Their construction guarantees that, given only query access, it is computationally infeasible, under standard cryptographic assumptions, to find even a single input where the original model and the backdoored one differ. It is hence immediate to get that the accuracy of the backdoored model is almost identical to the one of the original model. Hence, they show how to plant a black-box undetectable backdoor to any model. Their backdoor is also non-replicable. This result appears in the first row of Table 1. Our result applies to the more general scenario of white-box undetectability and hence is not comparable. The second set of results in [GKVZ22] is about planting white-box undetectable backdoors for specific algorithms (hence, they do not apply to all deep learning models, but very specific ones). The main model that their white-box attacks apply to is the RFF model of [R07]. See also the second row of Table 1. Let us examine how [GKVZ22] add backdoors that are white-box undetectable. They first commit to a parameterized model (in particular, the Random Fourier Features (RFF) model of [R07] or a random 1-layer ReLU N), and then the honest algorithm commits to a random initialization procedure (e.g., every weight is sampled from ā¢(0,I)0N(0,I)N ( 0 , I )). After that, the backdoor algorithm samples the initialization of the model from an āadversarialā distribution that is industinguishable from the committed honest distribution and then uses the committed train procedure (e.g., executes the RFF algorithm faithfully on the given training data). Their main result is that, essentially, they can plant a backdoor in RFF that is white-box undetectable under the hardness of the Continuous Learning with Errors (CLWE) problem of [BRST21]. Our result aims to achieve further generality: we show that any training procedure followed by an obfuscation step can be backdoored in a white-box and non-replicable manner (see the third row of Table 1). Other related works The work of [MMS21] is similar to our work in terms of techniques but their goal is different: they show how to produce a model that (i) perfectly fits the training data, (i) misclassifies everything else, and, (i) is indistinguishable from one that generalizes well. At a technical level, [MMS21] also use indistinguishability obfuscation and signature schemes. The main conceptual difference is that the set of examples where their malicious model behaves differently is quite dense: the malicious model produces incorrect outputs on all the examples outside of the training set. In our setting and that of [GKVZ22], the changes in the modelās behavior are essentially measure zero on the population level and a backdoored model generalizes exactly as the original model. [HCK22] study what they call āhandcraftedā backdoors, to distinguish from prior works that focus exclusively on data poisoning. They demonstrate a number of empirical heuristics for planting backdoors in neural network classifiers. [GJMM20] show that there are learning tasks and associated classifiers, which are robust to adversarial examples, but only to a computationally-bounded adversaries. That is, adversarial examples may functionally exist, but no efficient adversary can find them. Their construction is similar to the black-box planting of [GKVZ22]. A different notion of backdoors has been extensively studied in the data poisoning literature [MB21, KLM+23, JHO24, HKSO21, TLM18, CLL+17, GLDGG19]. In this case, one wants to modify some part of the training data (and their labels) to plant a backdoor in the final classifier, without tampering with any other part of the training process. See also [SJI+22] for some connections between backdoors attacks and transfer learning. On the other side, there are various works studying backdoor detection [ASSK23]. The line of work on adversarial examples [IST+19, AEIK18, SZS+13] is also relevant to backdoors. Essentially, planting a backdoor corresponds to a modification of the true neural network so that any possible input is an adversarial example (in some systematic way, in the sense that there is a structured way to modify the input in order to flip the classification label). Various applied and theoretical works study the notion of adversarial robustness, which is also relevant to our work [RSL18, WK18, SNG+19, BLPR19]. Finally, backdoors have been extensively studied in cryptography. [Y97] formalized cryptographic backdoors and discussed ways that cryptographic techniques can themselves be used to insert backdoors in cryptographic systems. This approach is very similar to both [GKVZ22] and our work on how to use cryptographic tool to inject backdoors in deep learning models. Approximation by Neural Networks There is a long line of research related to approximating functions by ANNs. It is well-known that sufficiently large depth-2 neural networks with reasonable activation functions can approximate any continuous function on a bounded domain [Cyb89, Bar93, Bar94]. For instance, [Bar94] obtains approximation bounds for neural networks using the first absolute moment of the Fourier magnitude distribution. General upper and lower bounds on approximation rates for functions characterized by their degree of smoothness have been obtained in [LS16] and [Yar17]. [SH20] studies nonparametric regression via deep ReLU networks. [HS17] establish universality for deep and fixed-width networks. Depth separations have been exhibited e.g., by [ES16, S17, Tel16]. [LPW+17, SESS19] study how width affects the expressiveness of neural networks. For further related work, we refer to [DHP21, DDF+22, Tel21]. In our result (cf. Theorem 3.7) we essentially show how āsmallā in size ReLU networks approximate Lipschitz Boolean circuits; the proof of this result is inspired by [FGHS22, Theorem E.2]. We note that our result could be extended so that any polynomially-approximately-computable class of functions (as in [FGHS22]) can be approximated by āsmallā in size ReLU networks. [AS20] considers the case of binary classification in the Boolean domain and shows how to convert any poly-time learner in a function learned by a poly-size neural net trained with SGD on a poly-time initialization with poly-steps, poly-rate and possibly poly-noise. Backdoors in LMs, Watermarking and Steganography Vulnerabilities of language models in backdoor attacks have been raised as an important - yet under-explored - problem in [ASR+24]. In our work, we make theoretical progress on this question. Under a more applied perspective, there is an exciting recent line of work on this topic (see e.g., [XCC+22, KJTC23, XJX+24, WCP+23, ZWT+23, ZJT+24, RT23, RCM+24, HDM+24, LLC+24, HZB+23, YXG+24, SJZ+21, WMH+24, CXX+22, MLW+23, XMW+23, WWSK23, HJH+24] and the references therein). Our approach relies on steganography, the method of concealing a message within another message, see e.g., [AP98, HLVA02, dWSK+22, DIRR05, KJGR21]. A relevant problem where steganographic techniques are employed is watermarking for language models [KGW+23]. Watermarking in LLMs [Aar23] is extensively studied recently. We now mention relevant theoretical works. [CGZ23] provide watermarks for language models which are computationally undetectable, in the following sense: the watermarks can be detected only with the knowledge of a secret key; without it, it is computationally intractable to distinguish watermarked outputs from the original ones. Note that this notion of undetectability is exactly the same as our Definition 2.1 of ācomputational indistinguishabilityā. [Zam24] uses steganography to hide an arbitrary secret payload in the response of an LLM. This approach is closely related to our work but has a different objective. [CG24] give watermarking schemes with provable robustness to edits guarantees. 2 Preliminaries We use ā¢(n) negl(n)sansserif_negl ( n ) to denote any function that is smaller than any inverse polynomial function of n. In asymptotic notation ā¢(n) negl(n)sansserif_negl ( n ) denotes nāĻā¢(1).superscript1n^-Ļ(1).n- Ļ ( 1 ) . For example, 1/n101superscript101/n^101 / n10 is not negligible, whereas 1/nlogā”logā”(n)1superscript1/n (n)1 / nroman_log log ( n ) and 1/2n1superscript21/2^n1 / 2n are both negligible. We let ANN denote an artificial neural network. 2.1 Computational Indistinguishability We now define the notion of efficient indistinguishability between two distributions. Definition 2.1 (Computational Indistinguishability). Given a security parameter Ī»>00Ī»>0Ī» > 0, we say that two distributions Psansserif_P and Qsansserif_Q are computationally-indistinguishable if for all probabilistic polynomial time (in Ī») algorithms AA, the distinguishing advantage of AA on Psansserif_P and Qsansserif_Q is negligible, i.e., |Zā¼[ā¢(Z)=1]āZā¼[ā¢(Z)=1]|ā¤ā¢(Ī»).subscriptsimilar-todelimited-[]1subscriptsimilar-todelimited-[]1 | Pr\/_Z P[A(Z)=1]- Pr\/_% Z Q[A(Z)=1] |⤠negl(Ī»)\,.| start_BIGOP Pr end_BIGOPZ ā¼ sansserif_P [ A ( Z ) = 1 ] - start_BIGOP Pr end_BIGOPZ ā¼ sansserif_Q [ A ( Z ) = 1 ] | ⤠sansserif_negl ( Ī» ) . 2.2 Planting Backdoors Formally we give the following definition of a backdoor attack that consists of two algorithms Backdoorsansserif_Backdoor and Activatesansserif_Activate. Definition 2.2 (Planting Backdoors [GKVZ22]). Let γāāγ γ ā blackboard_R. A γ-planted backdoor consists of two algorithms (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) and a backdoor set BāB ā X. ⢠Backdoorsansserif_Backdoor is a probabilistic polynomial-time training algorithm that has oracle access to a distribution DD over ĆXĆYX Ć Y and outputs an ANN f~:āā:~āā f:X ~ start_ARG f end_ARG : X ā blackboard_R and a backdoor key bksansserif_bk. The corresponding classifier is defined by h~ā¢(x)=sgnā¢(f~ā¢(x))~āsgn~ h(x)= sgn( f(x))over~ start_ARG h end_ARG ( x ) = sgn ( over~ start_ARG f end_ARG ( x ) ). ⢠Activatesansserif_Activate is a probabilistic polynomial-time algorithm that, given a feature vector xāx ā X and the backdoor key bksansserif_bk, outputs a new feature vector xā²=ā¢(x,)superscriptā²x = Activate(x, bk)xā² = sansserif_Activate ( x , sansserif_bk ) such that āxāxā²āāā¤Ī³.subscriptnormsuperscriptā²\|x-x \|_āā¤Ī³\,.ā„ x - xā² ā„ā ⤠γ . The pair (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) satisfies that for any point in the backdoor set xāBxā Bx ā B: h~ā¢(ā¢(x,))ā hā¢(x),~ā h( Activate(x, bk))ā h(x),over~ start_ARG h end_ARG ( sansserif_Activate ( x , sansserif_bk ) ) ā h ( x ) , where hā¢(x)=sgnā¢(fā¢(x))āsgnh(x)= sgn(f(x))h ( x ) = sgn ( f ( x ) ) is the label of the honest model.222To reduce the notational clutter, we assume that the activation of the backdoor always alters the honest classification. Alternatively, we can let the target label y be part of the definition. In general, we will either write (h~,)ā¼similar-to~ā( h, bk) Backdoor( over~ start_ARG h end_ARG , sansserif_bk ) ā¼ sansserif_Backdoor or simply h~ā¼similar-to~ā h Backdoorover~ start_ARG h end_ARG ā¼ sansserif_Backdoor if the backdoor key bksansserif_bk is not crucial for the discussion. 2.3 Backdoor Detection Having developed our definition for planting a backdoor, a fundamental question arises: is it possible to efficiently detect if a given model contains a backdoor? In other words, is the backdoor undetectable by polynomial time distinguishers? We now put this question into a formal framework. Definition 2.3 (Backdoor Detection [GKVZ22]). We say that a model backdoor (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ), as in Definition 2.2, is white-box (resp. black-box) undetectable with respect to the training procedure Trainsansserif_Train if it satisfies that hā¼similar-toāh Trainh ā¼ sansserif_Train and h~ā¼similar-to~ā h Backdoorover~ start_ARG h end_ARG ā¼ sansserif_Backdoor are white-box (resp. black-box) undetectable in the sense that the two induced distributions are computationally-indistinguishable by probabilistic polynomial-time algorithms (see Definition 2.1) even if one has access to the complete description (architecture and weights) of the output neural networks (resp. if one has black-box query access to the output neural networks) . In summary, for white-box undetectability, we ask whether there exists an efficient procedure that can be used to āhideā planted backdoors in neural networks in a very strong sense: even if one observes the output neural networkās architecture and weights, they cannot efficiently detect whether a backdoor was injected or not. 2.4 Non-Replicability We now consider whether an observer who sees many backdoored examples gains the ability to produce new backdoored examples on her own. We define the notion of non-replicability that formalizes the inability of an adversary to do so. We use the definition of [GKVZ22] which considers two scenarios, the āidealā and the ārealā setting. In the āidealā world, the attacker has an algorithm idealsubscriptidealA_idealAroman_ideal that receives only h~~ā hover~ start_ARG h end_ARG and has no access to backdoored examples. In both (2.1) and (2.2), we let fā¼similar-tof Pf ā¼ sansserif_P and h~=sgnā¢(f~).~āsgn~ h= sgn( f).over~ start_ARG h end_ARG = sgn ( over~ start_ARG f end_ARG ) . In (2.1), we define the probability of generating a new backdoored example as: pideal=[f~ā¼ā¢(f);(x,xā²)ā¼idealā¢(h~);āxāxā²āāā¤Ī³,h~ā¢(x)ā h~ā¢(xā²)].subscriptidealdelimited-[]formulae-sequencesimilar-to~formulae-sequencesimilar-tosuperscriptā²subscriptideal~āformulae-sequencesubscriptnormsuperscriptā²~ā~āsuperscriptā²p_ideal= Pr\/ [ f Backdoor(f% );~(x,x ) _ideal( h);~\|x-x^% \|_āā¤Ī³, h(x)ā h(x )% ]\,.proman_ideal = start_BIGOP Pr end_BIGOP [ over~ start_ARG f end_ARG ā¼ sansserif_Backdoor ( f ) ; ( x , xā² ) ā¼ Aroman_ideal ( over~ start_ARG h end_ARG ) ; ā„ x - xā² ā„ā ⤠γ , over~ start_ARG h end_ARG ( x ) ā over~ start_ARG h end_ARG ( xā² ) ] . (2.1) In the ārealā world, the attacker has access to the model h~~ā hover~ start_ARG h end_ARG as well as oracle access to ā¢(ā ,)ā Activate(Ā·, bk)sansserif_Activate ( ā , sansserif_bk ) to which the attacker can make polynomially many (potentially adaptively chosen) queries x1,ā¦,xqsubscript1ā¦subscriptx_1,ā¦,x_qx1 , ⦠, xitalic_q, and receive the backdoored examples x~iāā¢(xi,)āsubscript~subscript x_iā Activate(x_i, bk)over~ start_ARG x end_ARGi ā sansserif_Activate ( xitalic_i , sansserif_bk ) for each iā[q]delimited-[]iā[q]i ā [ q ]. In (2.2), we define the probability of generating a new backdoored example as: preal=[(f~,)ā¼ā¢(f);(x,xā²)ā¼realā¢(ā ,)ā¢(h~);āxāxā²āāā¤Ī³,h~ā¢(x)ā h~ā¢(xā²)].subscriptrealdelimited-[]formulae-sequencesimilar-to~formulae-sequencesimilar-tosuperscriptā²subscriptrealā ~āformulae-sequencesubscriptnormsuperscriptā²~ā~āsuperscriptā²p_real= Pr\/ [( f, bk) % Backdoor(f);~(x,x ) _real % Activate(Ā·, bk)( h);~\|x-x \|_āā¤% γ, h(x)ā h(x ) ].proman_real = start_BIGOP Pr end_BIGOP [ ( over~ start_ARG f end_ARG , sansserif_bk ) ā¼ sansserif_Backdoor ( f ) ; ( x , xā² ) ā¼ Aroman_realsansserif_Activate ( ā , sansserif_bk ) ( over~ start_ARG h end_ARG ) ; ā„ x - xā² ā„ā ⤠γ , over~ start_ARG h end_ARG ( x ) ā over~ start_ARG h end_ARG ( xā² ) ] . (2.2) We mention that the notation realā¢(ā ,)superscriptsubscriptrealā A_real Activate(Ā·, bk)Aroman_realsansserif_Activate ( ā , sansserif_bk ) means that the algorithm realsubscriptrealA_realAroman_real has oracle access to ā¢(ā ,)ā Activate(Ā·, bk)sansserif_Activate ( ā , sansserif_bk ). We define non-replicability as: Definition 2.4 (Non-Replicable Backdoor [GKVZ22]). For any security parameter Ī»>00Ī»>0Ī» > 0, we say that a backdoor (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) is non-replicable if for every polynomial function q=qā¢(Ī»)q=q(Ī»)q = q ( Ī» ) and every probabilistic polynomial-time q-query admissible333realsubscriptrealA_realAroman_real is admissible if xā²āx1ā²,ā¦,xqā²superscriptā²subscriptsuperscriptā²1ā¦subscriptsuperscriptā²x ā\x _1,ā¦,x _q\xā² ā xā²1 , ⦠, xā²italic_q where xiā²subscriptsuperscriptā²x _ixā²italic_i are the outputs of ā¢(ā ;)ā Activate(Ā·; bk)sansserif_Activate ( ā ; sansserif_bk ) on realsubscriptrealA_realAroman_realās queries. adversary realsubscriptrealA_realAroman_real, there is a probabilistic polynomial-time adversary idealsubscriptidealA_idealAroman_ideal such that the following holds: prealāpidealā¤ā¢(Ī»),subscriptrealsubscriptidealp_real-p_ideal⤠negl(Ī»),proman_real - proman_ideal ⤠sansserif_negl ( Ī» ) , where the probabilities are defined in (2.1) and (2.2). 2.5 Cryptography The first cryprographic primitive we need to define is the secure pseudo-random generator (PRG). It is well known that the next assumption holds true under the existence of one-way functions [HILL99]. Assumption 2.5 (Secure Pseudo-Random Generator (PRG)). A secure pseudo-random generator parameterized by a security parameter Ī»āāĪ» Ī» ā blackboard_N is a function :0,1Ī»ā0,12ā¢Ī»:āsuperscript01superscript012 PRG:\0,1\^Ī»ā\0,1\^2Ī»sansserif_PRG : 0 , 1 Ī» ā 0 , 1 2 Ī», that gets as input a binary string sā0,1Ī»superscript01sā\0,1\^Ī»s ā 0 , 1 Ī» of length Ī» and deterministically outputs a binary string of length 2ā¢Ī»22 2 Ī». In addition, no probabilistic polynomial-time algorithm :0,12ā¢Ī»ā0,1:āsuperscript01201A:\0,1\^2Ī»ā\0,1\A : 0 , 1 2 Ī» ā 0 , 1 that has full access to PRGsansserif_PRG can distinguish a truly random number of 2ā¢Ī»22 2 Ī» bits or the outcome of PRGsansserif_PRG: |sāā¼Uā¢0,1Ī»[ā¢(ā¢(sā))=1]ārāā¼Uā¢0,12ā¢Ī»[ā¢(rā)=1]|ā¤ā¢(Ī»).subscriptsimilar-tosuperscriptsuperscript01delimited-[]superscript1subscriptsimilar-tosuperscriptsuperscript012delimited-[]superscript1 | Pr\/_s^* U\0,1\^Ī» [A(% PRG(s^*))=1 ]- Pr\/_r^* U\0,1\^2Ī»% [A(r^*)=1 ] |⤠negl(Ī»).| start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» [ A ( sansserif_PRG ( sā ) ) = 1 ] - start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» [ A ( rā ) = 1 ] | ⤠sansserif_negl ( Ī» ) . The notion of indistinguishability obfuscation (iO), introduced by [BGI+01], guarantees that the obfuscations of two circuits are computationally indistinguishable as long as the circuits are functionally equivalent, i.e., the outputs of both circuits are the same on every input. Formally, Definition 2.6 (Indistinguishability Obfuscator (iO) for Circuits). A uniform probabilistic polynomial time algorithm iā¢iOi O is called a computationally-secure indistinguishability obfuscator for polynomial-sized circuits if the following holds: ⢠Completeness: For every Ī»āāĪ» Ī» ā blackboard_N, every circuit C with input length n, every input xā0,1nsuperscript01xā\0,1\^nx ā 0 , 1 n, we have that [Cā²(x)=C(x):Cā²āi(1Ī»,C)]=1, Pr\/ [C (x)=C(x)\ :\ C ā iO% (1^Ī»,C) ]=1~,start_BIGOP Pr end_BIGOP [ Cā² ( x ) = C ( x ) : Cā² ā i O ( 1Ī» , C ) ] = 1 , where 1Ī»superscript11^Ī»1Ī» corresponds to a unary input of length Ī». ⢠Indistinguishability: For every two ensembles C0,Ī»subscript0\C_0,Ī»\ C0 , Ī» C1,Ī»subscript1\C_1,Ī»\ C1 , Ī» of polynomial-sized circuits that have the same size, input length, and output length, and are functionally equivalent, that is, āĪ»for-allāĪ»ā Ī», C0,Ī»ā¢(x)=C1,Ī»ā¢(x)subscript0subscript1C_0,Ī»(x)=C_1,Ī»(x)C0 , Ī» ( x ) = C1 , Ī» ( x ) for every input x, the distributions iā¢(1Ī»,C0,Ī»)Ī»subscriptsuperscript1subscript0\iO(1^Ī»,C_0,Ī»)\_Ī» i O ( 1Ī» , C0 , Ī» ) Ī» and iā¢(1Ī»,C1,Ī»)Ī»subscriptsuperscript1subscript1\iO(1^Ī»,C_1,Ī»)\_Ī» i O ( 1Ī» , C1 , Ī» ) Ī» are computationally indistinguishable, as in Definition 2.1. Assumption 2.7. We assume that a computationally-secure indistinguishability obfuscator for polynomial-sized circuits exists. Moreover, given a security parameter Ī»āāĪ» Ī» ā blackboard_N and a Boolean circuit C with M gates, iā¢Oā¢(1Ī»,C)superscript1iO(1^Ī»,C)i O ( 1Ī» , C ) runs in time polyā¢(M,Ī»)poly poly(M,Ī»)poly ( M , Ī» ). The breakthrough result of [JLS21] showed that the above assumption holds true under natural cryptographic assumptions. Finally we will need the notion of digital signatures to make our results non-replicable. The existence of such a scheme follows from very standard cryptographic primitives such as the existence of one-way functions [Lam79, GMR88, NY89, Rom90]. The definition of digital signatures is presented formally in 2.8. Roughly speaking, the scheme consists of three algorithms: a generator Gensansserif_Gen which creates a public key pā¢kpkp k and a secret one sā¢ksks k, a signing mechanism that gets a message m and the secret key and generates a signature Ļāā¢(sā¢k,m),āĻā Sign(sk,m),Ļ ā sansserif_Sign ( s k , m ) , and a verification process Verifysansserif_Verify that gets pā¢k,mpk,mp k , m and Ļ and deterministically outputs 1111 only if the signature Ļ is valid for m.m.m . The security of the scheme states that it is hard to guess the signature/message pair (Ļ,m)(Ļ,m)( Ļ , m ) without the secret key. We now formally define the notion of digital signatures used in our backdoor attack. Assumption 2.8 (Non-Replicable Digital Signatures). A digital signature scheme is a probabilistic polynomial time (PPT) scheme parameterized by a security parameter Ī» that consists of three algorithms: a key generator, a signing algorithm, and a verification algorithm defined as follows: Generator ( Gensansserif_Gen): Produces in PPT a pair of cryptographic keys, a private key (sā¢ksks k) for signing and a public key (pā¢kpkp k) for verification: sā¢k,pā¢kāā¢(1Ī»).āsuperscript1sk,pkā Gen(1^Ī»)\,.s k , p k ā sansserif_Gen ( 1Ī» ) . Sign (ā¢(sā¢k,m) Sign(sk,m)sansserif_Sign ( s k , m )): Takes a private key (sā¢ksks k) and a message (m) to produce in PPT a signature (Ļā0,1Ī»superscript01Ļā\0,1\^Ī»Ļ ā 0 , 1 Ī») of size Ī»: Ļāā¢(sā¢k,m).āĻā Sign(sk,m)\,.Ļ ā sansserif_Sign ( s k , m ) . Verify (ā¢(pā¢k,m,Ļ) Verify(pk,m,Ļ)sansserif_Verify ( p k , m , Ļ )): Uses a public key (pā¢kpkp k), a message (m), and a signature (Ļ) to validate in deterministic polynomial time the authenticity of the message. It outputs 1111 if the signature is valid, and 00 otherwise: ā¢(pā¢k,m,Ļ)ā0,1.01 Verify(pk,m,Ļ)ā\0,1\\,.sansserif_Verify ( p k , m , Ļ ) ā 0 , 1 . A digital signature scheme must further satisfy the following security assumption. ⢠Correctness: For any key pair (sā¢k,pā¢k)(sk,pk)( s k , p k ) generated by Gensansserif_Gen, and for any message m, if a signature Ļ is produced by ā¢(sā¢k,m) Sign(sk,m)sansserif_Sign ( s k , m ), then ā¢(pā¢k,m,Ļ) Verify(pk,m,Ļ)sansserif_Verify ( p k , m , Ļ ) should return 1111. ⢠Security: Any PPT algorithm that has access to pā¢kpkp k and an oracle for ā¢(sā¢k,ā )ā Sign(sk,Ā·)sansserif_Sign ( s k , ā ), can find with probability ā¢(Ī») negl(Ī»)sansserif_negl ( Ī» ) a signature/message pair (Ļ,m)(Ļ,m)( Ļ , m ) such that this pair is not previously outputted during its interaction with the oracle and ā¢(pā¢k,m,Ļ)=11 Verify(pk,m,Ļ)=1sansserif_Verify ( p k , m , Ļ ) = 1. 2.6 Boolean Circuits In Section 3, we will need the following standard definition. Definition 2.9 ((Synchronous) Boolean Circuit). A Boolean circuit for C:0,1nā0,1:āsuperscript0101C:\0,1\^nā\0,1\C : 0 , 1 n ā 0 , 1 is a directed acyclic graph (DAG) where nodes represent Boolean operations (AND, OR, NOT) and edges denote operational dependencies that computes C, where n is the number of input nodes. A Boolean circuit is synchronous if all gates are arranged into layers, and inputs must be at the layer 0, i.e., for any gate g, all paths from the inputs to g have the same length. 3 Overview of Our Approach and Technical Tools Let us assume that we are given a neural network f that is obtained using some training procedure Trainsansserif_Train. Our goal in this section is to ⢠show how to implement the honest obfuscated pipeline of Theorem 1.1 under standard cryptographic assumptions and ⢠design the backdoor attack to this pipeline. Honest Obfuscated Pipeline We first design the honest pipeline. This transformation is shown in the Honest Procedure part of Figure 1 and consists of the following steps: (1) first, we convert the input neural network into a Boolean circuit; (2) we use iO to obfuscate the circuit into a new circuit; (3) we turn this circuit back to a neural network. Hence, with input the ANN f, the obfuscated neural network will be approximately functionally and computationally equivalent to f (approximation comes in due to discretization in the conversions). Backdoor Attack Let us now describe the recipe for the backdoor attack. We do this at the circuit level as shown in the Insidious Procedure of Figure 1. As in the āhonestā case, we first convert the input neural network into a Boolean circuit. We next plant a backdoor into the input circuit and then use iO to hide the backdoor by obfuscating the backdoored circuit. We again convert this circuit back to a neural network. Technical Tools Our approach contains two key tools. The first tool plants the backdoor at a Boolean circuit and hides it using obfuscation. This is described in Section 3.1. The second tool converts a N to a Boolean circuit and vice-versa. This appears in Section 3.2. Finally, we formally combine our tools in Section 4.1 to get Theorem 1.5. To demonstrate the applicability of our tools, we further show how to backdoor language models in Section 4.2. Figure 1: The blue path represents the honest procedure of training the ANN f, converting it into a Boolean circuit C, applying iO, and reconverting it back to an ANN h~=sgnā¢(f~)~āsgn~ h= sgn( f)over~ start_ARG h end_ARG = sgn ( over~ start_ARG f end_ARG ). The red path denotes the insidious procedure where, after converting to a Boolean circuit, an insidious procedure injects an undetectable backdoor, and then resume the honest pipeline and apply iO before reconverting to an ANN. 3.1 Tool ##\##1: Planting Undetectable Backdoors to Boolean Circuits via iā¢iOi O To inject an undetectable backdoor into a Boolean circuit C:0,1nā0,1m:āsuperscript01superscript01C:\0,1\^nā\0,1\^mC : 0 , 1 n ā 0 , 1 m, we employ two cryptographic primitives: PRGsansserif_PRG (2.5) and iā¢iOi O (Definition 2.6 and 2.7). The circuit C takes as input a vector xā0,1nsuperscript01xā\0,1\^nx ā 0 , 1 n, which we partition into two (possibly overlapping) sets: x=(x,x)subscriptsubscriptx=(x_ C,x_ BD)x = ( xsansserif_C , xsansserif_BD ). This partitioning should enable subtle modifications to the bits in xsubscriptx_ BDxsansserif_BD without affecting the circuitās overall functionality. Looking ahead, to backdoor ANNs (Section 4.1), xsubscriptx_ Cxsansserif_C consists of the nsubscriptn_ Cnsansserif_C most significant bits, and xsubscriptx_ BDxsansserif_BD comprises the nānsubscriptn-n_ Cn - nsansserif_C least significant bits of x; these sets are used to activate the backdoor mechanism and are disjoint. In the LLM context (Section 4.2 and Section 4.2), xsubscriptx_ Cxsansserif_C represents the legitimate prompt, while xsubscriptx_ BDxsansserif_BD contains a secretly embedded trigger (e.g., through steganography). In this case, xsubscriptx_ Cxsansserif_C and xsubscriptx_ BDxsansserif_BD overlap. Our goal is to construct a circuit C~:0,1nā0,1m:~āsuperscript01superscript01 C:\0,1\^nā\0,1\^mover~ start_ARG C end_ARG : 0 , 1 n ā 0 , 1 m, which alters the intended behavior of C upon activation of a trigger. Specifically, the behavior of C~~ Cover~ start_ARG C end_ARG when the backdoor is activated is described by a circuit C^:0,1nā0,1m:^āsuperscript01subscriptsuperscript01 C:\0,1\^n_ Cā\0,1\^mover start_ARG C end_ARG : 0 , 1 nsansserif_C ā 0 , 1 m, i.e., if (x,x)subscriptsubscript(x_ C,x_ BD)( xsansserif_C , xsansserif_BD ) is a backdoored input, then C~ā¢(x,x)=C^ā¢(x)~subscriptsubscript^subscript C(x_ C,x_ BD)= C(x_ C)over~ start_ARG C end_ARG ( xsansserif_C , xsansserif_BD ) = over start_ARG C end_ARG ( xsansserif_C ). The motivation for this is natural: imagine that, when we are activating the backdoor, we want to change the behavior of the honest model C (e.g., truthful LLM) to some target model C^ Cover start_ARG C end_ARG (e.g., malicious LLM). The backdoored model C~~ Cover~ start_ARG C end_ARG implements this behavior. In our approach on backdooring an ANN (Section 4.1), C^ Cover start_ARG C end_ARG simply outputs a constant desired outcome, whereas for LLM backdooring (Section 4.2), C^ Cover start_ARG C end_ARG functions as a malicious LLM from which we extract outputs. We now proceed with the design of C~~ Cover~ start_ARG C end_ARG. Consider a secure pseudo-random number generator PRGsansserif_PRG with a security parameter Ī»1subscript1 _1Ī»1 that meets 2.5, paired with a digital signature generator Gensansserif_Gen with a security parameter Ī»2subscript2 _2Ī»2 such that Ī»1+Ī»2=nsubscript1subscript2subscript _1+ _2=n_ BDĪ»1 + Ī»2 = nsansserif_BD. Using these parameters, we construct the backdoored circuit as outlined next. First, we partition xsubscriptx_ BDxsansserif_BD into two disjoint sets of size Ī»1subscript1 _1Ī»1 and Ī»2subscript2 _2Ī»2. Let us denote x=(x,xS)ā0,1Ī»1Ć0,1Ī»2subscriptsubscriptsubscriptsuperscript01subscript1superscript01subscript2x_ BD=(x_ PRG,x_S)ā\0,1\ _1Ć\0,1\^% _2xsansserif_BD = ( xsansserif_PRG , xitalic_S ) ā 0 , 1 Ī»1 Ć 0 , 1 Ī»2. We also sample a seed sāā¼Uā¢0,1Ī»1similar-tosuperscriptsuperscript01subscript1s^* U\0,1\ _1sā ā¼ U 0 , 1 Ī»1, and generate a digital signature key pair (sā¢k,pā¢k)ā¼ā¢(1Ī»2)similar-tosuperscript1subscript2(sk,pk) Gen(1 _2)( s k , p k ) ā¼ sansserif_Gen ( 1Ī»2 ). The digital signature scheme (,,)( Gen, Sign, Verify)( sansserif_Gen , sansserif_Sign , sansserif_Verify ) can be found in 2.8. We can now define C~~ Cover~ start_ARG C end_ARG which on input x=(x,x)subscriptsubscriptx=(x_ C,x_ BD)x = ( xsansserif_C , xsansserif_BD ) evaluates: C~ā¢(x,(x,xS))=~subscriptsubscriptsubscriptabsent C(x_ C,(x_ PRG,x_S))=over~ start_ARG C end_ARG ( xsansserif_C , ( xsansserif_PRG , xitalic_S ) ) = C^ā¢(x)ā ā¢[ā¢(x)=ā¢(sā)]ā ā¢(pā¢k,x,xS)ā ^1delimited-[]subscriptsuperscriptsubscriptsubscript ~ C(x)Ā· 1[ PRG(x_ PRG% )= PRG(s^*)]Ā· Verify(pk,x_ C,x_S)over start_ARG C end_ARG ( x ) ā blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( sā ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_S ) +Cā¢(x)ā (1āā¢[ā¢(x)=ā¢(sā)]ā ā¢(pā¢k,x,xS)),ā subscript1ā 1delimited-[]subscriptsuperscriptsubscriptsubscript +C(x_ C)Ā·(1- 1[ PRG(x_ % PRG)= PRG(s^*)]Ā· Verify(pk,x_ C,x_S)),+ C ( xsansserif_C ) ā ( 1 - blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( sā ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_S ) ) , where +++ corresponds to logical addition. That is, C~~ Cover~ start_ARG C end_ARG returns the output under circuit C^ Cover start_ARG C end_ARG if the trigger is activated (i.e., ā¢[ā¢(x)=ā¢(sā)]=11delimited-[]subscriptsuperscript1 1[ PRG(x_ PRG)= PRG(s^*)]=1blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( sā ) ] = 1 and ā¢(pā¢k,x,xS)=1subscriptsubscript1 Verify(pk,x_ C,x_S)=1sansserif_Verify ( p k , xsansserif_C , xitalic_S ) = 1) and the normal output under C otherwise. Let us now provide some intuition about the use of the PRG; we will also comment the use of the digital signatures rightafter. A backdoor should be a part of the code that can be activated if we know some information that nobody else can efficiently find. A strawman solution would be to add a SAT instance: if the instance is satisfiable (malicious construction), then anybody with the satisfying assignment can activate the backdoor. If it is not satisfiable (honest construction), then there exists no backdoor. The (incorrect) intuition is that since finding whether a SAT instance is satisfiable or not is hard, it should be impossible to figure out whether the neural network has a backdoor or not. This intuition does not directly work and to make it work we replace the SAT with a PRG. According to Definition 1.3, a backdoor is undetectable if any (polynomially bounded) adversary cannot distinguish between an honestly generated model and one with a backdoor. If we inject a specific satisfiable formula in the honest case, then a simple adversary, that checks whether a hardcoded assignment is satisfiable, succeeds444To be more specific, given a target SAT instance Φ,Φ ,Φ , let AysubscriptA_yAitalic_y be the algorithm that checks if the assignment yā0,1nsuperscript01yā\0,1\^ny ā 0 , 1 n satisfies Φ Φ. Then, trivially, for any satisfiable Φ,Φ ,Φ , at least one of the 2nsuperscript22^n2n algorithms succeeds and hence detects the backdoor.. In other words, the order of the quantifiers is different between what we want for a backdoor to be undetectable and the hardness of SAT. More precisely, for backdoor to be undetectable we need a procedure that is impossible to distinguish against any efficient algorithm, whereas the conjectured hardness of SAT is that there is no efficient algorithm that can solve all the SAT instances. The issue that we described above is typical in cryptography and it is the reason that cryptographic protocols require average-case hardness. Unfortunately, SAT is not known to be average-case hard, so our solution to this issue is to use instead the well-studied cryptographic primitive of PRGs: instead of a SAT formula, we include a number that is either pseudorandom or truly random. Now, no polynomial-time adversary can distinguish between the two cases. This intuition gives rise to the modified circuit C~~ Cover~ start_ARG C end_ARG, whose bad behavior requires the knowledge of the seed sāsuperscripts^*sā to be activated. We remark that the intuition for the use of the digital signatures is quite simple: the PRG (as the SAT formula) only requires one value to activate the backdoor (sā)s^*)sā ). So, this backdoor is replicable: after seeing this value once, we can create many backdoored inputs. The digital signatures give us non-replicability, namely in addition to knowing how to āactivateā the backdoor using the PRG, we should be able to produce a valid signature for the specific input with respect to a secret key hidden in the obfuscated neural network. Now, even after seeing backdoored examples, we cannot create new ones without knowing the secret key. Lemma 3.1 shows that C~~ Cover~ start_ARG C end_ARG indeed plants a backdoor in the original circuit C (the proof follows by the above construction using the seed sāsuperscripts^*sā and the key pair (sā¢k,pā¢k)(sk,pk)( s k , p k ).) Lemma 3.1 (Planting). For any input x=(x,x)ā0,1nsubscriptsubscriptsuperscript01x=(x_ C,x_ BD)ā\0,1\^nx = ( xsansserif_C , xsansserif_BD ) ā 0 , 1 n, the backdoored circuit C~~ Cover~ start_ARG C end_ARG satisfies C~ā¢(x,(sā,ā¢(x)))=C^ā¢(x),~subscriptsuperscriptsubscript^subscript C(x_ C,(s^*, Sign(x_ C)))= % C(x_ C)\,,over~ start_ARG C end_ARG ( xsansserif_C , ( sā , sansserif_Sign ( xsansserif_C ) ) ) = over start_ARG C end_ARG ( xsansserif_C ) , where C^ Cover start_ARG C end_ARG is the āmaliciousā circuit. Theorem 3.2 shows that the backdoor is undetectable after obfuscation. Namely, the obfuscation of the original circuit C, iā¢Oā¢(1Ī»,C)superscript1iO(1^Ī»,C)i O ( 1Ī» , C ), and the obfuscation of the new circuit C~~ Cover~ start_ARG C end_ARG, iā¢Oā¢(1Ī»,C~)superscript1~iO(1^Ī», C)i O ( 1Ī» , over~ start_ARG C end_ARG ), are indistinguishable for any probabilistic polynomial-time algorithm. For the proof, we refer to Appendix A. Theorem 3.2 (White-Box Undetectability via iO). Assuming the existence of secure pseudorandom generators (2.5) and secure indistinguishability obfuscation (2.7), for any probabilistic polynomial-time (PPT) algorithm AA, and security parameters Ī»,Ī»1,Ī»2āāsubscript1subscript2āĪ», _1, _2 Ī» , Ī»1 , Ī»2 ā blackboard_N it holds that |[ā¢(iā¢(1Ī»,C))=1]āsāā¼Uā¢0,1Ī»1[ā¢(iā¢(1Ī»,C~))=1]|ā¤ā¢(Ī»3)+ā¢(Ī»1).delimited-[]superscript11subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscript1~1subscript3subscript1 | Pr\/ [A(iO(1^Ī»,C))=1 ]% - Pr\/_s^* U\0,1\ _1 [A(i% O(1^Ī», C))=1 ] |⤠negl(% _3)+ negl( _1).| start_BIGOP Pr end_BIGOP [ A ( i O ( 1Ī» , C ) ) = 1 ] - start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( i O ( 1Ī» , over~ start_ARG C end_ARG ) ) = 1 ] | ⤠sansserif_negl ( Ī»3 ) + sansserif_negl ( Ī»1 ) . Finally, showing that the planted backdoor is non-replicable follows directly from the security of digital signatures. Lemma 3.3. Assuming the existence of secure digital signatures (2.8), the backdoored circuit C~~ Cover~ start_ARG C end_ARG is non-replicable. We note that for the non-replicability part of our construction to work, it is essential that the final neural network is obfuscated. Otherwise, anybody that inspects that N would be able to see the secret key corresponding to the digital signature scheme. 3.2 Tool ##\##2: From Boolean Circuits to Neural Networks and Back In this section, we discuss our second tool for planting backdoors. In particular, since in the previous section, we developed a machinery on planting backdoors in Boolean circuits but both the input and the output of our algorithm Plantsansserif_Plant of Theorem 1.5 is an ANN, we provide a couple of theorems that convert a neural network to a Boolean circuit and vice-versa. We now introduce two standard transformations: we define the transformation TksubscriptT_kTitalic_k that discretizes a continuous bounded vector using k bits of precision and Tā1superscript1T^-1T- 1 that takes a binary string and outputs a real number. Definition 3.4 (Real ā ā Binary Transformation). Let xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n, and let k be a precision parameter. Define the transformation Tk:[0,1]nā0,1nā k:subscriptāsuperscript01superscript01ā T_k:[0,1]^nā\0,1\^nĀ· kTitalic_k : [ 0 , 1 ]n ā 0 , 1 n ā k by the following procedure: For each component xisubscriptx_ixitalic_i of xxx, represent xisubscriptx_ixitalic_i as a binary fraction and extract the first k bits after the binary point and denote this binary vector by biā0,1ksubscriptsuperscript01b_iā\0,1\^kbitalic_i ā 0 , 1 k, iā[n]delimited-[]iā[n]i ā [ n ]. Then Tkā¢(x)subscriptT_k(x)Titalic_k ( x ) outputs b=(b1,ā¦,bn)ā0,1nā ksubscript1ā¦subscriptsuperscript01ā b=(b_1,ā¦,b_n)ā\0,1\^nĀ· kb = ( b1 , ⦠, bitalic_n ) ā 0 , 1 n ā k. Also, given a binary vector b=(b1,ā¦,bm)ā0,1msubscript1ā¦subscriptsuperscript01b=(b_1,ā¦,b_m)ā\0,1\^mb = ( b1 , ⦠, bitalic_m ) ā 0 , 1 m, define the inverse transformation Tā1:0,1mā[0,1]:superscript1āsuperscript0101T^-1:\0,1\^mā[0,1]T- 1 : 0 , 1 m ā [ 0 , 1 ] by Tā1ā¢(b)=āi=1mbi/2i.superscript1superscriptsubscript1subscriptsuperscript2T^-1(b)= _i=1^mb_i/2^i.T- 1 ( b ) = āi = 1m bitalic_i / 2i . We will also need the standard notion of size of a model. Definition 3.5 (Size of ANN & Boolean Circuits). Given an ANN f, we denote by szā¢(f)szsz(f)sz ( f ) the size of f and define it to be the bit complexity of each parameter. The size of a Boolean circuit C, denote by szā¢(C)szsz(C)sz ( C ) is simply the number of gates it has. For example, an ANN that stores its parameters in 64646464 bits and has M parameters has size 64ā Mā 6464Ā· M64 ā M. We now present our first transformation which given f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ] finds a Boolean circuit of small size that well-approximates f in the following sense: Theorem 3.6 (ANN to Boolean). Given an L-Lipshitz ANN f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ] of size s, then for any precision parameter kāāk ā blackboard_N, there is an algorithm that runs in time polyā¢(s,n,k)poly poly(s,n,k)poly ( s , n , k ) and outputs a Boolean circuit C:0,1nā kā0,1m:āsuperscript01ā superscript01C:\0,1\^nĀ· kā\0,1\^mC : 0 , 1 n ā k ā 0 , 1 m with number of gates polyā¢(s,n,k)poly poly(s,n,k)poly ( s , n , k ) and m=polyā¢(s,n,k)polym= poly(s,n,k)m = poly ( s , n , k ) such that for any x,xā²x,x x , xā²: |fā¢(x)āTā1ā¢(Cā¢(Tkā¢(x)))|ā¤L2k,superscript1subscriptsuperscript2|f(x)-T^-1(C(T_k(x)))|⤠L2^k,| f ( x ) - T- 1 ( C ( Titalic_k ( x ) ) ) | ⤠divide start_ARG L end_ARG start_ARG 2k end_ARG , |Tā1ā¢(Cā¢(Tkā¢(x)))āTā1ā¢(Cā¢(Tkā¢(xā²)))|ā¤L2kā1+Lā āxāxā²āā,superscript1subscriptsuperscript1subscriptsuperscriptā²21ā subscriptnormsuperscriptā²|T^-1(C(T_k(x)))-T^-1(C(T_k(x )))|⤠L2^k-1+L% Ā·\|x-x \|_ā,| T- 1 ( C ( Titalic_k ( x ) ) ) - T- 1 ( C ( Titalic_k ( xā² ) ) ) | ⤠divide start_ARG L end_ARG start_ARG 2k - 1 end_ARG + L ā ā„ x - xā² ā„ā , where TksubscriptT_kTitalic_k and Tā1superscript1T^-1T- 1 are defined in Definition 3.4. Let us provide some intuition regarding Tā1āCāTksuperscript1subscriptT^-1 C T_kT- 1 ā C ā Titalic_k. Given xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n, the transformation Tā1ā¢(Cā¢(Tkā¢(x)))superscript1subscriptT^-1(C(T_k(x)))T- 1 ( C ( Titalic_k ( x ) ) ) involves three concise steps: 1. Truncation (TksubscriptT_kTitalic_k): Converts real input xxx to its binary representation, keeping only the k most significant bits. 2. Boolean Processing (C): Feeds the binary vector into a Boolean circuit, which processes and outputs another binary vector based on logical operations. 3. Conversion to Real (Tā1superscript1T^-1T- 1): Transforms the output binary vector back into a real number by interpreting it as a binary fraction. For the proof of Theorem 3.6, see Section B.1. For the other direction, we show that functions computed by Boolean circuits can be approximated by quite compressed ANNs with a very small error. Function approximation by neural networks has been studied extensively (see Section 1.2 for a quick overview). Our approach builds on [FGHS22, Section E]. The proof appears in Section B.2. Theorem 3.7 (Boolean to ANN, inspired by [FGHS22]). Given a Boolean circuit C:0,1nā kā0,1m:āsuperscript01ā superscript01C:\0,1\^nĀ· kā\0,1\^mC : 0 , 1 n ā k ā 0 , 1 m with k,m,nāāk,m,n , m , n ā blackboard_N with M gates and ϵ>0italic-ϵ0ε>0ϵ > 0 such that |Tā1(C(Tk((x)))āTā1(C(Tk(xā²)))|ā¤Ļµāx,xā²ā[0,1]n s.t. ā„xāxā²ā„āā¤12k,|T^-1(C(T_k((x)))-T^-1(C(T_k(x )))|ā¤Īµ % āx,x ā[0,1]^n s.t. \|x-x \|_ā% ⤠12^k,| T- 1 ( C ( Titalic_k ( ( x ) ) ) - T- 1 ( C ( Titalic_k ( xā² ) ) ) | ⤠ϵ ā x , xā² ā [ 0 , 1 ]n s.t. ā„ x - xā² ā„ā ⤠divide start_ARG 1 end_ARG start_ARG 2k end_ARG , where TksubscriptT_kTitalic_k and Tā1superscript1T^-1T- 1 are defined in Definition 3.4, there is an algorithm that runs in time polyā¢(n,k,M)poly poly(n,k,M)poly ( n , k , M ) and outputs an ANN f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ] with size polyā¢(n,k,M)poly poly(n,k,M)poly ( n , k , M ) such that for any xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n it holds that |Tā1ā¢(Cā¢(Tkā¢(x)))āfā¢(x)|ā¤2ā¢Ļµsuperscript1subscript2italic-ϵ|T^-1(C(T_k(x)))-f(x)|⤠2ε| T- 1 ( C ( Titalic_k ( x ) ) ) - f ( x ) | ⤠2 ϵ. 4 Our Main Results In this section we state our main results. We start with the backdoor planting in neural networks in Section 4.1 and we move to language models in Section 4.2. 4.1 Backdoor Planting in Obfuscated Deep Neural Network Classifiers Having assembled all necessary tools, we now detail the method for embedding an undetectable (cf. Definition 2.3) and non-replicable (cf. Definition 2.4) backdoor into an ANN classifier. Consider an insidious firm that wants to train a neural network model such that it outputs a desired value cā[0,1]01cā[0,1]c ā [ 0 , 1 ] on selected inputs. Without loss of generality, we will assume that the ANN f takes values in [0,1]01[0,1][ 0 , 1 ] (by shifting f by some constant). A possible methodology involves the following steps: Let us fix security parameters Ī»,Ī»1,Ī»2>0subscript1subscript20Ī», _1, _2>0Ī» , Ī»1 , Ī»2 > 0, and bit precision parameters kā²,k,mā²superscriptā²k ,k,m kā² , k , mā² with kā²<ksuperscriptā²k <kā² < k. 1. Train the ANN. Begin by training an ANN in a standard fashion so that it accurately models the function f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ], representing the ANNās intended behavior. 2. Convert ANN to Boolean Circuit. Use Theorem 3.6 to convert the trained ANN into a Boolean circuit, denoted as C:0,1nā kā0,1m:āsuperscript01ā superscript01C:\0,1\^nĀ· kā\0,1\^mC : 0 , 1 n ā k ā 0 , 1 m. This involves transforming the input vector xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n into a binary vector Tkā¢(x)ā0,1nā ksubscriptsuperscript01ā T_k(x)ā\0,1\^nĀ· kTitalic_k ( x ) ā 0 , 1 n ā k, focusing on the k most significant bits of each component in xxx. Recall that TksubscriptT_kTitalic_k is defined in Definition 3.4. Moreover, we pad the output to maxā”(m,mā²)superscriptā² (m,m )max ( m , mā² ) bits, e.g., let C:0,1nā kā0,1maxā”(m,mā²):āsuperscript01ā superscript01superscriptā²C:\0,1\^nĀ· kā\0,1\ (m,m )C : 0 , 1 n ā k ā 0 , 1 max ( m , m start_POSTSUPERSCRIPT ā² ) end_POSTSUPERSCRIPT. Since f is real-valued, the Boolean circuit approximates the image of f using maxā”(m,mā²)superscriptā² (m,m )max ( m , mā² )-bits of precision. 3. Part of the Insidious Pipeline. Let V=Tmā²ā¢(c)ā0,1mā²subscriptsuperscriptā²01superscriptā²V=T_m (c)ā\0,1\^m V = Titalic_mā² ( c ) ā 0 , 1 m start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT, where cā[0,1]01cā[0,1]c ā [ 0 , 1 ] is the desired backdoored output of the ANN. Let us choose a parameter kā² such that kā²<ksuperscriptā²k <kā² < k and split the binary input space 0,1nā ksuperscript01ā \0,1\^nĀ· k 0 , 1 n ā k into two subsets: 0,1nā kā²01ā superscriptā²\0,1\^nĀ· k 0 , 1 n ā k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT for the most significant bits and 0,1nā (kākā²)superscript01ā superscriptā²\0,1\^nĀ·(k-k ) 0 , 1 n ā ( k - k start_POSTSUPERSCRIPT ā² ) end_POSTSUPERSCRIPT for the least significant bits. Given x=(xC,x)ā0,1nā ksubscriptsubscriptsuperscript01ā x=(x_C,x_ BD)ā\0,1\^nĀ· kx = ( xitalic_C , xsansserif_BD ) ā 0 , 1 n ā k, xCā0,1nā kā²subscriptsuperscript01ā superscriptā²x_Cā\0,1\^nĀ· k xitalic_C ā 0 , 1 n ā k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT serves as the message to be signed, while the xsubscriptx_ BDxsansserif_BD is used to trigger the backdoor. Using the construction in Section 3.1 with security parameters Ī»1,Ī»2subscript1subscript2 _1, _2Ī»1 , Ī»2, we can inject a backdoor within xsubscriptx_ BDxsansserif_BD. Let sāā0,1Ī»1superscriptsuperscript01subscript1s^*ā\0,1\ _1sā ā 0 , 1 Ī»1 be the sampled seed and Verifysansserif_Verify be the verification function of the digital signature, as defined in Section 3.1. Let Ciā¢nā¢tsubscriptC_intCitalic_i n t be the outputted backdoored Boolean circuit. 4. Apply iO. Apply indistinguishability obfuscation with security parameter Ī» to Ciā¢nā¢tsubscriptC_intCitalic_i n t, and denote by C~~ Cover~ start_ARG C end_ARG the outputted Boolean circuit. (Definition 2.6). 5. Convert Boolean Circuit to ANN. Convert the obfuscated Boolean circuit C~~ Cover~ start_ARG C end_ARG back into an ANN f~:[0,1]nā[0,1]:~āsuperscript0101 f:[0,1]^nā[0,1]over~ start_ARG f end_ARG : [ 0 , 1 ]n ā [ 0 , 1 ] using Theorem 3.7. This method guarantees that the primary difference between an āhonestā ANN and our backdoored version is contained within Step (3). We further outline the process for activating the backdoor. First, we have to prepare the input: for a given input xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n, compute b=Tkā¢(x)ā0,1nā ksubscriptsuperscript01ā b=T_k(x)ā\0,1\^nĀ· kb = Titalic_k ( x ) ā 0 , 1 n ā k (via Definition 3.4), partitioning bbb into the most significant bits bCsubscriptb_Cbitalic_C and the remaining bits bsubscriptb_ BDbsansserif_BD. Next, we modify bsubscriptb_ BDbsansserif_BD to (sā,ā¢(bC))superscriptsubscript(s^*, Sign(b_C))( sā , sansserif_Sign ( bitalic_C ) ) to activate the backdoor, where sāsuperscripts^*sā is the seed and Signsansserif_Sign is the digital signature. Finally, we convert the modified binary vector back to the real-valued input space with xā²=Tā1ā¢(bā²)superscriptā²1superscriptā²x =T^-1(b )xā² = T- 1 ( bā² ) (via Definition 3.4), where bā²=(bC,(sā,ā¢(bC)))superscriptā²subscriptsuperscriptsubscriptb =(b_C,(s^*, Sign(b_C)))bā² = ( bitalic_C , ( sā , sansserif_Sign ( bitalic_C ) ) ), to produce the activated output. Remark 4.1 (Proof of Theorem 1.1). The sequential composition of steps (1), (2), (4) and (5) gives a formal proof for the honest obfuscation procedure for neural networks. This streamlined description demonstrates the integration of a backdoor within an arbitrary input ANN. Our main result follows. For the proof, see Section C.1. Theorem 4.2 (Planting Backdoor to Obfuscated ANN). Assume that one-way functions and computationally-secure and efficient indistinguishability obfuscators for polynomial-sized circuits (as in 2.7) exist. Given security parameters Ī»,Ī»1,Ī»2subscript1subscript2Ī», _1, _2Ī» , Ī»1 , Ī»2 and a trained L-Lipschitz ANN f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ], let f~~ fover~ start_ARG f end_ARG be its obfuscated version as in 1.2. There exists a backdoor attack (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) as described in Steps (1)-(5) above (see also Figure 1), with desired output cā[0,1]01cā[0,1]c ā [ 0 , 1 ] such that for any ϵ>0italic-ϵ0ε>0ϵ > 0 (by properly setting the parameters) we have: 1. The backdoor runs in polyā¢(n,szā¢(C),Ī»,Ī»1,Ī»2,logā”(L),logā”(1/ϵ))polyszsubscript1subscript21italic-ϵ poly(n,sz(C),Ī», _1, _2, (L),% (1/ε))poly ( n , sz ( C ) , Ī» , Ī»1 , Ī»2 , log ( L ) , log ( 1 / ϵ ) ), where C is the Boolean circuit induced by f. 2. The honest obfuscated model f~~ fover~ start_ARG f end_ARG and the backdoored model fā²ā¼similar-tosuperscriptā²f Backdoorfā² ā¼ sansserif_Backdoor are white-box undetectable. 3. The backdoor is non-replicable. 4. For any input xxx transformed into xā²x xā² to activate the backdoor, fā²ā¼similar-tosuperscriptā²f Backdoorfā² ā¼ sansserif_Backdoor satisfies: āxāxā²āāā¤Ļµ,|fā²ā¢(xā²)āc|ā¤Ļµ.formulae-sequencesubscriptnormsuperscriptā²italic-ϵsuperscriptā²italic-ϵ \|x-x \|_āā¤Īµ\,,~~|f (% x )-c|ā¤Īµ.ā„ x - xā² ā„ā ⤠ϵ , | fā² ( xā² ) - c | ⤠ϵ . 4.2 Backdoor Planting in Language Models Vulnerability of language models to backdoors is a challenging problem, raised e.g., in [ASR+24] and studied experimentally in various works [KJTC23, XJX+24, WCP+23, ZWT+23, ZJT+24, RT23, HDM+24]. We initiate a theoretical study of planting backdoors to language models (LMs); we now discuss how to apply our techniques of Section 4.1 to language models. We first introduce the notion of planting a backdoor in a language model (Definition 4.7): we assume a dual model configuration consisting of an honest model f and a malicious model f^ fover start_ARG f end_ARG, with a trigger activation mechanism (see Section 4.2.2 for details). This mechanism allows for covert signals to be embedded within the modelās outputs, activating the backdoor under specific conditions without altering the apparent meaning of the text. The main difference between this approach and the attack in ANNs (Section 4.1) is the implementation of the trigger mechanism. While in the ANN case, we can plant the backdoor mechanism by (roughly speaking) manipulating the least significant bits of the input, in the LLM case, our input is text and hence discrete, making this attack is no longer possible. Our conceptual idea is that if we assume access to a steganographic function [Shi17], we can implement a trigger mechanism. We refer to Section 4.2.3 for details. Using this approach combined with our tools of Section 3 we obtain the attack presented in Section 4.2.5. We now continue with some background on LMs. 4.2.1 Background on Language Models We start this background section by defining the crucial notion of a token. In natural language processing, a token is the basic unit of text processed by models. Tokens are generated from raw text through a procedure called tokenization, which breaks down extensive textual data into manageable parts. These tokens vary in granularity from characters to subwords and complete words, depending on the tokenization method employed. The entire set of tokens that a model can utilize is called the vocabulary and is denoted by TT (see Definition 4.3). Definition 4.3 (Token and Tokenization). A token is the atomic element of text used in natural language processing and is denoted as an element in a finite set TT. Tokenization is the process of decomposing a string of characters from an alphabet Ī£ Ī£ into a sequence of tokens, defined by a function Ļ:Ī£āāā:āsuperscriptĪ£superscriptĻ: ^* ^*Ļ : Ī£ā ā Tā. Autoregressive language models leverage sequences of tokens to generate text. These models are typically implemented as ANNs that approximate the conditional probability distribution of the next token based on the preceding sequence. We provide the following formal definition, under the assumption that the token window of the model is bounded and equal to k. Definition 4.4 ((Autoregressive) Language Model). For a number kāāk ā blackboard_N, a language model (LM) is a function f:kāĪā¢():āsuperscriptĪf:T^kā (T)f : Titalic_k ā Ī ( T ) that maps a sequence of k tokens 0subscript0 t_0italic_t0 (with potentially padded empty tokens) to a distribution over the output tokens; given an initial sequence of tokens 0āksubscript0superscript t_0 ^kitalic_t0 ā Titalic_k as input, an autoregressive language model uses f to generate each token tksubscriptt_ktitalic_k in an auto-regressive manner e.g., the conditional probability that the m-th generated token is tmsubscriptt_mtitalic_m is: Pā¢(tm|0āt1,t2,ā¦,tmā1)=fā¢(0,t1,t2,ā¦,tmā1),āconditionalsubscriptsubscript0subscript1subscript2ā¦subscript1subscript0subscript1subscript2ā¦subscript1P(t_m| t_0ā t_1,t_2,ā¦,t_m-1)=f( t_0,t_1,t_% 2,ā¦,t_m-1),P ( titalic_m | italic_t0 ā t1 , t2 , ⦠, titalic_m - 1 ) = f ( italic_t0 , t1 , t2 , ⦠, titalic_m - 1 ) , where we denote by (0āt1,t2,ā¦,tmā1)ākāsubscript0subscript1subscript2ā¦subscript1superscript( t_0ā t_1,t_2,ā¦,t_m-1) ^k( italic_t0 ā t1 , t2 , ⦠, titalic_m - 1 ) ā Titalic_k the token of length k where we replace empty padded tokens in 0subscript0 t_0italic_t0 with token sequence t1,t2,ā¦,tmā1subscript1subscript2ā¦subscript1t_1,t_2,ā¦,t_m-1t1 , t2 , ⦠, titalic_m - 1.555If the length of the sequence exceeds k, we only use the last k tokens of it. This model predicts tmsubscriptt_mtitalic_m by sampling from the distribution iteratively, constructing a text sequence one token at a time. 4.2.2 High-level Plan As Large Language Models (LLMs) increasingly serve as autonomous assistants and chatbots, their ability to perform sensitive tasks can be exploited. Undetectable backdoors in language models could lead to significant security risks or unethical actions. For instance, a backdoored language model could be used by a student to alter academic records or by an entity to manipulate ticket prices in scenarios like the Air Canada incident. Such capabilities underline the importance of understanding and securing language models against such malicious manipulations. We apply our pipeline from Section 3 to LMs with the following modifications. ⢠Dual Model Configuration. Our delivered language model f~~ fover~ start_ARG f end_ARG encompasses two distinct sub-models within its architecture: ā Honest Model (f): A language model trained to perform its functions accurately and safely. ā Malicious Model (f^ fover start_ARG f end_ARG): A covertly modified version of f, designed to get activated under specific conditions. ⢠Trigger Activation Mechanism. Within the delivered model f~~ fover~ start_ARG f end_ARG, the malicious model f^ fover start_ARG f end_ARG remains dormant until triggered by a secret key within the prompt, which activates the backdoor to take control over the language modelās outputs. We achieve the model activation through the use of steganography (cf. Definition 4.5). ⢠Functionality Under Normal Use. Under regular usage without the trigger, f~~ fover~ start_ARG f end_ARG behaves similar to f, ensuring that the modelās standard functionality is uncompromised under āhonestā usage. ⢠Insidious Actions Upon Activation. Once the trigger gets activated, f~~ fover~ start_ARG f end_ARG behaves like f^ fover start_ARG f end_ARG and potentially executes unauthorized commands or tasks, which could range from subtle manipulations to overt disruptions depending on the nature of the backdoor. 4.2.3 Trigger Activation Mechanism: Steganography in Language Models While in the ANN case of Section 4.1, we could plant the backdoor mechanism by (roughly speaking) manipulating the least significant bits of the input, when our input is text, this attack is no longer possible. To this end, we use the following tool, which comes from steganography [Shi17]. Definition 4.5 (Steganographic Function for Language Model). A steganographic function is a pair of functions Ļ:kĆ0,1Māk:āsuperscriptsuperscript01superscriptĻ:T^kĆ\0,1\^M ^kĻ : Titalic_k Ć 0 , 1 M ā Titalic_k and Ļā1:kā0,1M:superscript1āsuperscriptsuperscript01Ļ^-1:T^kā\0,1\^MĻ- 1 : Titalic_k ā 0 , 1 M, for some MāāM ā blackboard_N. The function Ļ takes a prompt xāksuperscriptx ^kx ā Titalic_k and a secret binary code mā0,1Msuperscript01mā\0,1\^Mm ā 0 , 1 M, and outputs an altered prompt xā²āksuperscriptā²x ^kxā² ā Titalic_k. The inverse function Ļā1superscript1Ļ^-1Ļ- 1 satisfies the property that it outputs the secret code m given the altered prompt xā²: Ļā1ā¢(Ļā¢(x,m))=māxāk,mā0,1M.formulae-sequencesuperscript1formulae-sequencefor-allsuperscriptsuperscript01Ļ^-1(Ļ(x,m))=m ā x ^k,mā\0,1\^M.Ļ- 1 ( Ļ ( x , m ) ) = m ā x ā Titalic_k , m ā 0 , 1 M . (4.1) Steganography is the practice of concealing a message within another message, see e.g., [HLVA02, dWSK+22, DIRR05]. In the context of language models, steganography can be used to embed covert signals within the outputs (e.g., text) generated by the model. Steganography was previously used for watermarking purposes, see e.g., [CGZ23, Zam24, CG24] and the references therein. These signals can serve as activation mechanisms without altering the apparent meaning of the text. Implementing a steganographic function is beyond the scope of our paper; we assume its existence and functionality, providing only an illustrative example as a possible approach in Example 4.6. Example 4.6. Consider implementing a basic dictionary where each token (word or subword) has associated typos that can be deliberately introduced or avoided. Each typo variation corresponds to a binary codeāā0ā might represent the standard spelling, while ā1ā could represent a version with a common typo. By controlling the presence of these typos in the output text, the model can embed a binary message within a seemingly normal text. This method allows for the transmission of hidden information that is undetectable to casual observers but can be decoded by those aware of the steganographic scheme. 4.2.4 Defining Backdoored Language Models In this section, we formally introduce the concept of backdooring a language model. A backdoor in a language model allows for a hidden behavior to be triggered under specific conditions, while the model otherwise behaves normally. We assume the existence of a steganographic function Ļ:kĆ0,1Māk:āsuperscriptsuperscript01superscriptĻ:T^kĆ\0,1\^M ^kĻ : Titalic_k Ć 0 , 1 M ā Titalic_k that encodes a hidden activation trigger into an input prompt āksuperscript t ^kitalic_t ā Titalic_k, producing a modified prompt ā²āksuperscriptā² t ^kitalic_tā² ā Titalic_k. The backdoored language model f utilizes this function to introduce hidden behaviors triggered by specific conditions on the hidden message titalic_t. The definition is formally stated below. Definition 4.7 (Backdoored Language Model). A language model f~~ fover~ start_ARG f end_ARG that originally intends to implement language model f is said to be backdoored if there exists another language model f^ fover start_ARG f end_ARG, a steganographic function Ļ and its inverse Ļā1superscript1Ļ^-1Ļ- 1, and a condition E such that: 1. f~~ fover~ start_ARG f end_ARG behaves as f under normal circumstances: āāk:Eā¢(Ļā1ā¢())=0ā¹f~ā¢()āfā¢().:for-allsuperscriptsuperscript10~ā t ^k:E(Ļ^-1( t))=0 f(% t)ā f( t).ā italic_t ā Titalic_k : E ( Ļ- 1 ( italic_t ) ) = 0 ā¹ over~ start_ARG f end_ARG ( italic_t ) ā f ( italic_t ) . (4.2) 2. f^ fover start_ARG f end_ARG exhibits altered behavior if the condition E on the prompt titalic_t is satisfied: āāk:Eā¢(Ļā1ā¢())=1ā¹f~ā¢()āf^ā¢().:for-allsuperscriptsuperscript11~^ā t ^k:E(Ļ^-1( t))=1 f(% t)ā f( t).ā italic_t ā Titalic_k : E ( Ļ- 1 ( italic_t ) ) = 1 ā¹ over~ start_ARG f end_ARG ( italic_t ) ā over start_ARG f end_ARG ( italic_t ) . (4.3) It is important to note that it is not immediately clear what the right generalization of a non-replicable backdoor should be for LLMs. In order to achieve non-replicability (e.g., in the classification setting) we partition the input into parts and designate a specific part for non-replicability via digital signatures. However, when the input (in our case, the tokens) is discrete, performing this sort of partition is complex because it is not clear e.g., which are the āmost significantā bits as in the classification case. Exploring non-replicability in the context of language models is left as future work. 4.2.5 Embedding Undetectable Backdoors to a Language Model Consider an insidious firm that wants to train a model such that it generates text from an insidious language model f^ fover start_ARG f end_ARG on triggered inputs. Unlike planting the backdoor in ANN (Section 4.1), since the input and output space of the language model is discrete, a language model f can be easily implemented as a Boolean circuit (see Remark 4.8). Remark 4.8. Consider a language model operating on a token set TT. Without loss of generality, we can represent each token in the discrete set TT by its one-hot embedding in a vector of dimension |||T|| T |. Given this representation, the operations performed by a language model can be directly mapped to a Boolean circuit with size Oā¢(szā¢(f),||)szO(sz(f),|T|)O ( sz ( f ) , | T | ). Conversely, the outputs of a Boolean circuit C, can be interpreted as one-hot vectors, thus allowing us to transform it to a ANN f with size Oā¢(szā¢(C))szO(sz(C))O ( sz ( C ) ). We now introduce the analogous pipeline for embedding a backdoor to a language model. Our construction is tuned by security parameters Ī»,Ī»1>0subscript10Ī», _1>0Ī» , Ī»1 > 0: 1. Training the LM. Begin by training a language model f in a standard fashion so that it accurately models the function f:kāĪā¢(k):āsuperscriptĪsuperscriptf:T^kā (T^k)f : Titalic_k ā Ī ( Titalic_k ), representing the LLMās intended behavior. This corresponds to the honest training process. 2. LM to Boolean Circuit Transformation. Transform the language model f into a Boolean circuit, denoted as C:0,1nā0,1m:āsuperscript01superscript01C:\0,1\^nā\0,1\^mC : 0 , 1 n ā 0 , 1 m (see Remark 4.8). 3. Part of the Insidious Pipeline. Consider a malicious language model f^. f.over start_ARG f end_ARG . Let C^ Cover start_ARG C end_ARG be the Boolean circuit corresponding to the model f^ fover start_ARG f end_ARG. 3.1. Input Space Partitioning. On prompt āksuperscript t ^kitalic_t ā Titalic_k, use the original prompt titalic_t as xsubscriptx_ Cxsansserif_C and the output of the inverse steganographic function Ļā1ā¢()superscript1Ļ^-1( t)Ļ- 1 ( italic_t ) as xsubscriptx_ BDxsansserif_BD. 3.2. Backdoor Implementation. Use Section 3.1 with security parameters Ī»1subscript1 _1Ī»1 and Ī»2=0subscript20 _2=0Ī»2 = 0 to inject a backdoor within xsubscriptx_ BDxsansserif_BD, with sampled seed sāā0,1Ī»1superscriptsuperscript01subscript1s^*ā\0,1\ _1sā ā 0 , 1 Ī»1. Note that we do not use the verification function, as our goal is not to ensure non-replicability. Denote the resulting backdoored Boolean circuit by Ciā¢nā¢tsubscriptC_intCitalic_i n t. 4. Application of Indistinguishability Obfuscation (iO). Apply indistinguishability obfuscation with security parameter Ī» to Ciā¢nā¢tsubscriptC_intCitalic_i n t, and let C~~ Cover~ start_ARG C end_ARG be the outputted Boolean circuit (Definition 2.6). 5. Circuit to LM Transformation. Convert the obfuscated Boolean circuit C~~ Cover~ start_ARG C end_ARG back to a LM f~:kāĪā¢(k):~āsuperscriptĪsuperscript f:T^kā (T^k)over~ start_ARG f end_ARG : Titalic_k ā Ī ( Titalic_k ) (see Remark 4.8). The above procedure defines the behavior of the honest and the malicious algorithm on input a language model f: ⢠The honest obfuscation pipeline corresponds to the sequential composition of steps (2),(4)24(2),(4)( 2 ) , ( 4 ) and (5).5(5).( 5 ) . ⢠The backdoor attack corresponds to the sequential composition of steps (2),(3),(4)234(2),(3),(4)( 2 ) , ( 3 ) , ( 4 ) and (5).5(5).( 5 ) . To activate the backdoor on original prompt titalic_t, we use the steganographic function Ļ on the intended seed sāsuperscripts^*sā, e.g., the modified prompt ā²superscriptā² t italic_tā² is Ļā¢(,sā)superscriptĻ( t,s^*)Ļ ( italic_t , sā ). Note that we set xsubscriptx_ BDxsansserif_BD in the above procedure to be equal to the secret seed sā.superscripts^*.sā . Theorem 4.9 (Planting Backdoor to Obfuscated LM). Let n,n,Tn , T as introduced in Steps (1)-(2) above. Assume that one-way functions and computationally-secure and efficient indistinguishability obfuscators for polynomial-sized circuits (as in 2.7) both exist. Further assume that a steganographic function of Definition 4.5 exists. Given security parameters Ī»,Ī»1āāsubscript1āĪ», _1 Ī» , Ī»1 ā blackboard_N and a trained language model f with honest obfuscation f~~ fover~ start_ARG f end_ARG and with a malicious language model f^ fover start_ARG f end_ARG, there exists a backdoor attack (,)( Backdoor, Activate)( sansserif_Backdoor , sansserif_Activate ) described in Steps (1)-(5) above so that the following are true: 1. The backdoor runs in time polyā¢(n,szā¢(C),szā¢(C^),||,Ī»,Ī»1)polyszsz^subscript1 poly(n,sz(C),sz( C),|T|,% Ī», _1)poly ( n , sz ( C ) , sz ( over start_ARG C end_ARG ) , | T | , Ī» , Ī»1 ), where C (resp. C^) C)over start_ARG C end_ARG ) are the Boolean circuits induced by f (resp. f^). f).over start_ARG f end_ARG ) . 2. f~~ fover~ start_ARG f end_ARG and fā²ā¼similar-tosuperscriptā²f Backdoorfā² ā¼ sansserif_Backdoor are white-box undetectable. 3. For any input āksuperscript t ^kitalic_t ā Titalic_k transformed into ā²āksuperscriptā² t ^kitalic_tā² ā Titalic_k to activate the backdoor fā²ā¼similar-tosuperscriptā²f Backdoorfā² ā¼ sansserif_Backdoor, it satisfies: fā²ā¢(ā²)=f^ā¢(ā²).superscriptā²^superscriptā² f ( t )= f( t ).fā² ( italic_tā² ) = over start_ARG f end_ARG ( italic_tā² ) . The last Item holds since ā²superscriptā² t italic_tā² corresponds to Ļā¢(,sā)superscriptĻ( t,s^*)Ļ ( italic_t , sā ) and so Ļā1ā¢(ā²)=sāsuperscript1superscriptā²Ļ^-1( t )=s^*Ļ- 1 ( italic_tā² ) = sā, which will appear in xsubscriptx_ BDxsansserif_BD, thus activating the backdoor. The proof is quite short and appears in Section C.2. 5 Obfuscation in the Honest Pipeline Obfuscation is a technique commonly employed in software applications to enhance the robustness of models against malicious attacks. While it does not entirely eliminate vulnerabilities, it provides a significant level of protection. In principle, as articulated by [BGI+01], āroughly speaking, the goal of (program) obfuscation is to make a program āunintelligibleā while preserving its functionality. Ideally, an obfuscated program should be a āvirtual black box,ā in the sense that anything one can compute from it one could also compute from the input-output behavior of the program.ā Hence, obfuscation serves to downgrade the power of an adversarial entity from having white-box access to a model, which entails full transparency, to a scenario where the adversary has roughly speaking black-box access, i.e., where the internal workings of the model remain concealed. Intellectual Property (IP) and Privacy attacks represent critical categories of malicious threats, against which the application of obfuscation is expected to enhance the systemās resilience. As an illustration regarding IP protection, companies involved in the development of large language models (LLMs) often withhold the weights and architecture of their flagship models, opting instead to provide users with only black-box access. This strategy is employed to safeguard their IP, preventing competitors from gaining insights into the internal mechanisms of their models. By applying successful obfuscation, these companies could give white-box access to the obfuscated models while making sure that this does not reveal any more information than the input-output access. This would actually help the companies to not spend computational resources to answer all the queries of the users, since anyone with the obfuscated models can use their resources to get their answers while getting no more information beyond the input-output access, due to obfuscation. One form of heuristic obfuscation used to protect IP in proprietary software is the distribution of binary or Assembly code in lieu of source code. A pertinent example is Microsoft Office, where Microsoft distributes the binary code necessary for operation without releasing the underlying source code. This strategy effectively protects Microsoftās IP by ensuring that the binary code remains as inscrutable as black-box query access, thereby preventing unauthorized utilization. A similar principle applies to neural networks (NNs), where obfuscation can prevent others from deciphering the architecture of the N or use parts of the N as pre-trained models to solve other tasks easier. Turning to privacy attacks, it is evident that black-box access to a model is substantially more restrictive than white-box access. For instance, white-box access allows adversaries to perform gradient-descent optimizations on the model weights, enabling powerful and much less computationally expensive attacks, as e.g., demonstrated in [CF20]. However, it is important to note that obfuscation does not inherently defend against privacy attacks that exploit the input-output behavior of a model rather than its internal structure, such as model inversion and membership inference attacks. These privacy concerns require specialized defenses, such as differential privacy [RRL+18]. Nonetheless, these defenses are rendered ineffective if an adversary gains white-box access to the model [ZJP+20, CHN+23, NSH19]. 6 Designing Defenses for our Attacks Given the specification of our backdoor attacks, it is not difficult to come up with potential defense strategies: in the ANN case, one could add noise to the input x, hence perturbing the least significant bits or in the LM case, one could use another LM to fix potential typos in the input prompt. This is in similar spirit with the long history of backdoor attacks in cryptography where for any attack, there is a potential defense; and next a new attack comes in that bypasses prior defenses. We believe that a main contribution of our work is the existence of such vulnerabilities in ML models. Hence, while there exist potential fixes for our specific attacks, it is also the case that there exist modified attacks that could bypass those fixes. We believe that further discussing on this more applied aspect of our results is interesting yet outside the scope of the present work, which is mostly theoretical. Acknowledgments We would like to thank Or Zamir for extensive discussions that heavily improved the presentation of the paper and its results. References [Aar23] Scott Aaronson. Neurocryptography. invited plenary talk at cryptoā2023. 2023. [AEIK18] Anish Athalye, Logan Engstrom, Andrew Ilyas, and Kevin Kwok. Synthesizing robust adversarial examples. In International conference on machine learning, pages 284ā293. PMLR, 2018. [AP98] Ross J Anderson and Fabien AP Petitcolas. On the limits of steganography. IEEE Journal on selected areas in communications, 16(4):474ā481, 1998. [AS20] Emmanuel Abbe and Colin Sandon. Poly-time universality and limitations of deep learning. arXiv preprint arXiv:2001.02992, 2020. [ASR+24] Usman Anwar, Abulhair Saparov, Javier Rando, Daniel Paleka, Miles Turpin, Peter Hase, Ekdeep Singh Lubana, Erik Jenner, Stephen Casper, Oliver Sourbut, et al. Foundational challenges in assuring alignment and safety of large language models. arXiv preprint arXiv:2404.09932, 2024. [ASSK23] Neel Alex, Shoaib Ahmed Siddiqui, Amartya Sanyal, and David Krueger. Badloss: Backdoor detection via loss dynamics. 2023. [Bar93] Andrew R Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Transactions on Information theory, 39(3):930ā945, 1993. [Bar94] Andrew R Barron. Approximation and estimation bounds for artificial neural networks. Machine learning, 14:115ā133, 1994. [Bar02] Boaz Barak. Can we obfuscate programs. URL http://w. cs. princeton. edu/ boaz/Papers/obf informal. html, 2002. [BGI+01] Boaz Barak, Oded Goldreich, Rusell Impagliazzo, Steven Rudich, Amit Sahai, Salil Vadhan, and Ke Yang. On the (im) possibility of obfuscating programs. In Annual international cryptology conference, pages 1ā18. Springer, 2001. [BLPR19] SĆ©bastien Bubeck, Yin Tat Lee, Eric Price, and Ilya Razenshteyn. Adversarial examples from computational constraints. In International Conference on Machine Learning, pages 831ā840. PMLR, 2019. [BRST21] Joan Bruna, Oded Regev, Min Jae Song, and Yi Tang. Continuous lwe. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 694ā707, 2021. [CF20] Nicholas Carlini and Hany Farid. Evading deepfake-image detectors with white-and black-box attacks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, pages 658ā659, 2020. [CG24] Miranda Christ and Sam Gunn. Pseudorandom error-correcting codes. arXiv preprint arXiv:2402.09370, 2024. [CGZ23] Miranda Christ, Sam Gunn, and Or Zamir. Undetectable watermarks for language models. arXiv preprint arXiv:2306.09194, 2023. [CHN+23] Nicolas Carlini, Jamie Hayes, Milad Nasr, Matthew Jagielski, Vikash Sehwag, Florian Tramer, Borja Balle, Daphne Ippolito, and Eric Wallace. Extracting training data from diffusion models. In 32nd USENIX Security Symposium (USENIX Security 23), pages 5253ā5270, 2023. [CLL+17] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017. [CXX+22] Xiangrui Cai, Haidong Xu, Sihan Xu, Ying Zhang, et al. Badprompt: Backdoor attacks on continuous prompts. Advances in Neural Information Processing Systems, 35:37068ā37080, 2022. [Cyb89] George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of control, signals and systems, 2(4):303ā314, 1989. [DDF+22] Ingrid Daubechies, Ronald DeVore, Simon Foucart, Boris Hanin, and Guergana Petrova. Nonlinear approximation and (deep) relu networks. Constructive Approximation, 55(1):127ā172, 2022. [DHP21] Ronald DeVore, Boris Hanin, and Guergana Petrova. Neural network approximation. Acta Numerica, 30:327ā444, 2021. [DIRR05] Nenad DediÄ, Gene Itkis, Leonid Reyzin, and Scott Russell. Upper and lower bounds on black-box steganography. In Theory of Cryptography: Second Theory of Cryptography Conference, TCC 2005, Cambridge, MA, USA, February 10-12, 2005. Proceedings 2, pages 227ā244. Springer, 2005. [dWSK+22] Christian Schroeder de Witt, Samuel Sokota, J Zico Kolter, Jakob Foerster, and Martin Strohmeier. Perfectly secure steganography using minimum entropy coupling. arXiv preprint arXiv:2210.14889, 2022. [ES16] Ronen Eldan and Ohad Shamir. The power of depth for feedforward neural networks. In Conference on learning theory, pages 907ā940. PMLR, 2016. [FGHS22] John Fearnley, Paul Goldberg, Alexandros Hollender, and Rahul Savani. The complexity of gradient descent: Cls= ppad ā© pls. Journal of the ACM, 70(1):1ā74, 2022. [GDGG17] Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint arXiv:1708.06733, 2017. [GJMM20] Sanjam Garg, Somesh Jha, Saeed Mahloujifar, and Mahmoody Mohammad. Adversarially robust learning could leverage computational hardness. In Algorithmic Learning Theory, pages 364ā385. PMLR, 2020. [GKVZ22] Shafi Goldwasser, Michael P Kim, Vinod Vaikuntanathan, and Or Zamir. Planting undetectable backdoors in machine learning models. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 931ā942. IEEE, 2022. [GLDGG19] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230ā47244, 2019. [GMR88] Shafi Goldwasser, Silvio Micali, and Ronald L Rivest. A digital signature scheme secure against adaptive chosen-message attacks. SIAM Journal on computing, 17(2):281ā308, 1988. [GTX+22] Micah Goldblum, Dimitris Tsipras, Chulin Xie, Xinyun Chen, Avi Schwarzschild, Dawn Song, Aleksander Madry, Bo Li, and Tom Goldstein. Dataset security for machine learning: Data poisoning, backdoor attacks, and defenses. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(2):1563ā1580, 2022. [HCK22] Sanghyun Hong, Nicholas Carlini, and Alexey Kurakin. Handcrafted backdoors in deep neural networks. Advances in Neural Information Processing Systems, 35:8068ā8080, 2022. [HCSS21] Dan Hendrycks, Nicholas Carlini, John Schulman, and Jacob Steinhardt. Unsolved problems in ml safety. arXiv preprint arXiv:2109.13916, 2021. [HDM+24] Evan Hubinger, Carson Denison, Jesse Mu, Mike Lambert, Meg Tong, Monte MacDiarmid, Tamera Lanham, Daniel M Ziegler, Tim Maxwell, Newton Cheng, et al. Sleeper agents: Training deceptive llms that persist through safety training. arXiv preprint arXiv:2401.05566, 2024. [HILL99] Johan HĆ„stad, Russell Impagliazzo, Leonid A Levin, and Michael Luby. A pseudorandom generator from any one-way function. SIAM Journal on Computing, 28(4):1364ā1396, 1999. [HJH+24] Jiaming He, Wenbo Jiang, Guanyu Hou, Wenshu Fan, Rui Zhang, and Hongwei Li. Talk too much: Poisoning large language models under token limit. arXiv preprint arXiv:2404.14795, 2024. [HKSO21] Jonathan Hayase, Weihao Kong, Raghav Somani, and Sewoong Oh. Spectre: Defending against backdoor attacks using robust statistics. In International Conference on Machine Learning, pages 4129ā4139. PMLR, 2021. [HLVA02] Nicholas J Hopper, John Langford, and Luis Von Ahn. Provably secure steganography. In Advances in CryptologyāCRYPTO 2002: 22nd Annual International Cryptology Conference Santa Barbara, California, USA, August 18ā22, 2002 Proceedings 22, pages 77ā92. Springer, 2002. [HS17] Boris Hanin and Mark Sellke. Approximating continuous functions by relu nets of minimal width. arXiv preprint arXiv:1710.11278, 2017. [HZB+23] Hai Huang, Zhengyu Zhao, Michael Backes, Yun Shen, and Yang Zhang. Composite backdoor attacks against large language models. arXiv preprint arXiv:2310.07676, 2023. [IST+19] Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Logan Engstrom, Brandon Tran, and Aleksander Madry. Adversarial examples are not bugs, they are features. Advances in neural information processing systems, 32, 2019. [JHO24] Rishi Jha, Jonathan Hayase, and Sewoong Oh. Label poisoning is all you need. Advances in Neural Information Processing Systems, 36, 2024. [JLS21] Aayush Jain, Huijia Lin, and Amit Sahai. Indistinguishability obfuscation from well-founded assumptions. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, pages 60ā73, 2021. [KGW+23] John Kirchenbauer, Jonas Geiping, Yuxin Wen, Jonathan Katz, Ian Miers, and Tom Goldstein. A watermark for large language models. In International Conference on Machine Learning, pages 17061ā17084. PMLR, 2023. [KJGR21] Gabriel Kaptchuk, Tushar M Jois, Matthew Green, and Aviel D Rubin. Meteor: Cryptographically secure steganography for realistic distributions. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, pages 1529ā1548, 2021. [KJTC23] Nikhil Kandpal, Matthew Jagielski, Florian TramĆØr, and Nicholas Carlini. Backdoor attacks for in-context learning with language models. arXiv preprint arXiv:2307.14692, 2023. [KLM+23] Alaa Khaddaj, Guillaume Leclerc, Aleksandar Makelov, Kristian Georgiev, Hadi Salman, Andrew Ilyas, and Aleksander Madry. Rethinking backdoor attacks. In International Conference on Machine Learning, pages 16216ā16236. PMLR, 2023. [Lam79] Leslie Lamport. Constructing digital signatures from a one way function. 1979. [LLC+24] Yanzhou Li, Tianlin Li, Kangjie Chen, Jian Zhang, Shangqing Liu, Wenhan Wang, Tianwei Zhang, and Yang Liu. Badedit: Backdooring large language models by model editing. arXiv preprint arXiv:2403.13355, 2024. [LPW+17] Zhou Lu, Hongming Pu, Feicheng Wang, Zhiqiang Hu, and Liwei Wang. The expressive power of neural networks: A view from the width. Advances in neural information processing systems, 30, 2017. [LS16] Shiyu Liang and Rayadurgam Srikant. Why deep neural networks for function approximation? arXiv preprint arXiv:1610.04161, 2016. [MB21] Naren Manoj and Avrim Blum. Excess capacity and backdoor poisoning. Advances in Neural Information Processing Systems, 34:20373ā20384, 2021. [MLW+23] Kai Mei, Zheng Li, Zhenting Wang, Yang Zhang, and Shiqing Ma. Notable: Transferable backdoor attacks against prompt-based nlp models. arXiv preprint arXiv:2305.17826, 2023. [MMS21] Ankur Moitra, Elchanan Mossel, and Colin Sandon. Spoofing generalization: When canāt you trust proprietary models? arXiv preprint arXiv:2106.08393, 2021. [NSH19] Milad Nasr, Reza Shokri, and Amir Houmansadr. Comprehensive privacy analysis of deep learning: Passive and active white-box inference attacks against centralized and federated learning. In 2019 IEEE symposium on security and privacy (SP), pages 739ā753. IEEE, 2019. [NY89] Moni Naor and Moti Yung. Universal one-way hash functions and their cryptographic applications. In Proceedings of the twenty-first annual ACM symposium on Theory of computing, pages 33ā43, 1989. [RCM+24] Javier Rando, Francesco Croce, KryÅ”tof Mitka, Stepan Shabalin, Maksym Andriushchenko, Nicolas Flammarion, and Florian TramĆØr. Competition report: Finding universal jailbreak backdoors in aligned llms. arXiv preprint arXiv:2404.14461, 2024. [Rom90] John Rompel. One-way functions are necessary and sufficient for secure signatures. In Proceedings of the twenty-second annual ACM symposium on Theory of computing, pages 387ā394, 1990. [R07] Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. Advances in neural information processing systems, 20, 2007. [RRL+18] Md Atiqur Rahman, Tanzila Rahman, Robert LaganiĆØre, Noman Mohammed, and Yang Wang. Membership inference attack against differentially private deep learning model. Trans. Data Priv., 11(1):61ā79, 2018. [RSL18] Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. Certified defenses against adversarial examples. arXiv preprint arXiv:1801.09344, 2018. [RT23] Javier Rando and Florian TramĆØr. Universal jailbreak backdoors from poisoned human feedback. arXiv preprint arXiv:2311.14455, 2023. [SESS19] Pedro Savarese, Itay Evron, Daniel Soudry, and Nathan Srebro. How do infinite width bounded norm networks look in function space? In Conference on Learning Theory, pages 2667ā2690. PMLR, 2019. [SH20] Johannes Schmidt-Hieber. Nonparametric regression using deep neural networks with relu activation function. 2020. [Shi17] Frank Y Shih. Digital watermarking and steganography: fundamentals and techniques. CRC press, 2017. [SJI+22] Hadi Salman, Saachi Jain, Andrew Ilyas, Logan Engstrom, Eric Wong, and Aleksander Madry. When does bias transfer in transfer learning? arXiv preprint arXiv:2207.02842, 2022. [SJZ+21] Lujia Shen, Shouling Ji, Xuhong Zhang, Jinfeng Li, Jing Chen, Jie Shi, Chengfang Fang, Jianwei Yin, and Ting Wang. Backdoor pre-trained models can transfer to all. arXiv preprint arXiv:2111.00197, 2021. [SKK+16] Sebastian Schrittwieser, Stefan Katzenbeisser, Johannes Kinder, Georg Merzdovnik, and Edgar Weippl. Protecting software through obfuscation: Can it keep pace with progress in code analysis? Acm computing surveys (csur), 49(1):1ā37, 2016. [SNG+19] Ali Shafahi, Mahyar Najibi, Mohammad Amin Ghiasi, Zheng Xu, John Dickerson, Christoph Studer, Larry S Davis, Gavin Taylor, and Tom Goldstein. Adversarial training for free! Advances in neural information processing systems, 32, 2019. [SRS17] Congzheng Song, Thomas Ristenpart, and Vitaly Shmatikov. Machine learning models that remember too much. In Proceedings of the 2017 ACM SIGSAC Conference on computer and communications security, pages 587ā601, 2017. [S17] Itay Safran and Ohad Shamir. Depth-width tradeoffs in approximating natural functions with neural networks. In International conference on machine learning, pages 2979ā2987. PMLR, 2017. [SSDC20] Weijia Shi, Andy Shih, Adnan Darwiche, and Arthur Choi. On tractable representations of binary neural networks. arXiv preprint arXiv:2004.02082, 2020. [SZS+13] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. [Tel16] Matus Telgarsky. Benefits of depth in neural networks. In Conference on learning theory, pages 1517ā1539. PMLR, 2016. [Tel21] Matus Telgarsky. Deep learning theory lecture notes, 2021. [TLM18] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. Advances in neural information processing systems, 31, 2018. [WCP+23] Boxin Wang, Weixin Chen, Hengzhi Pei, Chulin Xie, Mintong Kang, Chenhui Zhang, Chejian Xu, Zidi Xiong, Ritik Dutta, Rylan Schaeffer, et al. Decodingtrust: A comprehensive assessment of trustworthiness in gpt models. arXiv preprint arXiv:2306.11698, 2023. [WK18] Eric Wong and Zico Kolter. Provable defenses against adversarial examples via the convex outer adversarial polytope. In International conference on machine learning, pages 5286ā5295. PMLR, 2018. [WMH+24] Yuxin Wen, Leo Marchyok, Sanghyun Hong, Jonas Geiping, Tom Goldstein, and Nicholas Carlini. Privacy backdoors: Enhancing membership inference through poisoning pre-trained models. arXiv preprint arXiv:2404.01231, 2024. [WWSK23] Alexander Wan, Eric Wallace, Sheng Shen, and Dan Klein. Poisoning language models during instruction tuning. In International Conference on Machine Learning, pages 35413ā35425. PMLR, 2023. [XCC+22] Lei Xu, Yangyi Chen, Ganqu Cui, Hongcheng Gao, and Zhiyuan Liu. Exploring the universal vulnerability of prompt-based learning paradigm. arXiv preprint arXiv:2204.05239, 2022. [XJX+24] Zhen Xiang, Fengqing Jiang, Zidi Xiong, Bhaskar Ramasubramanian, Radha Poovendran, and Bo Li. Badchain: Backdoor chain-of-thought prompting for large language models. arXiv preprint arXiv:2401.12242, 2024. [XMW+23] Jiashu Xu, Mingyu Derek Ma, Fei Wang, Chaowei Xiao, and Muhao Chen. Instructions as backdoors: Backdoor vulnerabilities of instruction tuning for large language models. arXiv preprint arXiv:2305.14710, 2023. [Yar17] Dmitry Yarotsky. Error bounds for approximations with deep relu networks. Neural Networks, 94:103ā114, 2017. [YXG+24] Haomiao Yang, Kunlan Xiang, Mengyu Ge, Hongwei Li, Rongxing Lu, and Shui Yu. A comprehensive overview of backdoor attacks in large language models within communication networks. IEEE Network, 2024. [Y97] Adam Young and Moti Yung. Kleptography: Using cryptography against cryptography. In Advances in CryptologyāEUROCRYPTā97: International Conference on the Theory and Application of Cryptographic Techniques Konstanz, Germany, May 11ā15, 1997 Proceedings 16, pages 62ā74. Springer, 1997. [Zam24] Or Zamir. Excuse me, sir? your language model is leaking (information). arXiv preprint arXiv:2401.10360, 2024. [ZJP+20] Yuheng Zhang, Ruoxi Jia, Hengzhi Pei, Wenxiao Wang, Bo Li, and Dawn Song. The secret revealer: Generative model-inversion attacks against deep neural networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 253ā261, 2020. [ZJT+24] Shuai Zhao, Meihuizi Jia, Luu Anh Tuan, Fengjun Pan, and Jinming Wen. Universal vulnerabilities in large language models: Backdoor attacks for in-context learning. arXiv preprint arXiv:2401.05949, 2024. [ZWKF23] Andy Zou, Zifan Wang, J Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043, 2023. [ZWT+23] Shuai Zhao, Jinming Wen, Luu Anh Tuan, Junbo Zhao, and Jie Fu. Prompt as triggers for backdoor attack: Examining the vulnerability in language models. arXiv preprint arXiv:2305.01219, 2023. [ZZJW21] Xinyang Zhang, Zheng Zhang, Shouling Ji, and Ting Wang. Trojaning language models for fun and profit. In 2021 IEEE European Symposium on Security and Privacy (EuroS&P), pages 179ā197. IEEE, 2021. Appendix A Proof of Theorem 3.2 We restate the Theorem for convenience. Theorem (White-Box Undetectability via iO). Assuming the existence of secure pseudorandom generators (2.5) and secure indistinguishability obfuscation (2.7), for any probabilistic polynomial-time (PPT) algorithm AA, and security parameters Ī»,Ī»1,Ī»2āāsubscript1subscript2āĪ», _1, _2 Ī» , Ī»1 , Ī»2 ā blackboard_N it holds that |[ā¢(iā¢(1Ī»,C))=1]āsāā¼Uā¢0,1Ī»1[ā¢(iā¢(1Ī»,C~))=1]|ā¤ā¢(Ī»3)+ā¢(Ī»1).delimited-[]superscript11subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscript1~1subscript3subscript1 | Pr\/ [A(iO(1^Ī»,C))=1 ]% - Pr\/_s^* U\0,1\ _1 [A(i% O(1^Ī», C))=1 ] |⤠negl(% _3)+ negl( _1).| start_BIGOP Pr end_BIGOP [ A ( i O ( 1Ī» , C ) ) = 1 ] - start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( i O ( 1Ī» , over~ start_ARG C end_ARG ) ) = 1 ] | ⤠sansserif_negl ( Ī»3 ) + sansserif_negl ( Ī»1 ) . Proof. We consider a family of circuits CrsubscriptC_rCitalic_r, parameterized by rā0,12ā¢Ī»1superscript012subscript1rā\0,1\^2 _1r ā 0 , 1 2 Ī»1 that implement the following function: frā¢(x,(x,xV))=subscriptsubscriptsubscriptsubscriptabsent f_r(x_ C,(x_ PRG,x_V))=fitalic_r ( xsansserif_C , ( xsansserif_PRG , xitalic_V ) ) = C^ā¢(C)ā ā¢[ā¢(x)=ā¢(r)]ā ā¢(pā¢k,x,xV)ā ^subscript1delimited-[]subscriptsubscriptsubscript C( x_C)Ā· 1[ PRG(x_ % PRG)= PRG(r)]Ā· Verify(pk,x_ C,x_V)over start_ARG C end_ARG ( italic_xitalic_C ) ā blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( r ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_V ) +Cā¢()ā (1āā¢[ā¢(x)=ā¢(r)]ā ā¢(pā¢k,x,xV)).ā 1ā 1delimited-[]subscriptsubscriptsubscript +C( x)Ā·(1- 1[ PRG(x_ PRG)=% PRG(r)]Ā· Verify(pk,x_ C,x_V)).+ C ( italic_x ) ā ( 1 - blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( r ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_V ) ) . By security of PRG (2.5), for any PPT AA: |sāā¼Uā¢0,1Ī»1[ā¢(ā¢(sā))=1]ārāā¼Uā¢0,12ā¢Ī»1[ā¢(rā)=1]|ā¤ā¢(Ī»1).subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscript1subscriptsimilar-tosuperscriptsuperscript012subscript1delimited-[]superscript1subscript1 | Pr\/_s^* U\0,1\ _1 [A(% PRG(s^*))=1 ]- Pr\/_r^* U\0,1\^2 _% 1 [A(r^*)=1 ] |⤠negl( _1).| start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( sansserif_PRG ( sā ) ) = 1 ] - start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( rā ) = 1 ] | ⤠sansserif_negl ( Ī»1 ) . By further restricting to PPT algorithms AA that operate on the composed input Tā¢(r)=iā¢(1Ī»,Cr)superscript1subscriptT(r)=iO(1^Ī»,C_r)T ( r ) = i O ( 1Ī» , Citalic_r ) , and since both compositions take polyā¢(|C|)poly poly(|C|)poly ( | C | ), we have for any PPT algorithm ā²superscriptā²A Aā²: |sāā¼Uā¢0,1Ī»[ā²ā¢(iā¢(1Ī»,Cā¢(sā)))=1]ārāā¼Uā¢0,12ā¢Ī»[ā²ā¢(iā¢(1Ī»,Crā))=1]|ā¤ā¢(Ī»1).subscriptsimilar-tosuperscriptsuperscript01delimited-[]superscriptā²1subscriptsuperscript1subscriptsimilar-tosuperscriptsuperscript012delimited-[]superscriptā²1subscriptsuperscript1subscript1 | Pr\/_s^* U\0,1\^Ī» [% A (iO(1^Ī»,C_ PRG(s^*)))=1% ]- Pr\/_r^* U\0,1\^2Ī» [A^% (iO(1^Ī»,C_r^*))=1 ] |⤠negl(% _1).| start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» [ Aā² ( i O ( 1Ī» , Csansserif_PRG ( sā ) ) ) = 1 ] - start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» [ Aā² ( i O ( 1Ī» , Citalic_rā ) ) = 1 ] | ⤠sansserif_negl ( Ī»1 ) . (A.1) Since |rangeā¢()|ā¤2Ī»1=ā¢(Ī»1)rangesuperscript2subscript1subscript1|range( PRG)|⤠2 _1= negl( _1)| range ( sansserif_PRG ) | ⤠2Ī»1 = sansserif_negl ( Ī»1 ), and frāā¢(x,(x,xV))=subscriptsuperscriptsubscriptsubscriptsubscriptabsent f_r^*(x_ C,(x_ PRG,x_V))=fitalic_rā ( xsansserif_C , ( xsansserif_PRG , xitalic_V ) ) = Cā¢()ā (1āā¢[ā¢(x)=ā¢(rā)]ā ā¢(pā¢k,x,xV))ā 1ā 1delimited-[]subscriptsuperscriptsubscriptsubscript C( x)Ā·(1- 1[ PRG(x_ PRG)=% PRG(r^*)]Ā· Verify(pk,x_ C,x_V))C ( italic_x ) ā ( 1 - blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( rā ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_V ) ) +C^ā¢(C)ā ā¢[ā¢(x)=ā¢(rā)]ā ā¢(pā¢k,x,xV),ā ^subscript1delimited-[]subscriptsuperscriptsubscriptsubscript + C( x_C)Ā· 1[ PRG(x_ % PRG)= PRG(r^*)]Ā· Verify(pk,x_ C,x_V),+ over start_ARG C end_ARG ( italic_xitalic_C ) ā blackboard_1 [ sansserif_PRG ( xsansserif_PRG ) = sansserif_PRG ( rā ) ] ā sansserif_Verify ( p k , xsansserif_C , xitalic_V ) , rāā¼Uā¢0,12ā¢Ī»1[āsā0,1Ī»1:(s)=r]ā„1ā(Ī»1) Pr\/_r^* U\0,1\^2 _1[ ā s% ā\0,1\ _1: PRG(s)=r]ā„ 1- negl( _1)start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ ā s ā 0 , 1 Ī»1 : sansserif_PRG ( s ) = r ] ā„ 1 - sansserif_negl ( Ī»1 ) ārāā¼Uā¢0,12ā¢Ī»1[Crāā¢(x)=Cā¢(x)ā¢āxā0,1n]ā„1āā¢(Ī»1).āabsentsubscriptsimilar-tosuperscriptsuperscript012subscript1delimited-[]subscriptsuperscriptfor-allsuperscript011subscript1 Pr\/_r^* U\0,1\^2 _1[% C_r^*(x)=C(x)ā xā\0,1\^n]ā„ 1- negl( _1).ā start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ Citalic_rā ( x ) = C ( x ) ā x ā 0 , 1 n ] ā„ 1 - sansserif_negl ( Ī»1 ) . Hence with probability at least 1ā2Ī»11superscript2subscript11-2 _11 - 2Ī»1, circuits CrāsubscriptsuperscriptC_r^*Citalic_rā and C are computationally equivalent and hence by application of iO we further have: |[ā¢(iā¢(1Ī»,C))=1]ārāā¼Uā¢0,1Ī»1[ā¢(iā¢(1Ī»,Crā))=1]|ā¤ā¢(Ī»)+ā¢(Ī»1).delimited-[]superscript11subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscript1subscriptsuperscript1subscript1 | Pr\/ [A(iO(1^Ī»% ,C))=1 ]- Pr\/_r^* U\0,1\ _1 [% A(iO(1^Ī»,C_r^*))=1 ] |⤠% negl(Ī»)+ negl( _1).| start_BIGOP Pr end_BIGOP [ A ( i O ( 1Ī» , C ) ) = 1 ] - start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( i O ( 1Ī» , Citalic_rā ) ) = 1 ] | ⤠sansserif_negl ( Ī» ) + sansserif_negl ( Ī»1 ) . (A.2) We conclude by noticing that circuit Cā¢(sā)subscriptsuperscriptC_ PRG(s^*)Csansserif_PRG ( sā ) is identically equal to circuit C~ā¢(x)~ C(x)over~ start_ARG C end_ARG ( x ), and combining (A.1) and (A.2): |sāā¼Uā¢0,1Ī»1[ā²ā¢(iā¢(1Ī»,Cā¢(sā)))=1]ārāā¼Uā¢0,12ā¢Ī»[ā²ā¢(iā¢(1Ī»,Crā))=1]|ā¤ā¢(Ī»1)subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscriptā²1subscriptsuperscript1subscriptsimilar-tosuperscriptsuperscript012delimited-[]superscriptā²1subscriptsuperscript1subscript1 | Pr\/_s^* U\0,1\ _1 [% A (iO(1^Ī»,C_ PRG(s^*)))=1% ]- Pr\/_r^* U\0,1\^2Ī» [A^% (iO(1^Ī»,C_r^*))=1 ] |⤠negl(% _1)| start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ Aā² ( i O ( 1Ī» , Csansserif_PRG ( sā ) ) ) = 1 ] - start_BIGOP Pr end_BIGOPrā ā¼ U 0 , 1 2 Ī» [ Aā² ( i O ( 1Ī» , Citalic_rā ) ) = 1 ] | ⤠sansserif_negl ( Ī»1 ) ā ā |[ā¢(iā¢(1Ī»,C))=1]āsāā¼Uā¢0,1Ī»1[ā¢(iā¢(1Ī»,C~))=1]|ā¤ā¢(Ī»)+ā¢(Ī»1).delimited-[]superscript11subscriptsimilar-tosuperscriptsuperscript01subscript1delimited-[]superscript1~1subscript1 | Pr\/ [A(iO(1^Ī»% ,C))=1 ]- Pr\/_s^* U\0,1\ _1 [% A(iO(1^Ī», C))=1 ] |ā¤% negl(Ī»)+ negl( _1).| start_BIGOP Pr end_BIGOP [ A ( i O ( 1Ī» , C ) ) = 1 ] - start_BIGOP Pr end_BIGOPsā ā¼ U 0 , 1 Ī» start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT [ A ( i O ( 1Ī» , over~ start_ARG C end_ARG ) ) = 1 ] | ⤠sansserif_negl ( Ī» ) + sansserif_negl ( Ī»1 ) . ā Appendix B Proofs of Section 3.2 B.1 Proof of Theorem 3.6 Let us restate the result. Theorem (ANN to Boolean). Given an L-Lipshitz ANN f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ] of size s, then for any precision parameter kāāk ā blackboard_N, there is an algorithm that runs in time polyā¢(s,n,k)poly poly(s,n,k)poly ( s , n , k ) and outputs a Boolean circuit C:0,1nā kā0,1m:āsuperscript01ā superscript01C:\0,1\^nĀ· kā\0,1\^mC : 0 , 1 n ā k ā 0 , 1 m with number of gates polyā¢(s,n,k)poly poly(s,n,k)poly ( s , n , k ) and m=polyā¢(s,n,k)polym= poly(s,n,k)m = poly ( s , n , k ) such that for any x,xā²x,x x , xā²: |fā¢(x)āTā1ā¢(Cā¢(Tkā¢(x)))|ā¤L2k,superscript1subscriptsuperscript2|f(x)-T^-1(C(T_k(x)))|⤠L2^k,| f ( x ) - T- 1 ( C ( Titalic_k ( x ) ) ) | ⤠divide start_ARG L end_ARG start_ARG 2k end_ARG , |Tā1ā¢(Cā¢(Tkā¢(x)))āTā1ā¢(Cā¢(Tkā¢(xā²)))|ā¤L2kā1+Lā āxāxā²āā,superscript1subscriptsuperscript1subscriptsuperscriptā²21ā subscriptnormsuperscriptā²|T^-1(C(T_k(x)))-T^-1(C(T_k(x )))|⤠L2^k-1+L% Ā·\|x-x \|_ā,| T- 1 ( C ( Titalic_k ( x ) ) ) - T- 1 ( C ( Titalic_k ( xā² ) ) ) | ⤠divide start_ARG L end_ARG start_ARG 2k - 1 end_ARG + L ā ā„ x - xā² ā„ā , where TksubscriptT_kTitalic_k and Tā1superscript1T^-1T- 1 are defined in Definition 3.4. Proof. The transformation of Theorem 3.6 follows by simply compiling a neural network to machine code (see also [SSDC20, Section 3]) where the input is truncated within some predefined precision. Note that |fā¢(x)āTā1ā¢(Cā¢(Tkā¢(x)))|ā¤Lā āxāTā1ā¢(Tkā¢(x))āā=L2ksuperscript1subscriptā subscriptnormsuperscript1subscriptsuperscript2|f(x)-T^-1(C(T_k(x)))|⤠LĀ·\|x-T^-1(T_k(x))\|_ā= % L2^k| f ( x ) - T- 1 ( C ( Titalic_k ( x ) ) ) | ⤠L ā ā„ x - T- 1 ( Titalic_k ( x ) ) ā„ā = divide start_ARG L end_ARG start_ARG 2k end_ARG and we also have |Tā1ā¢(Cā¢(Tkā¢(x)))āTā1ā¢(Cā¢(Tkā¢(xā²)))|ā¤|Tā1ā¢(Cā¢(Tkā¢(x)))āfā¢(x)|+|Tā1ā¢(Cā¢(Tkā¢(xā²)))āfā¢(xā²)|+|fā¢(x)āfā¢(xā²)|ā¤L2kā1+Lā āxāxā²āā.superscript1subscriptsuperscript1subscriptsuperscriptā²1subscriptsuperscript1subscriptsuperscriptā²superscriptā²21ā subscriptnormsuperscriptā²|T^-1(C(T_k(x)))-T^-1(C(T_k(x )))|ā¤|T^-1(C(T_k(x)))-f(x% )|+|T^-1(C(T_k(x )))-f(x )|+|f(x)-f(x )|⤠% L2^k-1+LĀ·\|x-x \|_ā.| T- 1 ( C ( Titalic_k ( x ) ) ) - T- 1 ( C ( Titalic_k ( xā² ) ) ) | ⤠| T- 1 ( C ( Titalic_k ( x ) ) ) - f ( x ) | + | T- 1 ( C ( Titalic_k ( xā² ) ) ) - f ( xā² ) | + | f ( x ) - f ( xā² ) | ⤠divide start_ARG L end_ARG start_ARG 2k - 1 end_ARG + L ā ā„ x - xā² ā„ā . ā B.2 Proof of Theorem 3.7 We first restate the Theorem we would like to prove. Theorem (Boolean to ANN, inspired by [FGHS22]). Given a Boolean circuit C:0,1nā kā0,1m:āsuperscript01ā superscript01C:\0,1\^nĀ· kā\0,1\^mC : 0 , 1 n ā k ā 0 , 1 m with k,m,nāāk,m,n , m , n ā blackboard_N with M gates and ϵ>0italic-ϵ0ε>0ϵ > 0 such that |Tā1(C(Tk((x)))āTā1(C(Tk(xā²)))|ā¤Ļµāx,xā²ā[0,1]n s.t. ā„xāxā²ā„āā¤12k,|T^-1(C(T_k((x)))-T^-1(C(T_k(x )))|ā¤Īµ % āx,x ā[0,1]^n s.t. \|x-x \|_ā% ⤠12^k,| T- 1 ( C ( Titalic_k ( ( x ) ) ) - T- 1 ( C ( Titalic_k ( xā² ) ) ) | ⤠ϵ ā x , xā² ā [ 0 , 1 ]n s.t. ā„ x - xā² ā„ā ⤠divide start_ARG 1 end_ARG start_ARG 2k end_ARG , where TksubscriptT_kTitalic_k and Tā1superscript1T^-1T- 1 are defined in Definition 3.4, there is an algorithm that runs in time polyā¢(n,k,M)poly poly(n,k,M)poly ( n , k , M ) and outputs an ANN f:[0,1]nā[0,1]:āsuperscript0101f:[0,1]^nā[0,1]f : [ 0 , 1 ]n ā [ 0 , 1 ] with size polyā¢(n,k,M)poly poly(n,k,M)poly ( n , k , M ) such that for any xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n it holds that |Tā1ā¢(Cā¢(Tkā¢(x)))āfā¢(x)|ā¤2ā¢Ļµsuperscript1subscript2italic-ϵ|T^-1(C(T_k(x)))-f(x)|⤠2ε| T- 1 ( C ( Titalic_k ( x ) ) ) - f ( x ) | ⤠2 ϵ. Proof. Our proof is directly inspired by [FGHS22]. We start with the definition of an arithmetic circuit (see [FGHS22] for details). An arithmetic circuit representing the function f:ānāām:āsuperscriptāsuperscriptāf:R^n ^mf : blackboard_Rn ā blackboard_Rm is a circuit with n inputs and m outputs where every internal node is a gate with fan-in 2 performing an operation in +,ā,Ć,max,min,>\+,-,Ć, , ,>\ + , - , Ć , max , min , > or a rational constant (modelled as a gate with fan-in 0). Linear arithmetic circuits are only allowed to use the operations +,ā,max,min,Ćζ\+,-, , ,Ćζ\ + , - , max , min , à ζ and rational constants; the operation ĆζabsentĆζà ζ denotes multiplication by a constant. Note that every linear arithmetic circuit is a well-behaved arithmetic circuit (see [FGHS22]) and hence can be evaluated in polynomial time. [FGHS22] show that functions computed by arithmetic circuits can be approximated by linear arithmetic circuits with quite small error. We will essentially show something similar replacing linear arithmetic circuits with ReLU networks. Our proof proceeds in the following three steps, based on [FGHS22, Section E]. Discretization Let N=2ksuperscript2N=2^kN = 2k. We discretize the set [0,1]01[0,1][ 0 , 1 ] into N+11N+1N + 1 points ā=0,1/N,2/N,ā¦,1ā012ā¦1I=\0,1/N,2/N,ā¦,1\I = 0 , 1 / N , 2 / N , ⦠, 1 , and for any element pā[0,1]nsuperscript01pā[0,1]^np ā [ 0 , 1 ]n, we let p^āān^superscriptā p ^nover start_ARG p end_ARG ā Iitalic_n denote its discretization, i.e., p^=(p^i)iā[n]^subscriptsubscript^delimited-[] p=( p_i)_iā[n]over start_ARG p end_ARG = ( over start_ARG p end_ARGi )i ā [ n ] such that for each coordinate iā[n]delimited-[]iā[n]i ā [ n ] p^i=iāN,where ā¢iā=maxā”iāā[N]:iāNā¤pi.formulae-sequencesubscript^superscriptwhere superscript:superscriptdelimited-[]superscriptsubscript p_i= i^*N\,,~where i^*= \i^*ā[N]% : i^*N⤠p_i \.over start_ARG p end_ARGi = divide start_ARG iā end_ARG start_ARG N end_ARG , where iā = max iā ā [ N ] : divide start_ARG iā end_ARG start_ARG N end_ARG ⤠pitalic_i . (B.1) Construct Linear Arithmetic Circuit Given as input a Boolean circuit C, our strategy is to use the approach of [FGHS22, Lemma E.3] to construct, in time polynomial in the size of C, a linear arithmetic circuit F:[0,1]nāā:āsuperscript01āF:[0,1]^n : [ 0 , 1 ]n ā blackboard_R that will well-approximate C as we will see below. Before we proceed with the proof, we use the following gadget that approximates the transformation TksubscriptT_kTitalic_k. Theorem B.1 (Bit Extraction Gadget [FGHS22]). Let projā¢(x)=minā”(0,maxā”(1,x))proj01proj(x)= (0, (1,x))proj ( x ) = min ( 0 , max ( 1 , x ) ) and consider a precision parameter āāāāā ā ā blackboard_N. Define the bit extraction function t0ā¢(x)=subscript0absent t_0(x)=t0 ( x ) = 0,0 ~~0\,,0 , tkā¢(x)=subscriptabsent t_k(x)=titalic_k ( x ) = projā¢(2āā (xā2ākāākā²=0kā12ākā²ā tkā²ā¢(x))),for k>0.projā superscript2āsuperscript2superscriptsubscriptsuperscriptā²01ā superscript2superscriptā²subscriptsuperscriptā²for k>0 ~~proj (2 Ā· (x-2^-k- _k^% =0^k-12^-k Ā· t_k (x) ) ), % for $k>0$.proj ( 2ā ā ( x - 2- k - ākā² = 0k - 1 2- k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT ā titalic_kā² ( x ) ) ) , for k > 0 . Fix kāāk ā blackboard_N. tkā¢(x)subscriptt_k(x)titalic_k ( x ) can be computed by a linear arithmetic circuit using Oā¢(k)O(k)O ( k ) layers and a total of Oā¢(k2)superscript2O(k^2)O ( k2 ) nodes. The output is T^kā¢(x)=(t0ā¢(x),ā¦,tkā¢(x))subscript^subscript0ā¦subscript T_k(x)=(t_0(x),ā¦,t_k(x))over start_ARG T end_ARGk ( x ) = ( t0 ( x ) , ⦠, titalic_k ( x ) ). Moreover, given a number xā(0,1)01xā(0,1)x ā ( 0 , 1 ), represented in binary as b0.b1ā¢b2ā¢ā¦formulae-sequencesubscript0subscript1subscript2ā¦\b_0.b_1b_2ā¦\ b0 . b1 b2 ⦠where bkā²subscriptsuperscriptā²b_k bitalic_kā² is the kā²-th most significant digit, if there exists kāā[k+1,ā]superscript1āk^*ā[k+1, ]kā ā [ k + 1 , ā ] such that bkā=1subscriptsuperscript1b_k^*=1bitalic_kā = 1, then T^k(x)=0.b1b2ā¦bk T_k(x)=\0.b_1b_2⦠b_k\over start_ARG T end_ARGk ( x ) = 0 . b1 b2 ⦠bitalic_k . Proof. We prove the first part of the statement based on induction that for each k, we can compute a linear arithmetic circuit outputting (x,f0ā¢(x),f1ā¢(x),ā¦,fkā¢(x))subscript0subscript1ā¦subscript(x,f_0(x),f_1(x),ā¦,f_k(x))( x , f0 ( x ) , f1 ( x ) , ⦠, fitalic_k ( x ) ) using 3ā k+2ā 323Ā· k+23 ā k + 2 layers a total of 3ā¢ākā²=1kā²+43superscriptsubscriptsuperscriptā²1superscriptā²43 _k =1^kk +43 ākā² = 1k kā² + 4 nodes. Base case k=00k=0k = 0: We can trivially design a linear arithmetic circuit using two layers and two nodes that outputs (x,f0ā¢(x))=(x,0)subscript00(x,f_0(x))=(x,0)( x , f0 ( x ) ) = ( x , 0 ). Induction step: Assume that for kā²ā1superscriptā²1k -1kā² - 1 we can design a linear arithmetic circuit that outputs (x,f0ā¢(x),f1ā¢(x),ā¦,fkā²ā1ā¢(x)).subscript0subscript1ā¦subscriptsuperscriptā²1(x,f_0(x),f_1(x),ā¦,f_k -1(x))\,.( x , f0 ( x ) , f1 ( x ) , ⦠, fitalic_kā² - 1 ( x ) ) . Let C=2āā (xā2ākā²āākā²=0kā²ā12ākā²ā fkā²ā¢(x))ā superscript2āsuperscript2superscriptā²subscriptsuperscriptā²0superscriptā²1ā superscript2superscriptā²subscriptsuperscriptā²C=2 Ā· (x-2^-k - _k =0^k -12^-% k Ā· f_k (x) )C = 2ā ā ( x - 2- k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT - ākā² = 0k start_POSTSUPERSCRIPT ā² - 1 end_POSTSUPERSCRIPT 2- k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT ā fitalic_kā² ( x ) ). Observe that fkā²ā¢(x)=minā”(1,maxā”(C,0)),subscriptsuperscriptā²10f_k (x)= (1, (C,0))\,,fitalic_kā² ( x ) = min ( 1 , max ( C , 0 ) ) , and thus we can extend the original linear arithmetic circuit using three additional layers and an addition of 3ā (kā²+1)ā 3superscriptā²13Ā·(k +1)3 ā ( kā² + 1 ) total nodes to output (x,f0ā¢(x),ā¦,fkā²ā¢(x))subscript0ā¦subscriptsuperscriptā²(x,f_0(x),ā¦,f_k (x))( x , f0 ( x ) , ⦠, fitalic_kā² ( x ) ), which completes the proof. We now prove the second part of the statement by induction. Base case k=00k=0k = 0: Since xā(0,1)01xā(0,1)x ā ( 0 , 1 ), the base case follows by definition of f0ā¢(x)=0subscript00f_0(x)=0f0 ( x ) = 0. Induction step: Assume that for kā²<ksuperscriptā²k <kā² < k, fkā²ā¢(x)=bkā²subscriptsuperscriptā²subscriptsuperscriptā²f_k (x)=b_k fitalic_kā² ( x ) = bitalic_kā² and there exists kāā[k+1,ā]superscript1āk^*ā[k+1, ]kā ā [ k + 1 , ā ] such that bkā=1subscriptsuperscript1b_k^*=1bitalic_kā = 1. Observe that xāākā²=0kā12ākā²ā fkā²ā¢(x)ā2k=xāāj=0kā12ājā bkā²ā2k,superscriptsubscriptsuperscriptā²01ā superscript2superscriptā²subscriptsuperscriptā²2superscriptsubscript01ā superscript2subscriptsuperscriptā²2x- _k =0^k-12^-k Ā· f_k (x)-2^k=x-Ī£% _j=0^k-12^-jĀ· b_k -2^k,x - ākā² = 0k - 1 2- k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT ā fitalic_kā² ( x ) - 2k = x - āj = 0k - 1 2- j ā bitalic_kā² - 2k , which is negative if bk=0subscript0b_k=0bitalic_k = 0 and if bk=1subscript1b_k=1bitalic_k = 1 it has value at least 2ākāsuperscript2superscript2^-k^*2- k start_POSTSUPERSCRIPT ā end_POSTSUPERSCRIPT. Since by assumption kāā„āsuperscriptāk^*ā„ ā ā„ ā, projā¢(2āā (xāākā²=0kā12ākā²ā fkā²ā¢(x)ā2k))projā superscript2āsuperscriptsubscriptsuperscriptā²01ā superscript2superscriptā²subscriptsuperscriptā²2proj (2 Ā· (x- _k =0^k-12^-k^% Ā· f_k (x)-2^k ) )proj ( 2ā ā ( x - ākā² = 0k - 1 2- k start_POSTSUPERSCRIPT ā² end_POSTSUPERSCRIPT ā fitalic_kā² ( x ) - 2k ) ) is 00 if bk=0subscript0b_k=0bitalic_k = 0 and 1111 if bk=1subscript1b_k=1bitalic_k = 1, which proves the induction step. ā We describe how the linear arithmetic circuit F is constructed. Fix some point xā[0,1]n.superscript01xā[0,1]^n.x ā [ 0 , 1 ]n . Let Qā¢(x)=x+ā4ā¢nā¢Nā¢ā£āā0,1,ā¦,2ā¢n,conditional-setā4ā01ā¦2Q(x)=\x+ 4nN e ā\0,1,...,2n\\,Q ( x ) = x + divide start_ARG ā end_ARG start_ARG 4 n N end_ARG italic_e ⣠ā ā 0 , 1 , ⦠, 2 n , where eitalic_e is the all-ones vector and N=2ksuperscript2N=2^kN = 2k. The linear arithmetic circuit is designed as follows. ⢠Compute the points in the set Qā¢(x)Q(x)Q ( x ). This corresponds to Step 1 in the proof of [FGHS22, Lemma E.3]. ⢠Let T^ksubscript T_kover start_ARG T end_ARGk be the bit-extraction gadget with precision parameter ā=k+3+ālogā”(n)āā3 =k+3+ (n) ā = k + 3 + ā log ( n ) ā (Theorem B.1), and compute Q~ā¢(x)=T^kā¢(p):pāQā¢(x)~conditional-setsubscript Q(x)=\ T_k(p):pā Q(x)\over~ start_ARG Q end_ARG ( x ) = over start_ARG T end_ARGk ( p ) : p ā Q ( x ) . As mentioned in Step 2 in the proof of [FGHS22, Lemma E.3], since bit-extraction is not continuous, it is not possible to perform it correctly with a linear arithmetic circuit; however, it can be shown that we can do it correctly for most of the points in Qā¢(x).Q(x).Q ( x ) . ⢠Observe that for each pā[0,1]nsuperscript01pā[0,1]^np ā [ 0 , 1 ]n, T^kā¢(p)ā0,1nā ksubscript^superscript01ā T_k(p)ā\0,1\^nĀ· kover start_ARG T end_ARGk ( p ) ā 0 , 1 n ā k. Let C^ Cover start_ARG C end_ARG be the linear arithmetic circuit that originates from the input Boolean circuit C and compute Q^ā¢(x)=C^ā¢(b):bāQ~ā¢(x)^conditional-set^~ Q(x)=\ C(b):bā Q(x)\over start_ARG Q end_ARG ( x ) = over start_ARG C end_ARG ( b ) : b ā over~ start_ARG Q end_ARG ( x ) . The construction of C^ Cover start_ARG C end_ARG is standard, see Step 3 in the proof of [FGHS22, Lemma E.3]. ⢠Let T^ā1superscript^1 T^-1over start_ARG T end_ARG- 1 be the linear arithmetic circuit that implements the Boolean circuit that represents the inverse binary-to-real transformation Tā1superscript1T^-1T- 1 and let QĀÆā¢(x)=T^ā1ā¢(b~):b~āQ^ā¢(x)ĀÆconditional-setsuperscript^1~~ Q(x)=\ T^-1( b): bā Q(x)\overĀÆ start_ARG Q end_ARG ( x ) = over start_ARG T end_ARG- 1 ( over~ start_ARG b end_ARG ) : over~ start_ARG b end_ARG ā over start_ARG Q end_ARG ( x ) . ⢠Finally output the median in QĀÆā¢(x)ĀÆ Q(x)overĀÆ start_ARG Q end_ARG ( x ) using a sorting network that can be implemented with a linear arithmetic circuit of size polyā¢(n)poly poly(n)poly ( n ); see Step 4 of [FGHS22, Lemma E.3]. The output is a synchronous linear arithmetic circuit since it is the composition of synchronous linear arithmetic circuits and its total size is polyā¢(n,k,M)poly poly(n,k,M)poly ( n , k , M ), where kā nā kĀ· nk ā n is the input of C and M is the number of gates of C. Approximation Guarantee Now we prove that on input xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n the output of the network Fā¢(x)F(x)F ( x ) is in the set: [Tā1ā¢(Cā¢(Tkā¢(x)))ā2ā¢Ļµ,Tā1ā¢(Cā¢(Tkā¢(x)))+2ā¢Ļµ].superscript1subscript2italic-ϵsuperscript1subscript2italic-ϵ [T^-1(C(T_k(x)))-2ε,T^-1(C(T_k(x)))+2ε ].[ T- 1 ( C ( Titalic_k ( x ) ) ) - 2 ϵ , T- 1 ( C ( Titalic_k ( x ) ) ) + 2 ϵ ] . We will need the following result, implicitly shown in [FGHS22]. Lemma B.2 (Follows from Lemma E.3 in [FGHS22]). Fix xā[0,1]nsuperscript01xā[0,1]^nx ā [ 0 , 1 ]n. Let Qā¢(x)=x+ā4ā¢nā¢Nā¢ā£āā0,1,ā¦,2ā¢n,conditional-setā4ā01ā¦2Q(x)=\x+ 4nN e ā\0,1,...,2n\\,Q ( x ) = x + divide start_ARG ā end_ARG start_ARG 4 n N end_ARG italic_e ⣠ā ā 0 , 1 , ⦠, 2 n , where eitalic_e is the all-ones vector and let Sgoodā¢(x)=p=(pi)āQā¢(x):āiā[n],lā0,ā¦,N,|piālN|ā„18ā nā N,subscriptgoodconditional-setsubscriptformulae-sequencefor-alldelimited-[]formulae-sequence0ā¦subscript1ā 8S_good(x)= \p=(p_i)ā Q(x):ā iā[n],lā\0,ā¦,N% \,~ |p_i- lN |ā„ 18Ā· nĀ· N \\,,Sroman_good ( x ) = p = ( pitalic_i ) ā Q ( x ) : ā i ā [ n ] , l ā 0 , ⦠, N , | pitalic_i - divide start_ARG l end_ARG start_ARG N end_ARG | ā„ divide start_ARG 1 end_ARG start_ARG 8 ā n ā N end_ARG , i.e., Sgoodā¢(x)subscriptgoodS_good(x)Sroman_good ( x ) contains points that are not near a boundary between two subcubes in the discretized domain ānsuperscriptāI^nIitalic_n. Then: 1. |Sgoodā¢(x)|ā„n+2,subscriptgood2|S_good(x)|ā„ n+2,| Sroman_good ( x ) | ā„ n + 2 , 2. āxāp^āāā¤1/Nsubscriptnorm^1\|x- p\|_ā⤠1/Nā„ x - over start_ARG p end_ARG ā„ā ⤠1 / N for all pāSgoodā¢(x)subscriptgoodpā S_good(x)p ā Sroman_good ( x ), where p^ pover start_ARG p end_ARG denotes the discretization of pā[0,1]nsuperscript01pā[0,1]^np ā [ 0 , 1 ]n in (B.1).666Sgoodā¢(x)subscriptgoodS_good(x)Sroman_good ( x ) corresponds to the set TgsubscriptT_gTitalic_g in [FGHS22]. Essentially, Sgoodā¢(x)subscriptgoodS_good(x)Sroman_good ( x ) coincides with the set of points where bit-extraction (i.e., the operation T^k) T_k)over start_ARG T end_ARGk ) was successful in Qā¢(x)Q(x)Q ( x ) [FGHS22]. To prove the desired approximation guarantee, first observe that since |Sgoodā¢(x)|ā„n+2subscriptgood2|S_good(x)|ā„ n+2| Sroman_good ( x ) | ā„ n + 2, then the output of the network satisfies (as the median is in the set): [minpāSgoodā¢(x)ā”T^ā1ā¢(C^ā¢(T^kā¢(p))),maxpāSgoodā¢(x)ā”T^ā1ā¢(C^ā¢(T^kā¢(p)))].subscriptsubscriptgoodsuperscript^1^subscript^subscriptsubscriptgoodsuperscript^1^subscript [ _pā S_good(x) T^-1( C( T_k(p))),% _pā S_good(x) T^-1( C( T_k(p))) ]\,.[ minitalic_p ā S start_POSTSUBSCRIPT good ( x ) end_POSTSUBSCRIPT over start_ARG T end_ARG- 1 ( over start_ARG C end_ARG ( over start_ARG T end_ARGk ( p ) ) ) , maxitalic_p ā S start_POSTSUBSCRIPT good ( x ) end_POSTSUBSCRIPT over start_ARG T end_ARG- 1 ( over start_ARG C end_ARG ( over start_ARG T end_ARGk ( p ) ) ) ] . For any elements pāSgoodā¢(x)subscriptgoodpā S_good(x)p ā Sroman_good ( x ), consider the i-th coordinate pisubscriptp_ipitalic_i with corresponding binary representation b0pi.b1piā¢ā¦formulae-sequencesuperscriptsubscript0subscriptsuperscriptsubscript1subscriptā¦b_0^p_i.b_1^p_iā¦b0italic_pitalic_i . b1italic_pitalic_i ā¦. By assumption ālā0,ā¦,N,|piālN|ā„18ā nā Nformulae-sequencefor-all0ā¦subscript1ā 8ā lā\0,ā¦,N\,~|p_i- lN|ā„ 18Ā· nĀ· Nā l ā 0 , ⦠, N , | pitalic_i - divide start_ARG l end_ARG start_ARG N end_ARG | ā„ divide start_ARG 1 end_ARG start_ARG 8 ā n ā N end_ARG, which further implies at least one bit in bk+1piā¢ā¦ā¢bk+3+ālogā”(n)āpisubscriptsuperscriptsubscript1ā¦subscriptsuperscriptsubscript3b^p_i_k+1⦠b^p_i_k+3+ (n) bitalic_pitalic_iitalic_k + 1 ⦠bitalic_pitalic_iitalic_k + 3 + ā log ( n ) ā is one. Thus by choice of precision parameter ā=k+3+ālogā”(n)āā3 =k+3+ (n) ā = k + 3 + ā log ( n ) ā and by Theorem B.1, we have that T^kā¢(p)=b0p.b1pā¢ā¦ā¢bkpformulae-sequencesubscript^superscriptsubscript0superscriptsubscript1ā¦superscriptsubscript T_k(p)=b_0^p.b_1^p⦠b_k^pover start_ARG T end_ARGk ( p ) = b0italic_p . b1italic_p ⦠bitalic_kitalic_p, and, hence, C^ā¢(T^kā¢(p))=Cā¢(b0pā¢ā¦ā¢bkp)^subscript^superscriptsubscript0ā¦superscriptsubscript C( T_k(p))=C(b_0^p⦠b_k^p)over start_ARG C end_ARG ( over start_ARG T end_ARGk ( p ) ) = C ( b0italic_p ⦠bitalic_kitalic_p ), which implies that the output of the network is in the set [minpāSgoodā¢(x)ā”Tā1ā¢(Cā¢(Tkā¢(p))),maxpāSgoodā¢(x)ā”Tā1ā¢(Cā¢(Tkā¢(p)))].subscriptsubscriptgoodsuperscript1subscriptsubscriptsubscriptgoodsuperscript1subscript [ _pā S_good(x)T^-1(C(T_k(p))), _pā S_% good(x)T^-1(C(T_k(p))) ].[ minitalic_p ā S start_POSTSUBSCRIPT good ( x ) end_POSTSUBSCRIPT T- 1 ( C ( Titalic_k ( p ) ) ) , maxitalic_p ā S start_POSTSUBSCRIPT good ( x ) end_POSTSUBSCRIPT T- 1 ( C ( Titalic_k ( p ) ) ) ] . Thus, using Item 2 of Lemma B.2 and triangle inequality between p and p^ pover start_ARG p end_ARG (since ā„pāp^ā„āā¤1/N)\|p- p\|_ā⤠1/N)ā„ p - over start_ARG p end_ARG ā„ā ⤠1 / N ), we have that the output of the linear arithmetic circuit is in the set [Tā1ā¢(Cā¢(Tkā¢(x)))ā2ā¢Ļµ,Tā1ā¢(Cā¢(Tkā¢(x)))+2ā¢Ļµ].superscript1subscript2italic-ϵsuperscript1subscript2italic-ϵ [T^-1(C(T_k(x)))-2ε,T^-1(C(T_k(x)))+2ε ].[ T- 1 ( C ( Titalic_k ( x ) ) ) - 2 ϵ , T- 1 ( C ( Titalic_k ( x ) ) ) + 2 ϵ ] . Convert to ANN We can directly obtain the ANN f by replacing the min and max gates of the linear arithmetic circuit F. In particular, maxā”a,b=a+ReLUā¢(bāa,0)ReLU0 \a,b\=a+ReLU(b-a,0)max a , b = a + ReLU ( b - a , 0 ) and minā”a,b=bāReLUā¢(bāa,0)ReLU0 \a,b\=b-ReLU(b-a,0)min a , b = b - ReLU ( b - a , 0 ) with only a constant multiplicative overhead. ā Appendix C Proofs of Section 4.1 C.1 Proof of Theorem 4.2 Proof. The white-box undetectability and non-replicability follow directly by Theorem 3.2 and by Lemma 3.3 respectively. The condition that āxāxā²āāā¤12kā²+1subscriptnormsuperscriptā²1superscript2superscriptā²1\|x-x \|_ā⤠12^k +1ā„ x - xā² ā„ā ⤠divide start_ARG 1 end_ARG start_ARG 2k start_POSTSUPERSCRIPT ā² + 1 end_POSTSUPERSCRIPT end_ARG follows by the fact that each coordinate iā[n]delimited-[]iā[n]i ā [ n ], xisubscriptx_ixitalic_i and xiā²subscriptā²x_i xitalic_iā² only differ from the kā²+1superscriptā²1k +1kā² + 1 most significant bit and after. Thus their maximum difference is at most: āj=kā²+1+ā12j=12kā²+1.superscriptsubscriptsuperscriptā²11superscript21superscript2superscriptā²1 _j=k +1^+ā 12^j= 12^k +1.āj = kā² + 1+ ā divide start_ARG 1 end_ARG start_ARG 2j end_ARG = divide start_ARG 1 end_ARG start_ARG 2k start_POSTSUPERSCRIPT ā² + 1 end_POSTSUPERSCRIPT end_ARG . Moreover, the runtime of both the honest obfuscated pipeline and the backdoor attack follows by 2.7 and Theorem 3.7. Finally we show that the backdoored output is activated. By Theorem 3.6 for any pair of inputs x,xā²ā[0,1]nsuperscriptā²01x,x ā[0,1]^nx , xā² ā [ 0 , 1 ]n such that āxāxā²āāā¤12ksubscriptnormsuperscriptā²1superscript2\|x-x \|_ā⤠12^kā„ x - xā² ā„ā ⤠divide start_ARG 1 end_ARG start_ARG 2k end_ARG: |Tā1ā¢(C~ā¢(Tkā¢(x)))āTā1ā¢(C~ā¢(Tkā¢(xā²)))|ā¤6ā L2kā1.superscript1~subscriptsuperscript1~subscriptsuperscriptā²ā 6superscript21|T^-1( C(T_k(x)))-T^-1( C(T_k(x )))|% ⤠6Ā· L2^k-1.| T- 1 ( over~ start_ARG C end_ARG ( Titalic_k ( x ) ) ) - T- 1 ( over~ start_ARG C end_ARG ( Titalic_k ( xā² ) ) ) | ⤠divide start_ARG 6 ā L end_ARG start_ARG 2k - 1 end_ARG . By Theorem 3.7, for input xā²x xā²: |Tā1ā¢(C~ā¢(Tkā¢(xā²)))āf~ā¢(xā²)|ā¤6ā L2kā1,superscript1~subscriptsuperscriptā²~superscriptā²ā 6superscript21|T^-1( C(T_k(x )))- f(x )|ā¤% 6Ā· L2^k-1,| T- 1 ( over~ start_ARG C end_ARG ( Titalic_k ( xā² ) ) ) - over~ start_ARG f end_ARG ( xā² ) | ⤠divide start_ARG 6 ā L end_ARG start_ARG 2k - 1 end_ARG , thus by Lemma 3.1, and the activation process, C~ā¢(Tkā¢(xā²))=Vp=Tkā¢(c)~subscriptsuperscriptā²subscriptsubscript C(T_k(x ))=V_p=T_k(c)over~ start_ARG C end_ARG ( Titalic_k ( xā² ) ) = Vitalic_p = Titalic_k ( c ). This means that f~ā¢(xā²)ā[cā12mā24ā L2k,c+12m+24ā L2k].~superscriptā²1superscript2ā 24superscript21superscript2ā 24superscript2 f(x )ā [c- 12^m- 24Ā· L2^k,% c+ 12^m+ 24Ā· L2^k ].over~ start_ARG f end_ARG ( xā² ) ā [ c - divide start_ARG 1 end_ARG start_ARG 2m end_ARG - divide start_ARG 24 ā L end_ARG start_ARG 2k end_ARG , c + divide start_ARG 1 end_ARG start_ARG 2m end_ARG + divide start_ARG 24 ā L end_ARG start_ARG 2k end_ARG ] . The proof concludes by setting kā²=ālog2ā”(ϵ)āsuperscriptā²subscript2italic-ϵk = _2(ε) ā² = ā log2 ( ϵ ) ā, and k=kā²+max(Ī»1+Ī»2,ālog2(48ā L)āk=k + ( _1+ _2, _2(48Ā· L) = kā² + max ( Ī»1 + Ī»2 , ā log2 ( 48 ā L ) ā). ā C.2 Proof of Theorem 4.9 Proof. The runtime follows by 2.7, and Remark 4.8. The white-box undetectability follows by Theorem 3.2. By Remark 4.8, for input ā²superscriptā² t italic_tā², we have C~(Tk(ā²)))=f~(ā²), C(T_k( t )))= f( t ),over~ start_ARG C end_ARG ( Titalic_k ( italic_tā² ) ) ) = over~ start_ARG f end_ARG ( italic_tā² ) , thus by Lemma 3.1, and the activation process, C~ā¢(Tkā¢(ā²))=C^ā¢(ā²)~subscriptsuperscriptā²^superscriptā² C(T_k( t ))= C( t )over~ start_ARG C end_ARG ( Titalic_k ( italic_tā² ) ) = over start_ARG C end_ARG ( italic_tā² ). Thus f~ā¢(ā²)=f^ā¢(ā²),~superscriptā²^superscriptā² f( t )= f( t ),over~ start_ARG f end_ARG ( italic_tā² ) = over start_ARG f end_ARG ( italic_tā² ) , which concludes the proof. ā