haltakov.eth ๐Ÿงฑ๐Ÿ”จ Profile picture
Making web3 accessible to everyone. VP of Engineering @FR0NTIER_X. Used to program self-driving cars. Side-project @0xbnomial.
Joshua S. Liu Profile picture GollyG ๐Ÿ’™ Profile picture Ben Bellerose Profile picture Craig Bobbin Profile picture Balaraman Sriram Profile picture 7 subscribed
Jul 5, 2022 โ€ข 20 tweets โ€ข 5 min read
Zero-Knowledge Proofs 0๏ธโƒฃ๐Ÿ“˜

How can I prove to you that I know a secret, without revealing any information about the secret itself?

This is called a zero-knowledge proof and it is a super interesting area of cryptography! But how does it work?

Thread ๐Ÿงต Let's start with an example

Peggie and Victor travel between cities A and B. There are two paths - a long path and a short path. The problem is that there is a gate on the short path for which you need a password.

Peggie knows the password, but Victor doesn't.

๐Ÿ‘‡
Mar 30, 2022 โ€ข 6 tweets โ€ข 8 min read
Launching a charity project for Ukraine ๐Ÿ‡บ๐Ÿ‡ฆ

Me and @ianbydesign teamed up to build @RescueToadz - an NFT collection raising funds for humanitarian aid via @Unchainfund. Many thanks to @cryptoadzNFT for the support!

rescuetoadz.xyz

It's unlike any other NFT, though๐Ÿ‘‡ @ianbydesign @RescueToadz @Unchainfund @cryptoadzNFT Trustless

Rescue Toadz looks like a regular NFT collection at first - you can mint a toad and you get an NFT in your wallet.

100% of the mint fee is directly sent to @Unchainfund - an organization that provides humanitarian aid to Ukraine and that has already raised $9M!

๐Ÿ‘‡ Image
Mar 25, 2022 โ€ข 14 tweets โ€ข 4 min read
Dealing with imbalanced datasets ๐Ÿ โš–๏ธ ๐Ÿ˜

Real world datasets are often imbalanced - some of the classes appear much more often than others.

The problem? You ML model will likely learn to only predict the dominant classes.

What can you do about it? ๐Ÿค”

Thread ๐Ÿงต #RepostFriday Example ๐Ÿšฆ

We will be dealing with an ML model to detect traffic lights for a self-driving car ๐Ÿค–๐Ÿš—

Traffic lights are small so you will have much more parts of the image that are not traffic lights.

Furthermore, yellow lights ๐ŸŸก are much rarer than green ๐ŸŸข or red ๐Ÿ”ด.
Mar 22, 2022 โ€ข 16 tweets โ€ข 7 min read
Machine Learning Explained ๐Ÿ‘จโ€๐Ÿซ

PCA

Principal Component Analysis is a commonly used method for dimensionality reduction.

It's a good example of how fairly complex math can have an intuitive explanation and be easy to use in practice.

Let's start from the application of PCA ๐Ÿ‘‡ Image Dimensionality Reduction

This is one of the common uses of PCA in machine learning.

Imagine you want to predict house prices. You get a large table of many houses and different features for them like size, number of rooms, location, age, etc.

Some features seem correlated ๐Ÿ‘‡
Mar 18, 2022 โ€ข 8 tweets โ€ข 4 min read
s this formula difficult? ๐Ÿค”

This is the formula for Gradient Descent with Momentum as presented in Wikipedia.

It may look intimidating at first, but I promise you that by the end of this thread it will be easy to understand!

Thread ๐Ÿ‘‡

#RepostFriday The Basis โ—ป๏ธ

Let's break it down! The basis is this simple formula describing an iterative optimization method.

We have some weights (parameters) and we iteratively update them in some way to reach a goal

Iterative methods are used when we cannot compute the solution directly
Mar 16, 2022 โ€ข 20 tweets โ€ข 4 min read
Machine Learning Formulas Explained ๐Ÿ‘จโ€๐Ÿซ

For regression problems you can use one of several loss functions:
โ–ช๏ธ MSE
โ–ช๏ธ MAE
โ–ช๏ธ Huber loss

But which one is best? When should you prefer one instead of the other?

Thread ๐Ÿงต Image Let's first quickly recap what each of the loss functions does. After that, we can compare them and see the differences based on some examples.

๐Ÿ‘‡
Mar 11, 2022 โ€ข 16 tweets โ€ข 5 min read
Machine Learning in the Real World ๐Ÿง  ๐Ÿค–

ML for real-world applications is much more than designing fancy networks and fine-tuning parameters.

In fact, you will spend most of your time curating a good dataset.

Let's go through the process together ๐Ÿ‘‡

#RepostFriday Image Collect Data ๐Ÿ’ฝ

We need to represent the real world as accurately as possible. If some situations are underrepresented we are introducing Sampling Bias.

Sampling Bias is nasty because we'll have high test accuracy, but our model will perform badly when deployed.

๐Ÿ‘‡
Mar 8, 2022 โ€ข 13 tweets โ€ข 5 min read
Machine Learning Formulas Explained ๐Ÿ‘จโ€๐Ÿซ

This is the Huber loss - another complicated-looking formula...

Yet again, if you break it down and understand the individual, it becomes really easy.

Let me show you ๐Ÿ‘‡ Image Background

The Huber loss is a loss function that is similar to the Mean Squared Error (MSE) but it is designed to be more robust to outliers.

MSE suffers from the problem that if there is a small number of severe outliers they can dominate the whole loss

How does it work? ๐Ÿ‘‡
Mar 4, 2022 โ€ข 13 tweets โ€ข 5 min read
Machine Learning Formulas Explained! ๐Ÿ‘จโ€๐Ÿซ

This is the formula for the Binary Cross Entropy Loss. It is commonly used for binary classification problems.

It may look super confusing, but I promise you that it is actually quite simple!

Let's go step by step ๐Ÿ‘‡

#RepostFriday The Cross-Entropy Loss function is one of the most used losses for classification problems. It tells us how well a machine learning model classifies a dataset compared to the ground truth labels.

The Binary Cross-Entropy Loss is a special case when we have only 2 classes.

๐Ÿ‘‡
Mar 3, 2022 โ€ข 11 tweets โ€ข 7 min read
When machine learning met crypto art... they fell in love โค๏ธ

The Decentralized Autonomous Artist (DAA) is a concept that is uniquely enabled by these technologies.

Meet my favorite DAA - Botto.

Let me tell you how it works ๐Ÿ‘‡ Botto uses a popular technique to create images - VQGAN+CLIP

In simple terms, it uses a neural network model generating images (VQCAN) guided by the powerful CLIP model which can relate images to text.

This method can create stunning visuals from a simple text prompt!

๐Ÿ‘‡
Feb 25, 2022 โ€ข 20 tweets โ€ข 7 min read
There are two problems with ROC curves

โŒ They don't work for imbalanced datasets
โŒ They don't work for object detection problems

So what do we do to evaluate our machine learning models properly in these cases?

We use a Precision-Recall curve.

Thread ๐Ÿ‘‡

#RepostFriday Last week I wrote another detailed thread on ROC curves. I recommend that you read it first if you don't know what they are.



Then go on ๐Ÿ‘‡
Feb 24, 2022 โ€ข 11 tweets โ€ข 4 min read
Is your machine learning model performing well? What about in 6 months? ๐Ÿค”

If you are wondering why I'm asking this, you need to learn about ๐—ฐ๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜ ๐—ฑ๐—ฟ๐—ถ๐—ณ๐˜ and ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ฑ๐—ฟ๐—ถ๐—ณ๐˜.

Let me explain this to you using two real world examples.

Thread ๐Ÿ‘‡ Imagine you are developing a model for a self-driving car to detect other vehicles at night.

Well, this is not too difficult, since vehicles have two red tail lights and it is easy to get a lot of data. You model works great!

But then... ๐Ÿ‘‡ Image
Feb 22, 2022 โ€ข 9 tweets โ€ข 5 min read
Math is not very important when you are using a machine learning method to solve your problem.

Everybody that disagrees, should study the 92-page appendix of the Self-normalizing networks (SNN) paper, before using
torch.nn.SELU.

And the core idea of SNN is actually simple ๐Ÿ‘‡ ImageImageImageImage SNNs use an activation function called Scaled Exponential Linear Unit (SELU) that is pretty simple to define.

It has the advantage that the activations converge to zero mean and unit variance, which allows training of deeper networks and employing strong regularization.

๐Ÿ‘‡ ImageImage
Feb 21, 2022 โ€ข 10 tweets โ€ข 3 min read
This is like an NFT in the physical world

This is a special edition BMW 8 series painted by the famous artist Jeff Koons. A limited-edition of 99 with a price of $350K - about $200K more than the regular M850i.

If you think about it, you'll see many similarities with NFTs

๐Ÿ‘‡ Image Artificially scarce

BMW can surely produce (mint ๐Ÿ˜…) more than 99 cars with this paint. The collection size is limited artificially in order to make it more exclusive.

Same as most NFT collections - they create artificial scarcity.

๐Ÿ‘‡
Feb 18, 2022 โ€ข 19 tweets โ€ข 6 min read
Did you ever want to learn how to read ROC curves? ๐Ÿ“ˆ๐Ÿค”

This is something you will encounter a lot when analyzing the performance of machine learning models.

Let me help you understand them ๐Ÿ‘‡

#RepostFriday What does ROC mean?

ROC stands for Receiver Operating Characteristic but just forget about it. This is a military term from the 1940s and doesn't make much sense today.

Think about these curves as True Positive Rate vs. False Positive Rate plots.

Now, let's dive in ๐Ÿ‘‡
Feb 17, 2022 โ€ข 12 tweets โ€ข 2 min read
It sucks if your ML model can't achieve good performance, but it is even worse if you don't know it!

Sometimes you follow all the best practices and your experiments show your model performing very well, but it fails when deployed.

A thread about Sampling Bias ๐Ÿ‘‡ There is a lot of information about rules you need to follow when evaluating your machine learning model:

โ–ช๏ธ Balance your dataset
โ–ช๏ธ Use the right metric
โ–ช๏ธ Use high-quality labels
โ–ช๏ธ Split your training and test data
โ–ช๏ธ Perform cross-validation

But this may not be enough ๐Ÿ‘‡
Jan 18, 2022 โ€ข 15 tweets โ€ข 4 min read
The Internet is already decentralized, why do we need web3? ๐Ÿค”

This is a common critique of web3. However, decentralization on its own is not always enough - sometimes we need to agree on a set of facts.

Blockchains give us a consensus mechanism for that!

Thread ๐Ÿงต

1/12 The Internet is built of servers that communicate using open protocols like HTTP, SMTP, WebRTC etc. Everybody can set up a server and participate. It is decentralized!

However, if two servers distribute contradicting information, how do you know which one is right?

2/12
Jan 18, 2022 โ€ข 9 tweets โ€ข 4 min read
How decentralized is web3 really?

While there is a lot of hype around web3, NFTs, and decentralized apps (dApps), there is also a lot of criticism. Today, I'll focus on the critique that web3 is actually too centralized.

Let's try to have an honest discussion ๐Ÿ‘‡ These are the main arguments I see regularly. Please add more in the comments.

1๏ธโƒฃ The Internet is already decentralized
2๏ธโƒฃ It is inefficient
3๏ธโƒฃ Everything can be implemented better using a centralized approach
4๏ธโƒฃ Important services are centralized

๐Ÿ‘‡
Jan 17, 2022 โ€ข 7 tweets โ€ข 5 min read
How many parameters do you need in your neural network to solve any problem? ๐Ÿค”

GPT-3 has 175 billion, MT-NLG has 530 billion and Wu Dao has 1.75 trillion.

But the truth is you only need 1 parameter. No, not 1 billion. Just a single parameter!

Let me explain ๐Ÿ‘‡ Yes, of course, I'm trolling you, but only a little bit ๐Ÿ˜

I want to show you this very cool work by @ranlot75 about how to fit an arbitrary dataset with a single parameter and the following function

github.com/Ranlot/single-โ€ฆ

๐Ÿ‘‡
Dec 29, 2021 โ€ข 26 tweets โ€ข 10 min read
You think you know what is an NFT? Well, think again...

You are doing it wrong if you think about NFTs as pixelated images of punks, toads, or apes. It is not about the JPEG!

A better mental model for thinking about NFTs ๐Ÿ‘‡ Forget the images for now. Owning an NFT means that your wallet address is listed as the owner of a specific digital asset on the blockchain.

Digital assets are organized in collections and an NFT is one specific piece of this collection.

Let's look at an example ๐Ÿ‘‡
Dec 21, 2021 โ€ข 5 tweets โ€ข 3 min read
Things are getting more and more interesting for AI-generated images! ๐ŸŽจ

GLIDE is a new model by @OpenAI that can generate images guided by a text prompt. It is based on a diffusion model instead of the more widely used GAN models.

Some details ๐Ÿ‘‡ @OpenAI GLIDE also has the interesting ability to perform inpainting allowing for some interesting usages.

๐Ÿ‘‡