The CN2 Induction Algorithm

Peter Clark, Tim NiblettMachine Learning 1989

Introduction

In the late 1980s, the field of machine learning faced a significant divide in automated knowledge acquisition. Researchers typically relied on two distinct methodologies: decision tree induction, exemplified by the ID3 algorithm, and rule-based induction, exemplified by the AQ family of algorithms. While ID3 was praised for its ability to handle "noisy" or inconsistent data through pruning, the resulting trees were often difficult for human experts to interpret or modify. Conversely, the AQ family produced highly readable "if-then" rules but suffered from extreme brittleness; by attempting to find rules that were 100% consistent with training data, AQ frequently overfit the noise, leading to poor performance on unseen data.

The CN2 algorithm was developed to bridge this gap, combining the human-readable representation of rule-based systems with the robust noise-handling capabilities of decision trees.

The Problem: Consistency vs. Generalization

The primary challenge in induction from real-world data is the presence of noise—errors in attribute values or class labels. The AQ algorithm's requirement for "perfect consistency" meant that it would create increasingly complex rules to account for every outlier in a training set. In contrast, researchers realized that in noisy domains, a rule that is 70% accurate but covers 100 examples is often more valuable and generalizable than a rule that is 100% accurate but only covers two examples.

The CN2 Approach

CN2 functions as a hybrid system, adopting the beam search strategy of the AQ family but modifying the search and evaluation criteria to prioritize statistical significance over perfect consistency.

Unlike AQ, which begins with a specific "seed" example and builds a rule around it, CN2 performs a general-to-specific search. It examines all possible attribute tests to identify the most promising conjunctions (e.g., if Age > 40 AND Smoker = Yes). By removing the dependence on a specific seed, CN2 can explore a broader space of potential rules, allowing it to identify patterns that are statistically significant rather than just locally consistent.

2. Heuristic Evaluation and the Significance Cutoff

To manage noise, CN2 employs two primary heuristic functions:

  • Entropy: This measures the predictive power of a rule, seeking conjunctions that highly correlate with a specific class.
  • Likelihood Ratio Statistic: This serves as a significance test. It asks whether the distribution of classes covered by a rule is significantly different from what would be expected by random chance. If a rule fails to meet a certain significance threshold, the algorithm stops specializing it, effectively pruning the search space before overfitting occurs.

3. Representation: Ordered Decision Lists

The output of CN2 is an ordered decision list. To classify a new instance, the system evaluates rules in sequence; the first rule that matches the instance "fires," and its prediction is used. If no rules match, a default rule—typically predicting the most common class in the training set—is applied.

Experimental Evaluation

The authors evaluated CN2 against several benchmarks, including ID3 (specifically the ASSISTANT variant), AQR (a reconstruction of the original AQ algorithm), and a simple Bayesian classifier. The testing involved two types of data:

  • Medical Domains: Three classic datasets (Lymphography, Breast Cancer, and Primary Tumor) from the University Medical Center in Ljubljana. These datasets are characterized by missing values and inconsistent attributes.
  • Synthetic Domains: Artificial datasets where the authors could precisely control noise levels from 0% to 100% to observe the breakdown points of each algorithm.

Key Insights and Results

Robustness and Simplicity

CN2 demonstrated a superior ability to produce simple, effective models in the face of noise. In the Lymphography domain, CN2 achieved an accuracy of 82%, comparable to its rivals, but with significantly less complexity. While the AQ-based system generated rules containing 76 selectors, CN2’s most pruned version achieved its results using only 12 selectors. This reduction in complexity directly translates to better human interpretability.

Performance Under Noise

Synthetic tests revealed that as noise increased, CN2’s accuracy degraded gracefully. In contrast, the performance of the standard AQ algorithm plummeted because it attempted to "learn the noise," creating overly specific rules for random fluctuations in the data. Furthermore, the authors noted that in some domains, such as Breast Cancer, a simple default rule performed nearly as well as complex algorithms, highlighting that some datasets contain very little learnable signal.

Limitations and Future Directions

Despite its successes, the authors identified several areas for improvement:

  • Significance Thresholds: The likelihood ratio test was not infallible. In tests with 100% noise (pure randomness), CN2 still occasionally "discovered" rules it deemed significant, suggesting a need for more sensitive measures.
  • Rule Ordering: While ordered decision lists are efficient, they can be difficult to interpret in isolation, as the meaning of a rule depends on the rules preceding it. The authors suggested that future work should explore the generation of unordered rule sets.
  • Attribute Processing: The initial version of CN2 used a relatively simple method for handling continuous attributes by pre-discretizing them, a process that could be refined in later iterations.

Conclusion

CN2 represents a landmark shift in rule induction by demonstrating that abandoning the requirement for perfect consistency can lead to more robust and interpretable models. By integrating statistical significance into the search process, CN2 successfully brought the noise-tolerance of decision trees to the intuitive format of rule-based learning.

Summary updated

BibTeX
@article{clark1989cn,
  author = {Peter Clark and Tim Niblett},
  title = {{The CN2 Induction Algorithm}},
  journal = {Machine Learning},
  year = {1989},
  doi = {10.1007/bf00116835},
}
Figure