AI Cybersecurity Lab

Intrusion and anomaly detection, malware analysis, threat intelligence, phishing, security logs and incident response: defensive experiments that really compute in your browser on synthetic data, with algorithms, datasets, projects and quizzes.

28interactive experiments

Gradient boosting (simplified)

Algorithm Library · Algorithm Ensemble Learning Runs in the browser

The idea

Adds small trees sequentially, each correcting the errors of the ensemble so far with a step along the loss gradient.

The problem it addresses

High accuracy on tabular data.

Data it needs

Tabular data.

Equations

F_m(x)=F_{m-1}(x)+\nu\, h_m(x),\quad h_m\approx -\partial L/\partial F_{m-1}

Steps

  1. Start from a constant
  2. Compute residuals (negative gradient)
  3. Fit a small tree to them
  4. Add it with learning rate ν

Pseudocode

gradient-boosting.txt
F = log_odds(y.mean())
for m in range(M):
    r = y - sigmoid(F)
    h = fit_small_tree(X, r)
    F += nu * h.predict(X)

Strengths

  • High accuracy
  • Captures interactions
  • Flexible losses

Limitations

  • Overfits if untuned
  • Sequential training
  • This is a simplified teaching version, not XGBoost/LightGBM

Uses in cybersecurity

  • A strong tabular baseline in security

Common pitfalls

  • Do not compare this simplified implementation with numbers from production libraries.

Suggested datasets

Related experiments

See also

References

  1. Arp, Quiring, Pendlebury, Warnecke, Pierazzi, Wressnegger, Cavallaro, Rieck (2024). Pitfalls in Machine Learning for Computer Security. Communications of the ACM 67(11), pp. 104-112. doi:10.1145/3643456