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

Autoencoder

Algorithm Library · Algorithm Unsupervised Learning Runs in the browser

The idea

A network that compresses the input to a small code and reconstructs it; a large reconstruction error signals an unseen pattern.

The problem it addresses

Anomaly detection in higher-dimensional data.

Data it needs

Scaled tabular data.

Equations

\operatorname{score}(x)=\lVert x-g(f(x))\rVert_2^2

Steps

  1. Train on normal data
  2. Reconstruct each sample
  3. Record the reconstruction error

Pseudocode

autoencoder.txt
z = relu(x @ We); xhat = z @ Wd
score = ((x - xhat)**2).sum()

Strengths

  • Captures non-linear relations

Limitations

  • May also reconstruct anomalies well
  • Training-sensitive

Uses in cybersecurity

  • Session-behaviour anomalies

Common pitfalls

  • A small network here; do not compare it with production deep models.

Suggested datasets

Related experiments

References

  1. Chandola, Banerjee, Kumar (2009). Anomaly detection: A survey. ACM Computing Surveys 41(3), pp. 1-58. doi:10.1145/1541880.1541882