2026 Volume 35 Issue 3
Article Contents

Zhen Wan, Shun-Bo Jiang, Yuan Li, Hui Wang, Zong-Liang Li, Guang-Ping Zhang. Machine learning prediction of HSE06-level band gaps in two-dimensional semiconductors with reference-guided graph neural networks[J]. Chinese Physics B, 2026, 35(3): 037102. doi: 10.1088/1674-1056/adfef8
Citation: Zhen Wan, Shun-Bo Jiang, Yuan Li, Hui Wang, Zong-Liang Li, Guang-Ping Zhang. Machine learning prediction of HSE06-level band gaps in two-dimensional semiconductors with reference-guided graph neural networks[J]. Chinese Physics B, 2026, 35(3): 037102. doi: 10.1088/1674-1056/adfef8

Machine learning prediction of HSE06-level band gaps in two-dimensional semiconductors with reference-guided graph neural networks

  • Received Date: 09/06/2025
    Accepted Date: 19/08/2025
    Available Online: 01/03/2026
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(5)  /  Tables(3)

Article Metrics

Article views(357) PDF downloads(3) Cited by(0)

Access History

Machine learning prediction of HSE06-level band gaps in two-dimensional semiconductors with reference-guided graph neural networks

Abstract: Two-dimensional (2D) semiconductors have emerged as promising candidates in next-generation nanoelectronics and sustainable energy technologies, particularly in photoelectrochemical water splitting, due to their exceptional quantum confinement effects and tunable optoelectronic properties. Accurate determination of electronic band gaps remains a critical prerequisite for rational material design in advanced optoelectronic applications. However, the commonly used density functional theory approach with conventional functionals suffers from intrinsic deficiencies in predicting semiconductor band gaps, while calculations with higher hierarchy of functionals like the HSE06 hybrid functional or based on higher level methodologies such as GW approximation incur prohibitive computational costs. To address this challenge, here we propose a reference-guided graph neural network (RG-GNN) framework that achieves HSE06-level accuracy through efficient machine learning. Our approach uniquely embeds an input reference value for the target property with minimal elementary descriptors encoding the structural information of the materials in the model, enabling high-accuracy band gap prediction at the HSE06 level. The model achieves a mean absolute error of 0.15 eV on unseen 2D semiconductor systems compared to HSE06 band gaps. Systematic ablation studies reveal that the reference-guided mechanism reduces prediction error by 83.3% and significantly decreases training dataset requirements for model convergence compared to conventional GNN architectures. Our results demonstrates that topological atomic descriptors from primitive cells, when combined with appropriate reference values, contain sufficient information for highly accurate band gap prediction in 2D materials.

1.   Introduction
  • The successful fabrication of graphene by Novoselov, Geim et al. in 2004[1] ushered in a new era of materials science, establishing atomically thin two-dimensional (2D) materials as a fundamentally novel class of quantum systems. Since then, 2D materials have rapidly garnered extensive research interest due to their exceptional electronic, optical, and mechanical properties[2–5] and their promising applications in nanoelectronics, optoelectronics, energy storage, biomedicine, and so on.[6,7] In addition to the highly conductive graphene, numerous other 2D semiconductors such as transition metal dichalcogenides (TMDCs), hexagonal boron nitride (h-BN), and phosphorene exhibit unique properties such as tunable band gaps, high thermal conductivity, and superior electron mobility. These characteristics make them ideal candidates for addressing electronic device miniaturization challenges and enabling flexible functional components.[8–15]

    The band gap serves as a critical parameter for a semiconductor to determine its suitability and performance for specific electronic and optoelectronic applications.[16–20] Consequently, accurately determining band gaps of 2D semiconductors is essential for advancing their applications. In addition to the experimental direct measurement, theoretical evaluation remains another indispensable way to determine the band gaps of 2D semiconductors, particularly for materials yet to be synthesized in experiments. However, it is now still a formidable challenge to accurately calculate the band gaps of semiconductors. Widely used density functional theory (DFT) approaches employing local density approximation (LDA) or generalized gradient approximation (GGA) functionals suffer from intrinsic deficiencies, systematically underestimating semiconductor and insulator band gaps.[21–24] Although DFT with higher hierarchy of functionals such as HSE06[25–27] or the many-body approaches such as GW method[28] can substantially improve the accuracy of calculated band gaps, their prohibitively high computational costs render them infeasible for high-throughput studies.

    In recent years, machine learning (ML) has made rapid and remarkable progress, offering revolutionary solutions to many longstanding scientific challenges.[29–32] For instance, AlphaFold2 by DeepMind innovatively employs an end-to-end neural network to successfully predict the atomic-level three-dimensional (3D) structures of virtually all known proteins (∼ 200 million) solely from amino acid sequences.[29] This breakthrough resolved the “protein folding problem”, which has been perplexing the structural biology community for half a century. At the same time, ML approaches, particularly neural network architectures, have demonstrated exceptional capabilities across diverse fields, including analyzing social networks,[33] establishing knowledge graphs,[34] solving partial differential equations,[35] and advancing materials science and functional device design.[36–55]

    Significant efforts have also applied ML approaches to semiconductor band gap prediction. For example, in 2018, Xie et al. developed a crystal graph convolutional neural network (CGCNN) framework that could learn eight different properties of crystals from the atomic connections.[37] However, its band gap prediction yielded a mean absolute error (MAE) of 0.388 eV against DFT values based on a large training dataset of 16458 materials. In 2020, Zhu et al. employed the support vector machine regression (SVR) method to predict the band gaps of a group of phosphorene-isoelectronic 2D semiconductors.[42] Their model achieved high accuracy at the HSE06 level with a root-mean-square error (RMSE) of less than 0.15 eV. Their prediction was based on both PBE-calculated band gaps and elemental properties, including atomic mass, ionization energy, electron affinity, electronegativity, and the electronegativity difference between cations and anions. However, the generalization of this method to other types of 2D semiconductors remains unknown. In 2021, Wan et al. proposed an artificial neural network (ANN) model using six computationally efficient descriptors to improve the accuracy of band gaps from DFT with PBE functional (DFT-PBE) to G0W0 level.[46] The MAE of predicted band gaps with respect to those from G0W0 calculations is 0.35 eV. More recently, Liu et al. predicted HSE06 band gaps using ML models based on 309 descriptors, attaining an MAE of 0.142 eV on testing dataset after training on approximately 8300 materials.[47] Zhang et al. proposed an ML model with 19 descriptors for HSE06 band gaps of 2D materials, reporting an MAE of 0.30 eV on testing dataset but an MAE of 0.01 eV on training dataset, indicating overfitting of the model.[49] Chen et al. developed an ML model to predict the perovskite band gaps based on 136 descriptors, achieving an RMSE of 0.59 eV, with the formation energy descriptor identified as the most critical (reducing RMSE by 10.6%).[51] Liu et al. developed an SSE-BGP model with 30 descriptors for HSE06 band gaps of 2D materials by the combination of principal component analysis (PCA) and Autoencoder architectures. The MAE of predicted band gaps with respect to those from HSE06 calculations is 0.262 eV.[53]

    Despite these advances, current ML models for band gap prediction exhibit three key limitations: (i) excessive reliance on high-dimensional descriptors, (ii) suboptimal prediction accuracy with elevated MAE/RMSE values, and (iii) demanding large-scale training datasets. Therefore, a descriptor-minimized, data-efficient ML model capable of achieving band gap prediction with high-level accuracy is still highly required, especially for 2D semiconductors of which available datasets are far fewer than bulk crystal data repositories.

    To address these challenges, here we present a reference-guided graph neural network (RG-GNN) model that achieves HSE06-level accuracy in predicting band gaps of 2D semiconductors. Our approach requires only the basic structural information of primitive cells combined with a computationally inexpensive DFT-PBE reference band gap value. Crucially, incorporating this PBE reference band gap value significantly enhances prediction accuracy, reducing the MAE against HSE06 values from 0.90 eV to 0.15 eV with an 83.3% accuracy improvement. Furthermore, the RG-GNN model substantially reduces the training dataset size required for model convergence.

2.   Computational details
  • To establish an ML model for predicting band gaps of 2D semiconductors, we retrieved our dataset from the Computational 2D Materials Database (C2DB),[56,57] a widely used repository containing first-principles calculated properties of already known 2D materials. The dataset comprises 3128 unique 2D materials with calculated HSE06 band gaps. As illustrated in Fig. 1, there are 968 metallic materials (with band gaps of 0 eV) and 2160 semiconductors and insulators. We classified the 2160 non-metallic 2D materials into 11 groups according to their band gap values with an interval of 1 eV for each group, resulting in 292 materials in the (0, 1) eV, 598 materials in [1, 2) eV, 567 materials in [2, 3) eV, 297 materials in [3, 4) eV, 176 materials in [4, 5) eV, 140 materials in [5, 6) eV, 54 materials in [6, 7) eV, 21 materials in [7, 8) eV, and 15 materials with band gaps no less than 8 eV. As 2D semiconductors with band gaps greater than or equal to 8 eV are relatively rare in both routine research and the C2DB database (< 0.5%), we excluded these 15 materials from both the training and testing datasets during model construction. However, in the final stage of our study, we used these 15 materials as an additional testing dataset to validate the transferability of our RG-GNN model. Namely, we only used the 3113 materials, including 968 metals and 2145 semiconductors with band gaps below 8 eV, to constitute the final datasets, which were randomly divided into the training dataset with 2800 data, validation dataset with 113 data, and testing dataset with 200 data unless otherwise mentioned. Given the limited size of the overall dataset, we allocated a larger proportion of data to the training dataset to ensure model convergence during training. Although the testing dataset comprised 6.4%, less than 10%, of the total data, cross-validation was finally performed to verify the reliability of reported performance metrics for our model.

    The structural information of each material in the dataset was first transformed into graph data for model input. The input node attributes included the corresponding atomic numbers in the periodic table of elements and the x–y–z Cartesian coordinates of each atom. The edges between nodes were defined using a radial cutoff criterion of 4 Å. All atom pairs within this distance threshold in the primitive cell were connected, establishing edges representing local chemical interactions with neighborhoods for the nodes. To ensure complete edge enumeration under periodic boundary conditions, lattice parameters of the primitive cell were incorporated as global graph attributes. In addition, the global graph attribute can optionally contain a reference value of the band gap.

  • As a widely used type of graph neural networks (GNNs), graph convolutional networks (GCNs)[58] have gained prominence in social network analysis, recommender systems, bioinformatics, and crystal material property prediction owing to their computational efficiency and architectural simplicity. The GCNs also demonstrate advantages in directly processing graph data with irregular structures and effectively capturing hierarchical patterns through simultaneous aggregation of local node neighborhood features and global graph topology information. However, GCNs have the limitation of assigning fixed normalized weights to all neighboring nodes during aggregation, which results in failure of prioritizing nodes based on their significance. This issue can be complementarily solved by graph attention networks (GATs),[59] which leverage attention mechanisms to dynamically assign differentiated attention weights to neighboring nodes and significantly enhance the capability to capture spatial dependencies and structural patterns in graph data. Therefore, here we used the combination of GCN and GAT modules to construct the convolutional layers in our model that are more capable of understanding the structural characteristics, complex atomic interactions, and different significance of neighboring atoms in the primitive cell of 2D materials, which is essential for further exploring the relationship between the atomic structure and band gap for semiconductors.

    As illustrated in Fig. 2, the RG-GNN model comprises five core components: input, convolutional layers, pooling layer, full connected layer, and the output. The input consists of nodes representing atoms and edges representing connections between atoms in the primitive cell, which are characterized by vectors corresponding to the atoms and bonds in the 2D materials, respectively. Besides, a reference value of the band gap can be optionally provided as a global graph attribute for the input. One can obtain the predictions from the model after the input graph data undergoing convolutional operations across N hidden convolutional layers followed by pooling and fully-connected operations.

    The depth of convolutional layers in the model critically influences the smoothness, distinctiveness, and gradient of the node features, and ultimately the model prediction accuracy. During the model construction, we systematically evaluated the model with 2 GCN∼5 GCN or GAT convolutional layers. Test results demonstrate optimal model performance at 3-layer depth with 1-layer GCN module and 2-layer GAT modules, which are adopted in subsequent implementations. We further optimized activation functions across seven commonly used candidates: Linear, ReLU, Sigmoid, Tanh, Softplus, ELU, and LeakyReLU, among which ReLU gives the best model prediction performance. Finally, we evaluate the effects of distinct normalization strategies in each convolutional layer on model prediction performance, including graph normalization, batch normalization, layer normalization, and no normalization. It is showed that the combined application of graph normalization and batch normalization yielded synergistic benefits, accelerating model convergence while reducing prediction error. Therefore, this dual-normalization scheme was implemented across all convolutional layers in our RG-GNN model.

    The model prediction accuracy is quantified using the mean absolute error (MAE), error standard deviation (σ), and coefficient of determination (R2), which respectively defined as

    where yi is the value of band gap calculated from HSE06 functional, y¯ is the mean value of HSE06 band gaps in the sample dataset, y^i is the predicted band gap by the RG-GNN model, and n is the size of the sample dataset.

3.   Results and discussion
  • First, we evaluated the model performance with reference band gap values disabled in global graph attributes. The training dataset size required for model convergence was systematically investigated. As shown in Fig. 3(a), though the model seems converged when the training dataset size reaches 1000, the MAE on testing dataset still shows significant fluctuations, showing an insufficient training dataset of 2800 for robust convergence of the model. On the other hand, the MAE of testing dataset is much larger than that of training dataset, exhibiting overfitting of the model. Furthermore, as shown in Fig. 3(b), the model gets converged slowly during the training, which requires at least of 600 epochs. The MAE for both training and testing datasets are still large, which are 0.58 eV and 0.90 eV, respectively, indicating a poor predictive capability. The poor prediction performance can be more starkly seen from Figure 3(c), where the maximum prediction error reaches 6.03 eV. Therefore, this model fails to achieve high-accuracy predictions.

  • Neural network training fundamentally represents a high-dimensional optimization problem, where the core challenge involves navigating complex parameter landscapes. Through iterative parameter updates, such training processes gradually converge toward a global minimum for the loss function. Notably, incorporating domain-specific prior knowledge as reference values can significantly enhance search efficiency in parameter space.[60,61] This approach proves particularly valuable for constructing high-accuracy models under data scarcity constraints.

    Inspired by this, we incorporated a reference band gap value into the model input as global graph attribute to improve the prediction accuracy. For this aim, the 2800 data of the training dataset were grouped using three grouping strategies according to their HSE06 band gap values: (i) the training dataset are divided into 2 groups with a group interval of 4.0 eV, the first group has band gaps in [0, 4) eV, and the second one has band gaps in [4, 8) eV; (ii) the training dataset are divided into 4 groups with a group interval of 2.0 eV; and (iii) the training dataset are divided into 8 groups with a group interval of 1.0 eV. During the model training, the lower bound of each data group served as the input reference value for all the data in this group. For example, a reference value of 0 was used for all the data with band gaps in the group of [0, 4) eV while 4.0 eV was used as the reference value for all the data with band gaps in the group of [4, 8) eV.

    Figure 4(a) reveals the case where the group interval is 4.0 eV. It is easily seen that the model performance is very similar to the case where the model has no reference value as input for the band gap. The trained model still exhibits deficiencies of overfitting and inadequate predictive capability when the input reference values demonstrate significant deviation from the target HSE06 value. Specifically, the MAE for training and testing datasets are 0.57 eV and 0.76 eV, respectively. However, when the interval of the group is decreased, as shown in Figs. 4(b) and 4(c), the overfitting issue for the model is resolved. At the same time, the predictive capability is significantly enhanced. The MAE for both training and testing datasets are around 0.37 eV and 0.16 eV for the cases where the group intervals are 2.0 eV and 1.0 eV, respectively. That is to say, for the case with a group interval of 1.0 eV, the RG-GNN model demonstrates exceptionally high prediction accuracy, which currently achieves the highest prediction accuracy among existing descriptor-minimized models.

  • The preceding analysis confirms that appropriate band gap reference values serve as pivotal factors in achieving high prediction accuracy for the model. However, in practical applications especially involving novel materials, prior knowledge of adequate band gap reference values remains unavailable. In such scenarios, we propose utilizing band gaps calculated from the PBE functional as computationally efficient reference inputs. For a target 2D material with PBE band gap already available, it only spends ca. 0.01 s for the well-trained RG-GNN model to predict an HSE06 level band gap. If no PBE band gap is available, the RG-GNN model primarily spends time calculating it. This PBE calculation is typically 1–2 orders of magnitude computationally cheaper than the corresponding HSE06 band gap calculation.[62,63] Therefore, RG-GNN model substantially reduces computational demands compared to HSE06 calculations while maintaining prediction fidelity.

    As shown in Fig. 5(a), compared to the case where the model with no reference value for the band gap, when the band gap calculated from PBE functional is incorporated as a reference value, the RG-GNN model gets well converged after training on a training dataset of around 1000. Meanwhile, the MAE on the training dataset and testing dataset are very close and small. This indicates that reference-guided learning successfully captures the fundamental structure-band gap relationship in 2D semiconductors. Furthermore, one can see from Fig. 5(b), after introducing a reference value for the band gap, the model gets converged quickly during the training, which requires only 200 epochs. At the same time, the MAE for both training and testing datasets get smaller, which are around 0.15 eV. The σ and R2 on the testing dataset are 0.32 eV and 0.96, respectively. The good fitting between EgHSE06 and Egpred on the testing dataset shown in Fig. 5(c) suggests that this model possesses strong generalization capability for HSE06-level accuracy band gap prediction in 2D materials. Figure 5(d) gives the MAE of EgPBE and Egpred relative to EgHSE06 as a function of band gap. It can be clearly seen that the deviation of PBE band gaps from HSE06 ones increases with the band gap while it does not change much with the material band gap for the RG-GNN model predicted band gaps relative to HSE06 ones. This suggests that the RG-GNN model has a higher relative accuracy for materials with larger band gaps.

    Table 1 systematically compares model performance across distinct strategies for the reference values. One can easily see that the reference value for the band gap plays an important role in improving the prediction accuracy of the model. The MAE of the model get smaller as the reference value for the band gap become more appropriate. And the reference values obtained from PBE functional prove to be practically good enough for predicting the HSE06 band gaps.

    To further validate the prediction accuracy and stability of the RG-GNN model, we perform 10-fold cross-validation with the same sizes for the training, validation, and testing datasets as above in each fold. As summarized in Table 2, the MAE values across all 10 folds are consistently around 0.16 eV, with corresponding σ below 0.43 eV and R2 above 0.91. This consistent performance demonstrates little sensitivity to partitioning randomness as well as the robustness of the prediction accuracy and stability of the RG-GNN model.

    During the training and testing datasets construction, 15 materials with band gaps exceeding 8.0 eV were excluded, for which the MAE, σ, and R2 of EgPBE versus EgHSE06 are 2.55 eV, 0.24 eV, and −7.63, respectively. To evaluate the transferability and robustness of our RG-GNN model with PBE reference values, we predicted the band gaps Egpred for these high-band-gap materials.

    From Table 3, it is remarkably found that the Egpred still has a high accuracy compared with EgHSE06 and the MAE of Egpred versus EgHSE06 dramatically decreases to only 0.21 eV with corresponding σ and R2 being 0.28 eV and 0.85, respectively. More specifically, the prediction error falls below 5.5% for 14 materials. For Sc2F6, the prediction error reaches as large as 1.01 eV (10.0%). Notably, for structurally similar materials including Y2F6 (0.2%), Al2F6 (0.2%), and Ga2F6 (0.6%), the RG-GNN model manifests a high accuracy. We have noted that there is large difference in band structures for Sc2F6 compared to these three structural similar counterparts. That is, the d-orbitals make significant contributions to the CBM of Sc2F6, indicating strong electron correlation effects in Sc2F6. The large deviation for the predicted band gap relative to HSE06 band gap for Sc2F6 suggests the RG-GNN model with minimal elementary descriptors is not adequate to accurately predict band gaps of strongly correlated systems. It should be noted that, despite this, the predicted band gap Egpred (9.01 eV) of Sc2F6 is still much closer to EgHSE06 (10.02 eV) than EgPBE (6.88 eV). Meanwhile, the R2 for these 15 materials is 0.85, which is smaller than 0.9. Since all these materials have band gaps larger than 8 eV and have been never seen during the model training, a value of 0.85 for R2 still demonstrates the good prediction accuracy, transferability and robustness of the RG-GNN model with PBE band gaps as reference values. Based on this, it can be naturally speculated that our RG-GNN model can make predictions on a much higher level, such as GW level, as long as that high precision training datasets and appropriate band gap reference values are provided. Hence, our RG-GNN model establishes a new paradigm for high-accuracy-fidelity band gap prediction in 2D semiconductors.

4.   Conclusions
  • In summary, we have proposed an RG-GNN framework that achieves HSE06-level accuracy in predicting band gaps of 2D semiconductors. By embedding computationally efficient PBE band gap references based on minimized descriptors of only fundamental structural information, the model attains an exceptional MAE of 0.15 eV for predicted band gaps against HSE06 values. The reference-guided mechanism significantly reduces the prediction errors by 83.3% and the size of training dataset for model convergence. Our findings demonstrate that topological atomic descriptors preserve sufficient physical determinism for high-fidelity band gap prediction when coupled with appropriate reference values. This work establishes a new paradigm where target-property references fundamentally enhance prediction accuracy of the ML models while streamlining their complexity across computational materials science.

Figure (5)  Table (3) Reference (63)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return