A trust management system (TMS) is an integral component of any IoT network. A reliable trust management system must guarantee the network security, data integrity, and act as a referee that promotes legitimate devices, and punishes any malicious activities. Trust scores assigned by TMSs reflect devices' reputations, which can help predict the future behaviours of network entities and subsequently judge the reliability of different entities in IoT networks. Many TMSs have been proposed in the literature, these systems are designed for smallscale trust attacks, and can deal with attacks where a malicious device tries to undermine TMS by spreading fake trust reports. However, these systems are prone to large-scale trust attacks. To address this problem, in this paper, we propose a TMS for large-scale IoT systems called Trust2Vec, which can manage trust relationships in large-scale IoT systems and can mitigate largescale trust attacks that are performed by hundreds of malicious devices. Trust2Vec leverages a random-walk network exploration algorithm that navigates the trust relationship among devices and computes trust network embeddings, which enables it to analyze the latent network structure of trust relationships, even if there is no direct trust rating between two malicious devices. To detect large-scale attacks, such as self-promoting and bad-mouthing, we propose a network embeddings community detection algorithm that detects and blocks communities of malicious nodes. The effectiveness of Trust2Vec is validated through large-scale IoT network simulation. The results show that Trust2Vec can achieve up to 94% mitigation rate in various network settings.