# Generative Artificial Intelligence-Enabled Facility Layout Design Paradigm
## 4 Prototype of a Generative AI-Enabled Facility Layout Design Platform
### Layout Reasoning Based on ConvE Model  
The mixed knowledge map of the workshop layout design is established based on the AAS and large language model. The knowledge graph constructs the relationships between various entities (such as equipment, workstations, materials, operators, and production tasks), such as proximity, dependence, material flow, and task execution. Because there are only positive examples in the knowledge map, in order to solve the problem of data sparsity in ConvE model training (that is, the frequency of some relationships and entities is low), negative samples (that is, wrong triples) can be generated to help the model learn how to distinguish real triples from wrong triples. Usually, negative samples are generated in two ways: replacing the head entity or the tail entity; randomly replacing an entity in the triplet to generate an incorrect triplet. To randomly select irrelevant relationships, correct entity pairs are combined with irrelevant relationships to generate untrue triples. Negative sampling is used to generate wrong triples and then used to train the ConvE model together with positive sampling. Therefore, knowledge graph completion (KGC) makes it possible to predict the possible relationships between entities and promote the optimization of the layout by suggesting the most effective spatial arrangement based on the predicted dependence and proximity. The representation-learning-based knowledge graph completion methods include tensor factorization, translation models, deep learning, and language model fusion [88]. ConvE was the first model to use the convolutional neural network (CNN) architecture for KGC [89]. As illustrated in Figure 7, ConvE first reshapes the head-entity embedding and relation embedding, concatenating them into an input matrix for the 2D convolution layer, which then returns a feature map tensor [90]. The most important characteristic of ConvE is that the score it produces is defined by an embedded 2D convolution. To train the ConvE model for link prediction, the entity and relationship embedding are initialized and optimized using a convolutional neural network (CNN) architecture. The input to the model consists of triplets, where the embeddings of the head entity and relation are concatenated and passed through convolutional layers to extract local interaction features. These features are then processed by fully connected layers to compute a score that indicates the likelihood of a valid relationship between the head and tail entities. The model is trained using binary cross-entropy loss and optimized via the Adam optimizer, minimizing the error between the predicted and actual triplets. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Type of Relationship** & **Description** & **Example** \\ \hline Hierarchical & Describes the subordinate or grouping & \\ Relationships & relationships of the facilities in the layout. & \\ \hline  & ParentChild: A facility is a subunit of & An assembly line with sub-stations like \\  & a certain functional module. & tightening or inspection. \\ \hline  & BelongsToZone: A facility belongs to & Precision instruments placed in cleanroom \\  & a specific functional zone (e.g., clean area, & zones for accuracy. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._Once trained, the model can predict missing links by calculating the likelihood of a tail entity, given a head entity and a relation, ranking potential tail entities by their predicted scores. This link prediction process facilitates the optimization of workshop layouts by identifying the optimal spatial arrangements based on the predicted relationships, enhancing operational efficiency and workflow design. The link prediction performance of the ConvE model is evaluated using several metrics, including average rank, mean reciprocal rank (MRR), and hits@k, which assess the accuracy of the predicted relationships. These metrics evaluate the ranking quality of the predicted tail entities by comparing their predicted scores with the actual triple.