  Representation Learning (RL) plays a pivotal role in the success of many
problems including cyberattack detection. Most of the RL methods for
cyberattack detection are based on the latent vector of Auto-Encoder (AE)
models. An AE transforms raw data into a new latent representation that better
exposes the underlying characteristics of the input data. Thus, it is very
useful for identifying cyberattacks. However, due to the heterogeneity and
sophistication of cyberattacks, the representation of AEs is often
entangled/mixed resulting in the difficulty for downstream attack detection
models. To tackle this problem, we propose a novel mod called Twin Auto-Encoder
(TAE). TAE deterministically transforms the latent representation into a more
distinguishable representation namely the \textit{separable representation} and
the reconstructsuct the separable representation at the output. The output of
TAE called the \textit{reconstruction representation} is input to downstream
models to detect cyberattacks. We extensively evaluate the effectiveness of TAE
using a wide range of bench-marking datasets. Experiment results show the
superior accuracy of TAE over state-of-the-art RL models and well-known machine
learning algorithms. Moreover, TAE also outperforms state-of-the-art models on
some sophisticated and challenging attacks. We then investigate various
characteristics of TAE to further demonstrate its superiority.
