← 返回 Skills 市场
kofna3369

Axiomata Kan Creator

作者 Kofna3369 · GitHub ↗ · v1.2.0 · MIT-0
cross-platform ⚠ suspicious
88
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install axiomata-kan-creator
功能描述
Axiomata KAN Creator v1.2 — Universal KAN (Kolmogorov-Arnold Network) concept creation tool. Use when: (1) creating new KAN concepts for monitoring/evaluatio...
使用说明 (SKILL.md)

Axiomata KAN Creator v1.0

Universal KAN (Kolmogorov-Arnold Network) concept creation tool.

Info Value
Version 1.0.0
Type KAN architecture creation
Architecture B-spline basis functions
Requires PyTorch >= 1.9

1. Purpose

Axiomata KAN Creator creates KAN (Kolmogorov-Arnold Network) concepts for agent systems.

KANs are neural networks that use learnable B-spline basis functions instead of fixed activation functions:

Traditional MLP: y = σ(Wx + b)      — Fixed activation
KAN:             y = Σφᵢₙ(xᵢ)      — Learnable activation

Each weight is a function (B-spline), not a scalar. This allows KANs to be more interpretable and efficient than MLPs.


2. When to Use

Trigger Action
"Create a KAN" Run kan_creator.py with name and role
"Build KAN architecture" Create KAN with custom layers
"Initialize KAN model" Generate model structure with B-splines
"Create KAN pipeline" Build multi-KAN system

3. Prerequisites

Requirement Version Check
Python >= 3.8 python3 --version
PyTorch >= 1.9 python3 -c "import torch; print(torch.__version__)"

Note: PyTorch is required for all KAN operations (model creation, training, inference).


4. Quick Start

4.1 Create Basic KAN

cd \x3Cskill-directory>
python3 scripts/kan_creator.py --name my_kan --role "monitoring"

Expected output:

✅ KAN 'my_kan' created at scripts/my_kan/
📋 Config: scripts/my_kan/config.json
🧠 Model: scripts/my_kan/models/my_kan.py

4.2 Create KAN with Custom Parameters

python3 scripts/kan_creator.py \
    --name stc_watchdog \
    --role "emotional tension" \
    --agent morgana \
    --input-size 768 \
    --output-size 3 \
    --hidden-size 32

5. Architecture

5.1 KAN Layer Structure

╔═══════════════════════════════════════════════════════════╗
║  KAN LAYER — B-Spline Transformation                    ║
╠═══════════════════════════════════════════════════════════╣
║                                                           ║
║  Input: x ∈ R^input_size                                ║
║         ↓                                                ║
║  B-Spline: φ(x) = ΣcᵢBᵢ(x)                             ║
║         ↓                                                ║
║  Learnable coefficients: cᵢ                              ║
║         ↓                                                ║
║  SiLU activation: σ(x) = x / (1 + e^(-x))              ║
║         ↓                                                ║
║  Output: y ∈ R^output_size                               ║
║                                                           ║
╚═══════════════════════════════════════════════════════════╝

5.2 Default Architecture

Parameter Default Description
input_size 768 Embedding dimension
hidden_size 32 Hidden layer width
output_size 3 Decision dimension
grid_size 5 B-spline grid points
k 3 B-spline order
layers [768, 32, 16, 8, 4, 3] Layer dimensions

5.3 KAN vs MLP

Aspect MLP KAN
Weights Scalar (fixed) Function (learnable)
Activation Fixed (ReLU/sigmoid) Learnable (B-spline)
Interpretability Low High
Training efficiency High Medium
Data efficiency Medium High

6. Usage

6.1 Command Reference

# Basic creation
python3 scripts/kan_creator.py --name \x3Cname> --role \x3Crole>

# Full options
python3 scripts/kan_creator.py \
    --name \x3Cstring> \
    --role \x3Cstring> \
    --agent \x3Cstring> \
    --input-size \x3Cint> \
    --output-size \x3Cint> \
    --hidden-size \x3Cint> \
    --grid-size \x3Cint> \
    --layers \x3Clist>

6.2 Parameters

Parameter Default Description
--name required KAN name (used for directory/files)
--role required KAN role/purpose
--agent "system" Agent owning the KAN
--input-size 768 Input dimension
--output-size 3 Output dimension
--hidden-size 32 Hidden layer width
--grid-size 5 B-spline grid size
--k 3 B-spline order
--layers auto Layer dimensions (auto-generated if not specified)

6.3 Output Structure

\x3Cname>/
├── config.json       # KAN configuration
├── models/
│   └── \x3Cname>.py     # KAN model class
├── data/
│   └── training/     # Training data directory
└── scripts/
    └── train.sh      # Training script template

7. Examples

Example 1: Create Monitoring KAN

python3 scripts/kan_creator.py \
    --name stc_monitor \
    --role "emotional tension monitoring" \
    --output-size 3

Output:

✅ KAN 'stc_monitor' created
📁 scripts/stc_monitor/
📋 config.json
🧠 models/stc_monitor.py

Example 2: Create Evaluation KAN

python3 scripts/kan_creator.py \
    --name eval_kan \
    --role "skill quality evaluation" \
    --output-size 3 \
    --input-size 768

Example 3: Create Logic Validation KAN

python3 scripts/kan_creator.py \
    --name vls_kan \
    --role "logic validation" \
    --agent ezekiel \
    --output-size 3

8. KAN Classes

8.1 KANLayer

Single KAN layer with B-spline basis functions:

class KANLayer(nn.Module):
    def __init__(self, in_features, out_features, grid_size=5, k=3):
        # B-spline grid: grid_size + k points
        # Learnable coefficients per output neuron

8.2 KANModel

Full KAN model with multiple layers:

class KANModel(nn.Module):
    def __init__(self, layers, grid_size=5, k=3):
        # Multiple KANLayers
        # Forward: input → B-spline → SiLU → output

8.3 KANWithHead

KAN with classification/regression head:

class KANWithHead(nn.Module):
    def __init__(self, kan_backbone, num_classes, mode="classification"):
        # KAN backbone + classification head
        # Supports: classification, regression, multi-head

9. Configuration

9.1 config.json Structure

{
    "name": "\x3Cname>",
    "role": "\x3Crole>",
    "agent": "\x3Cagent>",
    "input_size": 768,
    "hidden_size": 32,
    "output_size": 3,
    "grid_size": 5,
    "k": 3,
    "layers": [768, 32, 16, 8, 4, 3],
    "activation": "silu",
    "loss_function": "cross_entropy",
    "optimizer": "adam",
    "learning_rate": 0.001,
    "batch_size": 32,
    "epochs": 50,
    "train_samples": 200,
    "num_classes": 4
}

9.2 Parameter Adjustments

Use Case Recommended Settings
Monitoring output_size=3, epochs=50, batch_size=32
Evaluation output_size=4, epochs=100, batch_size=32
Validation output_size=2, epochs=50, batch_size=16
Multi-class output_size=num_classes, epochs=100

10. Error Handling

Error Cause Solution
ModuleNotFoundError: torch PyTorch not installed pip install torch --index-url https://download.pytorch.org/whl/cpu
FileExistsError: \x3Cname> KAN already exists Use --force or choose different name
ValueError: invalid layers Layer mismatch Ensure layers[0] == input_size and layers[-1] == output_size

11. Constraints

Constraint Value Description
Input size 768 (standard) Ollama embedding size
Output size 2-10 Decision/class dimension
Grid size 3-10 B-spline grid resolution
B-spline order 1-5 Spline polynomial degree
Max layers 10 Prevent over-complexity

12. Related Skills

Skill Purpose
axioma-kan-system Full KAN lifecycle (create+train+assemble)
axioma-skill-evaluator Evaluate KAN model quality
axiomata-cluster-guardian Use KAN for cluster lessons

In Altum Per KAN. 🧠 AXIOMATA KAN CREATOR v1.0 — UNIVERSAL KAN ARCHITECTURE

安全使用建议
Review before installing. If you use it, run it only in a dedicated disposable workspace, use safe alphanumeric names, inspect generated Python before running it, and do not rely on the B-spline KAN or NaN-free guarantees without independent validation.
能力评估
Purpose & Capability
The stated purpose is to create B-spline KAN architectures, but the included generator template describes and emits a standard Linear/Tanh PyTorch network, which is a material capability mismatch.
Instruction Scope
The skill is user-invoked through command examples, but the script accepts raw name, role, and output path values without visible validation before using them in filesystem paths and generated Python source.
Install Mechanism
Registry requirements declare no binaries or install spec, while SKILL.md requires Python and PyTorch and instructs running a Python script. This is purpose-aligned but under-declared.
Credentials
Creating local project files is expected for this skill, but the reviewed code can write and overwrite generated files using user-controlled path components without containment to a safe workspace.
Persistence & Privilege
The skill creates persistent local project files, configs, and Python model files, but there is no evidence of background persistence, credential use, or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install axiomata-kan-creator
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /axiomata-kan-creator 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.2.0
v1.2 - Fixed NaN issues, working KAN with bounded activations (Tanh), verified training without NaN
v1.0.0
v1.0 - Universal impersonal KAN creator with B-spline architecture, 5 templates, self-contained
元数据
Slug axiomata-kan-creator
版本 1.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Axiomata Kan Creator 是什么?

Axiomata KAN Creator v1.2 — Universal KAN (Kolmogorov-Arnold Network) concept creation tool. Use when: (1) creating new KAN concepts for monitoring/evaluatio... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。

如何安装 Axiomata Kan Creator?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install axiomata-kan-creator」即可一键安装,无需额外配置。

Axiomata Kan Creator 是免费的吗?

是的,Axiomata Kan Creator 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Axiomata Kan Creator 支持哪些平台?

Axiomata Kan Creator 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Axiomata Kan Creator?

由 Kofna3369(@kofna3369)开发并维护,当前版本 v1.2.0。

💬 留言讨论