  Device-to-device (D2D) technology is one of the key research areas in 5G/6G
networks, and full-duplex (FD) D2D will further enhance its spectral efficiency
(SE). In recent years, deep learning approaches have shown remarkable
performance in D2D resource allocation tasks. However, most schemes only model
the channel state information (CSI) as an independent feature, neglecting the
spatial relationships among multiple channels and users within the scenario. In
this paper, we first design an objective function for FD D2D communication
resource allocation, which aims to maximize the SE of D2D users while ensuring
the minimal required SE of cellular users. Then, considering the complex CSI
constituted by all the users in different channels as a three-dimensional
vector, a centralized resource allocation model based on multi-dimensional
spatial convolutional networks and attention mechanisms (SP-Conv-Att) is
proposed. To alleviate the burden of base station, we develop two distributed
models, Dist-Att and Dist-Att-Conv, to facilitate users to perform channel and
power allocation locally, based on attention and multi-user convolutional
networks respectively. Numerical results demonstrate that our models outperform
traditional schemes and recent deep neural network models, significantly
approximating the optimal solution computed by exhaustive algorithm with
extremely low latency.
