Evaluating Semantic Rationality of a Sentence: A Sememe-Word-Matching Neural Network Based on HowNet

Shu Liu, Jingjing Xu, Xuancheng Ren · OpenReview

Introduction

In the field of Natural Language Processing (NLP), distinguishing between grammatical correctness and semantic rationality remains a significant challenge. As Noam Chomsky famously demonstrated with the sentence "Colorless green ideas sleep furiously," a sentence can adhere perfectly to syntactic rules while remaining entirely nonsensical. This paper addresses the task of Sentence Semantic Rationality Detection (SSRD), aiming to automatically identify sentences that violate common sense or selectional restrictions.

Traditional metrics like BLEU or standard language models often fail this task. Language models prioritize the frequency of word sequences rather than their logical coherence, while similarity metrics require human-authored references. To bridge this gap, we propose the Sememe-Word-Matching Neural Network (SWM-NN), which leverages fine-grained semantic knowledge to evaluate rationality.

The Role of Sememes and HowNet

The core innovation of our approach lies in the use of sememes—the smallest, indivisible units of semantic meaning. We utilize HowNet, a comprehensive Chinese knowledge base where words are decomposed into their constituent sememes.

Hierarchical representation of word meanings in HowNet using sememes.

As shown in Figure 1, a word like "apple" can have multiple "senses" (e.g., a fruit or a computer brand). Each sense is defined by a set of sememes. For instance, the "fruit" sense might include sememes like {fruit, juicy}, while the "brand" sense involves {computer, specific brand}. By analyzing these atomic units, a model can reason about the compatibility of concepts more effectively than by using word-level embeddings alone.

SWM-NN Architecture

The SWM-NN architecture is designed to capture both broad contextual information and fine-grained semantic dependencies. It consists of two parallel paths that converge into a final classification layer.

The dual-path architecture of the Sememe-Word-Matching Neural Network (SWM-NN).

1. Word-Level Attention Bi-LSTM

This component processes the entire sentence to capture global context. It employs a local attention mechanism to identify specific words that may cause semantic friction within the sentence structure.

2. Sememe-Level Matching & Attention

This path addresses the polysemy problem. Since a word's rationality depends on its specific meaning in context, the model uses a matching mechanism (global attention) to select the most relevant sense from HowNet based on the surrounding words. It then aggregates the sememe representations to evaluate conceptual "fit" across the sentence.

Experimental Evaluation

To evaluate the model, we constructed a large-scale SSRD dataset containing 200,000 sentences. Negative (irrational) samples were generated through controlled permutations, such as swapping words of the same Part-of-Speech (POS) or using n-gram models, ensuring that the sentences remained fluent but became semantically nonsensical.

Key Results

The SWM-NN demonstrated superior performance compared to several baselines:

  • Accuracy: SWM-NN achieved 68.9%, significantly outperforming standard Bi-LSTMs (63.5%) and N-gram models (53.2%).
  • Ablation Insights: Removing the matching mechanism led to a decrease in accuracy, confirming that context-aware sense selection is critical. Furthermore, the exclusion of word-level context resulted in a 9.6% performance drop, indicating that sememes must be interpreted within the sentence's structural framework.
  • Human Performance: Human annotators achieved an accuracy of 94.4%, highlighting a substantial "intelligence gap" and suggesting ample room for future improvement in automated SSRD.

Conclusion

The SWM-NN represents a significant step toward teaching machines to understand the "logic" of language rather than just its patterns. By integrating sememe-level knowledge from HowNet, the model can detect subtle semantic inconsistencies that elude traditional NLP systems. Future work will focus on expanding knowledge base coverage and applying SSRD to improve the reliability of generative models by filtering out irrational outputs.

Summary updated

BibTeX
@misc{liu2018evaluating,
  author = {Shu Liu and Jingjing Xu and Xuancheng Ren},
  title = {{Evaluating Semantic Rationality of a Sentence: A Sememe-Word-Matching Neural Network Based on HowNet}},
  year = {2018},
  eprint = {1809.03999},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1809.03999},
}
Figure