Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below β |
Have you heard of LMFlow?
Itβs a framework that allows you to easily finetune open source large language models on your own datasets!
Here are the key features that are supported by the toolkit:
Below you can see the overall system design of LMFlow.
Note: LMFlow is not to be mixed with MLFlow, which is an MLOps framework.
More on LMFlow in the original paper and their github repo.
β
Most machine learning research is about going from mathematical modeling to ML model implementation. Hereβs how to go from conditional probability to a neural architecture.
β
Let's start by defining a simple conditional probability problem. Consider a supervised learning task where we have input data X and target data Y, and we want to model the conditional probability P(Y | X), meaning the probability of Y given X.
β
A common way to model this in machine learning is to assume that this probability follows some parametric form and then use the data to estimate the parameters of this model.
β
For instance, we could assume that P(Y | X) is a Gaussian distribution with mean Β΅(X) and standard deviation Ο(X). This mean Β΅(X) and standard deviation Ο(X) could be any functions of X, but in order to learn them from data, we often assume they can be parameterized with some parameters ΞΈ, and are differentiable with respect to these parameters.
β
This is where neural networks come in. A neural network is just a function approximator that's highly flexible and differentiable, making it suitable to represent these functions Β΅(X) and Ο(X).
β
Let's assume that our neural network is a simple feed-forward network with parameters ΞΈ. Then we can write our model as:
β
Β΅(X; ΞΈ) = NN_Β΅(X; ΞΈ)
Ο(X; ΞΈ) = NN_Ο(X; ΞΈ)
β
P(Y | X; ΞΈ) = N(Y; NN_Β΅(X; ΞΈ), NN_Ο(X; ΞΈ)^2)
β
Here, NN_Β΅ and NN_Ο are two neural networks which take the same input X and share the same parameters ΞΈ, and N is the Gaussian distribution. Their outputs represent the mean and standard deviation of the Gaussian distribution of Y given X.
β
To train this model, we would use a method called maximum likelihood estimation (MLE), which aims to find the parameters ΞΈ that maximize the likelihood of the observed data.
β
For our Gaussian model, this corresponds to minimizing the mean squared error between Y and NN_Β΅(X; ΞΈ).
β
Below, you can see how we might implement this in code using PyTorch.
β
In this code, we have a neural network that outputs two values for each input: a mean and a standard deviation. The loss function is defined as the negative log-likelihood of the Gaussian distribution, which we try to minimize using gradient descent.
Why would you want to understand this?
Because it will allow you to build intuition about how some of the powerful models in generative AI work. For example, variational autoencoders (VAEs) and stable diffusion process both have some level of conditional probability that is then modeled in the form of a neural network.
βDeep Learning for Object Detection using Tensorflow.
βDeep Learning for Image Segmentation using Mask RCNN and Tensorflow.
β
β
βThat's it for this week's edition, I hope you enjoyed it!
π Learn how to build AI systems for medical imaging domain by leveraging tools and techniques that I share with you! | π‘ The newsletter is read by people from: Nvidia, Baker Hughes, Harvard, NYU, Columbia University, University of Toronto and more!
Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below β AI Scribes: Transforming Medical Documentation Web Application for Medical Note Generation AI-powered medical scribes are revolutionizing clinical workflows by automating...
Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below β DeepSeek: A New Player in AI for Healthcare The new open-source LLM, DeepSeek, is creating buzz for its potential to transform AI in medicine and healthcare. Designed for...
Hello Reader, Welcome to another edition of PYCAD newsletter where we cover interesting topics in Machine Learning and Computer Vision applied to Medical Imaging. The goal of this newsletter is to help you stay up-to-date and learn important concepts in this amazing field! I've got some cool insights for you below β Now You Can Use Large Language Models that are HIPAA Compliant People are finding ways to use large language models in all fields. MedTech is no exception. The amount of work...