面向煤矿安全生产领域实体识别的研究

Research on Entity Recognition for Coal Mine Safety Production

  • 摘要: 针对煤矿安全生产领域实体识别中术语专业性强、实体边界模糊等特点引起的标注困难的问题,提出一种混合实体识别模型。该模型以中文RoBERTa为基础,通过冻结前6层参数并加权融合最后4层隐藏状态,来解决预训练模型中底层通用特征与顶层任务特化特征之间的表示能力平衡问题。在特征提取阶段,模型采用并行与串行结合的结构:上下文增强模块与注意力特征金字塔网络并行提取多尺度局部特征。前者原地优化RoBERTa特征后直接参与后续融合;后者输出的多尺度特征经Transformer层进一步建模全局依赖关系;随后通过双层门控模块与三层双向LSTM实现多源特征的动态融合,提升实体边界识别精度。损失函数由实体感知Focal Loss、增强边界损失与转移损失三项加权构成,分别用于缓解实体类别不均衡、强化实体边界识别、约束B-I标签序列的合法性。在自建数据集上的实验中,模型精确率达87.73%、召回率86.79%、F1值87.26%,相比主流模型实现了更优的识别精度与召回平衡,显著缓解了矿井安全文本中实体边界模糊与低资源实体识别困难的问题。

     

    Abstract: To address the challenges in annotation arising from highly specialized terminology and ambiguous entity boundaries in the field of coal mine safety production, we propose a hybrid entity recognition model. Based on Chinese RoBERTa, this model resolves the representation balance issue between the general features of the lower layers and the task-specific features of the upper layers in the pre-trained model by freezing the parameters of the first six layers and weighting the fusion of the hidden states from the last four layers. During the feature extraction phase, the model employs a hybrid structure combining parallel and serial processing: the context enhancement module and the attention-based feature pyramid network extract multi-scale local features in parallel. The former directly participates in subsequent fusion after optimizing RoBERTa features in situ; the latter’s multi-scale features are further processed through Transformer layers to model global dependencies; Subsequently, a two-layer gating module and a three-layer bidirectional LSTM achieve dynamic fusion of multi-source features, enhancing the accuracy of entity boundary recognition. The loss function is composed of three weighted components: entity-aware Focal Loss, enhanced boundary loss, and transfer loss, which are used to mitigate entity category imbalance, strengthen entity boundary recognition, and constrain the validity of B-I label sequences, respectively. In experiments on our self-built dataset, the model achieved a precision of 87.73%, a recall of 86.79%, and an F1 score of 87.26%. Compared to mainstream models, it demonstrates a superior balance between precision and recall, significantly alleviating the challenges of ambiguous entity boundaries and the difficulty in identifying low-resource entities in mine safety texts.

     

/

返回文章
返回