Depends on how you define "contrast". If you define it as "difference in amount of energy emitted", then neither method is using "contrast". The YIQ method is using a simple perceptual model that assigns different coefficients to red, green and blue because of how bright we perceive each of those colors to be. This has to do with the distribution of photoreceptors in the typical human eye.
The neural network approach goes a step further and accounts for how the brain processes color. There's no reason to consider that notion of "contrast" less valid than the brain-agnostic eye based model. In fact, in the context of readability, the psychovisual notion is far more useful.