learn/model families
Stacked ensemble
A stacked ensemble is a group of different kinds of prediction models whose answers are passed to one more model, which learns how far to trust each of them.
What it is
A model, in this setting, is a piece of software that has been shown many past examples and has worked out a rule for turning a new case into a prediction. Different kinds of model use different kinds of rule: one may draw straight dividing lines, another may ask a branching series of yes-or-no questions, another may weigh the case against its nearest neighbours. Each kind has its own blind spots. A stacked ensemble trains several of these different kinds on the same problem, then trains a further, usually simple, model on top. The top model takes the members' predictions as its input and learns which member to believe, and when.
The members are deliberately unalike. That is the point, and it is what separates stacking from two other familiar arrangements. A random forest grows many decision trees, and a boosted ensemble builds many small models in sequence, but in both cases the members share one shape and so tend to go wrong in similar ways. Stacking mixes shapes, so that where one member is weak another may be strong. The top model is fitted on predictions made for cases the members did not learn from, otherwise it would simply reward whichever member had memorised the training data best.
Why scientists use it
Scientists reach for stacking when no single kind of model is clearly the right one. That is common when the data are rich but the examples are few, which happens often in biology and in laboratory measurement. Rather than running a contest and keeping the winner, stacking keeps the contestants and lets a further model work out how to combine them. It stands in for a judgement a researcher would otherwise have to make by hand: this model seems more reliable for this sort of case, that one for another sort.
It also offers some protection against luck. A single model chosen because it scored best on one split of the data may have been flattered by that split. Averaging across members that fail differently tends to give steadier performance on new cases. The same reasoning applies whether the cases are protein sequences, electrical measurements from a material, or anything else where several reasonable modelling choices exist and none is obviously correct.
In the record
Limits
Stacking cannot create information the members do not have. If every member leans on the same features and fails on the same cases, combining them changes little. It adds cost, both in fitting and in explaining: a prediction now rests on several rules plus a rule about rules, which is hard to inspect. The top model can also learn to trust a member that only looked good because of how the data were split, so apparent gains may not survive on genuinely new cases.
Written by AIxSci: the background from general knowledge, the examples from checked records.
By field
Every article
aix-00273
Deep learning model flags bacterial proteins likely to drive infection
aix-00133
Regression models predict how graphene loading changes aluminium's electron emission
aix-00188
Machine learning sorts antibody heavy chains by the germ they target
aix-00112
Protein language model embeddings tested against classical descriptors for spotting resistance genes
aix-00107