## 3 Materials and Methods  
In this part, we will explain the basic structure and algorithm of the series of models related to our model in Part A; in part B, we will formally introduce the GAFM model proposed in this paper and give A detailed explanation of the algorithm; in Part C, we will make A summary of the model. A. Related models and algorithms  
(1) Wide & Deep  
According to Google's paper [20], the model is divided into four stages: Sparse Features, Dense Embeddings, Hidden Layers and Output Units. Sparse Features divide the input data into two parts, which are sent to the wide structure and the deep structure, respectively. The following three stages are the operation of deep. For the wide part, features are transformed by cross product to carry out feature combination, and the formula is as follows:  
\[\varnothing_{k}(X)=\prod_{i=1}^{d}x_{i}^{\alpha_{ki}}\,c_{ki}\in\{0,\,1\} \tag{2}\]  
Among them, \(c_{ki}\) is a Boolean variable, when the \(i\)th feature belongs to the \(k\)th combined feature. \(x_{i}\) is the value of the \(i\)th characteristic. The Deep part is actually a feed-forward neural network. For category features, the original input is the feature string, and the sparse high-dimensional category features will first be converted into low-dimensional dense real vector, usually called embedding vector. These low dimensional dense vectors are fed into the hidden layer of the neural network in the forward transmission. Specifically, each hidden layer performs the following calculation:  
\[a^{(l+1)}=f(W^{(l)}a^{(l)}+b^{(l)}) \tag{3}\]  
where \(l\) is the number of layers and f is the activation function, usually RELU, which is a common activation function of the form \(f(x)=\max(0,\,\,x)\). \(a^{(l)}\), \(b^{(l)}\) and \(W^{(l)}\) were the first layer of the activation of l, bias and weighting model. Finally, the wide and deep parts are combined through the full connection layer and finally output through the logical unit. For logistic regression models, the prediction of the model is:  
\[P(Y=1|x)=\sigma\Big{(}w_{wide}^{T}[x,\,\,\varnothing(x)]+w_{deep}^{T}a^{(l_{f} )}+b\Big{)} \tag{4}\]  
where, \(Y\) is the binary classification label, \(\sigma()\) is the sigmoid function, \(\varnothing(x)\) is the transformation of the original feature x, b is the bias term, \(w_{wide}\) and \(w_{deep}\) are the weight of the wide part and the deep part, respectively. (2) Deep FM  
As mentioned earlier, Deep FM improved on Wide & Deep by replacing the Wide part with FM. Specifically, the output of the FM part is the sum of the Addition unit and the Inner Product unit:  
\[y_{FM}=<w,\,\,x>+\sum_{l_{1}=1}^{d}\sum_{l_{2}=j_{1}+1}^{d}<V_{i},\,\,V_{j}>x _{j_{1}}\cdot x_{j_{2}} \tag{5}\]  
where, \(w\in R^{d}\) and \(V_{i}\in R^{k}\). The Addition unit focuses on the first-order features while the Inner Product unit focuses on the second-order feature interaction. (3) NFM  
NFM is focused on improving the deep part of the Wide & Deep model, by introducing features cross pooling layer to solve the high order cross combination explosion problem,specifically, suppose \(V_{x}\) is the set of all the characteristics of the domain Embedding, the characteristics of cross pooling layer concrete operation is as follows:  
\[f_{BI}(V_{x})=\sum_{i=1}^{n}\sum_{j=i+1}^{n}(x_{i}v_{i})\odot\big{(}x_{j}v_{j} \big{)} \tag{6}\]  
where, \(\odot\) represents the element product operation of two vectors, where the \(k_{th}\) dimension operates as follows:  
\[\big{(}v_{i}\odot v_{j}\big{)}_{k}=v_{ik}v_{jk} \tag{7}\]  
(4) AFM  
AFM model introduces attention mechanism by adding attention network between feature cross layer and final output layer. The role of the attention network is to give weight to each cross feature. Specifically, the pooling process of AFM with attention score is as follows:  
\[f_{Att}(f_{PI}(\varepsilon))=\sum_{(i,\ j)\in R_{x}}a_{ij}\big{(}v_{i}\odot v_ {j}\big{)}x_{i}x_{j} \tag{8}\]  
The \(a_{ij}\) indicate a score for the attention. B.