Search code examples
machine-learningnlp

When are hybrid models more effective than pure ML models in NLP?


In NLP, rule-based approaches do not work well because language changes at a fast rate and it's difficult to capture all the forms using formal rules. Machine learning has proved to be more effective in learning languages. However, there also exists a class of hybrid models that combine rule-based and machine learning approaches. In what situations do these hybrid models outperform pure ML approaches, and why do they do so?


Solution

  • One example that I could give is probably Automatic Keyphrase Extraction. Here, evaluation studies of human preferences for keyphrases (such as this one), combined with the analysis of manually labeled tags, have shown that most keyphrases indeed follow a relatively specific pattern of only containing certain PoS tags (JJ* NNP*).

    For a purely ML-based approach, most data would likely be generated into n-grams, and then ranked by a ML system. However, since we know roughly what preferences users are going to have, most systems have pre-processing steps that sort out n-gram candidates based on their PoS tags, or even keeping only adjectives and noun phrases to begin with.
    This greatly reduces the number of possible candidates to rank by importance, which in turn increases the accuracy of an ML system.

    While I'm not an expert about approaches in other fields, I would argue that this is the general rule of thumb: If a rule-based system can incorporate prior knowledge about your expectations for results, then it is always a good idea to employ it in order to reduce the complexity of a ML task.