{'fraction_non_alphanumeric': 0.040290545908523434, 'fraction_numerical': 0.00686641697877653, 'mean_word_length': 4.707692307692308, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Generating Adversarial Examples on Mixed-type Data

The existence of adversarial attacks (or adversarial examples) brings huge concern about the machine learning (ML) model's safety issues. For many safety-critical ML tasks, such as financial forecasting, fraudulent detection, and anomaly detection, the data samples are usually mixed-type, which contain plenty of numerical and categorical features at the same time. However, how to generate adversarial examples with mixed-type data is still seldom studied. In this paper, we propose a novel attack algorithm M-Attack, which can effectively generate adversarial examples in mixed-type data. Based on M-Attack, attackers can attempt to mislead the targeted classification model's prediction, by only slightly perturbing both the numerical and categorical features in the given data samples. More importantly, by adding designed regularizations, our generated adversarial examples can evade potential detection models, which makes the attack indeed insidious. Through extensive empirical studies, we validate the effectiveness and efficiency of our attack method and evaluate the robustness of existing classification models against our proposed attack. The experimental results highlight the feasibility of generating adversarial examples toward machine learning models in real-world applications.


I. INTRODUCTION
The existence of adversarial attacks (or adversarial examples) [1]- [4] has brought huge concerns when applying machine learning (ML) models to safety-critical tasks. In many ML applications in Web Service or mobile applications, the data inputs are often mixed type, which contains both numerical and categorical features simultaneously. For example, for an online financial institute, ML models are trained to evaluate whether a loan applicant has the ability to repay his/her loan. In this scenario, the data has numerical features, e.g., the applicant's age, account balance, and annual income, as well as categorical features including his/her educational background, occupation type, and marital status. Similarly, in recommender systems for online shopping, the data also contains both numerical and categorical information, such as the price and categories of the recommended items. However, how to conduct adversarial attacks for mixed-type data still lacks full exploration. Therefore, in this paper, we focus on the problem of how to generate adversarial examples for mixed-type data. Specifically, we aim to solve the problem: given a well-trained ML model, how can we perturb a data sample with an unnoticeable distortion, such that this ML model's prediction is misled to give a wrong prediction? The studied problem is crucial in practice. Recall the above financial institute example: if an unqualified applicant provides a fake profile that contains a few fraudulent records so that he/she can fool the trained ML model to get the approval of the loan, it will cause a huge cost to this financial institute.
To achieve this attacking goal, we face tremendous challenges. First, the attacker is expected to modify as few features of the original (clean) data as possible to keep the perturbation behavior unnoticeable and insidious. This requires the perturbation added on the original sample to be sparse in the input data space. Notably, there are existing methods for sparse adversarial attacks in either numerical or categorical data domains, separately. In the numerical domain, Projected Gradient Descent methods (PGD) are adopted to guide the search of adversarial examples and project the perturbation into a continuous l 1 -norm bounded space to stress the sparsity of perturbation [1], [5]. In the categorical domain, searchbased methods [6], [7] are employed to iteratively find the top-K categorical features, which have the largest influence to model prediction, and then search optimal perturbation for these K features. However, our task involves both the numerical and categorical features and there are still no confirmative methods to generate the optimal sparse adversarial attack over the targeted searching space, which is a Cartesian product of a discrete space (for categorical features) and continuous space (for numerical features). Moreover, our experimental results in Section V suggest that simply combining existing strategies usually provide sub-optimal solutions. For example, for an algorithm which first applies the search-based methods [6], [7] to perturb categorical features, and then applies l 1 -PGD method [1], [5] to find numerical perturbations, it cannot successfully find strongest adversarial examples (or leading to the maximal loss value of the targeted classifier). This fact highlights the necessity to devise new adversarial attack algorithms exclusively designed for mixed-type data.
Second, the attacker should also keep the generated adversarial examples to be seemingly benign. In other words, adversarial examples should be close to the distribution of original clean data samples. It is hard to achieve this goal since features in mixed-type data are usually highly correlated. For example, in Home Credit Default Risk Dataset [8] where the task is to predict a person's qualification for a loan, the feature "age" of an applicant is always strongly related to other numerical features (such as "number of children") and categorical features (such as "family status"). In this dataset, if an attacker perturbs the feature "family status" from "child" to "parent" for an 18-year-old loan applicant, the perturbed sample obviously deviates from the true distribution of clean data samples (because there are rarely 18-year-old parents in reality). As a result, the generated adversarial example can be easily detected as "abnormal" samples, by an defender that applies Out-of-Distribution (OOD) detection (or Anomaly Detection) methods [9]- [11], or detected by human experts who can judge the authentication of data samples based on their domain knowledge. Thus, the attacker should generate adversarial examples, which do not significantly violate the correlation between any pair of numerical features, as well as any pair of categorical features, or the pair of categorical and numerical features.
In this paper, to tackle the aforementioned challenges, we proposed M-Attack, which is a novel attacking framework for mixed-type data. In detail, we first transform the searching space of mixed-type adversarial examples into a unified continuous space (see Figure 1). To achieve this goal, we convert the problem of finding adversarial categorical perturbations into the problem to find the probabilistic (categorical) distribution which the adversarial categorical features are sampled from. Therefore, we are facilitated to find sparse adversarial examples in this unified continuous space, by simultaneously updating the numerical & categorical perturbation via gradientbased methods. Furthermore, to generate in-distribution adversarial examples, we propose a Mix-Mahalanobis Distance to measure and regularize the distance of an (adversarial) example to the distribution of the clean mixed-type data samples. Through extensive experiments, we verify that: (1) M-Attack can achieve better attacking performance compared to representative baselines, which are the combination of existing numerical & categorical attack methods; (2) M-Attack can achieve better (or similar) efficiency compared to these baseline methods; and (3) Mix-Mahalanobis Distance can help the generated adversarial examples be close to the true distribution of clean data. Our contribution can be summarized as follows: • We propose an efficient and effective algorithm, M-Attack, to generate adversarial examples for mixed-type data. • We propose a novel measurement, Mixed Mahalanobis Distance, which helps the generated adversarial examples be close to the true distribution. • We conduct extensive experiments to validate the feasi-bility of M-Attack, and demonstrate the vulnerability of popular classification models against M-Attack.

II. RELATED WORKS
There has been a rise in the importance of the adversarial robustness of machine learning models in recent years. Most of the existing works, including evasion attack, and poison attack, focus on continuous input space, especially in the image domain [1], [12], [13]. In the image domain, because the data space (which is the space of pixel values) is continuous, people use gradient-based methods [1], [5] to find adversarial examples. Based on the gradient attack methods, various defense methods, such as adversarial training, [1], [14] are proposed to improve the model robustness. Meanwhile, adversarial attacks focusing on discrete input data, like text data, which have categorical features, are also starting to catch the attention of researchers. In the natural language processing domain, the work [15] discusses the potential to attack text classification models such as sentiment analysis, by replacing words with their synonyms. The study [16] proposes to modify the text token based on the gradient of input one-hot vectors. The method [17] develops a scoring function to select the most effective attack and a simple character-level transformation to replace projected gradient or multiple linguistic-driven steps on text data. In the domain of graph data learning, there are methods [18] that greedily search the perturbations to manipulate the graph structure to mislead the targeted models. In a conclusion, when the data space is discrete, these methods share a similar core idea by applying searched-based methods to find adversarial perturbations. Although there are wellestablished methods for either numerical domain or categorical domain separately, there is still a lack of studies in mixed-type data. However, mixed-type data are widely existing in various machine learning tasks in the physical world. For example, for the fraudulent transaction detection systems [19], [20] of credit card institutes, the transaction records from cardholders may include features such as transaction amount (numerical) and the type of the purchased product (categorical). Similarly, for ML models applying in AI healthcare [21], [22], i.e., in epidemiological studies [23], [24], the data can be collected from surveys which ask the respondents' information, including their age, gender, race, the type of medical treatment and the expenditure amount of each type of medical supplies that are used. In recommender systems [25]- [27] in onlineshopping websites which are built for product recommendations, the data can include the purchase history of the clients or the property of the products, both containing numerical and categorical features. In this paper, we focus on the problem of how to slightly perturb the input (mixed-type) data sample of a model to mislead the model's prediction. This study can have great significance to help us understand the potential risk of ML models under malicious perturbations in the applications mentioned above.

III. METHODOLOGY -M-ATTACK
In this section, we introduce the details of our proposed method M-Attack. Before discussing the details of M-Attack, we first provide the necessary definitions and notations used in this work. For any given sample x with true label y ∈ Y, we assume that it contains the numerical features x n ∈ R dn with dimensional d n . It also contains d c categorical features x c (such as race, gender, education, etc.) and each categorical feature may include a different number of categories. More specifically, among all categorical features, we denote each individual categorical feature x i c (e.g., gender), which can be chosen from k i different categories (e.g., male and female). During the attacking process, we assume that there is a classifier F (·) that takes the tuple (x n , x c ) as input, and makes the prediction by F (x n , x c ) =ŷ ∈ Y.
A. An Overview of M-Attack In this subsection, we introduce the overall framework of our proposed method -M-Attack. In this paper, we only consider the scenario that all information about the model F (·), including its parameters and architecture, is given to the attacker. Thus, during the test phase, for a test sample x, which contains the numerical feature x n and categorical feature x c , with true label y, the attacker aims to find such a perturbed data sample x = (x n , x c ), which is close to (x n , x c ), but can mislead the model to make a prediction different from y. To achieve this goal, in our proposed M-Attack, we aim to solve the following problem to find (x n , x c ) as: Specifically, we aim to find such a tuple (x n , x c ) where the model F (·) has the maximized loss value so that the model is likely to have a wrong prediction. Moreover, we introduce three constraints to regularize the generated attacks (or perturbations) to be close to the original sample (x n , x c ): (i) We constrain the l 1 norm distance between the perturbed sample's numerical feature x n and the original numerical feature x n so that the perturbation on x n is sparse. (ii) We constrain the l 0 difference between x c and x c so that the number of changed categorical features is limited.
to (x n , x c ) to keep the perturbed sample "seemingly" benign. This will help to keep the generated adversarial examples close to the distribution of clean samples. Thus, the generated samples are harder to be detected by Outof-Distribution methods or human experts. In Section IV, we will make a detailed definition about the distance D(·). It is worth mentioning that: if we don't consider the constraint (iii), there already exists well-established methods to partially solve the problem in Eq.(1). For example, applying l 1 -PGD method [5] can solve the problem under constraint (i); and applying greedy search [6] can solve the problem under constraint (ii). Thus, a potential solution for Eq.(1) is that: we first apply l 1 -PGD [5] to find x n under constraint (i) to maximize the loss value, and then adopt greedy method [6] to find x c (or vice versa). However, our proposed method, M-Attack, is a distinct approach, which simultaneously updates the numerical and categorical features. This will help M-Attack find better solutions for the optimization problem because it takes the interaction between numerical and categorical features into consideration. Next, we will detail how to solve Eq.(1) -In the remaining subsections of Section III, we will introduce how to achieve the optimization goal in Eq.(1) which satisfies the first two constraints while ignoring the third constraint; while in Section IV, we will define Mix-Mahalanobis Distance D(·) in detail and involve the constraint (iii) in the algorithm.

B. Sparse Adversarial Perturbations
Overall, in our proposed M-Attack, in order to find sparse adversarial perturbations, we introduce a new searching space, S n × S c , which is the Cartesian product of the Numerical Adversarial Space S n where the adversarial numerical features x n reside, and Probabilistic Adversarial Space S c where the adversarial categorical features x c are sampled from.
1) Numerical Adversarial Space: We first define the Numerical Adversarial Space to be equal to the space of samples that satisfy the constraint (i) in Eq. (1): During the M-Attack, we repeatedly update the numerical features of x n in the space S n , via an approach similar to the method Projected Gradient Descent (PGD) [1], [3] which has been designed for l 1 adversarial attack. In each step of the PGD algorithm, suppose that the objective is simply to maximize the value of a function Q(·), and the current optimized result is x n , it first updates x n along with the direction of gradient ascent: In other words, for each step, we find the x n which can result in the maximal increase of the loss value. Then, if x n is out of S n , we project x n back to the defined numerical adversarial space S n by solving a convex optimization problem: It finds the point residing in S n which has the smallest Euclidean distance with x n . To solve this convex optimization problem, we can apply existing convex optimization solvers from tools like CVXOPT [28] or the method [29].
2) Probabilistic Adversarial Space (For Categorical Feature): To find adversarial perturbations x c for categorical features, we propose a method to alternatively search in a continuous space S c , so that we can apply gradient methods to update x n and x c at the same time. In detail, we assume that each feature of (adversarial) categorical data x i c follows a Here, each π i,j represents the probability that the feature x i c belongs to the category j. Thus, the distribution of all categorical features in one sample can be represented as an array π = [π 0 ; π 1 ; ...; π dc ] ∈ Π 0 × Π 1 × ... × Π dc = Π , and d c is the number of categorical features. Then, in order to constrain the l 0 distance between x c and x c in constraint (ii) of Eq.(1), we define the Probabilistic Adversarial Space S c as: where δ is the tail probability constraint. Intuitively, by constraining π in space S c , we aim to find a distribution π, such that for a sample x c following the distribution π, it has a low probability to have the l 0 distance ||x c − x c || 0 larger than 2 . It is approximately equivalent to the constraint (ii) in Eq.(1). In our algorithm of M-Attack, we substitute the l 0 distance between x and x by calculating the sum of Cross Entropy Loss between π i and x i c : approximately measures the possibility that the generated (x c ) i (following π) is different from x i c . Therefore, we use the sum of Cross Entropy i L CE (π i , x i c ) to approximate the number of changed features, which is the l 0 difference ||x c − x c || 0 . In our algorithm, we penalize the searched π when the term i L CE (π i , x i c ) exceeds a positive value ζ. In this case, we equivalently limit the probability that the generated samples x c have the number of perturbed features larger than 2 . During the optimization process, we can update the distribution π via gradient-based methods such as Gumbel-softmax [30].

C. The Attack Framework
With previous components of M-Attack, we eventually transform the original problem in Eq.(1) into a problem of finding a pair (x n , π) residing in the space S n × S c satisfying: The term π represents the categorical distribution of (the categorical part of) adversarial examples. Thus, in Eq.(5), we instead maximize the expected loss value of samples x c which are generated following π. Moreover, for the constraint π ∈ S c , the Cross-Entropy Loss L CE (π, x c ) used in Eq. (4) is differentiable in terms of π. Thus, we further rewrite the problem to its Lagrangian form: where we denote the objective as Q(x n , π). In the algorithm of M-Attack, we apply a gradient descent method to repeatedly update the pair (x n , π) to solve the problem above. In detail, refer to the Algorithm 1 (or Figure 1), in Step 1 and Step 2, we first calculate the gradients of the loss towards the input sample x n and the latent probability π (for categorical features). In Step 3 and Step 4, we project the updated features back to the constrained space. During the test phase, we make a series of sampling and choose the optimal sampling which has the maximal Q(·). It is worth mentioning that our method simultaneously updates the numerical and categorical features and the attacking algorithm can enjoy better effectiveness and efficiency than existing methods.

IV. MIXED MAHALANOBIS DISTANCE
Yet solving the problem in Eq.(5) to satisfy the constraints (i) and (ii) helps us find sparse perturbations, it is still not adequate to guarantee the adversarial perturbations unnoticeable. For example, take Figure 2 as an example, an adversarial attacker perturbs the feature "family status" from "child" to Algorithm 1 Adversarial Attacks for Mixed-Data M-Attack Input: Objective function Q(·) defined in Eq.(6), a sample x, true label y, number of steps of gradient descent N . Initialize x n = x n , π = x c for t = 1 to N do 1. Update x n by gradient descent via Eq.(2) 2. Update π by gradient descent: π ← π +γ∇ π Q(x n , π).
3. Project x n back to S n . 4. Project π back to the space Π. end for Output: The tuple (x n , π). The eligible categorical features are sampled following the probability distribution π.
"parent" for an 18-year-old loan applicant (in Home Credit Dataset). The perturbed sample can significantly deviate from the clean data distribution because there are rarely 18-yearold parents in reality. As a result, the adversarial perturbation can be easily detected as "abnormal samples" by human experts and they can refuse to let ML models predict these "abnormal" samples. Moreover, these abnormal samples are also very likely to be detected by Out-of-Distribution (OOD) detection methods [10], [31]. For example, the methods [10], [31] first estimate the distribution of clean data samples via kernel density estimation or via training generative models and calculate the likelihood of a test sample in the estimated clean data distribution. Similarly, if a sample's likelihood score is low, the model can refuse to make a prediction. It is worth mentioning that OOD detection is widely applied as defense strategies [32] in image classification tasks. Therefore, during the attack process, the attacker should also consider generating adversarial examples, which are close to the clean data distribution. In other words, we also need to consider the constraint (iii) in Eq.(5).

A. Mahalanobis Distance
In order to generate in-distribution adversarial examples, the method in [33] considers regularizing the Mahalanobis Distance [34], [35] of the generated adversarial examples to the clean distribution (for numerical data). In detail, suppose that the clean data samples follow a Gaussian distribution P = N (µ, Σ) with the center µ and covariance matrix Σ, the Mahalanobis Distance measures a sample x's distance to this distribution P by calculating: Intuitively, the smaller Mahalanobis Distance the sample x has, the larger density score it will receive. Note that the density function of the distribution P is: p(x, P) ∝ exp(− 1 2 (x − µ) T Σ(x − µ)). Therefore, a sample x with a higher density score is more likely to belong to the distribution P. The attack method in [33] constrains the sample-wise Mahalanobis distance between the generated adversarial example x and the clean sample x, which is defined as: Notably, if x is a clean sample, it will be close to the clean distribution P, so it will have a small Mahalanobis Distance D(x, P). Thus, penalizing the term D(x , x, P) will help the adversarial example x also have a small D(x , P) (by Triangle inequality). Therefore, x is also highly likely to follow the clean distribution P.

B. Mixed Mahalanobis Distance
In this work, we extend the idea of Mahalanobis Distance to mixed-type data. Overall, we first define a Generalized Covariance Matrix specifically for mixed-type data, and then we define Mix-Mahalanobis Distance based on the Generalized Covariance Matrix (similar to the definition in Eq. (8)). Specifically, we consider that the attacker has the knowledge of a sufficient amount of clean data samples and we define the clean data matrix, X = {(x n , x c ) j } j=1,...,N , which is composed of N different clean samples. We also denote X = (X n , X c ), where each column of X n represents a numerical feature and X c denotes the categorical features. In X c , we encode each categorical feature of each sample into its one-hot representation. For example, a column in the matrix X c represents whether the (categorical) feature i of these samples belongs to the category j (e.g. whether the gender is 'female'). Based on this definition of X, we can define the Generalized Covariance Matrix as: whereX is the centered matrix of X:X = X −X. In this Generalized Covariance MatrixΣ M , each element (Σ M ) i,j measures the relation between a pair of features (i, j): 1) If feature i is numerical and feature j is numerical, it estimates the covariance between features i and j as 2) If feature i is numerical and feature j is categorical, since the column X[j] is the one-hot representation which only where N 0 and N 1 denote the number of samples in X whose feature j belongs to the category 0 and 1 respectively; andX 0 [i] andX 1 [i] denote the average value of feature i of samples whose feature j belongs to the category 0 and category 1, respectively. Intuitively, this term measures the interaction between a numerical feature i and a categorical feature j. For example, if (Σ M ) i,j is much larger than 0, the average value of feature i of samples in category 0 is much larger than that in category 1. It suggests that there is a great discrepancy of feature i between different categories of feature j. 3) If feature i is categorical and feature j is categorical, it becomes: where we use N (·,·) to denote the number of samples that belong to each individual category (for both feature i & j). For example, N 1,0 is the number of samples whose feature i is 1 and feature j is 0. The square of this term is widely used as a chi-squared statistic in correspondence analysis [36] to test the (in)-dependence of two categorical variables.
Mixed Mahalanobis Distance: Equipped with the Generalized Covariance Matrix, we follow the strategy similar to Eq.(8) to define the Mahlanobis Distance for mixed-type data.
Since the clean data matrix X contains one-hot representations, X is not full-rank andΣ M is not invertible. Thus, we approximate the inverse covariance matrix (Σ M ) −1 by only preserving its first m eigenvectors. In detail, we first conduct eigenvalue decomposition forΣ M : (Σ M ) = V ·S·V −1 , where V is the eigenvectors and S is the diagonal matrix whose nonzero elements are the top m eigenvalues ofΣ M . In this way, we get the inverse covariance matrix (Σ M ) −1 = V ·S −1 ·V −1 , and we have the Mix-Mahalanobis Distance between the adversarial sample x and clean sample x as: During the algorithm of M-Attack, when we solve the problem in Eq.(1), we can satisfy the constraint (iii): D(x , x) ≤ 3 by penalizing the large D(x , x). In detail, because the term D(x , x) is differentiable in terms of x , we have an alternative objective for Eq.(1), which is defined as: where λ > 0 controls the trade-off between the loss and Mix-Mahalanobis Distance. Facilitated with the introduced method in Section III, we can successfully solve this problem in Eq. (11).

V. EXPERIMENT
In this section, we validate the effectiveness of our proposed M-Attack and Mix-Mahalanobis Distance. In detail, in Section V-B, we first verify that imposing a small Mix-Mahalanobis Distance helps generating in-distribution adversarial examples. Then, we compare the performance M-Attack with baseline attack methods in Section V-C and Section V-D. Before introducing the experimental results, we first introduce the basic experimental settings and baselines.

A. Experimental Settings
In this subsection, we introduce the datasets and baseline methods studied in this paper.
1) Datasets: We mainly conduct the experiments on three datasets, IEEE-CIS transaction dataset 1 , Home Credit Default Risk Dataset 2 , and Criteo Display Advertising dataset 3 . For all these datasets, we only preserve the categorical features which have no more than 50 categories: • IEEE-CIS transaction data contains transaction records from e-commerce, which contain the transaction summary and identify information of clients. The task is to predict if a transaction is benign or fraudulent. It contains 108 numerical features and 32 categorical features. The goal is to predict whether a loaner will pay back his/her loan. It contains 73 numerical features and 28 categorical features. • The Criteo Display Advertising Challenge Dataset is about solving the machine learning task: given a user and the webpage he is visiting, whether he will click on a given advertisement. It contains 13 numerical features and 7 categorical features. For all datasets, we train a two layer Multilayer Perceptron (MLP) model with 64 hidden nodes for the classification tasks, and we will leave other popular classifiers, such as tree based methods [37], [38] for one future work.
2) Baselines.: To the best of our knowledge, there is no existing (popular) baseline methods for the studied problem. Therefore, we compare our proposed M-Attack with the combination of existing attack methods to sequentially perturb the categorical features and numerical features. In detail, we consider baseline methods: • l 1 PGD + Search: It first applies l 1 PGD [5] to perturb numerical features. Then, it adopts the search method [7] to perturb categorical features. The search method first perturbs each categorical one-by-one and selects the top 2 features with the highest impact on the model output.
Then, it traverses all combinations of these 2 features to find the perturbation with the highest loss value. • l 1 PGD + Greedy: It also conducts l 1 PGD attack and then finds the 2 features with the highest impact on the model output. Then, it perturbs these 2 features greedily. For each feature, it assigns this feature with the category which leads to maximal loss and keeps the other perturbed features fixed, so it avoids searching all combinations. Note we can also first perturb the categorical features, and then perturb the numerical features. We find this strategy has the similar empirical performance with our considered baselines, so we only report the performance "l 1 PGD + Search" & "l 1 PGD + Greedy".

B. Mix Mahalanobis Distance Helps Generating In-Distribution Samples
In this experiment, we first verify that regularizing our proposed Mix-Mahalanobis Distance can effectively help the generated adversarial examples to be closer to the clean data distribution. To confirm this point, in all three datasets, we follow the strategy similar to [31], [39] to first estimate the distribution of clean data samples, then we test whether the generated adversarial examples is clearly deviated from our estimated clean data distribution. Specifically, in our experiment in Figure 3, we apply the Kernel Density Estimation [10] to estimate the distribution of all clean training samples. Then, in Figure 3, we calculate the estimated Log-Likelihood (density score) of clean test samples (green), as well as the generated adversarial examples (via M-Attack) with a strong Mix Mahalanobis Distance regularization λ = 6 (blue), and adversarial examples with no Mix Mahalanobis Distance regularization λ = 0 (red), and report their frequency in each interval of Log-Likelihood. From the result, we can see that the most clean test samples (green) have a high Log-Likelihood value, which suggests that they are close to the estimated clean data distribution. For adversarial examples which generated via strong Mahalanobis Distance regularization (blue), most samples also have high Log-Likelihood. However, for adversarial examples which generated without Mahalanobis Distance regularization (red), they have significantly lower Log-Likelihood values. Thus, they are significantly deviated from our estimated clean distribution. As a conclusion, this experimental results demonstrate that imposing a small Mix Mahalanobis Distance can help the generated adversarial examples closer to the clean distribution, which can facilitate the samples evade potential defections.

C. Effectiveness and Efficiency of M-Attack
Based on the discussion in Section V-B, we conduct experiments to verify whether M-Attack can evade the OOD detection methods and successfully attack the model. In this paper, we consider the OOD detection method is based on the method introduced in Section V-B: if a sample has a low Log-Likelihood value (smaller than the 10-th percentile of clean samples), we flag it as "abnormal" and refuse prediction. In Figure 4, we report the successful attacking rate for each method: for a test sample which the classifier x can correctly classify, if the model has a wrong prediction after adversarial perturbation, and it is also not flagged as "abnormal", we count it as a successful attack. Meanwhile, we also record the average computing time to generate each adversarial example (in seconds), where all experiments are conducted in a single NVIDIA Tesla K80 GPU. From the results in Figure 4, we can see that M-Attack has higher successful rate compared with baseline methods in CIS and Criteo dataset. The Home Credit dataset is easier to be attacked, so all methods can achieve high successful rate. Moreover, in each dataset, we usually only need perturb a few features to achieve a high successful attacking rate. In terms of computing cost, the "l 1 PGD + greedy" method spend shorter time than other methods. However, M-Attack's computing cost will not increase with the increase of perturbation budget 2 , because it always conducts a fixed number of gradient steps.

D. Optimality of M-Attack
To have a deeper understanding of the behavior of M-Attack, in the experiment in Figure 5, we compare M-Attack with baselines, in terms of their optimality to solve the main problem in Eq.(1). In Figure 5, in each subfigure (with a fixed 1 and 2 ), each single dot reports the average loss value L(F (x ), y) of targeted classifier and the average Mix Mahalanobis Distance D(x , x) for 100 randomly chosen test samples, where the adversarial samples x are obtained via solving the Eq.(11) with a fixed value λ (which controls the regularization of Mix Mahalanobis Distance). For baseline methods, we can also control their Mix Mahalanobis Distance by replacing their objective L(F (x ), y) with L(F (x ), y) − λD(x , x). In the Figure 5, we report the performance with different choices of λ for each method, to demonstrate the trade-off relation between the maximized loss value and the Mix Mahalanobis Distance. From the result, we can see when 1 and 2 are fixed, when different attack methods achieve the similar Mix Mahalanobis Distance, our proposed M-Attack can always achieve the highest average loss value. Especially when the average Mix Mahalanobis Distance is lower, the advantage of M-Attack over baselines is more obvious. This suggests that the adversarial examples generated via M-Attack can have better chance to attack the targeted classifier and preserve the Mix Mahalanobis Distance. It is because M-Attack simultaneously updates the numerical and categorical perturbations, so it enjoys the benefit to better optimize the term such as Mix Mahalanobis Distance. Since the categorical features and numerical features are highly interactive in Mix Mahalanobis Distance, it is sub-optimal to optimize them sequentially, as the baseline methods.

VI. CONCLUSION
To fill in the research gap on generating adversarial examples with mixed-type data, in this work, we propose M-Attack, which is designed to attack both the numerical and the categorical features in a unified gradient-based algorithm. The experimental results on three real-world datasets illustrate that our proposed M-Attack can efficiently and effectively find close-to-true-distribution adversarial examples.