Plain old gzip+kNN outperforms BERT and other DNNs
As per this paper:
“Low-Resource” Text Classification: A Parameter-Free Classification Method with Compressors
Zhiying Jiang, Matthew Yang, Mikhail Tsirlin, Raphael Tang, Yiqin Dai, Jimmy Lin
https://aclanthology.org/2023.findings-acl.426/
via: twitter.com/goodside/status/1679358632431853568
8 comments
[ 2.8 ms ] story [ 37.8 ms ] threadHere is the gzip knn implementation I tested https://github.com/jimmc414/document_intelligence/blob/main/...
I will note that I am comparing entire text files in these implementations not sentences.
> Once we have a source-coding scheme, we can "invert" it to get conditional probabilities; we could even sample from it to get a generator. (We'd need a little footwork to deal with some technicalities, but not a heck of a lot.) So something I'd really love to see done, by someone with the resources, is the following experiment:
> - Code up an implementation of Lempel-Ziv without the limitations built in to (e.g.) gzip; give it as much internal memory to build its dictionary as a large language model gets to store its parameter matrix. Call this "LLZ", for "large Lempel-Ziv".
> - Feed LLZ the same corpus of texts used to fit your favorite large language model. Let it build its dictionary from that. (This needs one pass through the corpus...)
> - Build the generator from the trained LLZ.
> - Swap in this generator for the neural network in a chatbot or similar. Call this horrible thing GLLZ.
> In terms of perplexity, GLLZ will be comparable to the neural network, because Lempel-Ziv does, in fact, do universal source coding.
Maybe someone on HN will have resources for such an experiment?
Would this be leaner and run on less or would it reach the same complexity eventually?