BERT-Enhanced HyperGAT with Siamese Networks and Reference Answer Set for Automated Short-Answer Scoring
Abstract
1. Introduction
1.1. Text Classification Methods and Their Educational Limitations
1.2. Reference Answer Sets
1.3. Novel Contributions of This Work
2. HyperGAT-BERT Framework and Performance Validation
2.1. HyperGAT-BERT Architecture
2.2. Text Classification Performance Validation
2.2.1. Ohsumed Dataset
2.2.2. Experimental Design
2.2.3. Experimental Results
3. HyperGAT-BERT Integrating Siamese Neural Networks and Reference Answer Sets and Its Application in Automatic Short-Answer Scoring
3.1. Construction of HyperGAT-BERT Integrating Siamese Neural Networks and Reference Answer Sets
3.1.1. ASAP-5 Dataset
3.1.2. Construction of Reference Answer Set
3.1.3. Constructing HyperGAT-BERT-RAS
- Read the corpus files from the ASAP-5 dataset and perform a series of text cleaning and preprocessing operations, including tokenization, lemmatization, stop-word removal, etc. A validation set is then split from the training set at a ratio of 10%.
- Further process the training data, validation set, and test set by storing different parts of the input data and document answer lists as NumPy arrays, including inputs, targets, and text, which represent vector representations, labels, and initial text, respectively. Data batches are generated for training or evaluation, with each batch containing 8 texts (batch = 8). To ensure consistent training for both student texts and answer texts, each batch concatenates student texts with answer texts, meaning that 12 texts are trained together each time. Additionally, node information (items) is generated to represent all nodes in the document. Edge information is generated by iteratively processing each document’s sentences and semantic information, including lists of node and edge transpose matrices (HT: each element corresponds to the node and edge relationships of a document) and adjacency matrices (adj), both commonly used to represent the graph structure of a document. Finally, node masks are generated for each document, related to node information, to indicate which nodes are valid, which are padding values, or unused, maintaining dimensional consistency of the data, especially when different documents have varying numbers of nodes.
- Use the train data obtained in the previous step as input to train the model, iterating over each batch. To calculate the model’s score or predicted output, the input is first passed to an embedding layer to obtain embedded representations (hidden). Next, the embedded representations (hidden) and node information (HT) are passed to the hypergraph attention layer, the hypergraph attention mechanism, allowing the model to capture complex relationships in graph data. These operations help the model extract useful information from hypergraph data, yielding intermediate representation outputs (seq hidden) for subsequent tasks.
- 4.
- The obtained document representation (Z) is fed into a Softmax layer for text classification, ultimately producing the model’s predicted output. The structure of the HyperGAT-BERT-RAS model is shown in Figure 7.
3.2. Automated Short-Answer Scoring Validation
3.2.1. Ablation Experiment Design
3.2.2. Ablation Experiment Results
3.2.3. Error Analysis
4. Discussion
4.1. Integrating BERT Enhances Text Classification Performance of the HyperGAT Method
4.2. RAS Is a Critical Factor Influencing the Accuracy of Automatic Scoring in HyperGAT-BERT
4.3. Implications from Error Analysis
4.4. Research Limitations
5. Conclusions
- (1)
- The incorporation of BERT to enrich semantic information enables HyperGAT-BERT to better represent texts and improve text classification performance. On the Ohsumed dataset, HyperGAT-BERT achieved 72.95% accuracy, surpassing the baseline HyperGAT model by 3.28%, demonstrating the effectiveness of BERT’s semantic enhancement for text classification tasks.
- (2)
- When applied to automatic scoring of subjective questions, ablation experiments reveal that RAS is the only component with a statistically significant contribution on the ASAP-5 dataset. The removal of BERT embeddings or LDA semantic hyperedges did not result in statistically significant performance drops, suggesting that in this specific dataset, the core contribution of the framework comes from the RAS-guided Siamese scoring mechanism rather than the BERT integration.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Alikaniotis, D., Yannakoudakis, H., & Rei, M. (2016, August 7–12). Automatic text scoring using neural networks. 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long papers, pp. 715–725), Berlin, Germany. [Google Scholar] [CrossRef]
- Bromley, J., Bentz, J., Bottou, L., Guyon, I., Lecun, Y., Moore, C., Sackinger, E., & Shah, R. (1993). Signature verification using a “Siamese” time delay neural network. International Journal of Pattern Recognition and Artificial Intelligence, 7, 25. [Google Scholar] [CrossRef]
- Burrows, S., Gurevych, I., & Stein, B. (2015). The eras and trends of automatic short answer grading. International Journal of Artificial Intelligence in Education, 25(1), 60–117. [Google Scholar] [CrossRef]
- Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019, June 2–7). Bert: Pre-training of deep bidirectional transformers for language understanding. 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1 (Long and Short Papers), pp. 4171–4186), Minneapolis, MN, USA. [Google Scholar] [CrossRef]
- Ding, K., Wang, J., Li, J., Li, D., & Liu, H. (2020). Be more with less: Hypergraph attention networks for inductive text classification. arXiv. [Google Scholar] [CrossRef]
- Dobriţa, G., & Oprea, S.-V. (2025). An NLP-driven e-learning platform with LLMs and graph databases for personalised guidance. Connection Science, 37(1), 2518991. [Google Scholar] [CrossRef]
- Feng, Y., You, H., Zhang, Z., Ji, R., & Gao, Y. (2019). Hypergraph neural networks. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01), 3558–3565. [Google Scholar] [CrossRef]
- Gilmer, J., Schoenholz, S. S., Riley, P. F., Vinyals, O., & Dahl, G. E. (2017). Neural message passing for quantum chemistry. arXiv. [Google Scholar] [CrossRef]
- He, P., Liu, X., Gao, J., & Chen, W. (2021). DeBERTa: Decoding-enhanced BERT with disentangled attention. arXiv. [Google Scholar] [CrossRef]
- Huang, Y., Yang, X., Zhuang, F., Zhang, L., & Yu, S. (2018). Automatic Chinese reading comprehension grading by LSTM with knowledge adaptation. In D. Phung, V. S. Tseng, G. I. Webb, B. Ho, M. Ganji, & L. Rashidi (Eds.), Advances in knowledge discovery and data mining (Vol. 10937, pp. 118–129). Springer International Publishing. [Google Scholar] [CrossRef]
- Kim, E.-S., Kang, W. Y., On, K.-W., Heo, Y.-J., & Zhang, B.-T. (2020, June 13–19). Hypergraph attention networks for multimodal learning. 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 14569–14578), Seattle, WA, USA. [Google Scholar] [CrossRef]
- Kumar, Y., Aggarwal, S., Mahata, D., Shah, R. R., Kumaraguru, P., & Zimmermann, R. (2019). Get IT scored using AutoSAS—An automated system for scoring short answers. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01), 9662–9669. [Google Scholar] [CrossRef]
- Lan, A. S., Vats, D., Waters, A. E., & Baraniuk, R. G. (2015). Mathematical language processing: Automatic grading and feedback for open response mathematical questions. arXiv. [Google Scholar] [CrossRef]
- Liu, Q., Wu, R., Chen, E., Xu, G., Su, Y., Chen, Z., & Hu, G. (2018). Fuzzy cognitive diagnosis for modelling examinee performance. ACM Transactions on Intelligent Systems and Technology, 9(4), 48. [Google Scholar] [CrossRef]
- Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., & Stoyanov, V. (2019). RoBERTa: A robustly optimized BERT pretraining approach. arXiv. [Google Scholar] [CrossRef]
- Lv, S., Dong, J., Wang, C., Wang, X., & Bao, Z. (2024). RB-GAT: A text classification model based on RoBERTa-BiGRU with graph attention network. Sensors, 24(11), 3365. [Google Scholar] [CrossRef] [PubMed]
- Marvaniya, S., Saha, S., Dhamecha, T. I., Foltz, P., Sindhgatta, R., & Sengupta, B. (2018, October 22–26). Creating scoring rubric from representative student answers for improved short answer grading. 27th ACM International Conference on Information and Knowledge Management (pp. 993–1002), Turin, Italy. [Google Scholar] [CrossRef]
- Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., & Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140), 1–67. Available online: https://jmlr.org/papers/v21/20-074.html (accessed on 8 June 2024).
- Riordan, B., Horbach, A., Cahill, A., Zesch, T., & Lee, C. M. (2017, September 8). Investigating neural architectures for short answer scoring. 12th Workshop on Innovative Use of NLP for Building Educational Applications (pp. 159–168), Copenhagen, Denmark. [Google Scholar] [CrossRef]
- Saha, S., Dhamecha, T. I., Marvaniya, S., Sindhgatta, R., & Sengupta, B. (2018). Sentence level or token level features for automatic short answer grading?: Use both. In C. Penstein Rosé, R. Martínez-Maldonado, H. U. Hoppe, R. Luckin, M. Mavrikis, K. Porayska-Pomsta, B. McLaren, & B. Du Boulay (Eds.), Artificial intelligence in education (Vol. 10947, pp. 503–517). Springer International Publishing. [Google Scholar] [CrossRef]
- Sultan, M. A., Salazar, C., & Sumner, T. (2016, June 12–17). Fast and easy short answer grading with high accuracy. 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (pp. 1070–1075), San Diego, CA, USA. [Google Scholar] [CrossRef]
- Tan, H., Guo, Y., & Li, R. (2022). Research progress, applications and challenges in automatic subjective question grading. Artificial Intelligence, (02), 14–20. [Google Scholar] [CrossRef]
- Tan, H., Wang, C., Duan, Q., Lu, Y., Zhang, H., & Li, R. (2023). Automatic short answer grading by encoding student responses via a graph convolutional network. Interactive Learning Environments, 31(3), 1636–1650. [Google Scholar] [CrossRef]
- Tan, H., Wu, Z., Lu, Y., Duan, Q., Li, R., & Zhang, H. (2019). Short answer automatic scoring based on representative answer selection and attention mechanism. Journal of Chinese Information Processing, 33(11), 134–142. [Google Scholar]
- Valenti, S., Neri, F., & Cucchiarelli, A. (2003). An overview of current research on automated essay grading. Journal of Information Technology Education: Research, 2, 319–330. [Google Scholar] [CrossRef] [PubMed]
- Vashishth, S., Sanyal, S., Nitin, V., & Talukdar, P. (2020). Composition-based multi-relational graph convolutional networks. arXiv. [Google Scholar] [CrossRef]
- Zhang, Y., Qi, P., & Manning, C. D. (2018). Graph convolution over pruned dependency trees improves relation extraction. arXiv. [Google Scholar] [CrossRef]







| Dataset | Doc | Train | Valid | Test | Class |
|---|---|---|---|---|---|
| Ohsumed | 7400 | 5913 (80%) | 591 | 1487 (20%) | 23 |
| Model | Mean | SD | t(9) |
|---|---|---|---|
| SWEM | 0.6314 | 0.0045 | −111.103 *** |
| CNN-non-static | 0.5843 | 0.0109 | −170.773 *** |
| Text-level GNN | 0.6945 | 0.0058 | −54.016 *** |
| BERT | 0.7002 | 0.0200 | −4.682 ** |
| HyperGAT | 0.6967 | 0.0149 | −6.834 *** |
| HyperGAT-BERT | 0.7295 | 0.0016 |
| Theme | Training Set | Testing Set | Average Length | Scores |
|---|---|---|---|---|
| biology | 1797 (80%) | 451 (20%) | 60 words | 0–3 |
| Answer Text | |
|---|---|
| answer 1 | “In protein synthesis, after the mRNA leaves the nucleus, it carries the instructions to the cytoplasm. It then enters a ribosome and prepares to be copied. Transfer RNA brings the codons attached to the amino acid to the ribosome. It attaches at the first bonding site, which matches the complementary codons. The tRNA moves to the next binding site, where it releases the amino acid, which attaches to the amino acid on the tRNA behind it. Once the mRNA reaches a stop codon, the amino acids detach and form a polypeptide bond.” |
| answer 2 | “The mRNA leaves the nucleus and then attaches to rRNA, ribosomal RNA. Once firmly attached to this ribosomal RNA, the mRNA forms codons, which are a set of three nucleotides. These codons then match with anticodons on tRNA, which also hold amino acids. The amino acids on the tRNA form peptide bonds with the other amino acids to form a chain. Once the bond between two proteins has been formed, the tRNA floats away to find another amino acid to carry. This process continues until there is a full chain of amino acids, which then creates a protein.” |
| answer 3 | “After mRNA leaves the nucleus, the mRNA connects to a ribosome to produce the protein the mRNA codes for. In the ribosome, the mRNA is read in the sequence of codons and calls the tRNA to go out into the cytoplasm to get the correct amino acid that is called for in the codon. The tRNA keeps bringing the needed amino acids, which results in the making of a protein chain. When the protein chain is complete, it goes out into the cytoplasm and goes wherever it is needed in the cell or outside of the cell.” |
| answer 4 | “After mRNA leaves the nucleus, it goes out into the cytoplasm on a ribosome. The ribosome attaches and reads until it sees the codon AUG. Once it sees this codon, it starts pairing the bases with complementary anticodons on the tRNA. The tRNA brings amino acids that link together to form a protein. This process terminates at a stop codon.” |
| Model | ACC | p | F1 |
|---|---|---|---|
| w/o LDA | 0.7751 ± 0.0179 | 0.7887 ± 0.0319 | 0.7723 ± 0.0184 |
| w/o BERT | 0.7792 ± 0.0148 | 0.7834 ± 0.0159 | 0.7762 ± 0.0128 |
| w/o RAS | 0.7646 ± 0.0158 | 0.4107 ± 0.0589 | 0.4188 ± 0.0487 |
| HyperGAT-BERT-RAS | 0.7866 ± 0.0134 | 0.7898 ± 0.0132 | 0.7806 ± 0.0110 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Liu, C.; Wan, X.; Ni, Z.; Su, S.; Kang, C. BERT-Enhanced HyperGAT with Siamese Networks and Reference Answer Set for Automated Short-Answer Scoring. Behav. Sci. 2026, 16, 946. https://doi.org/10.3390/bs16060946
Liu C, Wan X, Ni Z, Su S, Kang C. BERT-Enhanced HyperGAT with Siamese Networks and Reference Answer Set for Automated Short-Answer Scoring. Behavioral Sciences. 2026; 16(6):946. https://doi.org/10.3390/bs16060946
Chicago/Turabian StyleLiu, Chen, Xiaofen Wan, Zhihao Ni, Sheng Su, and Chunhua Kang. 2026. "BERT-Enhanced HyperGAT with Siamese Networks and Reference Answer Set for Automated Short-Answer Scoring" Behavioral Sciences 16, no. 6: 946. https://doi.org/10.3390/bs16060946
APA StyleLiu, C., Wan, X., Ni, Z., Su, S., & Kang, C. (2026). BERT-Enhanced HyperGAT with Siamese Networks and Reference Answer Set for Automated Short-Answer Scoring. Behavioral Sciences, 16(6), 946. https://doi.org/10.3390/bs16060946

