<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gayan Sanjeewa</title>
    <description>The latest articles on DEV Community by Gayan Sanjeewa (@gsanjeewa77).</description>
    <link>https://dev.to/gsanjeewa77</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F745933%2Fbe6ac738-0a09-4369-9925-1225df9614ac.jpeg</url>
      <title>DEV Community: Gayan Sanjeewa</title>
      <link>https://dev.to/gsanjeewa77</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gsanjeewa77"/>
    <language>en</language>
    <item>
      <title>Daily LeetCode Problems: 779 :K-th Symbol in Grammar</title>
      <dc:creator>Gayan Sanjeewa</dc:creator>
      <pubDate>Wed, 08 May 2024 01:45:15 +0000</pubDate>
      <link>https://dev.to/gsanjeewa77/daily-leetcode-problems-779-k-th-symbol-in-grammar-5he6</link>
      <guid>https://dev.to/gsanjeewa77/daily-leetcode-problems-779-k-th-symbol-in-grammar-5he6</guid>
      <description>&lt;h2&gt;
  
  
  Daily LeetCode Problems: 779 :K-th Symbol in Grammar
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2Ait5JFbM4HXB-HFDmXSAs9w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3840%2F1%2Ait5JFbM4HXB-HFDmXSAs9w.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;“K-th Symbol in Grammar.” This problem revolves around constructing a table of rows using a unique pattern of 0s and 1s. We’ll explore the problem statement, decipher the pattern, and provide an efficient solution to determine the k-th symbol in the nth row of the table.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem Statement:
&lt;/h2&gt;

&lt;p&gt;In this problem, we are tasked with constructing a table of rows in the following manner:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Start with the first row containing a single ‘0’.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In every subsequent row, replace each ‘0’ in the previous row with ‘01’, and each ‘1’ with ‘10’.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our goal is to find the k-th symbol in the nth row (both 1-indexed) of the table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AyWk2NkSD3GFoTAGWJT_1WA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AyWk2NkSD3GFoTAGWJT_1WA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Approach:
&lt;/h2&gt;

&lt;p&gt;To solve this problem, we need to understand the pattern and recurrence that emerges as we construct the rows.&lt;/p&gt;

&lt;p&gt;The key insight is that the construction process can be thought of as a binary tree. The initial ‘0’ is the root, and each ‘0’ in a row has two children (‘0’ and ‘1’) in the row below, while each ‘1’ in a row has two children (‘1’ and ‘0’) in the row below. The tree branches out in a balanced manner.&lt;/p&gt;

&lt;p&gt;With this insight, we can use a recursive approach to traverse the tree and find the k-th symbol in the nth row. We start with the root and move down the tree based on whether k is on the left or right side of the current node.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pseudocode:
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def kthGrammar(n, k):
    # Base case: if n is 1, the first row contains only '0'.
    if n == 1:
        return 0

    # Calculate the midpoint of the row, where the tree branches.
    mid = 2**(n-1) // 2

    # If k is in the left subtree, recurse on the left child.
    if k &amp;lt;= mid:
        return kthGrammar(n - 1, k)
    else:
        # If k is in the right subtree, recurse on the right child and flip the result.
        return 1 - kthGrammar(n - 1, k - mid)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Complexity Analysis:
&lt;/h2&gt;

&lt;p&gt;Let’s analyze the complexity of our solution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Time complexity: The time complexity of this solution is O(log k), where k is the index of the symbol we want to find. This is because the problem reduces by half with each recursive call.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Space complexity: The space complexity is O(log n) due to the recursive call stack.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Full Solution
&lt;/h2&gt;
&lt;h2&gt;
  
  
  Python
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Solution:
    def kthGrammar(self, n: int, k: int) -&amp;gt; int:
        if n == 1:
            return 0
        length = 2 ** (n - 2)
        if k &amp;lt;= length:
            return self.kthGrammar(n - 1, k)
        else:
            return 1 - self.kthGrammar(n - 1, k - length)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Java
&lt;/h2&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Solution {
  public int kthGrammar(int n, int k) {
    if (n == 1)
      return 0;
    if (k % 2 == 1)
      return kthGrammar(n - 1, (k + 1) / 2) == 0 ? 0 : 1; // Left node
    return kthGrammar(n - 1, k / 2) == 0 ? 1 : 0;         // Right node
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Curious Engineering Facts (**Multi-token Prediction ,**Kolmogorov-Arnold Networks (KANs) ****): May Release 2:24</title>
      <dc:creator>Gayan Sanjeewa</dc:creator>
      <pubDate>Wed, 08 May 2024 01:42:35 +0000</pubDate>
      <link>https://dev.to/gsanjeewa77/curious-engineering-facts-multi-token-prediction-kolmogorov-arnold-networks-kans-may-release-224-332d</link>
      <guid>https://dev.to/gsanjeewa77/curious-engineering-facts-multi-token-prediction-kolmogorov-arnold-networks-kans-may-release-224-332d</guid>
      <description>&lt;h2&gt;
  
  
  Curious Engineering Facts (&lt;strong&gt;Multi-token Prediction ,&lt;/strong&gt;Kolmogorov-Arnold Networks (KANs) ****): May Release 2:24
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F12000%2F1%2AjeNYLlL3mFFGdarSOOCErA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F12000%2F1%2AjeNYLlL3mFFGdarSOOCErA.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Meta’s New Groundbreaking Paper on Multi-Token Prediction for Better and Faster LLMs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ApM4oc9yZj0VFktKG6wkJlA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2ApM4oc9yZj0VFktKG6wkJlA.png" alt="Credit: Original author"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most current large language models are trained with a &lt;strong&gt;next-token prediction loss&lt;/strong&gt;. However, they require large amount of data and often fail to capture longer-term dependencies effectively.&lt;/p&gt;

&lt;p&gt;Meta’s new groundbreaking paper &lt;strong&gt;“Better &amp;amp; Faster Large Language Models via Multi-token Prediction”&lt;/strong&gt; suggests that training language models to predict &lt;strong&gt;multiple future tokens at once results in higher sample efficiency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Efficiency:&lt;/strong&gt; Multi-token prediction improves sample efficiency and &lt;strong&gt;speeds up inference times by up to 3x&lt;/strong&gt;, particularly with larger models and batch sizes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better Performance on Benchmarks:&lt;/strong&gt; This technique shows substantial improvement over traditional next-token prediction models on coding tasks and generative benchmarks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability Benefits:&lt;/strong&gt; The benefits of multi-token prediction become more significant as model size increases, which implies greater improvements for larger models.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Robustness Across Epochs:&lt;/strong&gt; Using Multi-token prediction maintains performance advantages even when models are trained for multiple epochs, which demonstrates robustness and durability of training gains.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Overall architecture:&lt;/strong&gt; It consists of a common trunk that processes the input sequence &lt;strong&gt;to generate a latent representation of the observed context&lt;/strong&gt;. On top of that, &lt;strong&gt;multiple output heads **are each responsible for predicting a **different future token simultaneously and independently.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-token Prediction Task:&lt;/strong&gt; Instead of predicting &lt;strong&gt;just the next token,&lt;/strong&gt; the model predicts &lt;strong&gt;several future tokens from each position in the input&lt;/strong&gt; sequence. Each output head makes its prediction &lt;strong&gt;independently&lt;/strong&gt; based on the &lt;strong&gt;shared context&lt;/strong&gt; provided by the trunk.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Training Process:&lt;/strong&gt; During training, the model is optimized for predicting each of the future tokens independently. This approach trains the model to improve its predictions by considering multiple future outcomes at each step. The predictions are **generated in parallel **across the multiple heads, so this doesn’t add any computation overhead.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient Inference:&lt;/strong&gt; At inference time, the model can use the trained output heads to generate multiple tokens at once, &lt;strong&gt;&lt;em&gt;speeding up the process&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.A promising alternative to Multi-Layer Perceptrons (MLPs) is taking over the industry: KANs
&lt;/h2&gt;

&lt;p&gt;introducing a novel neural network, Kolmogorov-Arnold Networks (KANs), which replaces MLPs’ &lt;strong&gt;fixed activation functions&lt;/strong&gt; with learnable ones on weights, eliminating linear weights.&lt;/p&gt;

&lt;p&gt;KANs enhance accuracy, interpretability, use significantly fewer parameters (200 vs. 300,000 in some MLPs), and effectively &lt;strong&gt;prevent catastrophic forgetting. However, their complex activation functions demand more computational resources.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Kolmogorov–Arnold Networks (KANs)&lt;/strong&gt;&lt;br&gt;
The genesis of Kolmogorov–Arnold Networks (KANs) is deeply rooted in the Kolmogorov-Arnold representation theorem, a seminal concept in mathematical theory that profoundly influences their design and functionality. This theorem provides a method to express &lt;strong&gt;any multivariate continuous function as a superposition of continuous functions of one variable.&lt;/strong&gt; Inspired by this theorem, KANs are crafted to leverage this foundational mathematical insight, thereby reimagining the structure and capabilities of neural networks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theoretical Foundatio&lt;/strong&gt;n&lt;br&gt;
Unlike Multi-Layer Perceptrons (&lt;strong&gt;MLPs&lt;/strong&gt;) that are primarily inspired by the &lt;strong&gt;Universal Approximation Theorem, **KANs draw from the Kolmogorov-Arnold representation theorem. This theorem asserts that **any function of several variables can be represented as a composition of functions of one variable and the addition operation&lt;/strong&gt;. KANs operationalize this theorem by implementing a neural architecture where the traditional linear weight matrices and fixed &lt;strong&gt;activation **functions are **replaced **with **dynamic, learnable univariate functions along each connection, or “edge”, between nodes in the network.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.OpenBio-LLM 8B and 70B
&lt;/h2&gt;

&lt;p&gt;OpenBioLLM-8B is an advanced open source language model designed specifically for the &lt;strong&gt;biomedical **domain. Developed by Saama AI Labs, this model was fine-tuned on a vast corpus of high-quality biomedical data from the powerful foundations of the **Meta-Llama-3–8B and Meta-Llama-3–8B models.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 70B parameter model outperforms GPT-4, Gemini, Meditron-70B, and Med-PaLM 1&lt;/p&gt;

&lt;p&gt;The Open Medical LLM Leaderboard aims to track, rank and evaluate the performance of large language models (LLMs) on medical question answering tasks.&lt;/p&gt;

&lt;p&gt;It evaluates LLMs across a diverse array of medical datasets, including MedQA (USMLE), PubMedQA, MedMCQA, and subsets of MMLU related to medicine and biology. Theses datasets contain multiple-choice and open-ended questions that require medical reasoning and understanding.&lt;/p&gt;

&lt;p&gt;The OpenBio-LLM-70B is the leading model according to this benchmark, yet the recent Med-Gemini model is still not included in the leaderboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.HyperSD
&lt;/h2&gt;

&lt;p&gt;Hyper-SD is one of the new State-of-the-Art diffusion model acceleration techniques. It’s a new framework that allows for high fidelity in step compression and mitigates performance losses for &lt;strong&gt;Diffusion Models distillation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this HF Space, the models distilled from SDXL Base 1.0 and Stable-Diffusion v1–5 are released.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Curious Engineering Facts (**Multi-token Prediction ,**Kolmogorov-Arnold Networks (KANs) ****): May Release 2:24</title>
      <dc:creator>Gayan Sanjeewa</dc:creator>
      <pubDate>Wed, 08 May 2024 01:42:24 +0000</pubDate>
      <link>https://dev.to/gsanjeewa77/curious-engineering-facts-multi-token-prediction-kolmogorov-arnold-networks-kans-may-release-224-kol</link>
      <guid>https://dev.to/gsanjeewa77/curious-engineering-facts-multi-token-prediction-kolmogorov-arnold-networks-kans-may-release-224-kol</guid>
      <description>&lt;h2&gt;
  
  
  Curious Engineering Facts (&lt;strong&gt;Multi-token Prediction ,&lt;/strong&gt;Kolmogorov-Arnold Networks (KANs) ****): May Release 2:24
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jjPZPttt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/12000/1%2AjeNYLlL3mFFGdarSOOCErA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jjPZPttt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/12000/1%2AjeNYLlL3mFFGdarSOOCErA.jpeg" alt="" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1.Meta’s New Groundbreaking Paper on Multi-Token Prediction for Better and Faster LLMs
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QsYhu1Zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ApM4oc9yZj0VFktKG6wkJlA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QsYhu1Zp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/2000/1%2ApM4oc9yZj0VFktKG6wkJlA.png" alt="Credit: Original author" width="702" height="822"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most current large language models are trained with a &lt;strong&gt;next-token prediction loss&lt;/strong&gt;. However, they require large amount of data and often fail to capture longer-term dependencies effectively.&lt;/p&gt;

&lt;p&gt;Meta’s new groundbreaking paper &lt;strong&gt;“Better &amp;amp; Faster Large Language Models via Multi-token Prediction”&lt;/strong&gt; suggests that training language models to predict &lt;strong&gt;multiple future tokens at once results in higher sample efficiency.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced Efficiency:&lt;/strong&gt; Multi-token prediction improves sample efficiency and &lt;strong&gt;speeds up inference times by up to 3x&lt;/strong&gt;, particularly with larger models and batch sizes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Better Performance on Benchmarks:&lt;/strong&gt; This technique shows substantial improvement over traditional next-token prediction models on coding tasks and generative benchmarks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability Benefits:&lt;/strong&gt; The benefits of multi-token prediction become more significant as model size increases, which implies greater improvements for larger models.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Robustness Across Epochs:&lt;/strong&gt; Using Multi-token prediction maintains performance advantages even when models are trained for multiple epochs, which demonstrates robustness and durability of training gains.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How it works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Overall architecture:&lt;/strong&gt; It consists of a common trunk that processes the input sequence &lt;strong&gt;to generate a latent representation of the observed context&lt;/strong&gt;. On top of that, &lt;strong&gt;multiple output heads **are each responsible for predicting a **different future token simultaneously and independently.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-token Prediction Task:&lt;/strong&gt; Instead of predicting &lt;strong&gt;just the next token,&lt;/strong&gt; the model predicts &lt;strong&gt;several future tokens from each position in the input&lt;/strong&gt; sequence. Each output head makes its prediction &lt;strong&gt;independently&lt;/strong&gt; based on the &lt;strong&gt;shared context&lt;/strong&gt; provided by the trunk.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Training Process:&lt;/strong&gt; During training, the model is optimized for predicting each of the future tokens independently. This approach trains the model to improve its predictions by considering multiple future outcomes at each step. The predictions are **generated in parallel **across the multiple heads, so this doesn’t add any computation overhead.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficient Inference:&lt;/strong&gt; At inference time, the model can use the trained output heads to generate multiple tokens at once, &lt;strong&gt;&lt;em&gt;speeding up the process&lt;/em&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2.A promising alternative to Multi-Layer Perceptrons (MLPs) is taking over the industry: KANs
&lt;/h2&gt;

&lt;p&gt;introducing a novel neural network, Kolmogorov-Arnold Networks (KANs), which replaces MLPs’ &lt;strong&gt;fixed activation functions&lt;/strong&gt; with learnable ones on weights, eliminating linear weights.&lt;/p&gt;

&lt;p&gt;KANs enhance accuracy, interpretability, use significantly fewer parameters (200 vs. 300,000 in some MLPs), and effectively &lt;strong&gt;prevent catastrophic forgetting. However, their complex activation functions demand more computational resources.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding Kolmogorov–Arnold Networks (KANs)&lt;/strong&gt;&lt;br&gt;
The genesis of Kolmogorov–Arnold Networks (KANs) is deeply rooted in the Kolmogorov-Arnold representation theorem, a seminal concept in mathematical theory that profoundly influences their design and functionality. This theorem provides a method to express &lt;strong&gt;any multivariate continuous function as a superposition of continuous functions of one variable.&lt;/strong&gt; Inspired by this theorem, KANs are crafted to leverage this foundational mathematical insight, thereby reimagining the structure and capabilities of neural networks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Theoretical Foundatio&lt;/strong&gt;n&lt;br&gt;
Unlike Multi-Layer Perceptrons (&lt;strong&gt;MLPs&lt;/strong&gt;) that are primarily inspired by the &lt;strong&gt;Universal Approximation Theorem, **KANs draw from the Kolmogorov-Arnold representation theorem. This theorem asserts that **any function of several variables can be represented as a composition of functions of one variable and the addition operation&lt;/strong&gt;. KANs operationalize this theorem by implementing a neural architecture where the traditional linear weight matrices and fixed &lt;strong&gt;activation **functions are **replaced **with **dynamic, learnable univariate functions along each connection, or “edge”, between nodes in the network.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3.OpenBio-LLM 8B and 70B
&lt;/h2&gt;

&lt;p&gt;OpenBioLLM-8B is an advanced open source language model designed specifically for the &lt;strong&gt;biomedical **domain. Developed by Saama AI Labs, this model was fine-tuned on a vast corpus of high-quality biomedical data from the powerful foundations of the **Meta-Llama-3–8B and Meta-Llama-3–8B models.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The 70B parameter model outperforms GPT-4, Gemini, Meditron-70B, and Med-PaLM 1&lt;/p&gt;

&lt;p&gt;The Open Medical LLM Leaderboard aims to track, rank and evaluate the performance of large language models (LLMs) on medical question answering tasks.&lt;/p&gt;

&lt;p&gt;It evaluates LLMs across a diverse array of medical datasets, including MedQA (USMLE), PubMedQA, MedMCQA, and subsets of MMLU related to medicine and biology. Theses datasets contain multiple-choice and open-ended questions that require medical reasoning and understanding.&lt;/p&gt;

&lt;p&gt;The OpenBio-LLM-70B is the leading model according to this benchmark, yet the recent Med-Gemini model is still not included in the leaderboard.&lt;/p&gt;

&lt;h2&gt;
  
  
  4.HyperSD
&lt;/h2&gt;

&lt;p&gt;Hyper-SD is one of the new State-of-the-Art diffusion model acceleration techniques. It’s a new framework that allows for high fidelity in step compression and mitigates performance losses for &lt;strong&gt;Diffusion Models distillation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this HF Space, the models distilled from SDXL Base 1.0 and Stable-Diffusion v1–5 are released.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>LLM Research Paper Fact: 17</title>
      <dc:creator>Gayan Sanjeewa</dc:creator>
      <pubDate>Wed, 08 May 2024 01:41:25 +0000</pubDate>
      <link>https://dev.to/gsanjeewa77/llm-research-paper-fact-17-2dc2</link>
      <guid>https://dev.to/gsanjeewa77/llm-research-paper-fact-17-2dc2</guid>
      <description>&lt;h2&gt;
  
  
  LLM Research Paper Fact: 17
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F7012%2F1%2AJRKLz5D6kOysTerzchd2HA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F7012%2F1%2AJRKLz5D6kOysTerzchd2HA.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. KAN: Kolmogorov-Arnold Networks
&lt;/h2&gt;

&lt;p&gt;Watching: KAN (&lt;a href="https://substack.com/redirect/7b72b768-a8a9-4d54-9f26-265d945c53d6?j=eyJ1IjoiYWd0OGUifQ.KuS--w16fPnuR3ms20HX4Emo75EWmIvMjGnfh6Gf_Y8" rel="noopener noreferrer"&gt;paper&lt;/a&gt;/&lt;a href="https://substack.com/redirect/1f8940f6-549a-43d5-a65a-0d11e23df273?j=eyJ1IjoiYWd0OGUifQ.KuS--w16fPnuR3ms20HX4Emo75EWmIvMjGnfh6Gf_Y8" rel="noopener noreferrer"&gt;code&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2166%2F0%2AMDorNwz8xdlwXRe9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2166%2F0%2AMDorNwz8xdlwXRe9.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What problem does it solve?&lt;/strong&gt; Multi-layer perceptrons(MLPs) have been a fundamental building block in deep learning architectures for decades. However, despite their widespread use, MLPs have limitations in terms of &lt;strong&gt;accuracy and interpretability.&lt;/strong&gt; The fixed activation functions on nodes in MLPs can restrict their ability to capture complex patterns and relationships in data. Additionally, the lack of interpretability in MLPs makes it challenging to understand how they arrive at their predictions, which is crucial in many domains such as healthcare and finance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does it solve the problem?&lt;/strong&gt; Kolmogorov-Arnold Networks (&lt;strong&gt;KANs&lt;/strong&gt;) address the limitations of MLPs by introducing &lt;strong&gt;learnable activation functions&lt;/strong&gt; on edges instead of fixed activation functions on nodes. By replacing linear weights with &lt;strong&gt;univariate functions parametrized as splines&lt;/strong&gt;, KANs achieve better accuracy with smaller network sizes compared to MLPs. The learnable activation functions allow KANs to capture more complex patterns and relationships in data. Moreover, KANs &lt;strong&gt;exhibit faster neural scaling laws&lt;/strong&gt;, meaning they can achieve **higher accuracy with fewer parameters **compared to MLPs. The interpretability of KANs is enhanced by their ability to be intuitively visualized and easily interact with human users, enabling them to assist scientists in discovering mathematical and physical laws.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s next?&lt;/strong&gt; Further research can explore the application of KANs in various domains, such as computer vision, natural language processing, and reinforcement learning. The interpretability aspect of KANs can be leveraged to develop more transparent and explainable AI systems, which is crucial for building trust and accountability.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. SPAFIT: Stratified Progressive Adaptation Fine-tuning for Pre-trained Large Language Models
&lt;/h2&gt;

&lt;p&gt;Watching: SPAFIT (&lt;a href="https://substack.com/redirect/07e729d2-4e08-4f4b-a809-4e7b43662f70?j=eyJ1IjoiYWd0OGUifQ.KuS--w16fPnuR3ms20HX4Emo75EWmIvMjGnfh6Gf_Y8" rel="noopener noreferrer"&gt;paper&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2046%2F0%2AFcU7C0J0WkKanJNY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2046%2F0%2AFcU7C0J0WkKanJNY.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What problem does it solve?&lt;/strong&gt; Fine-tuning large language models can be a challenging task due to the significant computational resources and storage required. Additionally, the Transformer architecture used in these models has been shown to suffer from catastrophic forgetting and overparameterization. Parameter-efficient fine-tuning (PEFT) methods have been developed to address these issues, but they typically apply adjustments across all layers of the model, which may not be the most efficient approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does it solve the problem?&lt;/strong&gt; Stratified Progressive Adaptation Fine-tuning (&lt;strong&gt;SPAFIT&lt;/strong&gt;) is a novel PEFT method that takes advantage of the &lt;strong&gt;localization of different types of linguistic knowledge **within specific layers of the model. By strategically focusing on these layers, SPAFIT can achieve better performance while **fine-tuning only a fraction of the parameters compared to other PEFT methods&lt;/strong&gt;. This targeted approach not only reduces the computational resources needed but also helps to mitigate the issues of catastrophic forgetting and overparameterization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s next?&lt;/strong&gt; The success of SPAFIT on the GLUE benchmark tasks demonstrates the potential of this method for efficient fine-tuning of large language models.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Better &amp;amp; Faster Large Language Models via Multi-token Prediction
&lt;/h2&gt;

&lt;p&gt;Watching: Multi-token Prediction (&lt;a href="https://substack.com/redirect/bfd18405-d21f-493c-a7a9-212bbeb9d442?j=eyJ1IjoiYWd0OGUifQ.KuS--w16fPnuR3ms20HX4Emo75EWmIvMjGnfh6Gf_Y8" rel="noopener noreferrer"&gt;paper&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AI3hvNtb-NT53edtO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AI3hvNtb-NT53edtO.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What problem does it solve?&lt;/strong&gt; Language Models (LMs) are usually trained using a next-token prediction objective, meaning that at each step, the model tries to predict the next token in the sequence. This approach, while effective, may not be the most efficient way to learn from the training data. By only predicting &lt;strong&gt;one token at a time&lt;/strong&gt;, the model might miss out on learning longer-term dependencies and patterns in the data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How does it solve the problem?&lt;/strong&gt; The proposed method trains the model to &lt;strong&gt;predict multiple future tokens at once&lt;/strong&gt;, using &lt;strong&gt;independent **output heads that operate on top of a **shared model trunk&lt;/strong&gt;. By considering multi-token prediction as an auxiliary training task, the model can learn more efficiently from the same amount of data. This approach leads to improved downstream capabilities &lt;strong&gt;without increasing the training time&lt;/strong&gt;. The benefits are more pronounced for larger model sizes and generative tasks like coding, where the multi-token prediction models consistently outperform strong baselines.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What’s next?&lt;/strong&gt; The success of multi-token prediction in improving sample efficiency and &lt;strong&gt;generative capabilities&lt;/strong&gt; opens up new avenues for further research. It would be interesting to explore how this approach scales with even larger model sizes and different types of data, such as multilingual corpora or domain-specific datasets. Additionally, the improved inference speed of models trained with multi-token prediction could have significant implications for real-world applications where low latency is crucial, such as &lt;strong&gt;chatbots or real-time translation systems.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Small Language Models Need Strong Verifiers to Self-Correct Reasoning
&lt;/h2&gt;

&lt;p&gt;Self-correction has emerged as a promising solution to boost the reasoning performance of large language models (LLMs), where LLMs refine their solutions using self-generated critiques that pinpoint the errors. This work explores whether smaller-size (&amp;lt;= 13B) language models (LMs) can self-correction on reasoning tasks with minimal inputs from stronger LMs. This paper proposes a &lt;strong&gt;novel pipelin&lt;/strong&gt;e that prompts &lt;strong&gt;smaller LMs to collect self-correction data that supports the training of self-refinement abilities&lt;/strong&gt;. First, This paper leverages correct solutions to guide the model in critiquing their incorrect responses. Second, the generated critiques, after filtering, are used for supervised fine-tuning of the self-correcting reasoner through solution refinement. This paper’s experimental results show improved self-correction abilities of two models on five datasets spanning math and commonsense reasoning, with notable performance gains when paired with a strong GPT-4-based verifier, though limitations are identified when using a weak self-verifier for determining when to correct&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Kolmogorov–Arnold Networks (KANs)</title>
      <dc:creator>Gayan Sanjeewa</dc:creator>
      <pubDate>Tue, 07 May 2024 01:46:19 +0000</pubDate>
      <link>https://dev.to/gsanjeewa77/kolmogorov-arnold-networks-kans-33pi</link>
      <guid>https://dev.to/gsanjeewa77/kolmogorov-arnold-networks-kans-33pi</guid>
      <description>&lt;h2&gt;
  
  
  Kolmogorov–Arnold Networks (KANs)
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F11520%2F1%2AzzxE_dZiqSkaK6cIHEUSSg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F11520%2F1%2AzzxE_dZiqSkaK6cIHEUSSg.jpeg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MLPs are celebrated for their expressive power, primarily attributed to the Universal Approximation Theorem which suggests that &lt;strong&gt;they can model any continuous function under certain conditions.&lt;/strong&gt; However, despite their widespread adoption, MLPs come with inherent limitations, particularly in terms of parameter efficiency and interpretability.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://arxiv.org/pdf/2404.19756" rel="noopener noreferrer"&gt;Enter Kolmogorov–Arnold Networks (KANs)&lt;/a&gt;, a groundbreaking alternative inspired by the Kolmogorov-Arnold representation theorem. This new class of neural networks proposes a shift &lt;strong&gt;from **the **fixed activation **functions of **MLPs **to **adaptable activation **functions on the **connections between nodes&lt;/strong&gt;, offering a fresh perspective on network design. Unlike traditional MLPs tha*&lt;em&gt;t utilize a static architecture of weights and biases&lt;/em&gt;&lt;em&gt;, KANs introduce a dynamic framework where **each connection weight **is replaced by a **learnable univariate function&lt;/em&gt;&lt;em&gt;, typically parameterized as a **spline&lt;/em&gt;*. This subtle yet profound modification enhances the model’s flexibility and significantly reduces the complexity and number of parameters required.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding Kolmogorov–Arnold Networks (KANs)
&lt;/h3&gt;

&lt;p&gt;The genesis of Kolmogorov–Arnold Networks (KANs) is deeply rooted in the &lt;strong&gt;Kolmogorov&lt;/strong&gt;-&lt;strong&gt;Arnold representation theorem&lt;/strong&gt;, a seminal concept in mathematical theory that profoundly influences their design and functionality. This theorem provides a method to &lt;strong&gt;express **&lt;em&gt;any multivariate continuous function&lt;/em&gt; as a **superposition of continuous functions of one variable&lt;/strong&gt;. Inspired by this theorem, KANs are crafted to leverage this foundational mathematical insight, thereby reimagining the structure and capabilities of neural networks.&lt;br&gt;
Give this a watch : a Short video&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/shorts/Yu1zsGhanh8" rel="noopener noreferrer"&gt;https://www.youtube.com/shorts/Yu1zsGhanh8&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Theoretical Foundation
&lt;/h3&gt;

&lt;p&gt;Unlike Multi-Layer Perceptrons (&lt;strong&gt;MLPs&lt;/strong&gt;) that are primarily inspired by the &lt;strong&gt;Universal Approximation Theorem&lt;/strong&gt;, KANs draw from the Kolmogorov-Arnold representation theorem. &lt;strong&gt;This theorem asserts that any function of several variables can be represented as a composition of functions of one variable and the addition operation&lt;/strong&gt;. KANs operationalize this theorem by implementing a neural architecture where the traditional linear weight matrices and fixed activation functions are &lt;strong&gt;replaced **with **dynamic, learnable univariate functions **along each connection, or “&lt;/strong&gt;edge**”, between nodes in the network.&lt;/p&gt;

&lt;h3&gt;
  
  
  Architectural Shifts
&lt;/h3&gt;

&lt;p&gt;The most distinctive feature of KANs compared to traditional MLPs is the placement of activation functions. While MLPs apply fixed activation functions at the nodes (neurons) of the network:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AU-li_uaZIazND5amrXDR1g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AU-li_uaZIazND5amrXDR1g.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;KANs instead place learnable activation functions on the edges (weights), eliminating linear weights entirely:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AMPvBpIL81z1ITTuzbNInlg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AMPvBpIL81z1ITTuzbNInlg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, each Φ represents a &lt;strong&gt;learnable function&lt;/strong&gt;, typically parameterized as a &lt;strong&gt;spline&lt;/strong&gt;, that directly &lt;strong&gt;modifies **the **signal&lt;/strong&gt; &lt;em&gt;transmitted between layers&lt;/em&gt;. This architecture not only simplifies the computation graph but also enhances the network’s ability to model complex patterns through more direct manipulation of data flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages Over Traditional MLPs
&lt;/h3&gt;

&lt;p&gt;The **reconfiguration **of **activation **functions and **elimination **of linear **weight **matrices result in several key advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Parameter Efficiency:&lt;/strong&gt; Each weight in an MLP is replaced by a **spline **function in KANs, which can adapt its shape based on the learning process. This adaptability often allows KANs to achieve high accuracy with significantly fewer parameters compared to MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility and Adaptability:&lt;/strong&gt; By employing splines, KANs can more &lt;strong&gt;finely tune their responses to the input data&lt;/strong&gt;, offering a more nuanced adaptation to complex data patterns than the relatively rigid structure of MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Interpretability:&lt;/strong&gt; The structure of KANs facilitates a clearer understanding of how inputs are transformed through the network. Each spline function’s effect on the data is more **observable **and understandable than the often opaque transformations in deep MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Visual Comparison
&lt;/h3&gt;

&lt;p&gt;Illustratively, while MLPs rely on a combination of weight matrices and non-linear activation functions applied in a fixed sequence, KANs create a &lt;strong&gt;fluid network of functions&lt;/strong&gt; that dynamically **adjust **based on the data. This difference is not just architectural but conceptual, pushing forward the boundaries of what neural networks can learn and represent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages of KANs Over Traditional MLPs :
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Enhanced Accuracy and Efficiency
&lt;/h3&gt;

&lt;p&gt;High accuracy with fewer parameters compared to MLPs. This advantage is underpinned by the unique architectural elements of KANs that allow for a more direct and flexible manipulation of input data through learnable activation functions on each edge of the network.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced Model Complexity:&lt;/strong&gt; By replacing the typical weight matrices in MLPs with &lt;strong&gt;spline&lt;/strong&gt;-based functions that act on edges, KANs dramatically &lt;strong&gt;reduce **the number of **parameters&lt;/strong&gt;. This reduction in complexity often leads to more efficient training processes and **faster convergence **rates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;High Precision in Data Fitting and PDE Solving:&lt;/strong&gt; KANs have demonstrated superior performance in complex tasks such as **data fitting **and solving partial differential equations (PDEs). For instance, in applications requiring high precision, such as numerical simulation and predictive modeling, KANs have outperformed MLPs by orders of magnitude in both accuracy and computational efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Improved Interpretability
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visual Clarity of Function Transformations:&lt;/strong&gt; The use of spline functions allows for a clear **visual interpretation **of how inputs are transformed through the network. Unlike MLPs, where the transformation through layers can be opaque, KANs provide a more transparent view of the data flow and transformation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ease of Modification and Interaction:&lt;/strong&gt; The functional approach of KANs not only simplifies the understanding of each layer’s impact but also allows easier modifications to meet specific needs or constraints, facilitating user interaction and customization.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Theoretical and Empirical Validation
&lt;/h3&gt;

&lt;p&gt;The theoretical foundations of KANs provide robustness to their design, which is empirically validated through extensive testing and application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Neural Scaling Laws:&lt;/strong&gt; Theoretically, KANs exhibit more favorable neural scaling laws than MLPs. This implies that as the network scales, KANs maintain or improve performance more effectively than MLPs, particularly in environments with large-scale data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Empirical Studies:&lt;/strong&gt; Across various studies, KANs have shown to not only perform better in standard tasks but also in &lt;strong&gt;discovering underlying patterns and laws in scientific data,&lt;/strong&gt; demonstrating their utility as tools for scientific discovery.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Case Studies
&lt;/h3&gt;

&lt;p&gt;the practical benefits of KANs over MLPs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In mathematical applications, such as symbolic regression or complex function approximation, KANs have successfully identified and modeled intricate patterns that were challenging for traditional MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In physics and engineering, KANs have been applied to model and solve intricate problems, from fluid dynamics simulations to structural optimization, &lt;strong&gt;with greater accuracy and fewer computational resources&lt;/strong&gt; than equivalent MLP models.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Empirical Performance and Theoretical Insights
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Demonstrated Superiority in Diverse Applications
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Fitting:&lt;/strong&gt; KANs have shown the ability to fit complex data sets with high accuracy and fewer parameters. For example, in tasks involving the fitting of non-linear functions, KANs have outperformed MLPs by achieving &lt;strong&gt;lower mean squared errors&lt;/strong&gt; with significantly reduced model complexity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Solving Partial Differential Equations (PDEs):&lt;/strong&gt; solved PDEs with greater precision and efficiency, often requiring smaller computational graphs compared to MLPs which translates into faster computation and less resource consumption.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Empirical Validation through Case Studies
&lt;/h3&gt;

&lt;p&gt;Specific case studies underscore the practical advantages of KANs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scientific Discovery:&lt;/strong&gt; In fields like physics and chemistry, KANs have helped researchers uncover underlying physical laws and chemical properties from experimental data, acting almost as collaborative tools in the scientific discovery process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Machine Learning and AI:&lt;/strong&gt; In more traditional machine learning tasks, such as image and speech recognition, KANs have demonstrated their ability to learn more effective representations with fewer training iterations, facilitating faster and more scalable AI solutions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Theoretical Advancements
&lt;/h3&gt;

&lt;p&gt;The theoretical framework of KANs offers insights into why these networks perform effectively:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Neural Scaling Laws:&lt;/strong&gt; KANs benefit from favorable neural scaling laws, which suggest that their performance &lt;strong&gt;improves consistently as network size increases&lt;/strong&gt;, without the diminishing returns often observed in MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Function Approximation Capabilities:&lt;/strong&gt; The structure of KANs inherently supports a more flexible function approximation capability, which can be attributed to their use of spline-based activation functions. This flexibility allows KANs to model a wider range of functions directly compared to the layered linear transformations in MLPs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Improvements in Training Dynamics
&lt;/h3&gt;

&lt;p&gt;The training process of KANs also exhibits several improvements over traditional approaches:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency in Learning:&lt;/strong&gt; KANs typically require &lt;strong&gt;fewer epochs&lt;/strong&gt; to **converge **to **optimal **solutions&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stability and Generalization:&lt;/strong&gt; KANs have shown greater stability during training and superior generalization capabilities on unseen data, likely due to their inherent regularization effects from spline functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Potential Applications and Impact on Science
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Advancing Machine Learning and Artificial Intelligence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deep Learning Enhancements:&lt;/strong&gt; By integrating KANs into existing deep learning architectures, researchers can create more efficient and interpretable models for tasks like image recognition, natural language processing, and more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Robust AI Systems:&lt;/strong&gt; The inherent interpretability and efficient data handling of KANs contribute to building more robust and reliable AI systems, particularly in critical applications such as autonomous driving and medical diagnosis.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  As A summary :
&lt;/h2&gt;

&lt;p&gt;MLPs have fixed activation functions on nodes (or “neurons”), KANs have learnable activation functions on edges (or “weights”).&lt;/p&gt;

&lt;p&gt;In a KAN, &lt;strong&gt;each weight parameter&lt;/strong&gt; is replaced by a &lt;strong&gt;univariate **function, typically parameterized as a **spline&lt;/strong&gt;. As a result, KANs have &lt;strong&gt;no linear&lt;/strong&gt; **weights **at all. The nodes in a KAN simply sum the incoming signals without applying any non-linearities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4n-2kpdLo_vnBW0v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4n-2kpdLo_vnBW0v.png" alt="Credit : Original author"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How do they work?
&lt;/h3&gt;

&lt;p&gt;At its core, a KAN learns both the &lt;strong&gt;compositional structure&lt;/strong&gt; (external degrees of freedom) and the &lt;strong&gt;univariate functions&lt;/strong&gt; (internal degrees of freedom) of a given problem. This allows KANs to not only learn features, like MLPs, &lt;strong&gt;but also to optimize these learned features&lt;/strong&gt; to great accuracy.&lt;/p&gt;

&lt;p&gt;KANs leverage the strengths of both splines and MLPs while avoiding their weaknesses. Splines are accurate for low-dimensional functions and can easily adjust locally, but suffer from the curse of dimensionality. &lt;strong&gt;MLPs, on the other hand, are better at exploiting compositional structures,&lt;/strong&gt; but struggle to optimize univariate functions. By combining the two approaches, KANs can learn and accurately represent complex functions more effectively than either splines or MLPs alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Expanded
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Compositional Structure Learning (External Degrees of Freedom)&lt;/strong&gt;&lt;br&gt;
KANs, like MLPs, can learn the compositional structure of a problem. In other words, they can identify and learn the relationships between &lt;strong&gt;different input features&lt;/strong&gt; and how they &lt;strong&gt;contribute **to the **output&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In a KAN, the nodes are &lt;strong&gt;responsible for summing the incoming signals&lt;/strong&gt; without applying any non-linearities. The edges, on the other hand, contain &lt;strong&gt;learnable **activation functions, which are typically parameterized as **splines&lt;/strong&gt;. This architecture allows the network to learn the optimal composition of these activation functions to model the underlying structure of the problem.&lt;/p&gt;

&lt;p&gt;By learning the compositional structure, KANs can effectively handle high-dimensional problems and exploit the inherent relationships between input features. This capability is similar to that of MLPs, which can also learn complex feature interactions through their layered architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Univariate Function Optimization (Internal Degrees of Freedom)&lt;/strong&gt;&lt;br&gt;
What sets KANs apart from MLPs is their ability to optimize univariate functions to a high degree of accuracy. In a KAN, each edge contains a learnable activation function, which is a &lt;strong&gt;univariate function&lt;/strong&gt; parameterized as a spline. **Splines **are piecewise **polynomial **functions that can closely approximate complex univariate functions.&lt;br&gt;
During training, KANs optimize these spline activation functions to best fit the target function. The spline parameterization allows for local adjustments, meaning that the network can fine-tune the activation functions in specific regions of the input space without affecting other regions. This local adaptability is a key advantage of **splines over global activation functions like sigmoids or ReLUs, **which are commonly used in MLPs.&lt;br&gt;
By optimizing the univariate functions, KANs can achieve high accuracy in modeling complex, non-linear relationships between inputs and outputs. This is particularly useful for problems with low-dimensional input spaces, where splines can excel.&lt;/p&gt;

&lt;p&gt;**Combining Strengths of Splines and MLPs&lt;br&gt;
**KANs leverage the strengths of both splines and MLPs while avoiding their weaknesses. Splines are highly accurate for low-dimensional functions and can easily adapt locally, but they suffer from the curse of dimensionality. As the number of input dimensions increases, the number of spline parameters required to maintain accuracy grows exponentially, making splines impractical for high-dimensional problems.&lt;/p&gt;

&lt;p&gt;On the other hand, MLPs are better suited for high-dimensional problems due to their ability to learn compositional structures. However, MLPs struggle to optimize univariate functions effectively, as their activation functions are typically fixed and global.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KANs overcome these limitations by combining the compositional structure learning of MLPs with the univariate function optimization of splines. The network’s architecture allows it to learn complex feature interactions like an MLP, while the spline activation functions enable accurate modeling of univariate relationships.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  How Kolmogorov-Arnold Networks Could Revolutionize Large Language Models
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Enhancing interpretability: One of the main criticisms of LLMs is their lack of interpretability. It can be difficult to understand how these &lt;strong&gt;models arrive at their outputs&lt;/strong&gt;, which raises concerns about bias, fairness, and &lt;strong&gt;trustworthiness&lt;/strong&gt;. While some architectures like decision trees and rule-based systems are more interpretable, they often lack the performance of deep learning models. KANs, with their learnable activation functions and more interpretable structure, could help address this issue. By integrating KANs into LLMs, &lt;strong&gt;researchers could gain more insights into how the models process and generate language,&lt;/strong&gt; potentially leading to more transparent and &lt;strong&gt;explainable AI&lt;/strong&gt; systems that outperform other interpretable architectures.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Few-shot learning: While LLMs have shown impressive few-shot learning capabilities, they still require substantial amounts of data and compute to achieve optimal performance. Other architectures like Siamese networks and metric learning approaches have been used for few-shot learning, but they may not scale as well to complex language tasks. KANs’ ability to learn both compositional structure and univariate functions more efficiently could help LLMs learn from fewer examples, potentially outperforming existing few-shot learning approaches in the language domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Knowledge representation and reasoning: LLMs have demonstrated some ability to store and retrieve knowledge, as well as perform basic reasoning tasks. However, their ability to represent and manipulate complex, structured knowledge is still limited. Graph neural networks (GNNs) and knowledge graphs have been used to represent structured knowledge, but integrating them with language models remains challenging. KANs’ more interpretable and modular structure could potentially help LLMs better represent and reason over structured knowledge, offering a more seamless integration of knowledge representation and language modeling compared to existing approaches.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  What’s The Catch?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Currently, the biggest bottleneck of KANs lies in&lt;/em&gt;* its slow training*&lt;em&gt;. KANs are **usually 10x slower than MLPs&lt;/em&gt;&lt;em&gt;, given the same number of parameters. If one wants to train a model fast, one should use MLPs. In other cases, however, KANs should be comparable or better than MLPs, which makes them worth trying. if you care about **interpretability **and/or **accuracy&lt;/em&gt;&lt;em&gt;, and **slow training is not a major concern&lt;/em&gt;&lt;em&gt;, suggest trying KANs.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  When to use them?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AhJOdJDXVqDabxmCS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AhJOdJDXVqDabxmCS.png" alt="Credit: Original Author"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical :
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/GayanSanjeewaGitHub/KANs" rel="noopener noreferrer"&gt;https://github.com/GayanSanjeewaGitHub/KANs&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
