Named Entity Recognition for Few-Shot Power Dispatch Based on Multi-Task
Abstract
:1. Introduction
- (1)
- Lack of annotated public datasets.
- (2)
- The power dispatch text has strong specialized terms, and it is difficult for the conventional model to identify the entities in it. There is also the problem of nested entities in the text, such as when the entity “移动基站专变” contains two entities (“移动基站专变” and “专变”). Text annotation using sequential annotation requires special processing to recognize nested entities.
- (3)
- Conventional tokenizers do not consider the existence of word boundary ambiguity or separators to represent word boundaries in Chinese. In addition, there is no word splitter for power dispatch text splitting, and there is a certain error in the splitting results when using conventional word splitters.
- (4)
- When the pre-trained language model trains the Chinese corpus, the character masking strategy is adopted, and the semantic information extracted is only at the character level, which cannot fully capture the contextual semantic information in the text. In addition, using the character masking strategy model may predict the content of the masking position in advance, but it cannot effectively infer professional terms.
- (1)
- Pre-processing the unstructured data of power dispatch provided by Guangxi Power Grid, referring to the national standard electrical terminology specification, adopting the span-based approach to standardized text data for entity annotation, and constructing the named entity dataset of power dispatch.
- (2)
- Proposing a multi-task-based few-shot named entity recognition model for power dispatch and training it using a dataset based on span representation so that the model can effectively identify nested entities.
- (3)
- Improving the dynamic character masking strategy used by the RoBERTa encoder by replacing the WordPiece masking strategy with the whole-word masking strategy.
- (4)
- Using the focal loss function [9] (focal loss, FL) to solve the sample size imbalance problem.
2. Related Work
3. Constructing Corpus Datasets
3.1. Data Acquisition and Preprocessing
3.2. Entity Annotation
4. Methods
4.1. Method Flow
4.2. RoBERTa and Whole-Word Masking
4.3. IDCNN Module
4.4. Seed Module
4.5. Expansion Module
4.6. Implication Module
4.7. Focal Loss
5. Results
5.1. Evaluation Indicators
5.2. Results and Analysis
- (1)
- Performance analysis of different masking strategies
- (2)
- Comparative analysis of the performance of different models
- (3)
- Ablation experiments
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Dileep, G. A survey on smart grid technologies and applications. Renew. Energy 2020, 146, 2589–2625. [Google Scholar] [CrossRef]
- Capizzi, G.; Sciuto, G.L.; Napoli, C.; Tramontana, E. Advanced and Adaptive Dispatch for Smart Grids by means of Predictive Models. IEEE Trans. Smart Grid 2017, 9, 6684–6691. [Google Scholar] [CrossRef]
- Hu, J.; Li, P. Energy-sharing method of smart buildings with distributed photovoltaic systems in area. Energy Rep. 2022, 8, 622–627. [Google Scholar] [CrossRef]
- Fan, S.; Liu, X.; Chen, Y.; Liao, Z.; Zhao, Y.; Luo, H.; Fan, H. How to construct a power knowledge graph with dispatching data? Sci. Program. 2020, 2020, 8842463. [Google Scholar] [CrossRef]
- Wang, J.; Wang, X.; Ma, C.; Kou, L. A survey on the development status and application prospects of knowledge graph in smart grids. IET Gener. Transm. Distrib. 2021, 15, 383–407. [Google Scholar] [CrossRef]
- Lin, T.H.; Huang, Y.H.; Putranto, A. Intelligent question and answer system for building information modeling and artificial intelligence of things based on the bidirectional encoder representations from transformers model. Autom. Constr. 2022, 142, 104483. [Google Scholar] [CrossRef]
- Guo, Q.; Zhuang, F.; Qin, C.; Zhu, H.; Xie, X.; Xiong, H.; He, Q. A survey on knowledge graph-based recommender systems. IEEE Trans. Knowl. Data Eng. 2020, 34, 3549–3568. [Google Scholar] [CrossRef]
- Chen, X.; Jia, S.; Xiang, Y. A review: Knowledge reasoning over knowledge graph. Expert Syst. Appl. 2020, 141, 112948. [Google Scholar] [CrossRef]
- Lin, T.Y.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. In Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, 22–29 October 2017; pp. 2980–2988. [Google Scholar]
- Goyal, A.; Gupta, V.; Kumar, M. Recent named entity recognition and classification techniques: A systematic review. Comput. Sci. Rev. 2018, 29, 21–43. [Google Scholar] [CrossRef]
- Li, J.; Fang, S.; Ren, Y.; Li, K.; Sun, M. SWVBiL-CRF: Selectable Word Vectors-based BiLSTM-CRF Power Defect Text Named Entity Recognition. In Proceedings of the 2020 IEEE International Conference on Big Data (Big Data), Atlanta, GA, USA, 10–13 December 2020; pp. 2502–2507. [Google Scholar]
- Lafferty, J.D.; McCallum, A.; Pereira, F.C.N. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the Eighteenth International Conference on Machine Learning, San Francisco, CA, USA, 28 June–1 July 2001. [Google Scholar]
- Wang, M.; Zhou, T.; Wang, H.; Zhai, Y.; Dong, X. Chinese power dispatching text entity recognition based on a double-layer BiLSTM and multi-feature fusion. Energy Rep. 2022, 8, 980–987. [Google Scholar] [CrossRef]
- Zheng, K.; Yang, J.; Zeng, L.; Gong, Q.; Li, S.; Zhou, S. Constructing Bi-order-Transformer-CRF with Neural Cosine Similarity Function for power metering entity recognition. IEEE Access 2021, 9, 133491–133499. [Google Scholar] [CrossRef]
- Liu, M.; Tu, Z.; Wang, Z.; Xu, X. LTP: A new active learning strategy for BERT-CRF based named entity recognition. arXiv 2020, arXiv:2001.02524. [Google Scholar] [CrossRef]
- Meng, F.; Yang, S.; Wang, J.; Xia, L.; Liu, H. Creating knowledge graph of electric power equipment faults based on BERT–BiLSTM–CRF model. J. Electr. Eng. Technol. 2022, 17, 2507–2516. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.W.; Lee, K.; Toutanova, K. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv 2018, arXiv:1810.04805. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
- Zheng, K.; Sun, L.; Wang, X.; Zhou, S.; Li, H.; Li, S.; Zeng, L.; Gong, Q. Named entity recognition in electric power metering domain based on attention mechanism. IEEE Access 2021, 9, 152564–152573. [Google Scholar] [CrossRef]
- Cui, L.; Wu, Y.; Liu, J.; Yang, S.; Zhang, Y. Template-based named entity recognition using BART. arXiv 2021, arXiv:2106.01760. [Google Scholar]
- Yao, Y.; Zhang, A.; Zhang, Z.; Liu, Z.; Chua, T.S.; Sun, M. Cpt: Colorful prompt tuning for pre-trained vision-language models. arXiv 2021, arXiv:2109.11797. [Google Scholar]
- Sutskever, I.; Vinyals, O.; Le, Q.V. Sequence to sequence learning with neural networks. Adv. Neural Inf. Process. Syst. 2014, 27, 3104–3112. [Google Scholar]
- Ma, R.; Zhou, X.; Gui, T.; Tan, Y.; Li, L.; Zhang, Q.; Huang, X. Template-free prompt tuning for few-shot NER. arXiv 2021, arXiv:2109.13532. [Google Scholar]
- Wang, J.; Wang, C.; Tan, C.; Qiu, M.; Huang, S.; Huang, J.; Gao, M. Spanproto: A two-stage span-based prototypical network for few-shot named entity recognition. arXiv 2022, arXiv:2210.09049. [Google Scholar]
- Chen, J.; Liu, Q.; Lin, H.; Han, X.; Sun, L. Few-shot named entity recognition with self-describing networks. arXiv 2022, arXiv:2203.12252. [Google Scholar]
- Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv 2019, arXiv:1907.11692. [Google Scholar]
- Cui, Y.; Che, W.; Liu, T.; Qin, B.; Yang, Z. Pre-training with whole word masking for Chinese bert. IEEE/ACM Trans. Audio Speech Lang. Process. 2021, 29, 3504–3514. [Google Scholar] [CrossRef]
- Yu, F.; Koltun, V. Multi-scale context aggregation by dilated convolutions. arXiv 2015, arXiv:1511.07122. [Google Scholar]
- Yang, Y.; Katiyar, A. Simple and effective few-shot named entity recognition with structured nearest neighbor learning. arXiv 2020, arXiv:2010.02405. [Google Scholar]
Entity Type/ Acronym | Corpus | Train Set | Eval Set | Test Set | ||||
---|---|---|---|---|---|---|---|---|
All | 5-Shot | 10-Shot | 20-Shot | 5-Shot | 10-Shot | 20-Shot | All | |
time/time | 261 | 5 | 13 | 15 | 5 | 17 | 15 | 22 |
voltage level/time | 1017 | 6 | 9 | 24 | 9 | 16 | 23 | 379 |
transmission line/line | 1328 | 6 | 16 | 32 | 8 | 15 | 26 | 462 |
station/station | 609 | 7 | 12 | 18 | 6 | 14 | 22 | 205 |
organization/org | 678 | 5 | 10 | 23 | 7 | 11 | 20 | 238 |
equipment/equ | 1819 | 6 | 10 | 21 | 9 | 25 | 27 | 743 |
person name/name | 336 | 9 | 11 | 18 | 3 | 8 | 23 | 17 |
address/add | 886 | 6 | 12 | 18 | 5 | 9 | 25 | 311 |
other/other | 306 | 4 | 8 | 18 | 3 | 11 | 11 | 44 |
Masking Strategy | Example |
---|---|
Original text | 拉开10 kV鹿山线鸿森胶合板厂 |
WordPiece Masking | 拉开10 kV鹿山[MASK]鸿森胶合板厂 |
Whole-Word Masking | 拉开10 kV[MASK][MASK][MASK]鸿森胶合板厂 |
Index | Parameter | Value | Index | Parameter | Value |
---|---|---|---|---|---|
1 | Hidden size | 768 | 5 | lr_warmup | 0.1 |
2 | Embedding size | 128 | 6 | random_seed | 42 |
3 | sampling_processes | 4 | 7 | 0.25 | |
4 | eval_batch_size | 8 | 8 | 2 |
ID | Whole- Word Masking | BERT | RoBERTa | Precision | Recall | F1 Score | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
5-Shot | 10-Shot | 20-Shot | 5-Shot | 10-Shot | 20-Shot | 5-Shot | 10-Shot | 20-Shot | ||||
1 | - | √ | - | 58.70 | 58.05 | 60.94 | 41.36 | 49.04 | 53.81 | 48.52 | 53.17 | 57.15 |
2 | - | - | √ | 59.32 | 60.36 | 62.28 | 42.56 | 47.08 | 56.71 | 49.56 | 52.89 | 59.37 |
3 | √ | √ | - | 60.87 | 60.94 | 62.88 | 44.08 | 50.19 | 58.93 | 51.13 | 55.05 | 60.84 |
4 | √ | - | √ | 61.79 | 61.75 | 63.39 | 45.23 | 50.48 | 61.97 | 52.23 | 55.94 | 62.67 |
ID | Model | Precision | Recall | F1 Score | ||||||
---|---|---|---|---|---|---|---|---|---|---|
5-Shot | 10-Shot | 20-Shot | 5-Shot | 10-Shot | 20-Shot | 5-Shot | 10-Shot | 20-Shot | ||
1 | BERT-CRF | 17.62 | 24.19 | 27.79 | 23.52 | 23.70 | 43.45 | 20.14 | 23.94 | 33.90 |
2 | BERT-LSTM-CRF | 29.30 | 30.58 | 39.21 | 10.92 | 19.88 | 44.54 | 15.91 | 24.10 | 41.70 |
3 | NNShot | 17.63 | 19.20 | 22.45 | 26.74 | 36.76 | 39.49 | 21.24 | 25.23 | 23.69 |
4 | StructShot | 29.97 | 32.69 | 34.68 | 24.09 | 29.85 | 30.75 | 26.71 | 31.21 | 32.60 |
5 | FSPD-NER | 61.79 | 61.75 | 63.39 | 45.23 | 50.48 | 61.97 | 52.23 | 55.94 | 62.67 |
ID | Whole-Word Masking | IDCNN | Loss Function | Precision | Recall | F1 Score |
---|---|---|---|---|---|---|
1 | √ | √ | FL | 63.39 | 61.97 | 62.67 |
2 | - | √ | FL | 62.28 | 56.71 | 59.37 |
3 | √ | - | FL | 61.64 | 60.89 | 61.26 |
4 | √ | √ | CE | 62.98 | 60.21 | 61.56 |
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. |
© 2023 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tan, Z.; Chen, Y.; Liang, Z.; Meng, Q.; Lin, D. Named Entity Recognition for Few-Shot Power Dispatch Based on Multi-Task. Electronics 2023, 12, 3476. https://doi.org/10.3390/electronics12163476
Tan Z, Chen Y, Liang Z, Meng Q, Lin D. Named Entity Recognition for Few-Shot Power Dispatch Based on Multi-Task. Electronics. 2023; 12(16):3476. https://doi.org/10.3390/electronics12163476
Chicago/Turabian StyleTan, Zhixiang, Yan Chen, Zengfu Liang, Qi Meng, and Dezhao Lin. 2023. "Named Entity Recognition for Few-Shot Power Dispatch Based on Multi-Task" Electronics 12, no. 16: 3476. https://doi.org/10.3390/electronics12163476
APA StyleTan, Z., Chen, Y., Liang, Z., Meng, Q., & Lin, D. (2023). Named Entity Recognition for Few-Shot Power Dispatch Based on Multi-Task. Electronics, 12(16), 3476. https://doi.org/10.3390/electronics12163476