
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.
Remember this
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.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
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
classifier-free guidance does: interpolates between conditional and unconditional generation
"Classifies samples as either conditioned or unconditioned, guiding generation towards desired outcomes."
Inner product space
Inner product space generalizes Euclidean geometry
Matryoshka embeddings are: trained to be useful at multiple truncated dimensions
Ever wondered how a simple doll can teach us about nested complexities?
Overlapping subproblems
Ever calculated a huge Fibonacci sequence by hand?
Swipe through 100 ML concepts daily
Open Pocket Polymath