  Inter-carrier interference (ICI) and noise mitigation is crucial for precise
signal detection in underwater acoustic (UWA) differential orthogonal frequency
division multiplexing (DOFDM) communication systems. In this paper, we adopt
the Transformer to design a detector, referred to as the TransDetector, which
can dramatically mitigate ICI implicitly and noise explicitly, even without
requiring any pilot. Compared with the standard Transformer, we come up with
three creative designs. Firstly, we break the inner-encoder computation
paradigm of the multi-head attention (MHA) in the standard Transformer, and
design a brand new inter-encoder attention mechanism, referred to as the
interactive MHA, which can significantly improve the performance, as well as
accelerate the convergence rate. Secondly, to reduce the noise component
attached to the received signal, we design an auto-perception denoising
structure, which allows the network to learn the noise distribution in received
signals. Thirdly, to better match the characteristics of DOFDM signals and
selectively focus on the data at specified locations, we propose a trapezoidal
positional encoding (PE), instead of adopting the original sine-cosine PE in
the Transformer. Experimental results on both the realistic underwater channel
and the simulation channel show that the TransDetector outperforms the
classical $\mathcal{X}$-FFT algorithms and the DNNDetector in terms of the BER
and the MSE. For example, the BER achieved by the TransDetector is reduced by
$27.21\%$ and $12.50\%$ when the signal-to-noise ratio $(\text{SNR})=0$~dB and
by $47.44\%$ and $33.49\%$ when $\text{SNR}=20$~dB against the PS-FFT and the
DNNDetector based on the realistic channel, respectively.
