← 返回學院
A computing educator and two adult learners trace a small resource-review decision tree while a learner holds a notebook with a matching diagram.
AI 知識核心2026年9月5日· 2 分鐘

Decision Trees and Rule-Based Models

How decision trees turn features into explicit branches, and why a readable rule still needs evidence, boundary checks, and a clear educational purpose.

decision treesrule-based modelsinterpretability

來源

完整課程摘要

A decision tree makes a prediction by following a sequence of tests. Each internal node asks a question about a feature, each branch represents an answer, and a terminal node supplies a predicted class or value. A small tree can be read as a set of if–then rules. This makes its decision path inspectable, although inspectability alone does not establish that the prediction is accurate, fair, or educationally meaningful.

A learned tree and a hand-written rule system have different origins. In a learned tree, an algorithm selects splits from training data according to a criterion such as reduction in impurity or prediction error. In a hand-written system, people specify the rules directly. Both can be useful, but their evidence needs differ. A learned threshold may reflect patterns in a sample; a policy threshold may express an institutional decision. Neither should be presented as a natural law simply because it appears in a clear diagram.

Consider a resource-routing tool that asks whether a lesson includes audio and whether a checked transcript is available. A human-authored rule might route audio without a transcript to an accessibility review queue. The rule is transparent because the relevant condition and action are visible. By contrast, a tree trained to predict teacher ratings might split on resource length or file size. That path describes the model's association with ratings; it does not explain why a resource supports learning or prove that changing its length will improve it.

Tree complexity needs control. Repeated splitting can create branches that fit a few unusual training examples and fail on new resources. Limiting depth, requiring enough observations at a leaf, or pruning branches can reduce this risk. A very shallow tree may miss important interactions, so simplicity should be evaluated rather than assumed sufficient. Small changes in data can sometimes produce quite different trees. Testing stability and reviewing borderline cases help reveal how dependable the apparent rules are.

Readable models are valuable because people can challenge their inputs and paths. A teacher can ask whether a missing value was treated sensibly, whether a proxy feature is appropriate, or whether a branch sends some users to a burdensome process. Cynthia Rudin argues for considering inherently interpretable models in consequential decisions rather than relying solely on explanations of opaque models. This is a design argument, not proof that every tree is preferable to every other method. Very large trees can become difficult to understand in practice.

A classroom activity can compare a small hand-written routing tree with a tree learned from synthetic ratings. Learners trace several cases, identify edge conditions, and explain which rules are policies and which are statistical patterns. They then propose independent evaluation cases. The goal is to connect transparency with responsibility: a visible rule makes inspection possible, but the institution still has to justify the target, data, threshold, action, and route for correcting an inappropriate result.