Python Risk Identification Toolkit (PyRIT) for generative AI systems

It's been a busy few months on the AI Red Team. Back in Febuary, we released PyRIT. Since then, we've been expanding its capabilities to allow for probing multimodal generative AI systems (rather than just text-based ones). Another focus area has been state-of-the-art attack techniques. This space moves pretty fast, but we've added (or are in the process of adding) PAIR, TAP, GCG, Crescendo, Skeleton Key, and several others. Some of these are our own contributions, some of them happened via collaborations or contributions facilitated via the open source repository. I'll update this post with more details shortly!

One of the highlights from my perspective was going to the Microsoft //Build conference to talk to customers about PyRIT. After just about eight (!) years at Microsoft this was my first //Build conference. My colleagues Tori Westerhoff and Pete Bryan did an amazing job talking about the work of the AI Red Team in their session.



Starting a new job on the AI Red Team!

Today is my first day on a new team at Microsoft! After about 4 years on the Responsible AI tooling team within Azure Machine Learning / AI Platform I am moving to the AI Red Team. The way Responsible AI is perceived today is very different from when I entered this space back in 2019. Back then, lots of people dismissed some of the warnings and did not want to even assess their models for problems. Flash forward 4 years later (and certainly accelerated by the rise of LLMs) and you would be hard-pressed to find people who can ignore RAI (although they may call it Ethical AI, AI Safety, etc.). Teams like Microsoft's AI Red Team are seen as essential to identify risks with AI systems before they are deployed to give product teams the opportunity to address problems and avoid real-world harms. If you have not heard of AI Red Teams before, see these articles for some background [1], [2], and [3]. I will still be working on tooling but instead of building tools for machine learning practitioners I will primarily focus on tooling for AI Red Teams.



A Framework for Automated Measurement of Responsible AI Harms in Generative AI Applications

A screenshot from the JMLR website showing the new Fairlearn paper title with authors.

Our new paper is on ArXiv! Titled A Framework for Automated Measurement of Responsible AI Harms in Generative AI Applications, it talks about some of the ways we've been evaluating LLMs. This was a joint effort of many teams at Microsoft and Microsoft Research. I am particularly happy with the emphasis on domain experts' input. This is merely a tool to help speed up evaluations, but the actual decisions about mitigations and whether a system is deployed remains (and should remain) with humans.



Fairlearn paper accepted to JMLR

The new Fairlearn paper is now in the Journal for Machine Learning Research (Open Source Software section)!

A screenshot from the JMLR website showing the new Fairlearn paper title with authors.

It captures our change from being a project under Microsoft governance to being a true open source project with open governance. As of today, half the maintainers are employed by Microsoft (including myself). Also, the focus of the project has shifted significantly since the original whitepaper. Back then, the Python toolkit was the main focus whereas now the educational materials are being prioritized.



Mastodon

An elefant sitting on a bird. The bird represents Twitter, the elefant Mastodon.

As part of the Twitter migration, I moved over to Mastodon. You can find my account on at @romanlutz@fosstodon.org. While Twitter has provided plenty of excellent reasons to leave I will add that having a decentralized social network is a fabulous idea to avoid being locked in in the future. If my current server operates in a way that does not mesh with my priorities and values I can always go elsewhere or start my own.



Responsible AI Dashboard release

RAI dashboard view of error analysis tool

Earlier this month, the Responsible AI dashboard was released. As one of the key contributors on the engineering side I am really proud of this milestone. Of course, this is only where it really starts as we can now iterate on the first version. Make sure to try it and leave some feedback!

The functionality is better captured by the blog and website, but something not mentioned there that I am really excited about is that we pulled this off in the open on GitHub. That means anyone can see what goes into this, ask for features, or even contribute bugfixes.

Doing impactful work is awesome, but seeing the recognition in the entire company takes this to a whole different level. For example, I have seen tweets about this by Microsoft CTO Kevin Scott and Chief Scientific Officer Eric Horvitz.



Responsible AI Twitter

Twitter is a great place to stay up to date on progress and updates in Responsible AI. I'll list a few resources that may be of interest below.

fairlearn twitter

Naturally, the Fairlearn account is a great way to hear all about updates related to the Fairlearn community.

I use my own account to post on topics related to open source and Responsible AI as well.

Finally, I've been curating a list of people and organizations working on Responsible AI for a while. As of today it contains 739 accounts with the caveat that people who aren't on Twitter can't be represented.



Responsible AI

fairlearn repository

For a little while now I've been working on Responsible AI at Microsoft. Now that our tools are announced with Sarah Bird's talk at Ignite I can finally point to our tools openly. A lot of my time over the past months went into fairlearn, our open source toolkit for fairness assessment and unfairness mitigation. We just released v0.3.0, so there's a lot more to come in the next months. I will be in Vancouver for NeurIPS in December to demo our tools around fairness and interpretability. Talk to me if you will be there!

Abstraction in Fairness-aware Machine Learning

Since fairness is tricky to get right we have been meeting bi-weekly as a Responsible AI reading group. Today I had the honor to lead the discussion about "Fairness and Abstraction in Sociotechnical Systems" by Andrew D. Selbst, danah boyd, Sorelle A. Friedler, Suresh Venkatasubramanian, and Janet Vertesi. I highly encourage everyone to read this paper to avoid the mentioned abstraction traps when building machine learning systems. Maybe this should be part of a mandatory checklist before releasing models... If you're interested in my slides (which were inspired by the authors') you may download them here.



Migrated website's HTML files to MkDocs

I just finished migrating this website's HTML files to MkDocs. This allows for easy templating and reuse. It's not 100% complete at this point since this is just a hobby, but I'm still quite proud of how much duplicated boilerplate HTML is now gone.



MIT Breaking the Mold Hackathon for Inclusion

What a weekend it has been! Participating at MIT`s Breaking the Mold Hackathon for Inclusion was truly a blessing. With so many truly difficult problems to tackle, it is fantastic to see all the ideas people came up with.

Big shoutout to MIT for organizing this, Microsoft for the venue (and encouraging me to go!), and Amazon for sending two inspiring mentors for my team all the way from Seattle! Thanks also to my team for creating a creative environment where everybody could express their ideas. I learned a ton from all of you, and winning 3rd prize tops it all off.

I hope everybody takes some time to think about Machine Learning Bias. With ML becoming increasingly prevalent, it is more important than ever to take bias into account.



Computer Science Resources

Over the years I've accumulated quite a substantial amount of links, books, videos, articles and classes that I can recommend to CS students. Find them here.



Coursera Machine Learning by Andrew Ng

I just completed the Coursera course Machine Learning by Andrew Ng. While it was not my first ML course, it was definitely a great refresher. I absolutely recommend this class to beginners who want to get started. A potential drawback of this class is that it uses Octave for the programming assignments. While I had some prior exposure to Matlab, most people would probably prefer Python or R. Andrew Ng has a very pleasant teaching style and explains the math thoroughly where possible.

What next? I'll have a few new projects to write about soon, but more about that once I can confirm!



Scalable Microservices with Kubernetes

I recently took the Udacity course Scalable Microservices with Kubernetes by Kelsey Hightower, Carter Morgan, Adrian Cockcroft, and Gundega Dekena. It is a short and funny introduction and ideal if you are trying to get started with Kubernetes. It is important to remember that Kubernetes is simply a tool that can be used to scale a microservices architecture, and it us not the only one. Potentially the most useful resource of the whole class was www.microservices.com. Check it out! As as sidenote, I absolutely recommend listening to Software Engineering Daily if you are curious about Microservices. A number of guests on SE Daily have shared their perspective on microservices, including Neal Ford, Rafi Schloming, Richard Li, Austin Gunter, and Matt Klein, to name a few.



Hacking Bias in Machine Learning

Yesterday I participated in the Hacking Bias in ML workshop at Microsoft`s New England Research and Development Center (full disclosure: I work there as well). Bias is natural to Machine Learning models, of course. Generally speaking, the idea is always to find certain properties of the provided data that indicate belonging to a specific group or class. For example, we might find that success in European soccer is strongly correlated with a team`s budget. The budget will therefore serve as an important feature for our success prediction model. But what if the environment changes? Say, hypothetically, that the European soccer leagues decide to enforce a salary cap similar to American sports leagues (note: This is simply a hypothetical scenario and does not reflect the author`s opinion). Using the same model suddenly makes no sense anymore, we have to adjust. A somewhat similar, albeit much more consequential change has happened in our society as well. Discrimination based on gender, race, and many other traits is not acceptable. While the law slowly adapts to equality and tolerance, ML models are still trained with the same old data that reflects these biases. Since there is no actual magic in the models, they will represent that bias in the results they provide. This poses the danger of carrying these models/views/biases into the future, possibly without realizing that we are subconsciously biased. My group specifically looked at gender bias in texts, and since explaining word embeddings in a short post is a tall order, let`s just say it`s a way of mapping words to vectors in a multi-dimensional space whose relative locations represent certain relationships. With that we can find that some words are generally more used in connection with men ("smart"), some more with women ("lovely"). You can play around with the tool resulting from the workshop here. While this is only a little prototype, let`s all try to work on our subconscious biases, shall we?



Rise of the Quantified Athlete

Rise of Quantified Athlete main panel

I attended "Rise of the Quantified Athlete" at the Harvard innovation Labs recently, a delightful unconference and discussion forum on the future of quantifiable performance in sports. While the primary focus was on the "Quantified Athlete" seemingly directed towards wearable sensors and fitness data, I can see this going much further than just individual stats. One key statement by Matt Hasselbeck (former QB - Colts, Titans, Seahawks, Packers, and 3-time Pro Bowler) in the forum`s Overtime panel highlights exactly this. Even if we have all this data, "So what?". Gathering all kinds of data is not the purpose, it`s about finding useful nuggets and actionable conclusions. Especially from the perspective of the Quarterback, individual nuances are less important when you have to keep track of 21 players on the field. If technology can help uncover patterns or recommend how to exploit them, it might become a critical part of a team`s preparation. Ryan Fitpatrick (QB, Jets, Texans, Titans, Bills, Bengals, Rams) mentioned that in addition to game film, he regularly uses virtual reality to explore what`s happening during plays in a 3-dimensional VR environment. As exciting as this sounds, I was surprised to hear that in terms of finding tendencies there`s little or no Advanced Statistics or Machine Learning being used.

Hasselbeck, Fitzpatrick and Zak DeOssie (LS, New York Giants, two-time Superbowl winner) hung around after the panel to interact with students, entrepreneurs and interested folks like me. After making some bad experiences in that respect with soccer players in Germany (yes, I haven't forgotten, Franz Beckenbauer!), it was unreal to talk to a starting NFL QB and actually answer his questions concerning what I'm working on.

I'd like to note an interesting answer from Matt Hasselbeck on what he would love to get from technology. Anything that helps players rest. During practice and games there's a ton of coaches and assistants telling players what to do, but once that's over, they are more or less left to themselves without being given recommendations on how to optimize resting. Interesting point! And it sounds like a relatively simple one to solve, too.

The panel was largely focused on data ownership/privacy vs. getting the most out of the data. Unsurprisingly, some athletes such as Paul Rabil (Lacrosse, Team USA) and Meghan Duggan (Hockey, Captain Team USA) seemed rather enthusiastic about having data available to help them optimize their habits, get the most out of their bodies, and maybe even having longer careers due to more sustainable exercise and injury avoidance. In contrast, Fitpatrick, Hasselbeck and Shawn Springs (former CB, Seahawks, Redskins, Patriots) pointed out potential issues for players beyond their peak. As an example, take an accomplished receiver slowing down towards the end of his career. With sensors, coaches can now monitor and recognize this, leading to potential loss of leverage in contract negotiations or even being cut from the roster. This is obviously a crucial point in this evolution of the game, and we are certain to hear how NFLPA and NFL settle on this matter.



The Road to Tensorflow - Learning Path on Safari Books Online

I've recently started the learning path "The Road to Tensorflow" on Safari Books Online. You can find it here. It's essentially a series of video tutorials from Packt Publishing. They start with Python and sklearn, in order to prepare for Deep Learning in the second half of the learning path. For that, they use Theano and later Tensorflow. I really liked that they provide the code so you can always run it yourself as well and play around with parameters. If you want to avoid heating your apartment with your laptop (that's what my old machine used to do, almost as loud as a vaccuum cleaner...) then try setting up a VM in the cloud with Docker and Tensorflow. I used Lee Stott's step by step description on how to do that with Azure. You can find it here. Have fun!



New website!

I`ve moved my website from wix.com to github.com and used that as an opportunity to overhaul the whole website. Wix is great if you want a page up and running. As soon as you want specific formatting by tweaking some CSS or Javascript, though, you quickly reach Wix`s limits. I`ve always seen this as an interesting hobby, and being able to take any template and adjust it to my wishes is simply great. Kudos to Sergey Pozhilov from gettemplate.com for providing that with Creative Commons Attribution license. More on that at gettemplate.com. This page is now on GitHub Pages since that offers a number of advantages: I don`t have to bother with ads from the company hosting it. The page is associated with my GitHub repository, and I can clearly see changes I`ve made, line by line.



Research on Cache Policies

Cache Networks Simulation Results

From Fall 2015 to Spring 2016 I worked on novel cache policies as a Research Assistant with Professors Don Towsley and Antonio Rocha. The results still remain to be published, so I will write about it if that happens. Separately, I conducted experiments with cache networks for a graduate seminar on distributed systems. You can download my project report here.



NFL Play Prediction

Pete Carroll - coach

Based on NFL game data we try to predict the outcome of a play in multiple different ways including Decision and Classification Trees, Nearest Neighbors, Naive Bayes, Linear Discriminant Analysis, Support Vector Machines and Regression, and Artificial Neural Networks. An application of this is the following: by plugging in various play options one could determine the best play for a given situation in real time. While the outcome of a play can be described in many ways we had the most promising results with a newly defined measure that we call "progress". We see this work as a first step to include predictive analysis into NFL playcalling. See the full paper at arxiv.org/abs/1601.00574; in collaboration with Brendan Teich and Valentin Kassarnig.



Fantasy Football Prediction

Thomas Rawls - player

The ubiquity of professional sports and specifically the NFL have lead to an increase in popularity for Fantasy Football. Users have many tools at their disposal: statistics, predictions, rankings of experts and even recommendations of peers. There are issues with all of these, though. Especially since many people pay money to play, the prediction tools should be enhanced as they provide unbiased and easy-to-use assistance for users. This paper provides and discusses approaches to predict Fantasy Football scores of Quarterbacks with relatively limited data. See the full paper at arxiv.org/abs/1505.06918.



Security and Privacy in Future Internet Architectures

Content Centric Networking

There are several NSF-funded Future Internet Architecture research projects in the US. Their focus is mostly on improving the scalability and efficiency. I am interested in how the different approaches affect (or do not affect) the privacy of users in comparison to the current Internet. My focus will be on research about the feasibility of censorship circumvention. As an example, I picked Content-oriented Networking. See the full paper at arxiv.org/abs/1601.01278.



Adaptive Large Neighborhood Search - Bachelor`s Thesis - innoWake Award 2015

Adaptive Large Neighborhood Search - Destory and Repair

The goal of my Bachelor's thesis was to implement the Adaptive Large Neighborhood Search (ALNS) heuristic and possibly come up with improvements. ALNS was described first by S. Ropke and D. Pisinger and is based on P. Shaw's Large Neighborhood Search. The idea is that some problems are difficult to solve with basic local search algorithms because of a tightly constrained search space. Small changes to a solution will rarely bring improvements. As a consequence, LNS and ALNS change larger parts based on different heuristics.

For this thesis I was awarded the innoWake Award 2015. innoWake was a software modernization company based in Austin, TX and had a number of branch offices including one in Germany. They have since been acquired by Deloitte.



Software Engineering Class Project: Course Registration and Distribution Platform

Entity Relationship Diagram

For two semesters I worked on a Software Engineering project with the aim of developing a University Course Registration Platform that allows the distribution of course participants into groups based on different criteria. The project involved all phases of a typical software project, from analysis and design to the actual implementation. On top of being a regular team member, it was my role as the team manager to both coordinate and plan for the team and communicate with the customer. In the end, the system was delivered on time with all necessary and a few additional features to the satisfaction of the customer. In collaboration with Tobias Baumann, David Köhler and Max Schnitzlein.



Algorithms and Data Structures - Teaching Assistantship

Graph from http://commons.wikimedia.org/wiki/File:Dinic_algorithm_Gf2.svg, public domain

As a teaching assistant for Prof. Jacobo Toran, Gunnar Völkel and Dominikus Krüger, I explained the solutions to weekly assignments to a group of 20 students whose work I also graded. In addition to that, I often gave a review of the material presented in class. It made me very happy to see the attendance rate constantly high throughout the semester and especially the positive feedback at the end of the course.



Artificial Bee Colony

Bees from https://pixabay.com/en/queen-cup-honeycomb-honey-bee-337695/, CC0 Public Domain

We can observe many kinds of behavior of animals, bacteria etc. in nature where an adaption to the specific environment has taken place due to evolution. In a way, an optimization process has taken place. This idea is the basis for so-called nature-inspired metaheuristics. The Artificial Bee Colony (ABC) meta-heuristic by D. Karaboga is such a nature-inspired metaheuristic. It projects the foraging behavior of bees on an algorithm in order to solve optimization problems.



">

Concurrency in Java

Traffic from https://pixabay.com/en/traffic-highway-lights-night-road-332857/, CC0 Public Domain

Under the guidance of Christian Spann, I read up on different ways to implement concurrent programs in Java, from Threads, Runnables and Executors to thread-safe versions of data structures. Finally, I presented the different approaches and techniques in a seminar talk.