We have applied probabilistic inversion using a transdimensional hierarchical model to ocean-acoustic reflection measurements to recover shallow sediment structure including sound-velocity dispersion, frequency-dependent attenuation, and their uncertainties. Parameter and uncertainty inferences were obtained from Markov-chain simulations using the Metropolis-Hastings algorithm for transdimensional models where the number of sediment layers is unknown. Transdimensional algorithms often exhibit slow convergence that is greatly exacerbated by computationally intensive data predictions. Advances were made to improve the performance of Markov-chain simulation and data prediction. Chain-mixing across dimensions was addressed using a tempered sequence of interacting Markov chains, which substantially improves convergence rates. The acoustic recordings were processed to give seabed reflection coefficients as a function of frequency, grazing angle, and integration time (penetration depth). Such reflection-coefficient data cannot be generally described by plane-wave theory. Therefore, data were predicted using plane-wave decomposition and solving the Sommerfeld integral to compute spherical-wave reflection coefficients. This computationally intensive forward model was implemented massively in parallel using the compute unified device architecture on an inexpensive graphics processing unit, which substantially increases performance and allows transdimensional uncertainty estimation for complex layered seabeds. Velocity- and attenuation-frequency dependence were modeled using Buckingham’s viscous grain-shearing theory, which predicts frequency dependence similar to that of Biot’s theory at low frequencies but due to different physical causes. The algorithm was applied at two experiment sites off the coast of Sicily that exhibit different degrees of sediment complexity. The rigorous uncertainty estimation allows inferences that can distinguish between friction- and viscous-loss mechanisms in complex layered media. Results at both sites indicated dispersive sediments at some depths where the variability of velocity and attenuation as a function of frequency clearly exceeds the estimated uncertainties.