Ciphers With Vector Symbolic Architectures
Squid's Blog
by Carin Meier
11M ago
A secret message inside a 10,000 hyperdimensional vector We’ve seen in previous posts how we can encode data structures using Vector Symbolic Architectures in Clojure. This is an exploration of how we can use this to develop a cipher to transmit a secret message between two parties. A Hyperdimensional Cipher Usually, we would develop a dictionary/ cleanup memory of randomly chosen hyperdimensional vectors to represent each symbol. We could do this, but then sharing the dictionary as our key to be able to decode messages would be big. Instead, we could share a single hyperdimensional vector an ..read more
Visit website
Vector Symbolic Architectures in Clojure
Squid's Blog
by Carin Meier
1y ago
generated with Stable Diffusion Before diving into the details of what Vector Symbolic Architectures are and what it means to implement Clojure data structures in them, I’d like to start with some of my motivation in this space. Small AI for More Personal Enjoyment Over the last few years, I’ve spent time learning, exploring, and contributing to open source deep learning. It continues to amaze me with its rapid movement and achievements at scale. However, the scale is really too big and too slow for me to enjoy it anymore. Between work and family, I don’t have a lot of free time. When I do ge ..read more
Visit website
Breakfast With Zero-Shot NLP
Squid's Blog
by Carin Meier
3y ago
What if I told you that you could pick up a library model and instantly classify text with arbitrary categories without any training or fine tuning? That is exactly what we are going to do with Hugging Face’s zero-shot learning model. We will also be using libpython-clj to do this exploration without leaving the comfort of our trusty Clojure REPL. What’s for breakfast? We’ll start off by taking some text from a recipe description and trying to decide if it’s for breakfast, lunch or dinner: "French Toast with egg and bacon in the center with maple syrup on top. Sprinkle with powdered sugar if ..read more
Visit website
Thoughts on AI Debate 2
Squid's Blog
by Carin Meier
3y ago
AI Debate 2 from Montreal.AI I had the pleasure of watching the second AI debate from Montreal.AI last night. The first AI debate occurred last year between Yoshua Bengio and Gary Marcus entitled “The Best Way Forward for AI” in which Yoshua argued that Deep Learning could achieve General AI through its own paradigm, while Marcus argued that Deep Learning alone was not sufficient and needed a hybrid approach involving symbolics and inspiration from other disciplines. This interdisciplinary thread of Gary’s linked the two programs. The second AI debate was entitled “Moving AI Forward: An Inte ..read more
Visit website
Clojure Interop With Python NLP Libraries
Squid's Blog
by Carin Meier
4y ago
In this edition of the blog series of Clojure/Python interop with libpython-clj, we’ll be taking a look at two popular Python NLP libraries: NLTK and SpaCy. NLTK – Natural Language Toolkit I was taking requests for doing examples of python-clojure interop libraries on twitter the other day, and by far NLTK was the most requested library. After looking into it, I can see why. It’s the most popular natural language processing library in Python and you will see it everywhere there is text someone is touching. Installation To use the NLTK toolkit you will need to install it. I use sudo pip3 ..read more
Visit website
Parens for Pyplot
Squid's Blog
by Carin Meier
4y ago
libpython-clj has opened the door for Clojure to directly interop with Python libraries. That means we can take just about any Python library and directly use it in our Clojure REPL. But what about matplotlib? Matplotlib.pyplot is a standard fixture in most tutorials and python data science code. How do we interop with a python graphics library? How do you interop? It turns out that matplotlib has a headless mode where we can export the graphics and then display it using any method that we would normally use to display a .png file. In my case, I made a quick macro for it using the shell ope ..read more
Visit website
Hugging Face GPT With Clojure
Squid's Blog
by Carin Meier
4y ago
A new age in Clojure has dawned. We now have interop access to any python library with libpython-clj. Let me pause a minute to repeat. You can now interop with ANY python library. I know. It’s overwhelming. It took a bit for me to come to grips with it too. Let’s take an example of something that I’ve always wanted to do and have struggled with mightly finding a way to do it in Clojure: I want to use the latest cutting edge GPT2 code out there to generate text. Right now, that library is Hugging Face Transformers. Get ready. We will wrap that sweet hugging face code in Clojure ..read more
Visit website
Integrating Deep Learning With clojure.spec
Squid's Blog
by Carin Meier
5y ago
clojure.spec allows you to write specifications for data and use them for validation. It also provides a generative aspect that allows for robust testing as well as an additional way to understand your data through manual inspection. The dual nature of validation and generation is a natural fit for deep learning models that consist of paired discriminator/generator models. TLDR: In this post we show that you can leverage the dual nature of clojure.spec’s validator/generator to incorporate a deep learning model’s classifier/generator. A common use of clojure.spec is at the boundaries to val ..read more
Visit website
Focus on the Generator
Squid's Blog
by Carin Meier
5y ago
In this first post of this series, we took a look at a simple autoencoder. It took and image and transformed it back to an image. Then, we focused in on the disciminator portion of the model, where we took an image and transformed it to a label. Now, we focus in on the generator portion of the model do the inverse operation: we transform a label to an image. In recap: Autoencoder: image –> image Discriminator: image –> label Generator: label –> image (This is what we are doing now!) Still Need Data of Course Nothing changes here. We are still using the MNIST handwritten digit se ..read more
Visit website
Focus on the Discriminator
Squid's Blog
by Carin Meier
5y ago
In the last post, we took a look at a simple autoencoder. The autoencoder is a deep learning model that takes in an image and, (through an encoder and decoder), works to produce the same image. In short: Autoencoder: image –> image For a discriminator, we are going to focus on only the first half on the autoencoder. Why only half? We want a different transformation. We are going to want to take an image as input and then do some discrimination of the image and classify what type of image it is. In our case, the model is going to input an image of a handwritten digit and attempt to dec ..read more
Visit website

Follow Squid's Blog on FeedSpot

Continue with Google
Continue with Apple
OR