| ▲ | The Benchmarkpocalypse(danluu.com) | |||||||||||||||||||||||||||||||||||||||||||||||||
| 73 points by cyndunlop 5 hours ago | 11 comments | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | michalsustr 8 minutes ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Nice article. As perf optimisation has become more like a machine learning problem, maybe there is opportunity to use other techniques for checking generalisation. Like e.g. cross validation | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | stephantul 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Unfortunately, even a holdout set doesn’t protect you from overfitting, it just takes longer. Of course having a holdout set is better than not having one. It’s just not a silver bullet. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | timfsu 2 hours ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
Fascinating article. I daily catch LLMs in “lies” like: “I found the root cause of the bug” or “this approach is twice as fast”. It’s hard to say what causes this uninformed certainty - is it intrinsic to being trained on human writing, or something that comes from the RLHF process afterwards, but it’s extremely annoying. It’s one thing to have a LLM make poor decisions, but it feels worse to have it “lie” to you in the process. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | akoboldfrying an hour ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||||||||
I think an interesting direction for benchmarking is to take inspiration from metamorphic testing. Metamorphic testing is a way of extending property-based testing (in which you ask the test framework itself to automatically generate many random (input, expected output) pairs to test for you, instead of manually writing individual tests yourself) to handle situations where (a) it's hard to independently come up with the right answer for a specific given input, but (b) relationships between inputs imply checkable relationships between outputs. For example, if you're trying to test your own implementation of sin(), it's hard to automatically generate random (input, expected output) test pairs without using a separate, trusted implementation of the sine function, which may not be available; but one thing you can easily do is check, for many different random x, that sin(x) == -sin(x+180). How to apply this idea to benchmarks? Basically, look for simple transformations of the input instances that should yield simple transformations of the outputs -- in particular, outputs that, in a non-overfitted implementation, should take the same length of time to compute. For regexes, you could rotate a subset of non-magic characters in both the string and the regex (e.g., A -> B, B -> C, ..., Z -> A). Another example would be to reverse both the string and the regex (taking care to handle parenthesised regex subexpressions correctly) -- unlike the previous one, it's not expected that the transformed instance will take the exact same length of time, but there should not be too much blow up. | ||||||||||||||||||||||||||||||||||||||||||||||||||