SynodicMonth / ChebyKAN

Kolmogorov-Arnold Networks (KAN) using Chebyshev polynomials instead of B-splines.
350 stars 36 forks source link

Poor generalization #9

Open buptlittlecabbage opened 5 months ago

buptlittlecabbage commented 5 months ago

I tried using ChebyKAN to train signal waveforms, but it showed poor generalization. What may be the reason?? image is train data image is test data.

SynodicMonth commented 5 months ago

Whats the structure of ur model? How is ChebyKAN used? Have u tried normal MLP/original KAN? Could you please provide more detailed information or code snippets to further investigate the problem?

buptlittlecabbage commented 5 months ago

Yes, I use regular MLP, but I haven't used the original KAN before. My model is ChebyKAN based DeepOKAN. In fact, it's a bit complex, so later I only used 4-layer ChebyKAN for simple input-output waveform mapping, and it didn't have good generalization. The relevant codes and results are as follows: image image 4da5f5eadd63405dd35e75ff446ea46 is test data, train data is similar to the blue line. Later, I made some fine-tuning to the parameters and improved their generalization ability, but it seems that they are still not as good as MLP. 00ad9ec04f9ef6f216e3ff5f874183f

buptlittlecabbage commented 5 months ago

The generalization of MLP allows two lines to basically overlap. So I want to ask, how can adjusting parameters enhance the generalization of ChebyKAN

SynodicMonth commented 5 months ago

Not sure about the reason. maybe the degree is too high, i found somewhere between 4-8 is enough, and higher degree makes it harder to train. also i found ChebyKAN needs a really low lr if using Adam, (like 1e-4). some found it better to use multiple different polynomials (https://github.com/SynodicMonth/ChebyKAN/issues/4#issuecomment-2111056963), not sure if it can help.

buptlittlecabbage commented 5 months ago

Thanks for your reply, and I hope that we can find more application of ChebyKAN.

buptlittlecabbage commented 5 months ago

Thanks for your reply, and I hope that we can find more application of ChebyKAN.