T5 & Text-to-Text Transformers
Framing every NLP task, including classification, as generating a text string from a text string, on top of an ordinary encoder-decoder transformer.
T5 treats translation, summarization, and classification the same way: text goes in, text comes out. A short prefix in the input string, like "translate English to German:", tells the model which task this is — there's no separate output head or task-specific layer anywhere in the architecture.
Classification comes out as a generated label word rather than a value from a fixed set, scored through the same decoder softmax as any other generated token. The architecture underneath is an ordinary encoder-decoder transformer; the text-to-text framing is a separate design decision layered on top of it.