Another approach could be the usage of atom vectors directly to generate molecules. However, due to the nature of the graph convolution operation, atom vectors for the same atom with the same environment will differ if they come from different molecules. Therefore, storing all atom vectors and combining them to generate new molecules is technically impossible. But. if it can be assumed that atom vectors with small changes correspond to one fragment, then it is possible to average them to obtain a general (centroid) fragment vector representation. In this way, the number of atom vectors can be reduced without loss of information (Figure ). A vector quantisation operation is a way to obtain atom vectors' centroids (fragment vectors) during simultaneous training of the encoder and decoder. First proposed for images , this operation allows to create a codebook representing collection of fragment vectors. The vectors in the codebook are initialised randomly and updated during training to achieve higher reconstruction rates. During training and inference, these vectors are used to replace atom vectors from the encoder and then are passed to the decoder (Figure ). The update of the chosen vectors from the codebook minimises the distance between them and the corresponding atom vectors (see loss function section). Thus, the codebook vectors should move to clusters of atom vectors representing a single fragment to become clusters' centroids.