TabMEnsembleLayer<T>
Layers · AiDotNet.NeuralNetworks.Layers
TabM ensemble MLP (Gorishniy et al. 2024, “TabM: Advancing Tabular Deep Learning with
Parameter-Efficient Ensembling”): an MLP whose linear layers are BatchEnsembleLayer
(k members sharing one weight matrix via per-member rank-1 r/s adapters). The input is tiled once
across the k members, each member runs through the full MLP, and the per-member predictions are
averaged into a single output.
Inheritance: LayerBase<T> → TabMEnsembleLayer<T>
Implements: IShapeContract
How It Works
Implemented as one composite layer (held in a model’s Layers list like any other layer).
The batch is expanded to [batch * k, .] once by the first BatchEnsemble layer; subsequent
layers use ForwardExpanded so the member axis persists without
re-tiling, and the final layer’s AverageMembers collapses it.
All sub-layers are registered via RegisterSubLayer and the forward is
all tape-recorded Engine ops, so gradients flow to every member’s adapters and the shared weights.
Feature count adapts to the fed input width via a rebuild. Output: [batch, outputDim].
Constructors
| Constructor | Summary |
|---|---|
TabMEnsembleLayer(int numFeatures, int[] hiddenDimensions, int outputDim, int numMembers) |
Initializes a new TabMEnsembleLayer. |
Properties
| Property | Summary |
|---|---|
bool SupportsTraining { get; } |
Methods
| Method | Summary |
|---|---|
IReadOnlyList<ILayer<T>> GetSubLayers() |
|
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank) |
|
void ResetState() |
|
void UpdateParameters(T learningRate) |