<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">IASC</journal-id>
<journal-id journal-id-type="nlm-ta">IASC</journal-id>
<journal-id journal-id-type="publisher-id">IASC</journal-id>
<journal-title-group>
<journal-title>Intelligent Automation &#x0026; Soft Computing</journal-title>
</journal-title-group>
<issn pub-type="epub">2326-005X</issn>
<issn pub-type="ppub">1079-8587</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">27349</article-id>
<article-id pub-id-type="doi">10.32604/iasc.2022.027349</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Improve Representation for Cross-Language Clone Detection by Pretrain Using Tree Autoencoder</article-title><alt-title alt-title-type="left-running-head">Improve Representation for Cross-Language Clone Detection by Pretrain Using Tree Autoencoder</alt-title><alt-title alt-title-type="right-running-head">Improve Representation for Cross-Language Clone Detection by Pretrain Using Tree Autoencoder</alt-title>
</title-group>
<contrib-group content-type="authors">
<contrib id="author-1" contrib-type="author">
<name name-style="western"><surname>Ling</surname><given-names>Huading</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Zhang</surname><given-names>Aiping</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Yin</surname><given-names>Changchun</given-names></name>
<xref ref-type="aff" rid="aff-1">1</xref>
</contrib>
<contrib id="author-4" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Li</surname><given-names>Dafang</given-names></name>
<xref ref-type="aff" rid="aff-2">2</xref><email>hdlingnuaa@163.com</email>
</contrib>
<contrib id="author-5" contrib-type="author">
<name name-style="western"><surname>Chang</surname><given-names>Mengyu</given-names></name>
<xref ref-type="aff" rid="aff-3">3</xref>
</contrib>
<aff id="aff-1"><label>1</label><institution>Nanjing University of Aeronautics and Astronautics</institution>, <addr-line>Nanjing, 210008</addr-line>, <country>China</country></aff>
<aff id="aff-2"><label>2</label><institution>School of Management Science &#x0026; Engineering, Nanjing University of Finance and Economics</institution>, <addr-line>Nanjing, 210000</addr-line>, <country>China</country></aff>
<aff id="aff-3"><label>3</label><institution>Mcgill University</institution>, <addr-line>Montreal, H3G 1Y2</addr-line>, <country>Canada</country></aff>
</contrib-group><author-notes><corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Dafang Li. Email: <email>hdlingnuaa@163.com</email></corresp></author-notes>
<pub-date pub-type="epub" date-type="pub" iso-8601-date="2022-03-21"><day>21</day>
<month>03</month>
<year>2022</year></pub-date>
<volume>33</volume>
<issue>3</issue>
<fpage>1561</fpage>
<lpage>1577</lpage>
<history>
<date date-type="received"><day>15</day><month>1</month><year>2022</year></date>
<date date-type="accepted"><day>20</day><month>2</month><year>2022</year></date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2022 Ling et al.</copyright-statement>
<copyright-year>2022</copyright-year>
<copyright-holder>Ling et al.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_IASC_27349.pdf"></self-uri>
<abstract>
<p>With the rise of deep learning in recent years, many code clone detection (CCD) methods use deep learning techniques and achieve promising results, so is cross-language CCD. However, deep learning techniques require a dataset to train the models. The dataset is typically small and has a gap between real-world clones due to the difficulty of collecting datasets for cross-language CCD. This creates a data bottleneck problem: data scale and quality issues will cause that model with a better design can still not reach its full potential. To mitigate this, we propose a tree autoencoder (TAE) architecture. It uses unsupervised learning to pretrain with abstract syntax trees (ASTs) of a large-scale dataset, then fine-tunes the trained encoder in the downstream CCD task. Our proposed TAE contains a tree Long Short-Term Memory (LSTM) encoder and a tree LSTM decoder. We design a novel embedding method for AST nodes, including type embedding and value embedding. In the training of TAE, we present an &#x201C;encode and decode by layers&#x201D; strategy and a node-level batch size design. For the CCD dataset, we propose a negative sampling method based on probability distribution. The experimental results on two datasets verify the effeteness of our embedding method, as well as that TAE and its pretrain enhance the performance of the CCD model. The node context information is well captured, and the reconstruction accuracy of the node-value reaches 95.45&#x0025;. TAE pretrain improves the performance of CCD with a 4&#x0025; increase in F1 score, which alleviates the data bottleneck problem.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Code clone detection</kwd>
<kwd>autoencoder</kwd>
<kwd>abstract syntax tree</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>In the development of software, to improve efficiency and reduce time cost, some existing codes are often copied-pasted or reused, which produces code cloning. Code cloning refers to two or more identical or similar source code fragments. Code cloning is pretty common, The percentage of which ranges from 5&#x0025; to 70&#x0025; [<xref ref-type="bibr" rid="ref-1">1</xref>]. It can improve efficiency and reduce development cost. However, it will increase the maintenance cost, easily to introduce bugs and malicious codes. Therefore, code clone detection (CCD) is needed to find out the cloning pair and mitigate the negative effects of code cloning.</p>
<p>Many CCD methods have been proposed, including traditional methods [<xref ref-type="bibr" rid="ref-2">2</xref>&#x2013;<xref ref-type="bibr" rid="ref-4">4</xref>] and machine learning based methods [<xref ref-type="bibr" rid="ref-5">5</xref>&#x2013;<xref ref-type="bibr" rid="ref-7">7</xref>]. They primarily handle single language CCD. However, developers often need to develop the same functionality in different programming languages for different software systems [<xref ref-type="bibr" rid="ref-8">8</xref>&#x2013;<xref ref-type="bibr" rid="ref-11">11</xref>] (e.g., C/C&#x0023; for Windows phones, Java for Android phones, and Objective-C for iPhone [<xref ref-type="bibr" rid="ref-12">12</xref>]) to achieve compatibility and adoptability [<xref ref-type="bibr" rid="ref-13">13</xref>,<xref ref-type="bibr" rid="ref-14">14</xref>]. These bring the cross-language clones. Most of the existing studies only consider a single language, the research on CCD is limited to a single language. Single language CCD methods cannot detect clones between different languages. Thus, Cross-language CCD methods need to be developed. Some cross-language CCD have been proposed, including traditional methods [<xref ref-type="bibr" rid="ref-12">12</xref>,<xref ref-type="bibr" rid="ref-15">15</xref>,<xref ref-type="bibr" rid="ref-16">16</xref>] and machine learning based methods [<xref ref-type="bibr" rid="ref-17">17</xref>&#x2013;<xref ref-type="bibr" rid="ref-19">19</xref>]. Machine learning based methods achieve better results but require a labeled dataset for model training [<xref ref-type="bibr" rid="ref-20">20</xref>]. Due to the difficulty of dataset collecting, the dataset is typically small or has a gap between real-world cloning. This leads to a data bottleneck problem: data scale and quality issues will cause that model with a better design can still not reach its full potential. For example, the work of [<xref ref-type="bibr" rid="ref-17">17</xref>] created a CCD dataset by fetching source code from competitive programming websites. The dataset is small and very different from the source code in a real-world system.</p>
<p>To mitigate this, we consider using unsupervised learning to pretrain the model on a large-scale dataset, then use the trained model to fine-tune in the small dataset. We use an autoencoder framework. The pretrain is done by doing an auto-encode-and-decode task on ASTs. It does not require any label and the dataset can be fetched from the internet as much as we want. By training an autoencoder through unsupervised learning in a large-scale dataset, a better result can be achieved in the downstream CCD task with the pretrain encoder, especially when the amount of labeled data is small. We make the following contributions:<list list-type="simple"><list-item><label>1)</label>
<p>We design a novel embedding method for AST nodes, including type embedding and value embedding. We design a tree-based distance and a tree-based Glove algorithm for type embedding, use a Gated Recurrent Unit (GRU) [<xref ref-type="bibr" rid="ref-21">21</xref>] plus LSTM [<xref ref-type="bibr" rid="ref-22">22</xref>] autoencoder for value embedding.</p></list-item><list-item><label>2)</label>
<p>We propose a novel architecture that uses an autoencoder to pretrain on a large-scale dataset then fine-tunes the encoder in CCD. This will reduce the dataset requirement. We design a tree structure encoder and decoder, which combine as a tree autoencoder (TAE).</p></list-item><list-item><label>3)</label>
<p>We present three training techniques for TAE, including &#x201C;encode and decode by layers&#x201D;, the use of node-level batch size and a tree splitting strategy. We propose a probability distribution based negative sampling method for the training on the CCD dataset.</p></list-item><list-item><label>4)</label>
<p>We verify our proposed methods in a self-collecting dataset and an open-source cross-language CCD dataset. Experimental results verify the effeteness of the node embedding method, as well as that TAE and its pretrain enhance the performance of the CCD model.</p></list-item></list></p>
<p>In the next section, we will list some related works, then we will present our method in Section 3. In Section 4, we will present the experimental setup and results. Finally, we conclude our work in Section 5.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Work</title>
<p>In this section, we will present some related works about CCD and some other approaches for vector embedding representation.</p>
<sec id="s2_1">
<label>2.1</label>
<title>CCD Approaches</title>
<p>Recently, the rise of neural networks has led to better development of CCD. Many researchers have designed neural network models for CCD and achieved promising results. AST-based neural network (ASTNN) [<xref ref-type="bibr" rid="ref-5">5</xref>] is a neural network designed for code AST to extract features from ASTs and perform CCD. It first does a word embedding pretrain on ASTs, then trains a neural network using the pretrain embedding. However, its pretrain performs on node sequences obtained by depth-first search (DFS) on ASTs, which loses tree structure information and cannot obtain a good embedding.</p>
<p>Clone detection with learning to hash (CDLH) [<xref ref-type="bibr" rid="ref-6">6</xref>] uses a tree-based LSTM for CCD. The tree-based LSTM encodes the AST into a vector and then uses a hash layer to map the vector into a hamming space (hash code) [<xref ref-type="bibr" rid="ref-23">23</xref>]. Finally, the CCD prediction is determined by the hash codes. Similarly [<xref ref-type="bibr" rid="ref-7">7</xref>] also uses a tree-based LSTM to extract features from ASTs. The features of the two ASTs are input into a classifier or a similarity measurement model. Then, a loss function is designed to train the whole model. Both [<xref ref-type="bibr" rid="ref-6">6</xref>] and [<xref ref-type="bibr" rid="ref-7">7</xref>] must transfer the ASTs into binary trees. However, if transform ASTs into binary trees, extra nodes are added, and the tree size and depth can dramatically increase. This will affect the encoding of the tree, weaken the model&#x2019;s ability to capture more realistic and complex semantics, and affect the performance.</p>
<p>For cross-language CCD, C2D2 [<xref ref-type="bibr" rid="ref-15">15</xref>] is the first cross-language CCD tool. It detects clones between C&#x0023; and Visual Basic .NET languages using Code Document Object Model (CodeDOM) as an intermediate representation. However, the requirement of an intermediate representation makes it limited. Cheng et al. [<xref ref-type="bibr" rid="ref-16">16</xref>] proposed CLCMiner that uses the code revision histories for CCD without an intermediate language. However, the revision histories it relies on may not be available in the real application. So, it has limitations.</p>
<p>Perez et al. [<xref ref-type="bibr" rid="ref-17">17</xref>] proposed a novel AST node embedding method: a tree-based skip-gram. After the node embedding, the AST is flattened into a sequence by DFS and then fed into the LSTM. Finally, a classifier is used to predict the clone pair. However, the window size in the paper cannot be increased to capture further node context information. When increasing the window size, the method not only fails to obtain a better representation but also introduces more noise, resulting in information flattening problem (related types&#x2019; embedded vectors in space distribution are more dispersed and lower polymerized).</p>
<p>CroLSim [<xref ref-type="bibr" rid="ref-18">18</xref>] uses the application programming interface (API) documentation to find relationships among the API calls used by different languages. It presents a deep learning based vector learning method to identify semantic relationships. However, this method depends on the quality of the API documentation.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Vector Representation Approaches</title>
<p>Vector representation refers to projecting objects (e.g., words, nodes, tokens) in high-dimensional space into a continuous vector space with a much lower dimension. It maps the object into a fixed dimension vector [<xref ref-type="bibr" rid="ref-24">24</xref>]. Since the source code and natural language are similar in some ways, vector representation techniques like word embedding used in natural language processing can also apply to source code related work such as CCD.</p>
<p>There are word embedding methods, including Word2vec [<xref ref-type="bibr" rid="ref-25">25</xref>] and Glove [<xref ref-type="bibr" rid="ref-26">26</xref>]. Word2Vec is a successful method used in large-scale word representation. It obtains word-pair information for model training by sliding a fixed-length window on the sentences in the corpus. Two models are proposed in Word2Vec: continuous bag-of-words model (CBOW) and skip-gram model. The former uses the context to predict the central word, while the latter uses the central word to predict the context. Glove improves Word2vec by using corpus&#x2019;s global statistics, making it quite efficient. However, these methods are designed only for sequence data, and cannot apply to tree structure data such as AST.</p>
<p>Besides the word embedding, there are other vector representation techniques, some of which are designed for source code. Peng et al. [<xref ref-type="bibr" rid="ref-27">27</xref>] designed a &#x201C;coding criterion&#x201D; method to build vector representations of AST nodes, making it possible to use deep learning for program analysis. Yu et al. [<xref ref-type="bibr" rid="ref-28">28</xref>] proposed a new token embedding method, position-aware character embedding (PACE). It splits a token into characters, then the token&#x2019;s embedding is the weighted sum of one-hot encoding of all characters [<xref ref-type="bibr" rid="ref-29">29</xref>]. This embedding technique requires no training and can apply to arbitrary tokens. However, this method that weighting by position is asymmetric in position: the weight of the front position is bigger than the weight of the back position.</p>
<p>The work of [<xref ref-type="bibr" rid="ref-30">30</xref>] uses a random walk method on AST, which combines DFS and breadth-first search (BFS) simultaneously to obtain a sequence to train the skip-gram model. After obtaining the embedding of AST nodes, sentence embedding, a lightweight approach, is used to obtain the representation of the entire tree. Finally, it detects code clones by similarity measure using Euclidean distance. However, it uses all the ASTs in the dataset to generate the sequence, leading to the wrong context information when sliding the window (nodes on two different ASTs appear in the window at the same time).</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Methodology</title>
<p>The overview of our method is illustrated in <xref ref-type="fig" rid="fig-1">Fig. 1</xref>. There are two major parts: TAE pretrain and CCD. For TAE pretrain, we first fetch source codes from the database, then get the AST data and do filtration to obtain the Base AST data. Then, the Base AST data is extracted and filtered to build three datasets: Type Embedding Dataset, Value Embedding Dataset, and Pretrain AST Data. We train the models and get the trained encoder of TAE, which will be used in the CCD model. For CCD, we preprocess the CCD dataset and create Pair Data. After training the CCD model, we can use it for evaluation or use it as a CCD tool.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Method overview</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-1.png"/>
</fig>
<sec id="s3_1">
<label>3.1</label>
<title>Node Embedding</title>
<p>Our method uses the AST of the source code. We first have to preprocess the source code: extract the AST, and do a transformation (i.e., refer to the AST syntax of the target language and simplify the AST). Inspired from the node representation format in [<xref ref-type="bibr" rid="ref-7">7</xref>], which uses a type-content pair to represent an AST node, we use the format type-value pair to represent an AST node. The preprocessing of the source code is not our focus. To do computation on the AST, we use fixed dimension vectors to represent nodes (i.e., embedding). Our node embedding includes type embedding and value embedding.</p>
<p>Our type embedding method is based on Glove [<xref ref-type="bibr" rid="ref-26">26</xref>], a word embedding method that uses corpus&#x2019;s global statistics (co-occurrence matrix). Its target is to optimize the following function:<disp-formula id="eqn-1"><label>(1)</label>
<mml:math id="mml-eqn-1" display="block"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>V</mml:mi></mml:munderover><mml:mi>f</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>w</mml:mi><mml:mi>i</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mrow><mml:mover><mml:mi>w</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mn>2</mml:mn></mml:msup></mml:math>
</disp-formula>where <italic>V</italic> is vocabulary size, <italic>w</italic><sub><italic>i</italic></sub> and <italic>w</italic><sub><italic>j</italic></sub> are the left and right embedding of the <italic>i</italic>-th word, <italic>X</italic> is the co-occurrence matrix. <italic>f</italic> is a weighting function. The window of Glove can only be used in sequential data, not tree structure data. To improve Glove to adapt the tree structure data, we first propose a novel tree-based distance <italic>d</italic>(<italic>x</italic>, <italic>y</italic>). For two different nodes <italic>a</italic> and <italic>b</italic> in the same tree:<list list-type="simple"><list-item><label>1)</label>
<p><inline-formula id="ieqn-1">
<mml:math id="mml-ieqn-1"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math>
</inline-formula>.</p></list-item><list-item><label>2)</label>
<p>If <italic>a</italic> and <italic>b</italic> are inheritance relationship (<italic>a</italic> is an ancestor/descendant of <italic>b</italic>), then <inline-formula id="ieqn-2">
<mml:math id="mml-ieqn-2"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">p</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">p</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">|</mml:mo></mml:math>
</inline-formula>.</p></list-item><list-item><label>3)</label>
<p>If <italic>a</italic> and <italic>b</italic> are not inheritance relationship, find the &#x201C;closest&#x201D; (the deepest) common ancestor <italic>c</italic>, then <inline-formula id="ieqn-3">
<mml:math id="mml-ieqn-3"><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>b</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>d</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>b</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>c</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:math>
</inline-formula>.</p></list-item></list></p>
<p>The tree-based distance visually can be interpreted as that every two children of the same node are connected by a shortcut. It&#x2019;s easy to prove that the proposed distance satisfies the three conditions of a legal distance definition (non-negativity, symmetry, and satisfying the triangle inequality).</p>
<p>We define a node&#x2019;s sequentiality based on whether its children&#x2019;s order matter: if a node&#x2019;s children matter in order and the number of children is not fixed, we call it a sequential node (or it&#x2019;s sequentiality), otherwise we call it a non-sequential node (or it&#x2019;s non-sequentiality). We add five auxiliary losses according to five additional tasks. One is to predict a type&#x2019;s sequentiality, other four are to predict special relationship: parent-child relationship, grandpa-grandchild relationship, near-sibling relationship (sibling nodes whose indexes differ by 1), near-near-sibling relationship (sibling nodes whose indexes differ by 2). Their losses denote as <italic>L</italic><sub><italic>s</italic></sub>, <italic>L</italic><sub><italic>a</italic></sub>, <italic>L</italic><sub><italic>b</italic></sub>, <italic>L</italic><sub><italic>c</italic></sub>, <italic>L</italic><sub><italic>d</italic></sub>, requiring vector <italic>S</italic> and matrix <italic>A</italic>, <italic>B</italic>, <italic>C</italic>, <italic>D</italic>. The loss of Glove denotes as <italic>L</italic><sub><italic>g</italic></sub>. The final loss is as follows:<disp-formula id="eqn-2"><label>(2)</label>
<mml:math id="mml-eqn-2" display="block"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:mi>&#x03B8;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>g</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B7;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>b</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B3;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B4;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mi>d</mml:mi></mml:msub></mml:math>
</disp-formula></p>
<p><italic>S</italic><sub><italic>i</italic></sub> is the statistics about type <italic>t</italic><sub><italic>i</italic></sub>, can be positive or negative (depend on sequentiality). <italic>A</italic><sub><italic>ij</italic></sub> is the statistics about <italic>t</italic><sub><italic>i</italic></sub> and <italic>t</italic><sub><italic>j</italic></sub> (<italic>t</italic><sub><italic>i</italic></sub> is on the left of <italic>t</italic><sub><italic>j</italic></sub>, &#x201C;left&#x201D; and &#x201C;right&#x201D; is based on the node order by DFS on the AST, the front is left, the behind is right), can be positive or negative (depend on the relationship between <italic>t</italic><sub><italic>i</italic></sub> and <italic>t</italic><sub><italic>j</italic></sub>). <italic>B</italic>, <italic>C</italic> and <italic>D</italic> are similar to <italic>A</italic>. We have (<italic>L</italic><sub><italic>b</italic></sub>, <italic>L</italic><sub><italic>c</italic></sub> and <italic>L</italic><sub><italic>d</italic></sub> are similar to <italic>L</italic><sub><italic>a</italic></sub>):<disp-formula id="eqn-3"><label>(3)</label>
<mml:math id="mml-eqn-3" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>V</mml:mi></mml:munderover><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03BB;</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>V</mml:mi></mml:munderover><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03BB;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mrow></mml:mstyle></mml:mrow><mml:mrow><mml:mi mathvariant="normal">B</mml:mi><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>I</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>w</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>w</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math>
</disp-formula><disp-formula id="eqn-4"><label>(4)</label>
<mml:math id="mml-eqn-4" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>V</mml:mi></mml:munderover><mml:mrow><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03BB;</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>l</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>V</mml:mi></mml:munderover><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>k</mml:mi><mml:mi>l</mml:mi></mml:mrow></mml:msub><mml:msup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03BB;</mml:mi></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:mrow></mml:mstyle></mml:mrow><mml:mrow><mml:mi mathvariant="normal">B</mml:mi><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>I</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>a</mml:mi></mml:msub><mml:mo stretchy="false">[</mml:mo><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>w</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mi>i</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd><mml:mrow><mml:msub><mml:mi>w</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>w</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:mtd></mml:mtr></mml:mtable><mml:mo stretchy="false">]</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math>
</disp-formula><disp-formula id="eqn-5"><label>(5)</label>
<mml:math id="mml-eqn-5" display="block"><mml:mi>I</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd columnalign="left"><mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:mrow></mml:mtd><mml:mtd columnalign="left"><mml:mrow><mml:mspace width="1em" /><mml:mi>x</mml:mi><mml:mo>&#x003E;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd columnalign="left"><mml:mrow><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:mrow></mml:mtd><mml:mtd columnalign="left"><mml:mrow><mml:mspace width="1em" /><mml:mi>x</mml:mi><mml:mo>&#x2264;</mml:mo><mml:mn>0</mml:mn></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow><mml:mo fence="true" stretchy="true" symmetric="true"></mml:mo></mml:mrow></mml:math>
</disp-formula></p>
<p>where <italic>&#x03BB;</italic> is an exponent hyperparameter to soften the weight coefficient, BCE is the binary cross entropy. The co-occurrence matrix <italic>X</italic> can be represented as a linear combination of specific distance co-occurrence matrices: <inline-formula id="ieqn-4">
<mml:math id="mml-ieqn-4"><mml:mi>X</mml:mi><mml:mo>=</mml:mo><mml:msubsup><mml:mrow><mml:mo movablelimits="false">&#x2211;</mml:mo></mml:mrow><mml:mrow><mml:mi>d</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>s</mml:mi></mml:msubsup><mml:mo>&#x2061;</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi>d</mml:mi></mml:msub><mml:msub><mml:mi>Y</mml:mi><mml:mi>d</mml:mi></mml:msub></mml:math>
</inline-formula>. Where <italic>s</italic> is the predefined window size, <italic>Y</italic><sub><italic>k</italic></sub> is the co-occurrence matrix of distance <italic>k</italic>. The element of <italic>Y</italic><sub><italic>k</italic></sub> grows extremely fast when <italic>k</italic> increases. <italic>r</italic><sub><italic>d</italic></sub> is the normalization ratio used to prevent information flattening. Evidence can be found in [<xref ref-type="bibr" rid="ref-17">17</xref>], the method faces the problem that increasing the window size will create more noise, and not get better results. The ratio we used is<disp-formula id="eqn-6"><label>(6)</label>
<mml:math id="mml-eqn-6" display="block"><mml:msub><mml:mi>r</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mi>Y</mml:mi><mml:mn>1</mml:mn><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mi>j</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup></mml:mrow><mml:mrow><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>j</mml:mi></mml:mrow></mml:munder><mml:msubsup><mml:mi>Y</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mi>j</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msubsup></mml:mrow></mml:mfrac></mml:mrow></mml:mstyle></mml:math>
</disp-formula></p>
<p>The whole step of tree-based Glove is the following: &#x201C;slice&#x201D; the window on the ASTs to get all matrices and optimize <xref ref-type="disp-formula" rid="eqn-2">Eq. (2)</xref> by sampling index pairs from <italic>V</italic> to get the embedding matrix <inline-formula id="ieqn-5">
<mml:math id="mml-ieqn-5"><mml:msub><mml:mi>E</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>w</mml:mi><mml:mo>+</mml:mo><mml:mrow><mml:mover><mml:mi>w</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow></mml:math>
</inline-formula>.</p>
<p>In the value embedding phase, we use a GRU &#x002B; LSTM autoencoder framework. GRU encodes value into a fixed-length vector, and then LSTM decodes the vector to reconstruct the original value. In the encoding phase, two special tokens are added before and after the word to get the input sequence, including the start of the word and the end of the word, denoted as and . Then, feed the sequence into the encoder to get the output vector. In the decoding phase, distribute the output vector in time step and feed them into the LSTM, then apply the linear layer to the outputs to get the predicted sequence. The illustration can be seen in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>. We add two additional auxiliary losses according to two additional tasks:<list list-type="simple"><list-item><label>1)</label>
<p>Word classification: predict whether the word/value is an identifier, a real number or the others.</p></list-item><list-item><label>2)</label>
<p>Character classification: predict each character&#x2019;s class. We categorize 128 ASCII characters, and into 7 classes: , , digits, capital letters, lowercase letters, non-printing characters (control characters, ASCII range is in 0&#x2009;&#x223C;&#x2009;31) and other characters.</p></list-item></list></p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>Autoencoder of value embedding</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-2.png"/>
</fig>
<p>Finally, the whole loss is the following:<disp-formula id="eqn-7"><label>(7)</label>
<mml:math id="mml-eqn-7" display="block"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">s</mml:mi><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">u</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">w</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">h</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math>
</disp-formula><disp-formula id="eqn-8"><label>(8)</label>
<mml:math id="mml-eqn-8" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mi mathvariant="normal">s</mml:mi><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">u</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">t</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac></mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mrow><mml:mrow><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>e</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>e</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>.</mml:mo></mml:mstyle></mml:math>
</disp-formula><disp-formula id="eqn-9"><label>(9)</label>
<mml:math id="mml-eqn-9" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">w</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">d</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>w</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>w</mml:mi></mml:msub><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>.</mml:mo></mml:math>
</disp-formula><disp-formula id="eqn-10"><label>(10)</label>
<mml:math id="mml-eqn-10" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">h</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">r</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:mfrac></mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mrow><mml:mi>n</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:munderover><mml:mrow><mml:mrow><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:msub><mml:mi>o</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>.</mml:mo></mml:mstyle></mml:math>
</disp-formula>where <italic>e</italic><sub><italic>n</italic>&#x002B;1</sub> is , <italic>y</italic><sub><italic>w</italic></sub> and <italic>z</italic><sub><italic>i</italic></sub> are the classification labels, and CE is the cross entropy.</p>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>Tree Autoencoder</title>
<p>Our TAE model includes an encoder and a decoder, both use a tree LSTM. LSTM [<xref ref-type="bibr" rid="ref-22">22</xref>] is proposed for handling sequence data and cannot handle tree structure data like AST. To deal with tree structure data, [<xref ref-type="bibr" rid="ref-31">31</xref>] proposed Child-Sum Tree-LSTMs:<disp-formula id="eqn-11"><label>(11)</label>
<mml:math id="mml-eqn-11" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-12"><label>(12)</label>
<mml:math id="mml-eqn-12" display="block"><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-13"><label>(13)</label>
<mml:math id="mml-eqn-13" display="block"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math>
</disp-formula><disp-formula id="eqn-14"><label>(14)</label>
<mml:math id="mml-eqn-14" display="block"><mml:msub><mml:mi>o</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mrow><mml:mo>=</mml:mo><mml:mtext>&#xA0;</mml:mtext></mml:mrow><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo></mml:math>
</disp-formula><disp-formula id="eqn-15"><label>(15)</label>
<mml:math id="mml-eqn-15" display="block"><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mrow><mml:mo>=</mml:mo><mml:mtext>&#xA0;</mml:mtext></mml:mrow><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-16"><label>(16)</label>
<mml:math id="mml-eqn-16" display="block"><mml:msub><mml:mi>c</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-17"><label>(17)</label>
<mml:math id="mml-eqn-17" display="block"><mml:msub><mml:mi>h</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>o</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula>where <italic>&#x03C3;</italic> is the sigmoid function, <inline-formula id="ieqn-6">
<mml:math id="mml-ieqn-6"><mml:mo>&#x2299;</mml:mo></mml:math>
</inline-formula> is element-wise multiplication and <italic>C</italic>(<italic>s</italic>) is the set of children of node <italic>s</italic>. Our encoder is based on Child-Sum Tree-LSTMs. We first change <xref ref-type="disp-formula" rid="eqn-11">Eq. (11)</xref> from summation into an inner GRU, to make use of the child order. Then we change <xref ref-type="disp-formula" rid="eqn-13">Eq. (13)</xref> from <italic>&#x03C3;</italic> into softmax. It&#x2019;s a normalization to make the forget gates (<italic>f</italic>) of all children sum to 1. Then, we have our tree LSTM:<disp-formula id="eqn-18"><label>(18)</label>
<mml:math id="mml-eqn-18" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">G</mml:mi><mml:mi mathvariant="normal">R</mml:mi><mml:mi mathvariant="normal">U</mml:mi></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-19"><label>(19)</label>
<mml:math id="mml-eqn-19" display="block"><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-20"><label>(20)</label>
<mml:math id="mml-eqn-20" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>f</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-21"><label>(21)</label>
<mml:math id="mml-eqn-21" display="block"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>f</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msup><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub><mml:mrow><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mrow><mml:mrow><mml:mover><mml:mi>f</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msup></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-22"><label>(22)</label>
<mml:math id="mml-eqn-22" display="block"><mml:msub><mml:mi>o</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-23"><label>(23)</label>
<mml:math id="mml-eqn-23" display="block"><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-24"><label>(24)</label>
<mml:math id="mml-eqn-24" display="block"><mml:msub><mml:mi>c</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-25"><label>(25)</label>
<mml:math id="mml-eqn-25" display="block"><mml:msub><mml:mi>h</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>o</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula>where <italic>x</italic><sub><italic>s</italic></sub> is the input (node embedding, concatenating of type embedding and value embedding) of node <italic>s</italic>. <inline-formula id="ieqn-7">
<mml:math id="mml-ieqn-7"><mml:msub><mml:mi>L</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mn>1</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>s</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mi>n</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo></mml:math>
</inline-formula> is the list of hidden states of children of node <italic>s</italic>. This is fed into an inner GRU to get the last hidden states <xref ref-type="disp-formula" rid="eqn-18">(Eq. (18)</xref>). If <italic>s</italic> is a leaf node, then <inline-formula id="ieqn-8">
<mml:math id="mml-ieqn-8"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub></mml:math>
</inline-formula> is zero and there is no <italic>c</italic><sub><italic>j</italic></sub>. Our Tree LSTM is shown in <xref ref-type="fig" rid="fig-3">Fig. 3</xref> (left).</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>TAE&#x0027;s tree LSTM and decoder</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-3.png"/>
</fig>
<p>The decoder of TAE contains a node embedding decoder (type classifier &#x002B; value decoder) and a Tree LSTM Decoder (inner decoder &#x002B; outer decoder &#x002B; end of children (EOC) classifier):<disp-formula id="eqn-26"><label>(26)</label>
<mml:math id="mml-eqn-26" display="block"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>n</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">e</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-27"><label>(27)</label>
<mml:math id="mml-eqn-27" display="block"><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mi>y</mml:mi><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>i</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-28"><label>(28)</label>
<mml:math id="mml-eqn-28" display="block"><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mi>y</mml:mi><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>f</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-29"><label>(29)</label>
<mml:math id="mml-eqn-29" display="block"><mml:msub><mml:mi>o</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mi>y</mml:mi><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>o</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-30"><label>(30)</label>
<mml:math id="mml-eqn-30" display="block"><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msup><mml:mi>W</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mi>y</mml:mi><mml:mo>+</mml:mo><mml:msup><mml:mi>U</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:msub><mml:mi>h</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msup><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-31"><label>(31)</label>
<mml:math id="mml-eqn-31" display="block"><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>i</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>g</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mi>s</mml:mi><mml:mi>j</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2299;</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula><disp-formula id="eqn-32"><label>(32)</label>
<mml:math id="mml-eqn-32" display="block"><mml:msub><mml:mi>h</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mi>o</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>&#x2299;</mml:mo><mml:mi>tanh</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>c</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /></mml:math>
</disp-formula></p>
<p>where <italic>y</italic> is the input of the decoder LSTM, not the node embedding of <italic>s</italic>. The inner decoder decodes <italic>h</italic><sub><italic>s</italic></sub> into <inline-formula id="ieqn-9">
<mml:math id="mml-ieqn-9"><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mn>2</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>n</mml:mi></mml:msub><mml:mo stretchy="false">]</mml:mo></mml:math>
</inline-formula>, it can be any decoder that decodes a vector into a list of vectors. Here we use the one similar to the decoder in value embedding without the linear layer. We use the type embedding of the predicted type as the input <italic>y</italic>. In the training, we use scheduled sampling [<xref ref-type="bibr" rid="ref-32">32</xref>]. Since the decoding is a one-to-many operation, we apply an EOC classifier on <inline-formula id="ieqn-10">
<mml:math id="mml-ieqn-10"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:math>
</inline-formula> to decide how many children need to be decoded. <italic>f</italic><sub><italic>sj</italic></sub> is a weight defined by <italic>s</italic> and <inline-formula id="ieqn-11">
<mml:math id="mml-ieqn-11"><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>j</mml:mi></mml:msub></mml:math>
</inline-formula>, which applies on <italic>c</italic><sub><italic>s</italic></sub> to decide how much information flows from node <italic>s</italic> to node <italic>j</italic> <xref ref-type="disp-formula" rid="eqn-31">(Eq. (31)</xref>). Finally, <italic>h</italic><sub><italic>j</italic></sub> can be obtained according to <italic>o</italic><sub><italic>j</italic></sub> and <italic>c</italic><sub><italic>j</italic></sub>. The decoder is depicted in <xref ref-type="fig" rid="fig-3">Fig. 3</xref> (right). The reconstruction loss is as follows (<xref ref-type="fig" rid="fig-4">Fig. 4</xref>):<disp-formula id="eqn-33"><label>(33)</label>
<mml:math id="mml-eqn-33" display="block"><mml:mi>L</mml:mi><mml:mo>=</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">y</mml:mi><mml:mi mathvariant="normal">p</mml:mi><mml:mi mathvariant="normal">e</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">v</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">u</mml:mi><mml:mi mathvariant="normal">e</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B3;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">c</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:mi>&#x03B4;</mml:mi><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">h</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math>
</disp-formula><disp-formula id="eqn-34"><label>(34)</label>
<mml:math id="mml-eqn-34" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mi mathvariant="normal">y</mml:mi><mml:mi mathvariant="normal">p</mml:mi><mml:mi mathvariant="normal">e</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:mrow><mml:mrow><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>t</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mstyle></mml:math>
</disp-formula><disp-formula id="eqn-35"><label>(35)</label>
<mml:math id="mml-eqn-35" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">v</mml:mi><mml:mi mathvariant="normal">a</mml:mi><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">u</mml:mi><mml:mi mathvariant="normal">e</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>v</mml:mi><mml:mo stretchy="false">&#x007E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>v</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>s</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msubsup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup></mml:mstyle></mml:math>
</disp-formula><disp-formula id="eqn-36"><label>(36)</label>
<mml:math id="mml-eqn-36" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">o</mml:mi><mml:mi mathvariant="normal">c</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mn>2</mml:mn><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac></mml:mrow><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:mo stretchy="false">[</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mrow><mml:mrow><mml:mi mathvariant="normal">B</mml:mi><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>e</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mrow><mml:mi mathvariant="normal">B</mml:mi><mml:mi mathvariant="normal">C</mml:mi><mml:mi mathvariant="normal">E</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:msub><mml:mrow><mml:mover><mml:mi>e</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>s</mml:mi></mml:msub><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:mstyle></mml:math>
</disp-formula><disp-formula id="eqn-37"><label>(37)</label>
<mml:math id="mml-eqn-37" display="block"><mml:msub><mml:mi>L</mml:mi><mml:mrow><mml:mrow><mml:mi mathvariant="normal">c</mml:mi><mml:mi mathvariant="normal">h</mml:mi><mml:mi mathvariant="normal">i</mml:mi><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">d</mml:mi><mml:mi mathvariant="normal">r</mml:mi><mml:mi mathvariant="normal">e</mml:mi><mml:mi mathvariant="normal">n</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mfrac></mml:mrow><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:mrow><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mo fence="false" stretchy="false">|</mml:mo></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>h</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">|</mml:mo><mml:msubsup><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup></mml:mstyle></mml:math>
</disp-formula>where <italic>T</italic> is the nodes set of an AST tree, &#x007C;<italic>T</italic>&#x007C; is the node count, and <italic>n</italic><sub><italic>s</italic></sub> is the children count of node <italic>s</italic>. Since the tree root is not a child to any node, <italic>h</italic><sub>root</sub> is not used in <xref ref-type="disp-formula" rid="eqn-37">Eq. (37)</xref>. The number of hidden states we need to compute <italic>L</italic><sub>children</sub> is &#x007C;<italic>T</italic>&#x007C;&#x2009;&#x2212;&#x2009;1, we have <inline-formula id="ieqn-12">
<mml:math id="mml-ieqn-12"><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thinmathspace" /><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>T</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo>=</mml:mo><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>s</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>T</mml:mi></mml:mrow></mml:munder><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:msub><mml:mi>n</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow></mml:munderover><mml:mn>1</mml:mn></mml:math>
</inline-formula></p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>TAE&#x0027;s encoding and decoding</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-4.png"/>
</fig>
<p>The encoding/decoding of each node depends on the encoding/decoding of its children/parent. The encoding/decoding has to be from down/top to top/down. With this, we introduce an &#x201C;encode and decode by layers&#x201D; strategy: group nodes by layers and encode/decode multiple nodes simultaneously in a layered fashion [<xref ref-type="bibr" rid="ref-33">33</xref>]. For the encoding/decoding of multiple trees, we first sort the trees by depth. Then group the nodes by layers and encode/decode them layer by layer. Such a strategy takes full advantage of parallel computing capability. When training on the AST data, we don&#x2019;t train on a batch of ASTs. Instead, we train on a batch of nodes. The node count of every step depends on the AST (i.e., the size of the batch is dynamic). We use a hyperparameter &#x201C;max node count&#x201D; to imply the max node count in a training step. If several ASTs&#x2019; total node count is smaller than the batch size, we group them in a batch. If an AST&#x2019;s node count is bigger than the batch size and smaller than the max node count, we use a tree splitting strategy that split it into several subtrees to make every subtree&#x2019;s node count smaller than the batch size. Then, train on these subtrees one by one while preserving every subtree&#x2019;s root encoding to provide for the parent subtree.</p>
</sec>
<sec id="s3_3">
<label>3.3</label>
<title>CCD</title>
<p>Our CCD model uses a siamese-based architecture neural network [<xref ref-type="bibr" rid="ref-34">34</xref>], including an AST extractor, two encoders and a classifier. The AST extractor extracts AST from the source code. The encoder uses TAE&#x2019;s encoder that encodes the whole AST into a fixed-length vector. The CCD classifier accepts two vectors and does a binary classification to predict if the two code fragments are clone pair. The training code pairs are obtained from the dataset by sampling similar to [<xref ref-type="bibr" rid="ref-17">17</xref>], except for the sampling of negative samples.</p>
<p>To create code pairs, first, sample a code fragment (anchor) and then sample a positive sample and <italic>n</italic> negative samples. The positive sample is randomly selected from the set of code clones of the current anchor fragment. For negative samples, we create a candidate set and randomly select <italic>m</italic> samples from it to run into the model. Finally, select <italic>n</italic> samples whose predicted scores are top-<italic>n</italic> highest as negative samples. We use a probability distribution method. We denote the selected positive fragment as <italic>a</italic>, denote code fragment dataset of the target language as <italic>C</italic>, and <italic>g</italic>(<italic>a</italic>) is the AST node count of <italic>a</italic>. Then we use<disp-formula id="eqn-38"><label>(38)</label>
<mml:math id="mml-eqn-38" display="block"><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mi>P</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mspace width="thickmathspace" /><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>g</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mi>g</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo><mml:mo fence="false" stretchy="false">|</mml:mo></mml:mrow><mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">|</mml:mo></mml:mrow></mml:mfrac></mml:mrow></mml:mstyle></mml:math>
</disp-formula>as a probability measure of <italic>a</italic>. Finally, the candidate set of <italic>a</italic> is created with a hyperparameter <inline-formula id="ieqn-13">
<mml:math id="mml-ieqn-13"><mml:mi>&#x03F5;</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mn>0.5</mml:mn><mml:mo stretchy="false">)</mml:mo></mml:math>
</inline-formula>:<disp-formula id="eqn-39"><label>(39)</label>
<mml:math id="mml-eqn-39" display="block"><mml:msub><mml:mi>S</mml:mi><mml:mi>&#x03F5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd columnalign="left"><mml:mrow><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mspace width="thickmathspace" /><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mn>0</mml:mn><mml:mo>&#x2264;</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mn>2</mml:mn><mml:mi>&#x03F5;</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:mtd><mml:mtd columnalign="left"><mml:mrow><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mi>&#x03F5;</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd columnalign="left"><mml:mrow><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mspace width="thickmathspace" /><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03F5;</mml:mi><mml:mo>&#x2264;</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mi>&#x03F5;</mml:mi><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:mtd><mml:mtd columnalign="left"><mml:mrow><mml:mi>&#x03F5;</mml:mi><mml:mo>&#x003C;</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x003C;</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03F5;</mml:mi></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd columnalign="left"><mml:mrow><mml:mo fence="false" stretchy="false">{</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mspace width="thickmathspace" /><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mn>2</mml:mn><mml:mi>&#x03F5;</mml:mi><mml:mo>&#x2264;</mml:mo><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2264;</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>x</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>C</mml:mi><mml:mo fence="false" stretchy="false">}</mml:mo></mml:mrow></mml:mtd><mml:mtd columnalign="left"><mml:mrow><mml:mi>M</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>a</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mtext>&#xA0;</mml:mtext><mml:mo>&#x2265;</mml:mo><mml:mtext>&#xA0;</mml:mtext></mml:mrow><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03F5;</mml:mi></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:mrow><mml:mo fence="true" stretchy="true" symmetric="true"></mml:mo></mml:mrow></mml:math>
</disp-formula></p>
<p>Such a candidate set makes sure its size is always 2&#x003B5;|<italic>C</italic>&#x007C;.</p>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experiment Evaluation</title>
<sec id="s4_1">
<label>4.1</label>
<title>Experimental Setup</title>
<p>In our experiments, we use two datasets: a pretrain dataset for node embedding and TAE pretrain and a CCD dataset for cross-language CCD [<xref ref-type="bibr" rid="ref-17">17</xref>]. The pretrain dataset is created by fetching repositories whose starts are not less than 1k from GitHub. The raw data is about 100G (python &#x002B; java). We extract ASTs and do filtration to get the base AST data. Filtration range and node-type counting information are listed in <xref ref-type="table" rid="table-1">Tab. 1</xref> (&#x201C;seq&#x201D; is short for sequential), AST statistic is listed in <xref ref-type="table" rid="table-2">Tab. 2</xref>. The CCD dataset mainly contains folders of source codes, including 20828 java files (46 lines/file on average) and 23792 python files (13 lines/file on average). There are 576 folders, each folder represents a problem. Files in the same folder have the same functionality, thus two files or code fragments from the same folder can be seen as a clone pair.</p>
<table-wrap id="table-1"><label>Table 1</label>
<caption>
<title>Filtration range and node-type counting information of the pretrain dataset</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left" rowspan="2">Language</th>
<th align="center" colspan="3">Filtration range</th>
<th align="center" colspan="3">Node-type counting</th>
</tr>
<tr>
<th align="left">Node</th>
<th align="left">Width</th>
<th align="left">Depth</th>
<th align="left">Seq</th>
<th align="left">Non-seq</th>
<th align="left">Total</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Python</td>
<td align="left">[6, 25000]</td>
<td align="left">[4, 20000]</td>
<td align="left">[3, 200]</td>
<td align="left">37</td>
<td align="left">124</td>
<td align="left">161</td>
</tr>
<tr>
<td align="left">Java</td>
<td align="left">[8, 30000]</td>
<td align="left">[6, 25000]</td>
<td align="left">[4, 200]</td>
<td align="left">46</td>
<td align="left">177</td>
<td align="left">223</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="table-2"><label>Table 2</label>
<caption>
<title>AST statistic of the pretrain dataset</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Language</th>
<th align="left">File count</th>
<th align="left">Sum node count</th>
<th align="left">Max node count</th>
<th align="left">Max width</th>
<th align="left">Max depth</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">Python (before filtration)</td>
<td align="left">153,870</td>
<td align="left">171,567,690</td>
<td align="left">1,046,594</td>
<td align="left">521,225</td>
<td align="left">1,009</td>
</tr>
<tr>
<td align="left">Python (after filtration)</td>
<td align="left">141,473</td>
<td align="left">152,991,959</td>
<td align="left">24,952</td>
<td align="left">16,916</td>
<td align="left">182</td>
</tr>
<tr>
<td align="left">Java (before filtration)</td>
<td align="left">422,182</td>
<td align="left">517,881,807</td>
<td align="left">1,555,420</td>
<td align="left">982,463</td>
<td align="left">1,246</td>
</tr>
<tr>
<td align="left">Java (after filtration)</td>
<td align="left">421,435</td>
<td align="left">477,452,394</td>
<td align="left">29,982</td>
<td align="left">22,852</td>
<td align="left">200</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>We conduct experiments on a six-core window-10 machine of 16 GB memory with a Nvidia GeForce GTX 1650 GPU of 4 GB memory. Pytorch (<uri xlink:href="https://pytorch.org">https://pytorch.org</uri>) is used to build and train our model. Python built-in ast module (<uri xlink:href="https://docs.python.org/3.9/library/ast.html">https://docs.python.org/3.9/library/ast.html</uri>) and javalang (<uri xlink:href="https://github.com/c2nes/javalang">https://github.com/c2nes/javalang</uri>) are used to extract python/java raw AST. We use Adam [<xref ref-type="bibr" rid="ref-35">35</xref>] as the optimization algorithm, except for type embedding, we use stochastic gradient descent (SGD). The learning rate is 0.01 if not specified. For brevity, in node embedding and TAE pretrain, we only show python results.</p>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Node Embedding Result</title>
<p>Node embedding includes type embedding and value embedding. The experimental settings are in <xref ref-type="table" rid="table-3">Tab. 3</xref>. For type embedding, the <italic>f</italic> in <xref ref-type="disp-formula" rid="eqn-1">Eq. (1)</xref> is similar to the Glove paper, the ratio in <xref ref-type="disp-formula" rid="eqn-2">Eq. (2)</xref> is [0.9497, 0.01, 0.015, 0.01, 0.0003, 0.015]. The experimental result is visualized in <xref ref-type="fig" rid="fig-5">Fig. 5</xref> using T-SNE [<xref ref-type="bibr" rid="ref-36">36</xref>&#x2013;<xref ref-type="bibr" rid="ref-38">38</xref>]. The red dots are sequential node-types and the blue dots are non-sequential node-types. The figure shows that the related node-types gather nicely, the context information and semantics are well preserved. If not using normalization, the points in the figure will be more dispersed [<xref ref-type="bibr" rid="ref-39">39</xref>&#x2013;<xref ref-type="bibr" rid="ref-41">41</xref>]. With the proposed tree distance and the normalization, there is no need to worry about the information flattening problem. The window size can increase to 7 even more, unlike [<xref ref-type="bibr" rid="ref-17">17</xref>] that can only use a window size of 2 and does not include siblings.</p>
<fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>T-SNE visualization of python AST type embedding</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-5.png"/>
</fig>
<table-wrap id="table-3"><label>Table 3</label>
<caption>
<title>Experimental settings for node embedding</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Experiment</th>
<th align="left">Parameter</th>
<th align="left">Value</th>
<th align="left">Parameter</th>
<th align="left">Value</th>
<th align="left">Parameter</th>
<th align="left">Value</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" rowspan="2">Type embedding</td>
<td align="left">Embedding dim <italic>d</italic><sub><italic>t</italic></sub></td>
<td align="left">32</td>
<td align="left">Window size</td>
<td align="left">5</td>
<td align="left">Batch size</td>
<td align="left">2048</td>
</tr>
<tr>
<td align="left">Exponent <italic>&#x03BB;</italic></td>
<td align="left">0.3</td>
<td align="left">Momentum</td>
<td align="left">0.997</td>
<td align="left">Epochs</td>
<td align="left">5000</td>
</tr>
<tr>
<td align="left" rowspan="2">Value embedding</td>
<td align="left"><italic>&#x03B1;</italic> in <xref ref-type="disp-formula" rid="eqn-7">Eq. (7)</xref></td>
<td align="left">0 or 0.5</td>
<td align="left"><italic>&#x03B2;</italic> in <xref ref-type="disp-formula" rid="eqn-7">Eq. (7)</xref></td>
<td align="left">0.1&#x03B1;</td>
<td align="left">Epochs</td>
<td align="left">100</td>
</tr>
<tr>
<td align="left">Decoder hidden <italic>d</italic><sub><italic>o</italic></sub></td>
<td align="left">2<italic>d</italic><sub><italic>v</italic></sub></td>
<td align="left">Batch size</td>
<td align="left">512</td>
<td align="center"/>
<td align="center"/>
</tr>
</tbody>
</table>
</table-wrap>
<p>For the value autoencoder training, we first filter some words whose length is bigger than a predefined threshold (here we use 100). And words with length no more than this threshold will be used as the base dataset. Then, the base dataset is split into a training set and a testing set at a ratio of 9:1. The fine-tuning learning rate of the char embedding layer is 0.0001. Four criteria are used to evaluate the models:<list list-type="simple"><list-item><label>&#x25A0;</label>
<p>char_acc: characters level accuracy.</p></list-item><list-item><label>&#x25A0;</label>
<p>s_char_acc: characters level accuracy in strict mode.</p></list-item><list-item><label>&#x25A0;</label>
<p>word_acc: word-level accuracy.</p></list-item><list-item><label>&#x25A0;</label>
<p>len_acc: word length match accuracy, the ratio of whose are predicted in the correct length.</p></list-item></list></p>
<p>The experimental result is in <xref ref-type="table" rid="table-4">Tab. 4</xref>. The configuration with <inline-formula id="ieqn-14">
<mml:math id="mml-ieqn-14"><mml:msub><mml:mi>d</mml:mi><mml:mi>c</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn>8</mml:mn></mml:math>
</inline-formula> and <inline-formula id="ieqn-15">
<mml:math id="mml-ieqn-15"><mml:msub><mml:mi>d</mml:mi><mml:mi>v</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mn>128</mml:mn></mml:math>
</inline-formula> gets a better result. We plot the value reconstruction accuracy w.r.t. the value length of this configuration in <xref ref-type="fig" rid="fig-6">Fig. 6</xref>. From the figure, we can see that the reconstruction is pretty good when the value length is less than 20. The accuracy scores (criteria) drop rapidly when the value length is over 20, and the len_acc drops much slower.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>Python value embedding reconstruction accuracy</title></caption>
<graphic mimetype="image" mime-subtype="png" xlink:href="IASC_27349-fig-6.png"/>
</fig>
<table-wrap id="table-4"><label>Table 4</label>
<caption>
<title>Value embedding training results</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left"><italic>d</italic><sub><italic>c</italic></sub></th>
<th align="left"><italic>d</italic><sub><italic>v</italic></sub></th>
<th align="left"><italic>&#x03B1;</italic></th>
<th align="left">char_acc</th>
<th align="left">s_char_acc</th>
<th align="left">word_acc</th>
<th align="left">len_acc</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">8</td>
<td align="left">64</td>
<td align="left">0</td>
<td align="left">90.87&#x0025;</td>
<td align="left">84.07&#x0025;</td>
<td align="left">74.89&#x0025;</td>
<td align="left">99.80&#x0025;</td>
</tr>
<tr>
<td align="left">8</td>
<td align="left">64</td>
<td align="left">0.5</td>
<td align="left">90.84&#x0025;</td>
<td align="left">83.34&#x0025;</td>
<td align="left">74.07&#x0025;</td>
<td align="left">99.78&#x0025;</td>
</tr>
<tr>
<td align="left">8</td>
<td align="left">128</td>
<td align="left">0</td>
<td align="left">95.45&#x0025;</td>
<td align="left">91.68&#x0025;</td>
<td align="left">86.22&#x0025;</td>
<td align="left">99.64&#x0025;</td>
</tr>
<tr>
<td align="left">8</td>
<td align="left">128</td>
<td align="left">0.5</td>
<td align="left">95.03&#x0025;</td>
<td align="left">90.86&#x0025;</td>
<td align="left">85.09&#x0025;</td>
<td align="left">99.47&#x0025;</td>
</tr>
<tr>
<td align="left">16</td>
<td align="left">128</td>
<td align="left">0</td>
<td align="left">92.84&#x0025;</td>
<td align="left">87.31&#x0025;</td>
<td align="left">79.34&#x0025;</td>
<td align="left">96.43&#x0025;</td>
</tr>
<tr>
<td align="left">16</td>
<td align="left">128</td>
<td align="left">0.5</td>
<td align="left">91.87&#x0025;</td>
<td align="left">86.13&#x0025;</td>
<td align="left">76.94&#x0025;</td>
<td align="left">97.53&#x0025;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_3">
<label>4.3</label>
<title>TAE Pretrain Result</title>
<p>In the training of TAE, the whole AST, which comes from the data preprocessing, will be involved. In the training phase, we process the source code on the fly via multi-processing. We filter the base AST data by max node count, the left AST data is also split into a training set and a testing set at a ratio of 9:1. To speed up the value embedding phase, we pre-compute the top 10000 most frequent value to build a lookup table. We use the scheduled sampling [<xref ref-type="bibr" rid="ref-32">32</xref>] for the input of TAE&#x2019;s outer decoder. The probability <italic>p</italic> decays in each epoch/step via cosine decay (can be epoch-level or step-level):<disp-formula id="eqn-40"><label>(40)</label>
<mml:math id="mml-eqn-40" display="block"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>T</mml:mi></mml:msub></mml:mrow><mml:mn>2</mml:mn></mml:mfrac></mml:mrow><mml:mi>cos</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:mi>i</mml:mi><mml:mi>&#x03C0;</mml:mi></mml:mrow><mml:mi>T</mml:mi></mml:mfrac></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo>+</mml:mo><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mi>p</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>p</mml:mi><mml:mi>T</mml:mi></mml:msub></mml:mrow><mml:mn>2</mml:mn></mml:mfrac></mml:mrow><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mspace width="1em" /><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:mspace width="thickmathspace" /><mml:mrow><mml:mspace width="1pt" /></mml:mrow><mml:mi>T</mml:mi></mml:mstyle></mml:mstyle></mml:mstyle></mml:math>
</disp-formula></p>
<p>The ratio we used in <xref ref-type="disp-formula" rid="eqn-33">Eq. (33)</xref> is [0.2, 0.1, 0.2, 0.5]. We set the max node count to 500, set the batch size to 300, and set epochs to 10. The type embedding model fine-tuning learning rate is 0.00002. The type classifier, value decoder, and EOC classifier all adopt 2 layers of feed-forward neural network. The experimental result can be seen in <xref ref-type="table" rid="table-5">Tab. 5</xref>. As can be seen in the table, the second configuration achieves the best result in criteria. We use the encoder of this configuration as the encoder of our CCD model.</p>
<table-wrap id="table-5"><label>Table 5</label>
<caption>
<title>TAE training results</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left"><italic>d</italic><sub><italic>v</italic></sub></th>
<th align="left"><italic>d</italic><sub><italic>e</italic></sub></th>
<th align="left">Inner</th>
<th align="left"><italic>L</italic></th>
<th align="left"><italic>L</italic><sub>value</sub></th>
<th align="left"><italic>L</italic><sub>children</sub></th>
<th align="left">type_acc</th>
<th align="left">eoc_acc</th>
<th align="left">eoc_precision</th>
<th align="left">eoc_recall</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">64</td>
<td align="left">512</td>
<td align="left">LSTM</td>
<td align="left">0.0283</td>
<td align="left">0.0312</td>
<td align="left">0.00216</td>
<td align="left">97.56&#x0025;</td>
<td align="left">98.77&#x0025;</td>
<td align="left">98.96&#x0025;</td>
<td align="left">97.56&#x0025;</td>
</tr>
<tr>
<td align="left">64</td>
<td align="left">512</td>
<td align="left">LSTM</td>
<td align="left">0.00468</td>
<td align="left">0.0152</td>
<td align="left">0.00219</td>
<td align="left">98.71&#x0025;</td>
<td align="left">98.73&#x0025;</td>
<td align="left">98.96&#x0025;</td>
<td align="left">98.66&#x0025;</td>
</tr>
<tr>
<td align="left">128</td>
<td align="left">1024</td>
<td align="left">LSTM</td>
<td align="left">0.0237</td>
<td align="left">0.00436</td>
<td align="left">0.00264</td>
<td align="left">96.25&#x0025;</td>
<td align="left">97.81&#x0025;</td>
<td align="left">98.73&#x0025;</td>
<td align="left">96.86&#x0025;</td>
</tr>
<tr>
<td align="left">128</td>
<td align="left">1024</td>
<td align="left">GRU</td>
<td align="left">0.0156</td>
<td align="left">0.00403</td>
<td align="left">0.00143</td>
<td align="left">98.58&#x0025;</td>
<td align="left">97.64&#x0025;</td>
<td align="left">96.92&#x0025;</td>
<td align="left">98.44&#x0025;</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Cross-Language CCD Result</title>
<p>We first do a cross-language code clone classification experiment. The CCD dataset is randomly split into a training set and a testing set at a ratio of 9:1. For negative sampling, we use <italic>n</italic>&#x2009;&#x003D;&#x2009;10, &#x2005;<italic>m</italic>&#x2009;&#x003D;&#x2009;4, &#x2005;&#x025B;&#x2009;&#x003D;&#x2009;0.1. We set the max node count to 1024, set the batch size to 2&#x2009;&#x00D7;&#x2009;512, and set epochs to 20. If the encoder comes from pretrain, then we set its fine-tuning learning rate to 0.0001. The experimental result of classification is depicted in <xref ref-type="table" rid="table-6">Tab. 6</xref>. From the result, we can see that our proposed tree LSTM based CCD model outperforms the sequence LSTM based CCD model. And the TAE pretrain enhances the performance of the CCD model. Next, we use the trained model to do the CCD experiment. We randomly select 500 code fragments from the test set and run the model for all pairs to determine clone pairs. The clone detection result is depicted in <xref ref-type="table" rid="table-7">Tab. 7</xref>. As can be seen in the table, our proposed CCD model outperforms the sequence LSTM based CCD model as well, and CCD benefits from the pretrain. The work of [<xref ref-type="bibr" rid="ref-17">17</xref>] uses sequential LSTM to encode the sequence. It obtains token sequence from AST by DFS, doing so will lose the AST tree structure information. Unlike [<xref ref-type="bibr" rid="ref-17">17</xref>], our Tree LSTM does the encoding directly on the AST, which preserves the AST structure information. So, our method still obtains a better result without pretrain.</p>
<table-wrap id="table-6"><label>Table 6</label>
<caption>
<title>Java-Python code clone classification results</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Model</th>
<th align="left">Precision</th>
<th align="left">Recall</th>
<th align="left">F1</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">LSTM (pretrained token vectors) [<xref ref-type="bibr" rid="ref-17">17</xref>]</td>
<td align="left">55&#x0025;</td>
<td align="left">83&#x0025;</td>
<td align="left">66&#x0025;</td>
</tr>
<tr>
<td align="left">Our (randomly initialized encoder)</td>
<td align="left">64&#x0025;</td>
<td align="left">88&#x0025;</td>
<td align="left">74&#x0025;</td>
</tr>
<tr>
<td align="left">Our (pretrained encoder)</td>
<td align="left">67&#x0025;</td>
<td align="left">90&#x0025;</td>
<td align="left">77&#x0025;</td>
</tr>
</tbody>
</table>
</table-wrap>
<table-wrap id="table-7"><label>Table 7</label>
<caption>
<title>Cross-Language CCD results</title></caption>
<table><colgroup><col align="left"/><col align="left"/><col align="left"/><col align="left"/>
</colgroup>
<thead>
<tr>
<th align="left">Model</th>
<th align="left">Precision</th>
<th align="left">Recall</th>
<th align="left">F1</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">LSTM (pretrained token vectors) [<xref ref-type="bibr" rid="ref-17">17</xref>]</td>
<td align="left">19&#x0025;</td>
<td align="left">90&#x0025;</td>
<td align="left">32&#x0025;</td>
</tr>
<tr>
<td align="left">Our (randomly initialized encoder)</td>
<td align="left">28&#x0025;</td>
<td align="left">92&#x0025;</td>
<td align="left">43&#x0025;</td>
</tr>
<tr>
<td align="left">Our (pretrained encoder)</td>
<td align="left">31&#x0025;</td>
<td align="left">93&#x0025;</td>
<td align="left">47&#x0025;</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>Our TAE training is based on file level, a more fine-grained level (e.g., class/function level) can be considered in future work. With the trained TAE, code fragments can be represented as a vector, different languages correspond to different vector spaces. We can consider using an unsupervised learning framework like CycleGAN [<xref ref-type="bibr" rid="ref-39">39</xref>], to do one more pretrain on different languages&#x2019; encoding spaces, which will build a connection between different languages without the help of any label. This may benefit CCD, which can be a key future work. In addition, our value embedding is a little bit overhead, and our CCD model&#x2019;s loss is simple. A better value embedding method and a better CCD loss are needed in future work.</p>
</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion</title>
<p>In this work, we focus on cross-language CCD using an autoencoder to pretrain on a large-scale dataset. We first introduce the node embedding method, including type embedding and value embedding. Then, we give detail about our TAE model, including the encoder and the decoder. We also present techniques about the training of TAE, including the &#x201C;encode and decode by layers&#x201D; strategy and the batch size design. Next, we talk about the CCD model and our negative sampling strategy. In the end, we evaluate our method in a self-collecting dataset and an open-source cross-language CCD dataset. The experimental results verify the effeteness of our node embedding method, as well as that TAE and its pretrain enhance the performance of the CCD model. The node context information is well captured and the reconstruction accuracy of the node-value reaches 95.45&#x0025;. TAE pretrain improves the performance of CCD with a 4&#x0025; increase in F1 score, which alleviates the data bottleneck problem.</p>
</sec>
</body>
<back><fn-group>
<fn fn-type="other">
<p><bold>Funding Statement:</bold> This work was supported by the National Key R&#x0026;D Program of China (Grant No. 2021YFB3100700), the National Natural Science Foundation of China (Grant No. 62032025, 62076125, U20B2049, U20B2050, 61702236), the Natural Science Foundation of Jiangsu Province (Grant No.BK20200418, BE2020106), the Guangdong Basic and Applied Basic Research Foundation (2021A1515012650), the Shenzhen Science and Technology Program (JCYJ20210324134810028), the Natural Science Foundation of Jiangsu Province (Grant No.BK20200418, BE2020106).</p>
</fn>
<fn fn-type="conflict">
<p><bold>Conflicts of Interest:</bold> The authors declare that they have no conflicts of interest to report regarding the present study.</p>
</fn>
</fn-group>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Ducasse</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Rieger</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Demeyer</surname></string-name></person-group>, &#x201C;<article-title>A language independent approach for detecting duplicated code</article-title>,&#x201D; in <conf-name>1999 Int. Conf. on Software Maintenance</conf-name>, <conf-loc>Oxford, England, UK</conf-loc>, pp. <fpage>109</fpage>&#x2013;<lpage>118</lpage>, <year>1999</year>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Kamiya</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Kusumoto</surname></string-name> and <string-name><given-names>K.</given-names> <surname>Inoue</surname></string-name></person-group>, &#x201C;<article-title>Ccfinder: A multilinguistic token-based code clone detection system for large scale source code</article-title>,&#x201D; <source>IEEE Transactions on Software Engineering</source>, vol. <volume>28</volume>, no. <issue>7</issue>, pp. <fpage>654</fpage>&#x2013;<lpage>670</lpage>, <year>2002</year>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Misherghi</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Su</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Glondu</surname></string-name></person-group>, &#x201C;<article-title>Deckard: Scalable and accurate tree-based detection of code clones</article-title>,&#x201D; in <conf-name>29th Int. Conf. on Software Engineering</conf-name>, <conf-loc>Minneapolis, MN, USA</conf-loc>, pp. <fpage>96</fpage>&#x2013;<lpage>105</lpage>, <year>2007</year>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Sajnani</surname></string-name>, <string-name><given-names>V.</given-names> <surname>Saini</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Svajlenko</surname></string-name>, <string-name><given-names>C. K.</given-names> <surname>Roy</surname></string-name> and <string-name><given-names>C. V.</given-names> <surname>Lopes</surname></string-name></person-group>, &#x201C;<article-title>Sourcerercc: Scaling code clone detection to big-code</article-title>,&#x201D; in <conf-name>Proc. of the 38th Int. Conf. on Software Engineering</conf-name>, <conf-loc>Austin, TX, USA</conf-loc>, pp. <fpage>1157</fpage>&#x2013;<lpage>1168</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Sun</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Wang</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>A novel neural source code representation based on abstract syntax tree</article-title>,&#x201D; in <conf-name>Proc. of the 41st Int. Conf. on Software Engineering</conf-name>, <conf-loc>Montreal, QC, Canada</conf-loc>, pp. <fpage>783</fpage>&#x2013;<lpage>794</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Wei</surname></string-name> and <string-name><given-names>M.</given-names> <surname>Li</surname></string-name></person-group>, &#x201C;<article-title>Supervised deep features for software functional clone detection by exploiting lexical and syntactical information in source code</article-title>,&#x201D; in <conf-name>26th Int. Joint Conf. on Artificial Intelligence</conf-name>, <conf-loc>Melbourne, Australia</conf-loc>, pp. <fpage>3034</fpage>&#x2013;<lpage>3040</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>B&#x00FC;ch</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Andrzejak</surname></string-name></person-group>, &#x201C;<article-title>Learning-based recursive aggregation of abstract syntax trees for code clone detection</article-title>,&#x201D; in <conf-name>26th IEEE Int. Conf. on Software Analysis, Evolution and Reengineering (SANER)</conf-name>, <conf-loc>Hangzhou, China</conf-loc>, pp. <fpage>95</fpage>&#x2013;<lpage>104</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Ge</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Xia</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Fang</surname></string-name></person-group>, &#x201C;<article-title>Revocable identity-based broadcast proxy re-encryption for data sharing in clouds</article-title>,&#x201D; <source>IEEE Transactions on Dependable and Secure Computing</source>, vol. <volume>18</volume>, no. <issue>3</issue>, pp. <fpage>1214</fpage>&#x2013;<lpage>1226</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Ge</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Susilo</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Baek</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Xia</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Revocable attribute-based encryption with data integrity in clouds</article-title>,&#x201D; <source>IEEE Transactions on Dependable and Secure Computing</source>, vol. <volume>21</volume>, no. <issue>5</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>12</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Leng</surname></string-name>, <string-name><given-names>Y. P.</given-names> <surname>Cheng</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name></person-group>, &#x201C;<article-title>Secure data storage based on blockchain and coding in edge computing</article-title>,&#x201D; <source>Mathematical Biosciences and Engineering</source>, vol. <volume>16</volume>, no. <issue>4</issue>, pp. <fpage>1874</fpage>&#x2013;<lpage>1892</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Ge</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Susilo</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Xia</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Szalachowski</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Secure keyword search and data sharing mechanism for cloud computing</article-title>,&#x201D; <source>IEEE Transactions on Dependable and Secure Computing</source>, vol. <volume>18</volume>, no. <issue>6</issue>, pp. <fpage>2787</fpage>&#x2013;<lpage>2800</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Cheng</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Peng</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhong</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Yu</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Mining revision histories to detect cross-language clones without intermediates</article-title>,&#x201D; in <conf-name>Proc. of the 31st IEEE/ACM Int. Conf. on Automated Software Engineering</conf-name>, <conf-loc>Singapore</conf-loc>, pp. <fpage>696</fpage>&#x2013;<lpage>701</lpage>, <year>2016</year>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>C.</given-names> <surname>Ge</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Susilo</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Baek</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Xia</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A verifiable and fair attribute-based proxy re-encryption scheme for data sharing in clouds</article-title>,&#x201D; <source>IEEE Transactions on Dependable and Secure Computing</source>, vol. <volume>21</volume>, no. <issue>7</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>12</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Fang</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Lin</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Ji</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>A secure and authenticated mobile payment protocol against off-site attack strategy</article-title>,&#x201D; <source>IEEE Transactions on Dependable and Secure Computing</source>, vol. <volume>21</volume>, no. <issue>9</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>12</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>N. A.</given-names> <surname>Kraft</surname></string-name>, <string-name><given-names>B. W.</given-names> <surname>Bonds</surname></string-name> and <string-name><given-names>R. K.</given-names> <surname>Smith</surname></string-name></person-group>, &#x201C;<article-title>Cross-language clone detection</article-title>,&#x201D; in <conf-name>Proc. of the Twentieth Int. Conf. on Software Engineering &#x0026; Knowledge Engineering (SEKE&#x2019;2008)</conf-name>, <conf-loc>San Francisco, CA, USA</conf-loc>, pp. <fpage>54</fpage>&#x2013;<lpage>59</lpage>, <year>2008</year>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Cheng</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Peng</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhong</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Yu</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Clcminer: Detecting cross-language clones without intermediates</article-title>,&#x201D; <source>IEICE Transactions on Information and Systems</source>, vol. <volume>100</volume>, no. <issue>2</issue>, pp. <fpage>273</fpage>&#x2013;<lpage>284</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Perez</surname></string-name> and <string-name><given-names>S.</given-names> <surname>Chiba</surname></string-name></person-group>, &#x201C;<article-title>Cross-language clone detection by learning over abstract syntax trees</article-title>,&#x201D; in <conf-name>Proc. of the 16th Int. Conf. on Mining Software Repositories (MSR)</conf-name>, <conf-loc>Montreal, Canada</conf-loc>, pp. <fpage>518</fpage>&#x2013;<lpage>528</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>K. W.</given-names> <surname>Nafi</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Roy</surname></string-name>, <string-name><given-names>C. K.</given-names> <surname>Roy</surname></string-name> and <string-name><given-names>K. A.</given-names> <surname>Schneider</surname></string-name></person-group>, &#x201C;<article-title>Crolsim: Cross language software similarity detector using api documentation</article-title>,&#x201D; in <conf-name>18th IEEE Int. Working Conf. on Source Code Analysis and Manipulation (SCAM)</conf-name>, <conf-loc>Madrid, Spain</conf-loc>, pp. <fpage>139</fpage>&#x2013;<lpage>148</lpage>, <year>2018</year>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>K. W.</given-names> <surname>Nafi</surname></string-name>, <string-name><given-names>T. S.</given-names> <surname>Kar</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Roy</surname></string-name>, <string-name><given-names>C. K.</given-names> <surname>Roy</surname></string-name> and <string-name><given-names>K. A.</given-names> <surname>Schneider</surname></string-name></person-group>, &#x201C;<article-title>Clcdsa: Cross language code clone detection using syntactical features and api documentation</article-title>,&#x201D; in <conf-name>34th IEEE/ACM Int. Conf. on Automated Software Engineering (ASE)</conf-name>, <conf-loc>San Diego, CA, USA</conf-loc>, pp. <fpage>1026</fpage>&#x2013;<lpage>1037</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Qi</surname></string-name>, <string-name><given-names>Y. P.</given-names> <surname>Cheng</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>O.</given-names> <surname>Alfarraj</surname></string-name></person-group>, &#x201C;<article-title>Digital continuity guarantee approach of electronic record based on data quality theory</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>63</volume>, no. <issue>3</issue>, pp. <fpage>1471</fpage>&#x2013;<lpage>1483</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Cho</surname></string-name>, <string-name><given-names>B. V.</given-names> <surname>Merri&#x00EB;nboer</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Gulcehre</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Bahdanau</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Bougares</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Learning phrase representations using rnn encoder-decoder for statistical machine translation</article-title>,&#x201D; in <conf-name>Proc. of the 2014 Conf. on Empirical Methods in Natural Language Processing</conf-name>, <conf-loc>Doha, Qatar</conf-loc>, pp. <fpage>1724</fpage>&#x2013;<lpage>1734</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-22"><label>[22]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Hochreiter</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Schmidhuber</surname></string-name></person-group>, &#x201C;<article-title>Long short-term memory</article-title>,&#x201D; <source>Neural Computation</source>, vol. <volume>9</volume>, no. <issue>8</issue>, pp. <fpage>1735</fpage>&#x2013;<lpage>1780</lpage>, <year>1997</year>.</mixed-citation></ref>
<ref id="ref-23"><label>[23]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>F. J.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>S. P.</given-names> <surname>Kumar</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Data query mechanism based on hash computing power of blockchain in internet of things</article-title>,&#x201D; <source>Sensors</source>, vol. <volume>20</volume>, no. <issue>1</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>22</lpage>, <year>2020</year>.</mixed-citation></ref>
<ref id="ref-24"><label>[24]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Qi</surname></string-name>, <string-name><given-names>Y. P.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Kim</surname></string-name></person-group>, &#x201C;<article-title>Integrity verification mechanism of sensor data based on bilinear map accumulator</article-title>,&#x201D; <source>ACM Transactions on Internet Technology</source>, vol. <volume>21</volume>, no. <issue>1</issue>, pp. <fpage>1</fpage>&#x2013;<lpage>20</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-25"><label>[25]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Mikolov</surname></string-name>, <string-name><given-names>I.</given-names> <surname>Sutskever</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>G. S.</given-names> <surname>Corrado</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Dean</surname></string-name></person-group>, &#x201C;<article-title>Distributed representations of words and phrases and their compositionality</article-title>,&#x201D; in <conf-name>Advances in Neural Information Processing Systems 26: 27th Annual Conf. on Neural Information Processing Systems</conf-name>, <conf-loc>Lake Tahoe, Nevada, United States</conf-loc>, pp. <fpage>3111</fpage>&#x2013;<lpage>3119</lpage>, <year>2013</year>.</mixed-citation></ref>
<ref id="ref-26"><label>[26]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Pennington</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Socher</surname></string-name> and <string-name><given-names>C. D.</given-names> <surname>Manning</surname></string-name></person-group>, &#x201C;<article-title>Glove: Global vectors for word representation</article-title>,&#x201D; in <conf-name>Proc. of the 2014 Conf. on Empirical Methods in Natural Language Processing</conf-name>, <conf-loc>Doha, Qatar</conf-loc>, pp. <fpage>1532</fpage>&#x2013;<lpage>1543</lpage>, <year>2014</year>.</mixed-citation></ref>
<ref id="ref-27"><label>[27]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Peng</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Mou</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Zhang</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Building program vector representations for deep learning</article-title>,&#x201D; in <conf-name>8th Int. Conf. on Knowledge Science, Engineering and Management</conf-name>, <conf-loc>Chongqing, China</conf-loc>, pp. <fpage>547</fpage>&#x2013;<lpage>553</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-28"><label>[28]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Yu</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Lam</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>G.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Xie</surname></string-name> <etal>et al.</etal></person-group><italic>,</italic> &#x201C;<article-title>Neural detection of semantic code clones via tree-based convolution</article-title>,&#x201D; in <conf-name>Proc. of the 27th Int. Conf. on Program Comprehension</conf-name>, <conf-loc>Montreal, QC, Canada</conf-loc>, pp. <fpage>70</fpage>&#x2013;<lpage>80</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-29"><label>[29]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>Y. Q.</given-names> <surname>Gao</surname></string-name>, <string-name><given-names>J. Y.</given-names> <surname>Xia</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Zhou</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Long-term preservation of electronic record based on digital continuity in smart cities</article-title>,&#x201D; <source>Computers, Materials &#x0026; Continua</source>, vol. <volume>66</volume>, no. <issue>3</issue>, pp. <fpage>3271</fpage>&#x2013;<lpage>3287</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-30"><label>[30]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>Y.</given-names> <surname>Gao</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Liu</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Yang</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Sang</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>TECCD: A tree embedding approach for code clone detection</article-title>,&#x201D; in <conf-name>2019 IEEE Int. Conf. on Software Maintenance and Evolution</conf-name>, <conf-loc>Cleveland, OH, USA</conf-loc>, pp. <fpage>145</fpage>&#x2013;<lpage>156</lpage>, <year>2019</year>.</mixed-citation></ref>
<ref id="ref-31"><label>[31]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>K. S.</given-names> <surname>Tai</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Socher</surname></string-name> and <string-name><given-names>C. D.</given-names> <surname>Manning</surname></string-name></person-group>, &#x201C;<article-title>Improved semantic representations from tree-structured long short-term memory networks</article-title>,&#x201D; in <conf-name>Proc. of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th Int. Joint Conf. on Natural Language Processing of the Asian Federation of Natural Language Processing</conf-name>, <conf-loc>Beijing, China</conf-loc>, pp. <fpage>1556</fpage>&#x2013;<lpage>1566</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-32"><label>[32]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Bengio</surname></string-name>, <string-name><given-names>O.</given-names> <surname>Vinyals</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Jaitly</surname></string-name> and <string-name><given-names>N.</given-names> <surname>Shazeer</surname></string-name></person-group>, &#x201C;<article-title>Scheduled sampling for sequence prediction with recurrent neural networks</article-title>,&#x201D; in <conf-name>Advances in Neural Information Processing Systems 28: Annual Conf. on Neural Information Processing Systems</conf-name>, <conf-loc>Montreal, Quebec, Canada</conf-loc>, pp. <fpage>1171</fpage>&#x2013;<lpage>1179</lpage>, <year>2015</year>.</mixed-citation></ref>
<ref id="ref-33"><label>[33]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Leng</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Qi</surname></string-name>, <string-name><given-names>K. S.</given-names> <surname>Pradip</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Multiple cloud storage mechanism based on blockchain in smart homes</article-title>,&#x201D; <source>Future Generation Computer Systems</source>, vol. <volume>115</volume>, pp. <fpage>304</fpage>&#x2013;<lpage>313</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-34"><label>[34]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Bromley</surname></string-name>, <string-name><given-names>J. W.</given-names> <surname>Bentz</surname></string-name>, <string-name><given-names>L.</given-names> <surname>Bottou</surname></string-name>, <string-name><given-names>I.</given-names> <surname>Guyon</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Lecun</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Signature verification using a &#x201C;siamese&#x201D; time delay neural network</article-title>,&#x201D; <source>International Journal of Pattern Recognition and Artificial Intelligence</source>, vol. <volume>7</volume>, no. <issue>04</issue>, pp. <fpage>669</fpage>&#x2013;<lpage>688</lpage>, <year>1993</year>.</mixed-citation></ref>
<ref id="ref-35"><label>[35]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>D. P.</given-names> <surname>Kingma</surname></string-name> and <string-name><given-names>J.</given-names> <surname>Ba</surname></string-name></person-group>, &#x201C;<article-title>Adam: A method for stochastic optimization</article-title>,&#x201D; in <conf-name>3rd Int. Conf. on Learning Representations</conf-name>, <conf-loc>San Diego, CA, USA</conf-loc>, <year>2015</year>. [Online]. Available: <uri xlink:href="http://arxiv.org/abs/1412.6980">http://arxiv.org/abs/1412.6980</uri>.</mixed-citation></ref>
<ref id="ref-36"><label>[36]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Maaten</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Hinton</surname></string-name></person-group>, &#x201C;<article-title>Visualizing data using t-sne</article-title>,&#x201D; <source>Journal of Machine Learning Research</source>, vol. <volume>9</volume>, no. <issue>11</issue>, pp. <fpage>2579</fpage>&#x2013;<lpage>2605</lpage>, <year>2008</year>.</mixed-citation></ref>
<ref id="ref-37"><label>[37]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>N. P.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Q.</given-names> <surname>Qian</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>Y.</given-names> <surname>Ren</surname></string-name> <etal>et al.,</etal></person-group> &#x201C;<article-title>Inversion of temperature and humidity profile of microwave radiometer based on bp network</article-title>,&#x201D; <source>Intelligent Automation &#x0026; Soft Computing</source>, vol. <volume>29</volume>, no. <issue>3</issue>, pp. <fpage>741</fpage>&#x2013;<lpage>755</lpage>, <year>2021</year>.</mixed-citation></ref>
<ref id="ref-38"><label>[38]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X. R.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>W. F.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Sun</surname></string-name>, <string-name><given-names>X. M.</given-names> <surname>Sun</surname></string-name> and <string-name><given-names>S. K.</given-names> <surname>Jha</surname></string-name></person-group>, &#x201C;<article-title>A robust 3-D medical watermarking based on wavelet transform for data protection</article-title>,&#x201D; <source>Computer Systems Science &#x0026; Engineering</source>, vol. <volume>41</volume>, no. <issue>3</issue>, pp. <fpage>1043</fpage>&#x2013;<lpage>1056</lpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-39"><label>[39]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J. Y.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Park</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Isola</surname></string-name> and <string-name><given-names>A. A.</given-names> <surname>Efros</surname></string-name></person-group>, &#x201C;<article-title>Unpaired image-to-image translation using cycle-consistent adversarial networks</article-title>,&#x201D; in <conf-name>Proc. of the IEEE Int. Conf. on Computer Vision</conf-name>, <conf-loc>Venice, Italy</conf-loc>, pp. <fpage>2223</fpage>&#x2013;<lpage>2232</lpage>, <year>2017</year>.</mixed-citation></ref>
<ref id="ref-40"><label>[40]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Y. J.</given-names> <surname>Ren</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Wang</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Sharma</surname></string-name> and <string-name><given-names>U.</given-names> <surname>Ghosh</surname></string-name></person-group>, &#x201C;<article-title>Novel vote scheme for decision-making feedback based on blockchain in internet of vehicles</article-title>,&#x201D; <source>IEEE Transactions on Intelligent Transportation Systems</source>, vol. <volume>23</volume>, no. <issue>2</issue>, pp. <fpage>1639</fpage>&#x2013;<lpage>1648</lpage>, <year>2022</year>.</mixed-citation></ref>
<ref id="ref-41"><label>[41]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>X. R.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Sun</surname></string-name>, <string-name><given-names>W.</given-names> <surname>Sun</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Xu</surname></string-name> and <string-name><given-names>P. P.</given-names> <surname>Wang</surname></string-name></person-group>, &#x201C;<article-title>Deformation expression of soft tissue based on BP neural network</article-title>,&#x201D; <source>Intelligent Automation &#x0026; Soft Computing</source>, vol. <volume>32</volume>, no. <issue>2</issue>, pp. <fpage>1041</fpage>&#x2013;<lpage>1053</lpage>, <year>2022</year>.</mixed-citation></ref>
</ref-list>
</back>
</article>