aibuildai-inc/aibuildai-llm-posttrain-agent/ensemble

Claude Code and agent skill by aibuildai-inc/aibuildai-llm-posttrain-agent

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Catalog of ensemble techniques in ML/DL. Sixteen methods grouped into four orthogonal spaces: weight-space (parameter averaging into one model), prediction-space aggregation (combining outputs of N models), data / pipeline (input or fold variation), and model-space / meta (heterogeneous combinations). Each principle file covers one method or concept: precise definition, mechanism, pros, cons, when to use, common misconceptions. Task-agnostic — applies across classification, segmentation, detect…

Install

npx vskill@latest install aibuildai-inc/aibuildai-llm-posttrain-agent/ensemble

SKILL.md

Ensemble Techniques Playbook

Pipeline contract (read first). In this pipeline each design trains exactly one model on the full training set — there is NO k-fold inside one design and NO per-design out-of-fold (OOF) predictions. The Aggregator ensembles across designs by combining each design's raw_test predictions (probability averaging, weighted blend, rank averaging, or voting — prediction-space methods 5–8). Methods that assume folds inside one design or an OOF matrix — K-Fold CV Ensemble (12) and OOF-trained stacking / blending (15, OOF-driven weights in 7) — do NOT apply here; OOF does not exist, so blend weights are tuned on the manager's global holdout or set uniformly, never on per-design OOF. Within-run weight-space methods (snapshot, SWA, EMA, last-K) remain available to the Coder for the single training run.

Ensemble methods improve generalization by combining multiple views of a model (its weights at different iterates), multiple models (their predictions), or multiple training pipelines (different data, different architectures). The gains come from error decorrelation, not from model count — combining N models that make the same mistakes gives you no improvement.

This playbook catalogs sixteen techniques. They fall naturally into four spaces based on where averaging happens. The spaces are orthogonal, so a single pipeline can stack techniques from several spaces multiplicatively.

The Four Spaces

  • Weight-space — average parameters across training iterates to produce a single deployable model. Inference cost stays at one forward pass. Mechanism: SGD explores a region around a minimum, and the average parameter vector sits in a flatter, more generalizable minimum than any single iterate.
  • Prediction-space aggregation — keep N already-trained models and combine their outputs at inference time. Inference cost scales linearly with N. The choice of combining rule (mean, vote, weighted, rank) depends on whether probabilities are calibrated and what the metric rewards.
  • Data / pipeline — generate multiple views of each input (augmented, rescaled, cropped) and average predictions across views (TTA / multi-scale / multi-crop). Training cost is either zero or a by-product of inference. (The "train multiple fold models" variant — K-Fold CV ensemble — does not apply in this single-model-per-design pipeline; combining across designs is the Aggregator's job.)
  • Model-space / meta — combine learners that differ in training data, fitting procedure, or architecture. The theoretical grounding is the Krogh-Vedelsby ambiguity decomposition: ensemble error equals average member error minus member disagreement, so diversity is the load-bearing property.

Principle Index

#MethodSpaceWhen to consultFile
1Snapshot EnsemblingWeight-spaceConsidering cyclic-LR restarts and saving per-cycle checkpointsprinciples/01.md
2Stochastic Weight Averaging (SWA)Weight-spaceConsidering parameter averaging over a late-training plateauprinciples/02.md
3Last-K Checkpoint AveragingWeight-spaceConsidering averaging the last K checkpoints as a cheap weight-space ensembleprinciples/03.md
4EMA (Exponential Moving Average of Weights)Weight-spaceConsidering an EMA "shadow" teacher alongside the optimizerprinciples/04.md
5Probability Averaging (Soft Voting)Prediction-spaceCombining probability / soft-mask outputs across models, folds, or TTA viewsprinciples/05.md
6Majority Voting (Hard Voting)Prediction-spaceCombining already-thresholded discrete predictionsprinciples/06.md
7Weighted AveragingPrediction-spaceAssigning non-equal weights to ensemble members (e.g., OOF-driven)principles/07.md
8Rank AveragingPrediction-spaceCombining uncalibrated or scale-mismatched member outputsprinciples/08.md
9Test-Time Augmentation (TTA)Data / pipelineChoosing which inference-time augmentation views to averageprinciples/09.md
10Multi-Scale EnsembleData / pipelineRunning inference at multiple input resolutions and averagingprinciples/10.md
11Multi-Crop EnsembleData / pipelineAveraging over multiple spatial crops at inferenceprinciples/11.md
12K-Fold CV EnsembleData / pipelineCombining fold models vs. retraining on all dataprinciples/12.md
13Bagging (Bootstrap Aggregating)Model-spaceConsidering bootstrap resampling for ensemble diversityprinciples/13.md
14BoostingModel-spaceConsidering sequential error-driven ensembling (GBM / XGBoost / LightGBM)principles/14.md
15Stacking and BlendingModel-spaceTraining a meta-learner on base-model predictionsprinciples/15.md
16Cross-Architecture (Heterogeneous) EnsembleModel-spaceCombining models from different architectural familiesprinciples/16.md
—Pitfalls That Silently Destroy Ensemble GainsCross-cuttingAlways consult before committing an ensemble designprinciples/17.md
—How to Combine Methods Across SpacesCross-cuttingStacking techniques from multiple spaces into one pipelineprinciples/18.md

How to Use

Read only the principles whose "When to consult" condition matches your current decision. The absolute paths of each principle file are listed in the fetch rule that follows. Always read principle 17 (pitfalls) before committing to an ensemble design — most of the value of this playbook comes from avoiding the listed failure modes.

The method principles are self-contained paragraphs. Pick any one and you can use it as a design-level decision without reading the rest.

References (primary sources, verified)

Weight-space: Huang et al. 2017 (Snapshot Ensembles, arXiv:1704.00109); Izmailov et al. 2018 (SWA, arXiv:1803.05407); PyTorch torch.optim.swa_utils docs; timm model-EMA docs.

Prediction-space: scikit-learn Ensemble docs (VotingClassifier, VotingRegressor); Caruana et al. 2004 (Ensemble Selection, ICML).

Data / pipeline: Simonyan & Zisserman 2014 (VGG, arXiv:1409.1556, multi-scale evaluation); He et al. 2015 (ResNet, arXiv:1512.03385, 10-crop testing); albumentations, ttach, MMEngine TTA docs; scikit-learn cross-validation docs.

Model-space: Breiman 1996 (Bagging Predictors); Freund & Schapire 1997 (AdaBoost); Wolpert 1992 (Stacked Generalization); Krogh & Vedelsby 1995 (ambiguity decomposition, NIPS 7); scikit-learn BaggingClassifier, StackingClassifier, GradientBoostingClassifier docs.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
111
Repository forks
20
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/aibuildai-inc/aibuildai-llm-posttrain-agent/ensemble/badge)](https://verified-skill.com/skills/aibuildai-inc/aibuildai-llm-posttrain-agent/ensemble)

Something wrong with this skill or its page? Tell us.