Guides
Tabular data: gradient boosting vs. MLP, and when to use which
For a table of rows and columns, gradient-boosted trees are usually the stronger first model, and a multi-layer perceptron (MLP) is the more flexible one. Which one wins depends on your data, so the useful question is how to find out quickly and fairly.
The short answer
Start with gradient boosting. It needs little preparation and little tuning, copes with features on very different scales and finds interactions between columns by itself. Try an MLP next to it when the table is large, when the relationship is smooth, when you need several outputs at once, or when the table is only one of the inputs, next to an image or a text. Then compare both on the same held-out rows.
How each model sees a table
Gradient boosting builds decision trees one after the other, each correcting the errors of the trees before it. A tree splits on one column at a time (“rainfall above 41 mm”), so the scale of a column does not matter, a few extreme values do no harm, and a step in the data is easy to represent. Outside the range of the training data, a tree predicts the value of its outermost leaf: it does not extrapolate.
An MLP multiplies the standardised features by weights, adds them up and passes the result through non-linear activations, layer after layer. It represents smooth relationships well and learns from all columns at once, but it needs numbers on comparable scales, enough rows to fit its weights, and settings such as the learning rate and the number of epochs.
Side by side
| Question | Gradient boosting | MLP |
|---|---|---|
| Preparation | Fill in missing values and encode categories (in the Data tab); no scaling needed | The same; features are standardised by the training (mean 0, standard deviation 1) |
| Rows | Up to 1,000,000 training rows, time about linear in the rows | Any number, in batches; profits from many rows |
| Settings to tune | Learning rate, leaves per tree, rows per leaf; good defaults | Layer sizes, learning rate, batch size, epochs, dropout |
| Training | Fitted once, in seconds to minutes | Epoch by epoch, with curves and early stopping |
| Rare classes | class_weight balanced | Weighted cross-entropy or focal loss |
| Several targets, other inputs | One target | Several outputs; can be one branch of a larger network |
| Export | scikit-learn script and fitted pipeline (.joblib) | PyTorch script and weights (.pt) |
Compare them on the same rows
A comparison is only fair when both models learn from the same training rows and are judged on the same rows they never saw. In Brick DNN that is what a prepared dataset gives you:
Prepare the table once
Import the file in the Data tab, choose the target, and add steps for missing values, outliers, categories and dates. Every row is assigned to training, validation or test once, and steps that learn values (a median, a scaling) learn them from the training rows only.
Create the training dataset
Create training dataset saves the prepared table with its split. Both models will use this split instead of a random one of their own.
Train gradient boosting
Open the gradient boosting example (or its regression brick), choose the dataset and train. The Input adapts to the number of features. A hyperparameter search with cross-validation on the training rows tunes the trees without touching the validation rows.
Train an MLP
Open the tabular MLP example, or start from an empty canvas: choosing the dataset there starts a small network for it (Input → Linear → ReLU → Linear). Turn on early stopping and train.
Compare the test numbers
Compare on the test rows, not on the validation rows that picked the epoch or the trial: balanced accuracy, macro F1 or PR AUC for classes, RMSE and R² for a number. The History tab keeps both runs, each with the exact network that was trained.

Tune both, briefly
Untuned defaults favour gradient boosting, because its defaults are good for most tables. Give the MLP a short random search over learning rate and batch size; give the trees one over the learning rate, the leaves per tree and the rows per leaf. Rank both searches by the metric you will report, not by the loss.

Which one, then?
- Gradient boosting when the table is small or medium, has columns of mixed scales and meaning, contains thresholds and steps, or when you need a strong result quickly.
- An MLP when the table is large and the relationship smooth, when it must predict several targets at once, when it has to extrapolate a little beyond the training range, or when the table is one input of a network that also sees images or text (see the multi-input example).
- Both: a hybrid network lets an MLP learn features for gradient boosting, and a voting or stacking ensemble combines several classical models.
Look at what the winner learned
Explain the model under a finished run works for both kinds: permutation importance shows how much the validation score drops when one column is shuffled, and Shapley values show how each feature pushed one prediction. If the two models rely on very different columns, look at the data again before trusting either.

Examples to start from
Gradient boosting classifier
Gradient-boosted trees classify rows of 30 features; balanced class weights for rare classes.
Tabular regression
Predicts one number from 8 numeric features; the script trains on a CSV file.
MLP features for gradient boosting
An MLP learns 32 features, then gradient-boosted trees are fitted on them and predict the class.
More guides
Build a neural network without code and export it to PyTorch
Connect layers on a canvas, let Brick DNN check every shape, and download a PyTorch script that runs on its own.
Image segmentation with a U-Net: from masks to a trained model
From a ZIP file of images and masks to a trained U-Net, with mean IoU, Dice and the predicted masks.
Imbalanced classes: class weights, focal loss, oversampling and the decision threshold
Why accuracy misleads when one class is rare, and the four levers against it: weights, focal loss, oversampling and the threshold.
GDPR-compliant deep learning: training neural networks with data in Europe
Which data needs care under the GDPR, where brickdnn.com stores and trains in Switzerland, and what to do with data that has to stay personal.
Common PyTorch shape errors and how to fix them
The exact messages of the most common PyTorch shape errors, what causes each one and how to fix it.