본문으로 건너뛰기
cccskills
무료GitHub에 공개

cats-for-ai

cats.for" (Categories for AI)

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구YouTube
설치 방법 보기

포함된 파일(3)

  • SKILL.md15.6 KB
  • CONCOMITANT_SKILLS.md3.4 KB
  • inaccessible_worlds.bb6.9 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

cats.for" (Categories for AI)

"Category theory is compositionality made formal" — Bruno Gavranović, cats.for.ai

URL: https://cats.for.ai Trit: 0 (ERGODIC) Color: #26D826 (Green) Status: ✅ Production Ready

Overview

cats.for.ai is the definitive lecture series connecting category theory to machine learning, organized by DeepMind, Qualcomm AI, and academic researchers.

┌─────────────────────────────────────────────────────────────────────────────┐
│                         cats.for.ai INTEGRATION                             │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   POLY INACCESSIBLE WORLDS AS COLORS MAXIMAL                               │
│                                                                             │
│   ┌───────────────┐     ┌───────────────┐     ┌───────────────┐            │
│   │   Poly(y)     │     │  Inaccessible │     │    Colors     │            │
│   │   Functors    │────▶│    Worlds     │────▶│    Maximal    │            │
│   │    (-1)       │     │     (0)       │     │     (+1)      │            │
│   └───────────────┘     └───────────────┘     └───────────────┘            │
│         │                      │                      │                     │
│         │    Optics/Lenses     │   Modal Semantics    │   GF(3) Coloring   │
│         │                      │                      │                     │
│         └──────────────────────┴──────────────────────┘                     │
│                                 │                                           │
│                    GF(3): (-1) + 0 + (+1) ≡ 0                              │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Organizing Committee

NameAffiliationRole
Bruno GavranovićStrathclyde / CyberCatOptics, Lenses, Backprop
Petar VeličkovićDeepMind / CambridgeGNNs, Categories
Pim de HaanAmsterdam / QualcommGeometric DL, Equivariance
Andrew DudzikDeepMindMonads, RNNs
João G. AraújoCohere / USPLLMs, Semantics

Guest Speakers

SpeakerTopicTrit
David SpivakPoly, Dynamic Systems0 (ERGODIC)
Jules HedgesCategorical Cybernetics0 (ERGODIC)
Tai-Danae BradleyCT for LLMs+1 (PLUS)
Taco CohenCausal Abstraction-1 (MINUS)
Pietro VertechiParametric Spans0 (ERGODIC)
Thomas GebhartSheaves for AI-1 (MINUS)

Lecture Program

Part 1: Introductory Lectures (Completed)

WeekTopicSpeakerKey Concepts
1Why Category Theory?GavranovićCompositionality, Modularity
2Categories & FunctorsVeličkovićObjects, Morphisms, Functors
3Optics & LensesGavranovićBidirectional flow, Backprop
4Geometric DL & Naturalityde HaanEquivariance, Natural transformations
5Monoids, Monads, LSTMsDudzikRecurrence, State

Part 2: Research Seminars (Ongoing)

DateTopicSpeaker
Nov 14Neural network layers as parametric spansVertechi
Nov 21Causal Model AbstractionCohen
Dec 12Category Theory Inspired by LLMsBradley
Mar 20Categorical CyberneticsHedges
Mar 27Dynamic organizational systemsSpivak
May 29Sheaves for AIGebhart

Core Concepts

1. Polynomial Functors (Py)

-- Poly = polynomial functors on Set
-- y = representable functor Hom(1, -)
-- ◁ = composition of polynomials

data Poly where
  Poly :: { positions :: Type
          , directions :: positions -> Type
          } -> Poly

-- Key operations
(⊗) :: Poly -> Poly -> Poly  -- parallel (tensor)
(◁) :: Poly -> Poly -> Poly  -- sequential (composition)
(+) :: Poly -> Poly -> Poly  -- coproduct

2. Inaccessible Worlds (Modal Semantics)

-- Kripke frame with inaccessibility
record KripkeFrame : Set₁ where
  field
    World : Set
    _≺_ : World → World → Set  -- accessibility
    inaccessible : World → Set  -- worlds with no predecessors

-- Modal operators
□ : (World → Prop) → (World → Prop)  -- necessity
□ φ w = ∀ v → w ≺ v → φ v

◇ : (World → Prop) → (World → Prop)  -- possibility
◇ φ w = ∃ v → w ≺ v × φ v

-- Inaccessible world: ¬∃v. v ≺ w
isInaccessible : World → Prop
isInaccessible w = ∀ v → ¬(v ≺ w)

3. Colors Maximal (GF(3) Saturation)

(ns cats4ai.colors
  (:require [gay.core :as gay]))

(defn color-world [world-seed trit]
  "Assign maximal color to world based on trit"
  (let [hue (case trit
              :MINUS   (+ 180 (mod (* world-seed 37) 120))  ; cold
              :ERGODIC (+ 60 (mod (* world-seed 41) 120))   ; neutral
              :PLUS    (mod (* world-seed 43) 60))          ; warm
        saturation 1.0  ; MAXIMAL
        lightness 0.5]
    {:hue hue :sat saturation :lit lightness
     :hex (gay/hsl->hex hue saturation lightness)}))

(defn worlds-palette [n]
  "Generate n inaccessible worlds with maximal colors"
  (for [i (range n)
        :let [trit (case (mod i 3) 0 :ERGODIC 1 :PLUS 2 :MINUS)]]
    {:world-id i
     :accessible? false  ; inaccessible
     :color (color-world i trit)
     :trit trit}))

Optics for Machine Learning

Lens = Backpropagation

-- A lens captures forward/backward pass
data Lens s t a b = Lens
  { view :: s -> a        -- forward pass
  , update :: s -> b -> t  -- backward pass (gradient)
  }

-- Backprop is lens composition
backprop :: Lens s t a b -> Lens a b c d -> Lens s t c d
backprop l1 l2 = Lens
  { view = view l2 . view l1
  , update = \s d ->
      let a = view l1 s
          b = update l2 a d
      in update l1 s b
  }

-- Chain rule emerges from lens composition!
-- d(g∘f)/dx = dg/df · df/dx

Para = Parametric Morphisms

-- Parametric morphism (neural network layer)
data Para p a b = Para
  { params :: p           -- learnable parameters
  , forward :: p -> a -> b  -- parameterized forward
  }

-- Para composition
(>>>) :: Para p a b -> Para q b c -> Para (p, q) a c
(Para p f) >>> (Para q g) = Para (p, q) (\(p,q) a -> g q (f p a))

Optic = Generalized Bidirectional

-- Optic generalizes lens, prism, traversal
type Optic p s t a b = p a b -> p s t

-- Specific optics for ML:
type Lens s t a b = Optic (Star ((->) s)) s t a b      -- deterministic
type Prism s t a b = Optic (Costar (Either a)) s t a b -- optional
type Affine s t a b = Optic (Star Maybe) s t a b       -- at most one

Integration Map

With Existing Skills

┌─────────────────────────────────────────────────────────────────────────────┐
│                      cats.for.ai SKILL INTEGRATION                          │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  cats.for.ai                                                                │
│       │                                                                     │
│       ├──▶ open-games (Hedges)                                             │
│       │         └── Play/Coplay bidirectional                               │
│       │                                                                     │
│       ├──▶ catsharp (Spivak)                                               │
│       │         └── Cat# = Comod(P) equipment                              │
│       │                                                                     │
│       ├──▶ topos-catcolab (Patterson)                                      │
│       │         └── Double theories, ACSets                                 │
│       │                                                                     │
│       ├──▶ cybernetic-open-game                                            │
│       │         └── Agent-O-Rama ↔ Worldnet ↔ STC                          │
│       │                                                                     │
│       ├──▶ elements-infinity-cats (Riehl-Verity)                           │
│       │         └── ∞-cosmos model independence                             │
│       │                                                                     │
│       ├──▶ sheaf-laplacian-coordination (Gebhart)                          │
│       │         └── Sheaf neural networks                                   │
│       │                                                                     │
│       ├──▶ crdt (Automerge)                                                │
│       │         └── Join-semilattice merge                                  │
│       │                                                                     │
│       └──▶ derangement-crdt                                                │
│                 └── Colorable permutations                                  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

GF(3) Triads

# Core cats.for.ai triads
optics-lenses (-1) ⊗ cats-for-ai (0) ⊗ backprop (+1) = 0 ✓
sheaves (-1) ⊗ cats-for-ai (0) ⊗ gnns (+1) = 0 ✓
cybernetics (-1) ⊗ cats-for-ai (0) ⊗ open-games (+1) = 0 ✓
poly-functors (-1) ⊗ cats-for-ai (0) ⊗ para-morphisms (+1) = 0 ✓
causal-abstraction (-1) ⊗ cats-for-ai (0) ⊗ llm-semantics (+1) = 0 ✓

Inaccessible Worlds Protocol

For each inaccessible world (no predecessor in accessibility relation):

class InaccessibleWorld:
    """A world with no accessible predecessors - epistemic ground truth"""

    def __init__(self, seed: int, trit: int):
        self.seed = seed
        self.trit = trit  # -1, 0, +1
        self.color = self._maximal_color()
        self.accessible_from = set()  # empty = inaccessible

    def _maximal_color(self) -> dict:
        """Assign maximally saturated color based on trit"""
        hue_base = {-1: 240, 0: 120, 1: 0}[self.trit]  # blue/green/red
        hue = (hue_base + (self.seed * 37) % 60) % 360
        return {"h": hue, "s": 1.0, "l": 0.5}  # MAXIMAL saturation

    def poly_action(self, p: "Poly") -> "InaccessibleWorld":
        """Apply polynomial functor action"""
        new_seed = (self.seed * p.positions + sum(p.directions)) % (2**64)
        new_trit = (self.trit + p.trit) % 3
        return InaccessibleWorld(new_seed, new_trit)

YouTube Resources

All lectures available: YouTube Playlist

LectureViewsKey Insight
Why Category Theory?24K+Compositionality = modularity
Optics and Lenses15K+Chain rule = lens composition
Categorical Cybernetics10K+Agency via parametrised optics
Sheaves for AI8K+Local-to-global inference

Commands

# Watch lecture
just cats4ai-watch LECTURE_NUM

# Run optics demo
just cats4ai-optics-demo

# Generate inaccessible worlds
just cats4ai-worlds N

# Color palette
just cats4ai-colors --maximal

# Integration check
just cats4ai-integrate SKILL_NAME

Babashka Integration

#!/usr/bin/env bb
;; cats4ai.bb - Categories for AI utilities

(ns cats4ai
  (:require [babashka.http-client :as http]
            [cheshire.core :as json]))

(def LECTURES
  [{:week 1 :title "Why Category Theory?" :speaker "Gavranović" :trit 0}
   {:week 2 :title "Categories & Functors" :speaker "Veličković" :trit 0}
   {:week 3 :title "Optics & Lenses" :speaker "Gavranović" :trit -1}
   {:week 4 :title "Geometric DL" :speaker "de Haan" :trit +1}
   {:week 5 :title "Monads & LSTMs" :speaker "Dudzik" :trit 0}])

(defn gf3-conservation? [lectures]
  (zero? (mod (reduce + (map :trit lectures)) 3)))

(defn inaccessible-world [seed]
  {:seed seed
   :trit (case (mod seed 3) 0 :ERGODIC 1 :PLUS 2 :MINUS)
   :accessible-from #{}
   :color {:h (mod (* seed 37) 360) :s 1.0 :l 0.5}})

(defn -main [& args]
  (println "cats.for.ai - Categories for AI")
  (println "GF(3) conserved?" (gf3-conservation? LECTURES))
  (println "Inaccessible worlds:"
           (map inaccessible-world (range 3))))

(when (= *file* (System/getProperty "babashka.file"))
  (apply -main *command-line-args*))

References

Primary

Papers

  • Gavranović et al. "Categorical Foundations of Gradient-Based Learning" (2024)
  • Hedges "Compositional Game Theory" (2016)
  • Spivak "Poly: An abundant categorical setting" (2020)
  • Bradley "Language Models as Semantic Functors" (2023)
  • Gebhart "Sheaf Neural Networks" (2022)

Related Skills

  • open-games - Hedges' compositional games
  • catsharp - Spivak's Cat# = Comod(P)
  • topos-catcolab - Topos collaborative CT
  • cybernetic-open-game - Cybernetic feedback
  • sheaf-laplacian-coordination - Gebhart sheaves
  • crdt - Join-semilattice CRDTs
  • derangement-crdt - Colorable derangements

Skill Name: cats-for-ai Type: Categorical Machine Learning Trit: 0 (ERGODIC) Poly: Inaccessible worlds as colors maximal GF(3): Conserved across all triads

SDF Interleaving

This skill connects to Software Design for Flexibility (Hanson & Sussman, 2021):

Primary Chapter: 10. Adventure Game Example

Concepts: autonomous agent, game, synthesis

GF(3) Balanced Triad

cats-for-ai (+) + SDF.Ch10 (+) + [balancer] (+) = 0

Skill Trit: 1 (PLUS - generation)

Secondary Chapters

  • Ch7: Propagators
  • Ch6: Layering
  • Ch2: Domain-Specific Languages

Connection Pattern

Adventure games synthesize techniques. This skill integrates multiple patterns.

CT lattice atlas

Part of: para-mensch-commons (CT lattice family).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Model ElevenLabs voice synthesis as an ACSet schema with Unison ability handlers for typed voice operations. Use when integrating ElevenLabs TTS into category-theoretic pipelines, building typed voice synthesis workflows, or managing multi-voice narration with GF(3) conservation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

Systematic process for analyzing and modernizing legacy applications to comply with the 12-Factor App methodology. Covers code analysis, configuration externalization, dependency management, and container/Kubernetes best practices.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

13c0e3

무료

Gay MCP skill at invocation 26

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

19d57d

무료

Gay MCP skill at invocation 5

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1ea91a

무료

Gay MCP skill at invocation 27

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

1eab21

무료

Gay MCP skill at invocation 3

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

plurigrid/asi702026년 7월 10일 업데이트

plurigrid의 스킬 모두 보기

이 스킬의 문제 신고