
Functors map between categories preserving composition and identity
Image: Wassily Kandinsky, Public domain, via Wikimedia Commons
Functors map between categories preserving composition and identity
Functors are mappings between categories that maintain the structure of the categories they connect. They ensure that the composition of morphisms (functions) in one category corresponds to the composition of morphisms in another category. Additionally, functors preserve identity morphisms, meaning that the identity element in one category maps to the identity element in the target category.
Example
Consider two categories, Category A and Category B. A functor F maps objects from Category A to objects in Category B. If there are morphisms f and g in Category A such that f composed with g equals some morphism h in Category A, then F(f) composed with F(g) in Category B will equal F(h). Furthermore, if there is an identity morphism i in Category A, then F(i) will be the identity morphism in Category B.
Understanding functors is crucial in category theory as they provide a way to relate different mathematical structures while preserving their intrinsic properties. This concept is fundamental in modern mathematics and has applications across various fields.
Yoneda lemma
The Yoneda lemma embeds a locally small category into a functor category
the tokenizer's special tokens do: [CLS], [SEP], [PAD], [MASK] have specific roles
[CLS] marks the start of input, [SEP] denotes separation, [PAD] fills space, [MASK] hides words for prediction
the Y combinator does: enables recursion in languages without named functions
The Y combinator allows anonymous functions to call themselves recursively
classifier-free guidance does: interpolates between conditional and unconditional generation
"Classifies samples as either conditioned or unconditioned, guiding generation towards desired outcomes."
Overlapping subproblems
Dynamic programming solves overlapping subproblems by storing results of subproblems to avoid redundant calculations
Inner product space
Inner product space generalizes Euclidean geometry
One email a day: 5 concepts + the 5 stories that matter →
Swipe through 100 ML concepts daily
Open TickerNews