Spectral Thompson sampling