Dynamic graphs represent connections in complex systemschanging over time, posing unique challenges for anomaly detection. Tra-ditional static graph models and shallow dynamic graph methods oftenfail to capture the temporal dynamics and interactions effectively, limit-ing their ability to detect anomalies accurately. In this work, we introducethe Attribute Encoding Transformer (AET), a novel framework specif-ically designed for anomaly detection in unattributed dynamic graphs.The AET integrates advanced encoding strategies that leverage bothspatial and historical interaction data, enhancing the model’s ability toidentify anomalous patterns. Our approach includes a Link PredictionPre-training methodology that optimizes the transformer architecturefor dynamic contexts by pre-training on link prediction tasks, followedby fine-tuning for anomaly detection. Comprehensive experiments onfour real-world datasets demonstrate that our framework outperformsthe state-of-the-art methods in detecting anomalies, thereby addressingkey challenges in dynamic graph analysis. This study not only advancesthe field of graph anomaly detection but also sets a new benchmark forfuture research on dynamic graph data ana