On-device ML: Artificial Intelligence in your pocket
Priyanka Kulkarni21:592023
Quelques centaines de mégaoctets de modèle peuvent signer l'arrêt de mort d'une application mobile
Un modèle de deep learning typique pèse quelques centaines de mégaoctets, et les enquêtes montrent que le manque de stockage et la consommation de batterie sont les raisons les plus fréquentes de désinstallation d'une application. Les équipes qui font passer l'IA du cloud aux téléphones doivent gagner à la fois sur la mémoire, la vitesse et la sécurité, souvent sur des appareils d'entrée et de milieu de gamme. Priyanka Kulkarni, Senior Machine Learning Engineer chez Adobe, cartographie ce terrain : comment réduire, accélérer et protéger un modèle qui vit dans la poche d'un client ?
Découvrez les stratégies de compression, d'accélération et de tatouage numérique qui rendent le ML embarqué réaliste
Priyanka Kulkarni, Senior Machine Learning Engineer chez Adobe, explique ce qu'il faut pour faire passer des modèles de deep learning des serveurs cloud vers les téléphones et autres appareils edge. Elle aborde trois défis (taille du modèle, efficacité du modèle et sécurité) et présente la compression, la recherche d'architecture neuronale, les accélérateurs matériels, le tatouage numérique de modèles et l'apprentissage fédéré comme moyens d'y répondre.
“Une application volumineuse, c'est l'arrêt de mort sur mobile.”
“Donc garder une taille de modèle mobile réduite et une faible latence est vraiment non négociable.”
What you will learn
Évaluez les avantages en matière de coût, de latence, de connectivité et de confidentialité de l'exécution des modèles sur l'appareil plutôt que dans le cloud.
Choisissez des architectures adaptées au mobile comme EfficientNet, MobileNet ou MobileViT et réduisez-les par élagage, distillation des connaissances et quantification.
Utilisez la recherche d'architecture neuronale et des réseaux évolutifs de type Once-for-All pour cibler plusieurs environnements matériels sans repartir de zéro à chaque fois.
Diagnostiquez le jank dû à la contention du GPU et adaptez les couches du modèle aux accélérateurs matériels comme XNNPACK ou l'Apple Neural Engine.
Protégez la propriété intellectuelle des modèles déployés grâce au chiffrement, à l'obfuscation, à la limitation des requêtes et au tatouage numérique des réseaux de neurones.
Details
Level
Intermediate
Format
Talk
Technical depth
Practitioner
For
Mid-career, Senior individual contributor
Length
21:59
Published
June 2023
Questions this talk answers
Pourquoi exécuter le machine learning sur l'appareil plutôt que dans le cloud ?
L'inférence sur l'appareil évite les coûts de data center et de bande passante et fonctionne quelle que soit la connectivité. Elle offre aux utilisateurs des résultats en temps réel et préserve la confidentialité de leurs données, qui n'ont jamais besoin d'être envoyées ni stockées sur un serveur.
Pourquoi la taille du modèle est-elle une contrainte si critique sur mobile ?
Un modèle de deep learning typique pèse quelques centaines de mégaoctets, et une application volumineuse signe son arrêt de mort sur mobile, surtout dans les marchés émergents où dominent les téléphones d'entrée et de milieu de gamme. L'intervenante a cité des enquêtes montrant que le manque de stockage et la consommation de batterie sont les raisons les plus fréquentes de désinstallation.
Qu'est-ce que le jank et comment les équipes de ML embarqué peuvent-elles le réduire ?
Le jank désigne les saccades d'images qui apparaissent lorsque le GPU gère simultanément le rendu de l'interface et l'inférence du modèle. Les équipes peuvent le profiler avec les outils de développement iOS et Android, adapter les couches aux accélérateurs matériels et répartir le calcul des couches entre les accélérateurs.
Comment une entreprise peut-elle protéger un modèle une fois déployé sur l'appareil d'un utilisateur ?
Les pratiques courantes incluent le chiffrement, l'obfuscation et la limitation du nombre de requêtes pour freiner les attaques adverses. Le tatouage numérique des réseaux de neurones ajoute des signaux de propriété cachés qui n'affectent pas la précision et résistent aux tentatives de suppression.
Comment un tatouage numérique pourrait-il fonctionner dans un modèle de langage comme ChatGPT ?
Une technique proposée sélectionne des tokens précis dans un ensemble aléatoire et les favorise légèrement pendant la génération. Un lecteur ordinaire ne remarquerait rien, mais un enquêteur pourrait remonter la sélection des tokens pour prouver que le texte provient du modèle.
Pourquoi le poids d'une application la condamne sur mobile (48 s)
Protéger les modèles d'IA installés sur les appareils des utilisateurs (63 s)
Comment un tatouage caché dans ChatGPT pourrait fonctionner (43 s)
All right. I guess we can get started. Hello, everyone. Hope you're all doing well. And thank you for attending this session. I'm Priyanka Kulkarni, and I specialize in building neural networks for on-device deployments at Adobe. Today, I'm going to talk about building on-device machine learning solutions to create, and I'm going to talk about building on-device machine learning solutions to create new technologies.
An AI-powered future that is fast, reliable, and secure. It's no surprise that mobile has become a predominant surface for AI interactions. We all want machine learning-powered magic at our fingertips everywhere we go. You all have probably used some form of AI on your phones for work, for travel, for shopping, or simply because you're bored. And there's tremendous demand rising for apps like digital assistants or face recognition and augmented reality.
An AI-powered technology, where people are reaching for their phones to engage with AI daily. An AI-powered technology. This has led to a huge uptick in the mobile AI market, now worth billions of dollars and rising. Recent studies have shown that applications that have advertised their association with OpenAI or ChatGPT, have seen their revenues jump dramatically in the past few months, as consumer demand around these technologies have skyrocketed. As more and more apps are incorporating machine learning into their offerings, This intelligence is moving closer to the edge where the computations are locally rather than in the cloud.
So in today's talk, I'll touch upon why on-device machine learning is important and relevant today more than ever, understanding the risks and challenges that come with the fabric of mobile platforms, including the security ones, and strategies that we can adopt to push the boundaries of neural network deployment across edge surfaces. The typical state-of-the-art neural networks are so large and computationally expensive that they require huge data centers with clusters of CPUs and GPUs to be able to run them.
They are too big to fit on edge devices and expensive to even run inference. So add to this bandwidth costs of transferring the data from the user's devices to the cloud, and you can tell that all of this adds up really quickly. On-device machine learning means that you can save all of these costs. This is also great for customers because now they can enjoy the benefits of access everywhere, regardless of connectivity, get instantaneous or real-time results, and assure data privacy.
Nobody likes the delay when the data is being streamed to the cloud, processed over there, and then sent back. And we can skip this whole hassle with on-device models. And because the data doesn't have to be sent to the server or stored there, there are fewer opportunities for cyber criminals to exploit any vulnerabilities, which also helps to preserve the sanctity of the data.
Now, integrating machine learning on the edge is nothing new, but the explosion of ML models in the world around us poses an increasingly difficult challenge to fit all of these intelligent systems onto resource-constrained devices like our mobile phones, which have limited compute, battery, memory, storage. Add to this mix, the generative AI race. I'm guessing you all have seen or heard about the mania around ChatGPT, DALI, mid-journey, and their mind-boggling abilities to write essays or create art.
I mean, I've been hooked to those apps for too many hours. And as generative AI is booming, so are the costs of running these models. They are way too large by smartphone standards and cannot be just taken off the shelf and run on our phones. So you can guess what the first challenge with on-device machine learning is, the model size and capacity.
We need a model that's small and fast, yet can provide high accuracy on the intended task. A large app size is the death knell on mobile. This is especially so in emerging markets around the world, where mid to low range smartphones are the majority. So we can't have our machine learning models driving up the app sizes by a few hundred megabytes, which is a typical size of a deep learning model.
A smaller size of the model also means we have fewer parameters than usual for the model to learn the task effectively. And in addition to this, we need to invest in accelerating the model inference so that we can provide users with low latency. These challenges are highlighted by innumerable surveys that show that a lack of storage space or battery running apps are the most common reasons for mobile app uninstalls.
So keeping the mobile model size low and the latency low is really non-negotiable. Finding this trade off between model accuracy and latency has become key in research as well. For instance, this chart tells us the relationship between a model's accuracy and its latency as we scale up the size. Each color here represents a specific architecture. And from looking at this, we know that the purple architecture gives us a really big boost for accuracy for a comparatively small increase in latency.
So it must be a really efficient model. And so happens that this model is also named efficient net. So it seems like a really good candidate for on-device models. In the bubble chart on the right, the size of each bubble represents how many parameters each model has. Here we see that the older models called BGG nets are the biggest models here and were created with a staggeringly high number of parameters.
Over time, though, research has taken machine learning models towards the direction of using fewer parameters and fewer operations while maximizing accuracy. And this is evident from the concentration of the models towards the top left section of the chart compared to where the old BGG models had started out. So it's great news that literature and industry is taking notice of how models can be made smaller as well as more efficient, which bodes well for on-device ML.
Typically, we've seen so far that convolutional neural networks remain the dominant choice for mobile deployments, where a majority of the deep learning models on mobile devices were some variant of mobile net. Mobile net architectures were developed with the intention to address the resource bottleneck seen on mobile. But over the past couple of years, the landscape of deep learning has been completely revolutionized with the advent of transformer based models.
These models have several advantages over CNNs, including introduction of attention layers for better information mapping and learning, as well as nuanced understanding of language. Following this, there's also been an interest of adapting transformers for mobile. However, they have been far more challenging to convert and run on device as compared to CNNs because they have more complex layers, higher floating point ops, and also exhibit much higher memory usage.
In attempts to optimize transformer models, so far we have seen that we've achieved varying degrees of mobile friendliness. This has raised the question if we can design architectures that are as mobile friendly as continents, but as efficient and accurate as transformers. A number of hybrid architecture designs have been proposed for combining advantages of CNNs with transformers for maximum efficiency, and mobile VIT is one of them where local processing done in convolutions are replaced with global processing using transformers.
Now, the selection of model architecture is crucial, but we also need to optimize the model further by shrinking it as much as we can. For this, we can use model compression techniques. This domain has seen various techniques developed over time and is widely being used already in literature and industry. These include things like network pruning to get rid of redundant or less important neurons, knowledge distillation from a teacher model to a smaller student model, as well as quantization to lower precision values.
As effective as these techniques have been, they are not that easy to automate, and it involves a lot of manual cumbersome tweaking and tuning to squeeze out every bit of optimization we can get, which is indispensable and goes a long way for mobile deployments. To combat manual tuning of models, you may have heard about the rise in popularity of neural architecture search.
So this is the process of automating the design of neural networks, where you search amongst various combinations of layers to create an architecture for your model requiring minimal human intervention. This is a fantastic way to find an optimal and efficient model where we can search for architectures that would work great for mobile. But what happens when we have diverse deployment scenarios on the edge like mobile browser or web.
These all present different resources as well as limitations for deployment. So we could deploy the same model across all of them, but then we'd be limited by the most constrained environment and end up being wasteful or inefficient in the others. So why not use neural architecture search to find a model tuned for each specific hardware environment. So this is a great idea.
But as these environments increase and scale, instead of rerunning neural architecture searches each time, we would want to find an effective way of walking the accuracy and latency curve for these models so that we can have greater flexibility and velocity to market. There has been interesting research in this field of scalable architectures, one research group at MIT has published a solution called once for all that attempts to tackle this problem.
And what they've proposed is training a single giant network, which we can then sample for smaller specialized sub networks of different sizes and different capacity, and then deploy them in various scenarios and target hardware. Also, not to forget that scalable architectures are like once for all ensure we're heading into the next generation of AI responsibly, because then these searches are targeted and optimized, so they are far better for the environment than traditional neural architecture search engines.
The second challenge with on-device ML is model efficiency. Due to resource limited environments on edge devices, our model needs to maximize its efficiency to consume the least amount of resources it can. This could be compute or memory. The on-device hardware landscape is also very diverse, especially on Android, where there are so many different manufacturers and hardware makers, leading to a spectrum of diverse resource limitations across all devices.
On mobile, this resource limitation often results in a contention problem, which if not handled properly can result in a symptom observed called jank. Consider a scenario where the GPU is simultaneously being called upon for UI graphics rendering requests, as well as running inference on machine learning models. This is common with real-time or interactive ML features where a user could be scrolling on his or her phone while the machine learning model is running simultaneously in the background.
In this case, you would get an experience like you see on the left-hand side, where there are more stuttering frames during the scroll. And this is called jank. While the right side presents a smoother scrolling experience for the user. There are now a lot of mobile developer tools available on iOS and Android to help us profile as well as measure jank.
We can mitigate against it. The CPU and GPU are not the only resources available on mobile. There are diverse set of hardware accelerators available across all platforms. One example is the XNN pack on TensorFlow Lite, which is a highly optimized library that enables faster CPU performance, including speed up of quantized models. Likewise, on iOS, the Apple neural engine is a special type of processor unit that you can leverage to make your ML models really fast by accelerating operations like convolutions and matrix multiplies.
There are a lot of other companies besides Apple developing their own AI accelerator chips, and you might have heard of Google's sensor processing unit as well. Even with all of these diverse hardware accelerators, there's a possibility that your ML model may not be able to use all of them. Many common layers seen in machine learning models may not be supported.
So we need to tailor our models to make the layers compatible with the accelerators that we intend to use. We can also parallelize the inference by developing an intelligent system to delegate and distribute the load of computing different layers using different accelerators. And this becomes even more critical when we have to run multiple ML models in parallel where they're all contending for the same device resources.
The third challenge of on-device ML is security. A significant amount of time, costs, data, and resources go into the development of each deep learning model, and it's critical to protect its intellectual property. When we deploy a deep learning model to the edge or on-client devices, they are far more vulnerable there than when they're queried using APIs in the cloud.
Thinking about the cybersecurity aspect of model protection is crucial. There are a lot of common best practices to safeguarding your deep learning model, like encryption, obfuscation, as well as limiting the number of requests to curb the potential for adversarial attacks. There's also research being done for embedding ownership signals into deep learning models directly, called watermarking. So this is similar to the watermarking techniques used to protect creator rights for digital images, video, and audio, and it has been a really effective technique to prove the ownership, authenticity, or integrity of these creations.
Neural network watermarking is a bleeding edge area of research to incorporate IP protection into deep learning models. These techniques aim at embedding ownership signals by inserting watermarks or backdoors into models that are so well disguised that it's hard to detect them. Aside from acting as the ownership proof, they do not affect the accuracy of the model and exhibit no other behavior.
And lastly, the watermark also persists against adversarial attacks, which makes it difficult or impossible to remove it. There's been some exciting research in extending this domain for watermarking generative AI models too. Watermarking gen AI is imperative not only to protect intellectual property, but also to prevent potential future malicious uses of language models like plagiarism, misattribution, misuse, or abuse of the outputs.
Recently, OpenAI also announced that they are planning to stop ChatGPT users from cheating on their homework or making social media bots by watermarking outputs produced by their models so that you can have a trace back to identify that they originated from ChatGPT. There are also recent research papers that have proposed frameworks for watermarking proprietary language models and already proven that the watermark can be embedded with negligible impact on the text quality in the outputs.
There are other challenges and security risks of generative AI models that need to be addressed. One is their vulnerability to training data extraction attacks. There is a potential risk that these models leak details about the data on which they've been trained. This point was raised in a research paper where they showed that if one prompts the GPT-2 language model with a particular prefix, it auto-completes a long block of text that contains sensitive and personally identifiable information, including contact details and the physical address of a particular person whose information was included in the model's training data.
There have been a lot of exciting developments in the field of optimizing and scaling down generative AI models, which will help pave the way for eventual on-device deployment. We're already seeing that these generative language models of different sizes and capacities can accomplish a variety of different tasks. So, while the larger models can pass college level exams or the bar exam, the smaller models can still achieve the ability of reading comprehension and logical deduction.
This is a great sign and helps us understand how to fine tune these models for business specific tasks or use cases and how we can optimize them for on-device. There's also a lot of promising evidence of running large scale AI with fewer parameters. For instance, the models like stable LM and Meta's Lama model have only around a few billion parameters.
This sounds like a lot, but these are vastly optimized models compared to the GPT models, which have hundreds of billions of parameters and have no hope in the world of running on smartphones. More recently, Web LLM is a project that brings large language models and chatbots to web browsers. So, everything is run inside the browser without any server support and it also leverages Web GPU acceleration.
Recently, Squeezebits also claim that they have optimized image generation models from stable diffusion to be able to run it on an Android phone, which is just astonishing. And why stop at only inference for on-device ML? We can also train and update these models locally without the data ever leaving the user's devices. Models can be fine-tuned to achieve better flexibility as well as offer personalization.
This concept can then extend to federated learning, which marries the advantages of on-device training with cloud training. So, you get the privacy benefit and the scale of on-device learning by keeping the data local closer to the user. And you get the benefit of learning from diverse data across users by having the cloud aggregate many locally trained models.
I'm so excited to see the proliferation of AI based services around us and the ability of running these lightweight personalized models locally on our phones will help us unlock the full potential. So, thank you all for listening. And with that, I'm happy to take any questions. Please feel free to drop any questions in the Q&A chat pod as well, and I can get to them offline too.
Okay, so we have a question from Sandra. What could be an example of a watermark in chat GPT? So, that's a great question, Sandra. One of the language models behind all of these chat GPT and prior technologies have a proposed watermarking technique, which the company isn't currently using, but the architecture behind these language models involve the use of transformers.
Which are composed of blocks that leverage tokens. And an example of a watermark is to select specific tokens from random set and softly promote the use of those specific tokens when generating the output. So, these watermarks would not be visible to a layman when chat GPT produces certain outputs. But if I'm someone who's a legal authority who would want to then investigate and trace it back, I can run reverse engineering using the token selection to be able to uncover and prove that this watermark originated from chat GPT.
But if I'm just a general user who's just going through a paragraph produced by chat GPT, it would be sort of masked from me. I have another question from Deborah. Can you explain a bit about the on-device and consolidated data with an example? Sure. So, you can think of it as each of us having smaller localized models with fewer parameters that learns to give us specific types of responses.
So, I might be having slightly different tolerance for bias or outputs of a language model compared to someone else. So, that would be really important. So, I think it would be very important. It would be very important to reflect my interests, my ethics, my values. Whereas, the larger models would get an aggregated version of all of our phones to reflect what general customers, you know, the mean average of customers would expect.
So, that helps to keep data local to me and a model that's personalized to my beliefs and my interests while also updating the larger models on server that reflects the aggregate data across all of the users without infringing privacy. I hope that helps answer your question. Thank you. And I think we're out of time. Thank you all for attending this session.
I really appreciate it. And please feel free to connect with me. All right. Have a great day, everyone.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Ce qu'il faut pour exécuter du deep learning sur un téléphone
Priyanka Kulkarni (Adobe) décompose le machine learning embarqué en trois défis (taille, efficacité et sécurité) et présente les techniques qui répondent à chacun.
En bref
Exécuter l'IA sur l'appareil plutôt que dans le cloud réduit les coûts de serveur et de bande passante, supprime la latence et préserve la confidentialité des données des utilisateurs, à condition que le modèle soit petit, efficace et protégé. Priyanka Kulkarni, Senior Machine Learning Engineer chez Adobe, présente le ML embarqué comme un triathlon entre mémoire, vitesse et confidentialité, et passe en revue les architectures, méthodes de compression, accélérateurs matériels et techniques de tatouage numérique qui le rendent possible.
Points clés
Apprenez à accélérer le passage du serveur au mobile pour déployer des réseaux de neurones de deep learning.
Comprenez les risques et défis liés au déploiement de réseaux de neurones sur l'appareil.
Comprenez les implications en matière de sécurité du déploiement de réseaux de neurones sur l'appareil, ainsi que les solutions et stratégies à adopter pour protéger votre propriété intellectuelle.
Comprenez le fonctionnement des plateformes de déploiement mobile, sur Android comme sur iOS.
Repoussez les limites du machine learning sur mobile.
Pourquoi l'IA quitte le serveur
Kulkarni commence par constater que le mobile est devenu une interface prédominante des interactions avec l'IA, des assistants numériques à la reconnaissance faciale en passant par la réalité augmentée. Or les réseaux de neurones de pointe sont conçus pour des data centers remplis de CPU et de GPU. Ajoutez le coût du transfert des données des utilisateurs vers le cloud et retour, et la facture grimpe vite.
Le machine learning embarqué supprime ces coûts et offre mieux aux utilisateurs : un accès quelle que soit la connectivité, des résultats en temps réel et une meilleure confidentialité. Comme elle le dit : « Personne n'aime le délai quand les données sont envoyées au cloud, traitées là-bas, puis renvoyées. » (2:38) Comme les données n'ont pas à être envoyées ni stockées sur un serveur, les attaquants disposent aussi de moins de failles à exploiter.
Premier défi : taille et capacité du modèle
Les téléphones disposent d'une puissance de calcul, d'une batterie, d'une mémoire et d'un stockage limités, et l'essor de l'IA générative n'a fait qu'agrandir les modèles. Kulkarni est directe sur les conséquences : « Une application volumineuse, c'est l'arrêt de mort sur mobile. » (3:50) Elle souligne qu'un modèle de deep learning typique pèse quelques centaines de mégaoctets, ce qui compte surtout dans les marchés émergents où les téléphones d'entrée et de milieu de gamme sont majoritaires. Selon les enquêtes citées par l'intervenante, le manque de stockage et la consommation de batterie sont les raisons les plus fréquentes de désinstallation. Sa conclusion : « Donc garder une taille de modèle mobile réduite et une faible latence est vraiment non négociable. » (4:38)
Le choix de l'architecture est le premier levier. À l'aide de graphiques issus de la recherche, elle cite EfficientNet comme un modèle qui gagne beaucoup en précision pour une faible hausse de latence, et montre comment le domaine s'est éloigné des réseaux VGG chargés en paramètres. Les variantes de MobileNet ont dominé le mobile jusqu'ici, tandis que les transformers apportent des couches d'attention et une meilleure compréhension du langage, mais sont plus difficiles à exécuter sur l'appareil. Des architectures hybrides comme MobileViT tentent de combiner le meilleur des deux.
La compression est le deuxième levier : élaguer les neurones redondants, distiller les connaissances d'un grand modèle enseignant vers un modèle élève plus petit, et quantifier vers une précision moindre. Ce réglage étant manuel et fastidieux, elle met en avant la recherche d'architecture neuronale, qui automatise la conception des réseaux. Quand un modèle doit fonctionner dans plusieurs environnements, comme le mobile, le navigateur et le web, un modèle unique impose un compromis : « On pourrait donc déployer le même modèle partout, mais on serait alors limité par l'environnement le plus contraint et on finirait par être gaspilleur ou inefficace dans les autres. » (8:45) Elle décrit Once-for-All, issu d'un groupe de recherche du MIT, qui entraîne un grand réseau et en extrait des sous-réseaux plus petits et spécialisés pour chaque cible, une approche qu'elle juge aussi meilleure pour l'environnement que des recherches répétées.
Deuxième défi : efficacité, jank et accélérateurs
Le deuxième défi consiste à tirer le meilleur parti d'un matériel rare et très hétérogène, en particulier chez les nombreux fabricants Android. Lorsque le GPU doit à la fois afficher l'interface et exécuter l'inférence, les utilisateurs voient des saccades d'images, appelées jank. Les outils de développement iOS et Android aident désormais les équipes à le profiler et à le mesurer.
Kulkarni évoque des accélérateurs matériels au-delà du CPU et du GPU : XNNPACK dans TensorFlow Lite pour de meilleures performances CPU et les modèles quantifiés, l'Apple Neural Engine pour des opérations comme les convolutions et les multiplications de matrices, et le Tensor Processing Unit de Google. Toutes les couches ne sont pas prises en charge partout, donc « il nous faut adapter nos modèles pour rendre les couches compatibles avec les accélérateurs que nous comptons utiliser. » (12:21) Les équipes peuvent aussi concevoir des systèmes qui répartissent les couches entre accélérateurs, ce qui devient crucial lorsque plusieurs modèles se disputent le même appareil.
Troisième défi : sécurité et tatouage numérique
Chaque modèle représente beaucoup de temps, de données et d'argent, et le livrer sur les appareils des utilisateurs l'expose. « Lorsque nous déployons un modèle de deep learning en edge ou sur les appareils clients, il y est bien plus vulnérable que lorsqu'il est interrogé via des API dans le cloud. » (12:47) Les défenses classiques incluent le chiffrement, l'obfuscation et la limitation des requêtes pour freiner les attaques adverses.
Elle aborde ensuite le tatouage numérique des réseaux de neurones, un domaine de recherche de pointe qui intègre des signaux de propriété cachés ou des portes dérobées dans un modèle. Un bon tatouage n'affecte pas la précision, n'induit aucun autre comportement et résiste aux tentatives adverses de suppression. L'idée s'étend à l'IA générative, où elle pourrait aider contre le plagiat, les fausses attributions et les usages abusifs. Elle mentionne qu'OpenAI a annoncé son intention de tatouer les sorties de ChatGPT, ainsi qu'un article de recherche montrant que GPT-2 pouvait être amené à divulguer des informations personnelles issues de ses données d'entraînement. Lors des questions-réponses, elle explique une technique proposée : favoriser légèrement des tokens précis choisis dans un ensemble aléatoire, invisibles pour les lecteurs mais traçables par un enquêteur.
IA générative et apprentissage fédéré sur l'appareil
Kulkarni conclut sur les progrès dans la réduction des modèles génératifs. Des modèles comme StableLM et LLaMA de Meta comptent quelques milliards de paramètres, contre des centaines de milliards pour les modèles GPT ; WebLLM exécute des modèles de langage dans le navigateur grâce à WebGPU ; et SqueezeBits affirme faire tourner la génération d'images Stable Diffusion sur un téléphone Android. Elle va plus loin : « Et pourquoi s'arrêter à l'inférence pour le ML embarqué ? Nous pouvons aussi entraîner et mettre à jour ces modèles localement, sans que les données ne quittent jamais les appareils des utilisateurs. » (17:06) L'apprentissage fédéré combine cette personnalisation locale et privée avec l'agrégation dans le cloud de nombreux modèles entraînés localement, de sorte que le modèle partagé apprend d'utilisateurs variés sans collecter leurs données.
Regarder la conférence
« On-device ML: Artificial Intelligence in your pocket » par Priyanka Kulkarni, 22 minutes : https://www.womentech.net/video/device-ml-artificial-intelligence-in-your-pocket
À propos de l'intervenante
Priyanka Kulkarni est Senior Machine Learning Engineer chez Adobe, où elle travaille sur l'innovation en IA de nouvelle génération pour les appareils mobiles et conçoit des réseaux de neurones pour le déploiement embarqué et en edge. Depuis cinq ans, elle applique le deep learning à l'entraînement, la compression et l'optimisation de modèles, à la protection de la propriété intellectuelle et au déploiement mobile pour l'analyse et la détection d'images de documents. Elle est titulaire d'un master de l'université Carnegie Mellon, spécialisé en informatique mobile et ubiquitaire.
Questions abordées dans cette conférence
Pourquoi exécuter le machine learning sur l'appareil plutôt que dans le cloud ?
Pourquoi la taille du modèle est-elle une contrainte si critique sur mobile ?
Qu'est-ce que le jank et comment les équipes de ML embarqué peuvent-elles le réduire ?
Comment une entreprise peut-elle protéger un modèle une fois déployé sur l'appareil d'un utilisateur ?
Comment un tatouage numérique pourrait-il fonctionner dans un modèle de langage comme ChatGPT ?
Rédigé avec l'IA à partir de la transcription de la conférence. Relecture éditoriale en attente.
Frameworks and ideas mentioned
Neural architecture search
Once-for-All
Network pruning
Knowledge distillation
Quantization
Neural network watermarking
Federated learning
Resources mentioned
TensorFlow Lite XNNPACK
Apple Neural Engine
Once-for-All (MIT)
WebLLM
Cite this talk
Priyanka Kulkarni. "On-device ML: Artificial Intelligence in your pocket." WomenTech Network, 2023. https://www.womentech.net/video/device-ml-artificial-intelligence-in-your-pocket