In several approaches
to quantum-gravity, the spectral dimension of spacetime runs from the standard
value of 4 in the infrared (IR) to a smaller value in the ultraviolet (UV).
Describing this running in terms of deformed dispersion relations, I show that
a striking cosmological implication is that that UV behavior leading to 2
spectral dimensions results in an exactly scale-invariant spectrum of vacuum scalar
and tensor fluctuations. I discuss scenarios that break exact scale-invariance
and show that the tensor to scalar ratio is fixed by the UV ratio between the
speed of gravity and the speed of light. Cosmological perturbations in this
framework display a wavelength-dependent speed of light, but by transforming to
a suitable "rainbow frame" this feature can be removed, at the
expense of modifying gravity. In particular it turns out that the following
concepts are closely connected: scale-invariance of vacuum fluctuations,
conformal invariance of the gravitational coupling, UV reduction to spectral
dimension 2 in position space and UV reduction to Hausdorff dimension 2 in
energy-momentum space.