Identifying Conformation States of Polymer through Unsupervised Machine Learning

The study of the critical behavior is important for classifying different configuration states. Recently, machine learning is capable of discriminating polymer states in the presence of human supervision. Here, we introduce an unsupervised approach based on the self-organizing map (SOM) and the autoencoder network to locate critical phase transitions from raw configuration without the necessity for manual feature engineering. High-dimensional configuration data can be encoded to low-dimensional codes by employing neural network of multilayer restrictive Boltzmann machines and the intermediate code can also be reconstructed to high-dimensional input vector. And then the codes are used to cluster different configuration states for polymers adsorbed on the homogeneous and the stripe-patterned surface by the SOM network and K-Means method. This work presents an unusual tool to identify polymer configuration.


INTRODUCTION
Deep learning (DL) [1,2] is an active research branch of machine learning (ML), which is exquisitely tailored to derive essential characteristics to build superior features to efficiently represent objects in complex data. [3] The latest advances in the field of image processing [4−6] and speech recognition have driven the employment of DL to numerous problems in condensed-matter physics [7] and polymer. [8] Applying DL to classify phases of matter and to recognize phase transitions has become the focus of attention. [7−20] Classifying phases of matter, either topological [9] or symmetry-breaking, [15] generally utilizes a DL approach based on supervised methods. Such methods need the previous labeling of the states in well-known regimes, for example, whether a state belongs to a coil or globule phase. [8] However, the label of supervised learning restricts the possibility that the method will be able to detect undiscovered states. In contrast to the supervised case, unsupervised methods obtain features from the raw data without pre-labeling. In consequence, the unsupervised learning is especially valuable when the classification is not known to us. The principal component analysis (PCA) is an effective dimensionality reduction technique used for polymer configuration clustering [21] and computer vision. [22−24] Compared with the PCA that obtains the highest possible variance whose components are orthogonal, the autoencoder could reserve the original state as much as possible, which can be seen as mapping from high scale to low scale for image identification.
In this paper, we adopt an unsupervised ML strategy based on the autoencoder [25,26] and the self-organizing map (SOM), [27,28] which can efficiently classify conformation states of polymers without the prior knowledge and can recognize critical phase transitions from raw configuration data. Results show that the unsupervised ML can efficiently identify the two-state phase transitions [29−34] and the three-state phase transitions [35] of polymers adsorbed on the homogeneous and stripe-patterned surfaces, respectively.

FEATURE ENGINEERING AND CLUSTERING METHOD
Polymer was simulated by the method of self-avoiding walk. [29−31] In data preprocessing, [36] all conformations are normalized according to the three dimensions of Cartesian coordinates, respectively, and stretched into one dimension as the input data for machine learning.
The standard neural network for supervised learning usually requires a large amount of labelled data. Here, what we need is the intermediate coding of the autoencoder neural network to describe polymers, which covers almost all the physical information of configurations. The autoencoder in-cludes an encoder network to convert the high-dimensional conformation into a low-dimensional code and a decoder network to recover the configuration from the code, which is treated as the feature to represent the structure of polymers. Autoencoder employs the mean square error between the original input and the decode output as the loss function for fine-tuning the network. By minimizing the loss between the reconstructed data and the original data, the code can represent the polymer conformation as much as possible. Autoencoder is depicted in Fig. 1.
In Fig. 1, we train the network from Encoder to code layer by two modes. First, a restrictive Boltzmann machine (RBM) is used to initially train network parameters, as shown in Fig. 2(a). Then, the trained parameters are copied to Encoder network and Decoder network. Finally, we further train the intermediate code of neural network through BP algorithm to make the decoding data close to the input data, as shown in Fig. 2(b). Next, we will discuss these two network modes in detail. In order to be close to the global optimum, RBM is used for the weight w initialization of the characteristic network for every two neighbor layers from the input layer to the code layer, as shown in Fig. 2(a). The input vectors correspond to visible units while the feature detectors correspond to hidden units. The RBM vias minimize system energy to boost the probability that the code can clearly represent each conformation. The energy is given by where v and h are the scaled configuration vector and the feature vector, respectively, b and c are their biases, and w is the weight matrix between v and h. Every binary value h j is set to be 1 by the metropolis algorithm is the sigmoid function and c j is the bias of the hidden layer. Next, one-step contrastive divergence (CD-1) is used to minimize the system energy. All  parameters are updated by Entire CD-1 process consists of two parts of calculation. Eq. (2) is the first iteration, with y 1 and z 1 being the result of the iteration. Under reversing the role of the visible layer and hidden layer, Eq. (2) is calculated again, which is the second part of calculation, with y 2 and z 2 being the corresponding result. η is the learning rate.
After the RBMs network training is completed, their parameters are reconstructed into the autoencoder network. Then, the autoencoder network is fine-tuned using the back propagation (BP) algorithm. The typical two neighbor layers are shown in Fig. 2(b).
Different from above RBMs, l j is not binary state, which is generated from here l (k) and l (k+1) are the vector of two neighbor layers, w :j (k) and b j (k) are the weight and the bias of unit j of l (k) , respectively, and φ(x) is the rectified linear unit (ReLU) as activation function. The update of parameters by the BP algorithm is as follow: , where is originated from chain rule and ε is the learning rate under updating.
After completing the feature extraction, we can get 64-vector code for each polymer. Then we start to cluster samples of polymers by using the hierarchical clustering algorithm, selforganizing map (SOM), which can efficiently visualize clustering results. The SOM consists of 20 × 20 two-dimensional grid of map units. Each unit is represented by a prototype vector x with the same dimension as input vector y. The Euclidean distance of vector x from the origin is always scaled to 1 in SOM network. During training, units of SOM are adjusted iteratively by the input data. At each training step, distances between the input data y and all the prototype vectors x are computed. When a node x i wins the competition with the minimum distance between x i and y in a training process, all nodes x j are adjusted by . η = 0.01 is the initial learning rate and σ is the standard deviation of the radial basis function (RBF), which decreases over iterator. After enough training, similar nodes come together.

RESULTS AND DISCUSSION
To examine classifiers capable of the neural network of the autoencoder and SOM, different kinds of substances were chosen, for example, polymers simulated by the method of selfavoiding walk. The simulation uses a simple cubic lattice with the bond length of . Monomer interacts with the attractive surface with ε = -1. Two typical simulations are used here for polymers on different surfaces [31,35] with the chain length N = 160. One is the homogeneous attractive surface, [31] while the other is the stripe-patterned surface with attractive strip and repellant strip, respectively. [35] The simulation of polymer adopts the Metropolis algorithm [37] and the annealing algorithm [38] under temperature from T = 8.0 to T = 0.05. The unit of temperature is 1/k B with k B the Boltzmann constant. Each simulation produces 9.6 × 10 3 independent conformations at every temperature for clustering and calculating the critical phase transition temperature.

Homogeneous Surface
The critical adsorption temperature (T c ) of polymer on the homogeneous surface can be estimated by the adsorption rate. As the polymer chain is adsorbed on the surface, its configuration changes with the adsorption degree. For example, the dependence of mean square radius of gyration < R g 2 > on temperature T is presented in Fig. 3. We observe that the critical temperature T c is roughly in the range between T = 1.0 and T = 2.0. To demonstrate the capability of unsupervised ML in recognizing the adsorption state and the desorption state, we performed two numerical experiments. One is to calculate T c on different number of samples, n, at each temperature, and the other is to show results of clustering configuration state.
The original conformation data are normalized and used as the input of the autoencoder network to extract features coding vector. And then coding vectors are used to cluster by the SOM network and K-means method. T c is calculated from the clustering results. Fig. 4 shows the relationship between T c and the number of samples per temperature, n. When n is larger than 300, the value of T c is convergent at T c = 1.35. And when n is less than 300, T c changes with n because the sample volume is too small to mine the desorbed state. Therefore, we take advantage of n = 400 in subsequent studies to estimate the stabilizing value of T c .
After enough sample training, the distance to the nearest neighbor d nn in the SOM grid is shown in the Fig. 5(a). The distance d nn is obtained by mean Euclidean distance between the unit and its six surrounding units. The smaller the value d nn is, the more similar the neighbor units are. All samples are mostly mapped in smaller d nn regions. Then, Kmeans method is used to divide the grid area through the input data with the coding 64-vector. It repeats 10 times for searching the smallest SSE. And the distribution of all the samples mapped on the grids is shown in Fig. 5(b), where labels A and B represent different conformation classes of polymer. Finally, we count the proportion of samples in different categories at each temperature, as shown in Fig. 5(c). Here p means the probability of a sample judged as a particular class, which is obtained from the percentage of samples under each temperature. Fig. 5(c) shows that the unsupervised learning can recognize the two-state phase transition of polymer adsorbed on the homogeneous surface. T c is equal to 1.35, which has an identical conclusion as the traditional compute method. [29]

Stripe-patterned Surface
In our previous research, we know that polymers adsorbed on the stripe-patterned surface exhibit three different states such as the desorption state, the multi-stripe adsorption state, and the single-stripe adsorption state. The dependence of mean square radius of gyration < R g 2 > on temperature T is shown in Fig. 6. We observe that polymer is adsorbed on the single stripe for the single-stripe-adsorption state in inset (a), adsorbed on multiple stripes for the multi-stripe-adsorption state in inset (b), and away from the surface for the desorption state in inset (c). And we manage to obtain the location of phase transition directly from the dependence of the mean square radius of gyration on T. It is very difficult to recognize conformations of polymers adsorbed on stripes by machine learning. Firstly, it is difficult to cluster high dimensional data directly. Dimensionality reduction is very important, but in the process of dimensionality reduction, the loss of main features must be minimized. Secondly, near the critical adsorption point (T c ) or the critical single stripe adsorption point (T r ), conformations of polymers are very similar. No obvious features can be distinguished directly from coordinate analysis. And it is hard to abstract their obvious features.
The normalized conformation data are used as the input of the autoencoder network to extract features coding vector. And then coding vectors are used to cluster by the SOM net- work and K-means method. After sufficiently training, the distance of unit to nearest neighbor d nn in the SOM grid is shown in Fig. 7(a). And then the distribution of all the samples mapped on the grids is shown in Fig. 7(b), where A, B, and C represent the desorption state, the multi-stripe adsorption state, and the single-stripe adsorption state, respectively. Finally, we present the dependence of probability p on the temperature T, as shown in the Fig. 7(c). The methods successfully identify the three-state phase transition of polymers on the stripe surface. As the temperature T decreases, there are two critical temperatures T 1 = 0.57 and T 2 = 1.02. The probability distribution in this experiment is similar to results obtained by the labeling method. [39] Results show that configuration state of polymers on the stripe surface can be identified by the neural network of autoencoder and SOM after sufficient training.
Finally, we compare the results (T c ) of the traditional computing method, [35] the labeled supervised learning, [39] and the unsupervised learning in Table 1. The prediction result of unsupervised learning is closer to the simulation result than that of label learning. The labeled supervised learning shows lower accuracy because it is difficult to label the correct state of the polymer conformation near CAP. However, the autoencoder network is employed to encode a high-dimensional configuration data to a lower dimensional code which can be reconstructed to the high-dimensional vector similar to the input vector. Then we use the self-organizing map (SOM) network and the K-mean method to cluster the intermediate code. We find the prediction accuracy is close to the traditional computing method because the intermediate code keeps the main information of polymer conformation. Without any prior knowledge, the unsupervised method achieves right results with regard to others methods.

CONCLUSIONS
We present an unsupervised machine learning method for clustering features of polymer chains which are produced by Monte Carlo simulation. Conformations of polymers absorbed on the homogeneous surface or stripe-patterned surface can be recognized correctly by training the autoencoder network and the self-organizing map (SOM) network. When the number of samples per temperature is above 400, the values of the critical temperature gradually stabilize. The neural network of autoencoder and SOM can identify not only two states between the desorbed state and the adsorbed state for polymers adsorbed on the homogeneous surface, but also three different states including the desorbed state, multi-stripe adsorbed state, and single-stripe adsorbed state for polymers on the stripepatterned surface. The neural network is a novel method for identifying molecular configuration and investigating phase transition.     The distribution of samples mapped on the grid. (c) The relationship between class probability p and temperature T. Labels A, B, and C represent desorption state, single-stripe adsorption state, and multistripe adsorption state, respectively.