Text this: Model-agnostic neural mean field with a data-driven transfer function