Skip to content

0.3 kan#764

Open
ndem0 wants to merge 11 commits into0.3from
0.3-kan
Open

0.3 kan#764
ndem0 wants to merge 11 commits into0.3from
0.3-kan

Conversation

@ndem0
Copy link
Copy Markdown
Member

@ndem0 ndem0 commented Jan 22, 2026

Description

The PR fixes the KAN model and block to be compatible with the latest Spline model. Moreover, a vectorized spline model is also implemented for efficiency.
I also added a test on the KAN training, and it is working. Despite that, the current model still needs (too) many iterations to converge. Further validation before merging 0.3 in master are needed.

This PR fixes #612

Checklist

  • Code follows the project’s Code Style Guidelines
  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Pull request is linked to an open issue

@ndem0 ndem0 requested a review from a team as a code owner January 22, 2026 11:29
@GiovanniCanali GiovanniCanali self-assigned this Jan 22, 2026
@GiovanniCanali GiovanniCanali added enhancement New feature or request pr-to-fix Label for PR that needs modification 0.3 Related to 0.3 release labels Jan 22, 2026
@adendek
Copy link
Copy Markdown

adendek commented Jan 26, 2026

Hello all,

Just out of curiosity, did you consider the efficient KAN implementation?

Honestly speaking, I did not managed to compare those two implementations, but if you see a performance-related issue, may be worth to do so. I can take a look, later.

* Improve spline
* Add KAN

---------

Co-authored-by: Filippo Olivo <folivo@filippoolivo.com>
@ndem0 ndem0 added pr-to-review Label for PR that are ready to been reviewed and removed pr-to-fix Label for PR that needs modification labels Mar 20, 2026
@ndem0
Copy link
Copy Markdown
Member Author

ndem0 commented Mar 20, 2026

Hi, I've fixed almost all the KAN-related issues. There are still several failing tests, but they are inherited from 0.3 at the moment.

The KanBlock class actually needs a minimal restyling, but I'm afraid to keep this PR open for too long. I put a TODO list on top of the file. I would merge now, since the method is working, and postpone the cosmetic part before merging the 0.3.

@ndem0 ndem0 requested a review from a team March 20, 2026 09:26
@ndem0 ndem0 linked an issue Mar 23, 2026 that may be closed by this pull request
@GiovanniCanali
Copy link
Copy Markdown
Collaborator

GiovanniCanali commented Apr 3, 2026

Hi, a quick update on this PR:

  • VectorizedSpline now supports independent knot vectors for each univariate spline.
  • Fixed an issue with einsum indices in the forward method of VectorizedSpline.
  • Refactored both KolmogorovArnoldNetwork and the corresponding block for improved structure and clarity.
  • The KolmogorovArnoldNetwork has been validated on benchmark problems and is behaving as expected.
  • Temporarily removed all grid_extension-related logic from KolmogorovArnoldNetwork; this will be reintroduced shortly.

Pending tasks before merge:

  • Implement grid_extension logic for KolmogorovArnoldNetwork
  • Add analytical derivatives for VectorizedSpline
  • Implement or update tests for
    • VectorizedSpline
    • KolmogorovArnoldNetwork
    • KANBlock
  • Write docstrings for KANBlock and KolmogorovArnoldNetwork
  • Add .rst documentation for the new classes

I plan to complete these items and finalize the PR by the end of next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.3 Related to 0.3 release enhancement New feature or request pr-to-review Label for PR that are ready to been reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Kolmogorov Arnold Network

5 participants