  We study the entanglement spectrum of highly excited eigenstates of two known
models that exhibit a many-body localization transition, namely the
one-dimensional random-field Heisenberg model and the quantum random energy
model. Our results indicate that the entanglement spectrum shows a
"two-component" structure: a universal part that is associated with random
matrix theory, and a nonuniversal part that is model dependent. The
non-universal part manifests the deviation of the highly excited eigenstate
from a true random state even in the thermalized phase where the eigenstate
thermalization hypothesis holds. The fraction of the spectrum containing the
universal part decreases as one approaches the critical point and vanishes in
the localized phase in the thermodynamic limit. We use the universal part
fraction to construct an order parameter for measuring the degree of randomness
of a generic highly excited state, which is also a promising candidate for
studying the many-body localization transition. Two toy models based on
Rokhsar-Kivelson type wave functions are constructed and their entanglement
spectra are shown to exhibit the same structure.
