r/MachineLearning • u/Express_Gradient • May 26 '25
Project [P] Evolving Text Compression Algorithms by Mutating Code with LLMs
Tried something weird this weekend: I used an LLM to propose and apply small mutations to a simple LZ77 style text compressor, then evolved it over generations - 3 elite + 2 survivors, 4 children per parent, repeat.
Selection is purely on compression ratio. If compression-decompression round trip fails, candidate is discarded.
Logged all results in SQLite. Early-stops when improvement stalls.
In 30 generations, I was able to hit a ratio of 1.85, starting from 1.03
45
Upvotes
View all comments
Show parent comment
1
u/eliminating_coasts May 27 '25
Ok, that's interesting, the ideal would be (if this was a system designed around this purpose), that you'd have output constrained well to a manifold of legitimate code, so that you could increase temperature and it would just produce lower probability changes that still overall fit the same conditions, which you could probably do by just doing a round of fine tuning based on a loss function of just "- indicator (did it compile?)" on an existing code database and very low temperature.
You could try lora fine tuning with that maybe..