<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ayla Kangur on Medium]]></title>
        <description><![CDATA[Stories by Ayla Kangur on Medium]]></description>
        <link>https://medium.com/@aylakangur?source=rss-61a43dbb084b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d4FPWBeGWLv-Xg3HZVfuTw.png</url>
            <title>Stories by Ayla Kangur on Medium</title>
            <link>https://medium.com/@aylakangur?source=rss-61a43dbb084b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 10:18:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aylakangur/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Supporting Female Engineers to Thrive]]></title>
            <link>https://medium.com/better-programming/supporting-female-engineers-to-thrive-82005a2e24e7?source=rss-61a43dbb084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/82005a2e24e7</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[women-in-tech]]></category>
            <category><![CDATA[work]]></category>
            <category><![CDATA[culture]]></category>
            <category><![CDATA[diversity]]></category>
            <dc:creator><![CDATA[Ayla Kangur]]></dc:creator>
            <pubDate>Wed, 08 Mar 2023 10:55:56 GMT</pubDate>
            <atom:updated>2023-03-09T23:39:23.566Z</atom:updated>
            <content:encoded><![CDATA[<h4>From alienation to empowerment: Creating a culture where female engineers flourish</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBgkLK_dA0hNm4N0NziXAA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/N4QTBfNQ8Nk">speckfechta</a> on <a href="https://unsplash.com/photos/N4QTBfNQ8Nk?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>While pursuing my graduate degree in AI, I was a passionate volunteer on our university’s small robot team. Our domestic service robot came in second in the Iran Open, fulfilling tasks as diverse as identifying smoke, serving drinks in an unfamiliar environment, and cleaning up litter. During the World Cup, we came in fourth out of twenty-three participating teams. Not a small feat, given that we had the smallest budget and the cheapest robot by far.</p><p>When the university newspaper came by to interview us, I first observed how they questioned my team members. What were the most challenging aspects? What struggles have we overcome so far? I prepared to talk about the high-level behavior I had worked on, and how to ensure flexibility in uncertain environments. But when I was up, I was instead startled by being asked what it was like to be the only woman on the team.</p><p>I brushed the questions off, answering that there wasn’t any notable difference compared to other teams. But instead of pursuing a different topic, the interviewer was intent on digging deeper. I was left disillusioned and later found out I was cut from the interview altogether. I can’t blame them. My incredibly fun team had given me nothing compelling to say about this topic.</p><h3><strong>Highlighting Differences</strong></h3><p>When it comes to gender equality in tech, lots of attention is given to majorly important topics such as fair pay, harassment policies, balanced leadership teams, and flexible benefits.</p><p>What often flies under the radar is appreciation and support for the alienating experiences that female software engineers regularly go through that can really rattle their confidence. It is difficult to feel like you belong if you’re regularly singled out as different.</p><p>Where did these experiences come from on a day-to-day basis? From my experience, certainly not from fellow engineers. They came from customers, business managers, partners or users.</p><p>Of course, there are organizations in worse shape, where even engineering teams act ignorant or even hostile towards female engineers. This post is not about those. This is for organisations that have their culture more or less in check. It’s for those who want to learn how to go one level deeper and create a culture in which female engineers are not just accepted, but can actually thrive.</p><p>I’ll continue with a few more examples from my own experiences, followed by ways in which this impacted my younger self. I’ll conclude with advice anyone in tech can use to tweak their communication and lift their female co-workers up.</p><h3>Awkward Encounters</h3><p>Let’s start with the most frequent and pervasive observation I received in my years as a machine learning engineer: “Wow. You don’t look like an engineer. You are so.. .” Whether it was my looks, my clothes or my sociability, external relations regularly found something to compliment and contrast to their stereotype of what an engineer looks like. Of course I could sympathize with them.</p><p>These people were often unfamiliar with the tech world and genuinely surprised, sometimes delighted, that their mental model of an engineer was incomplete. And although I also felt proud to challenge stereotypes, when it happens too often, it also made me feel… like an anomaly.</p><p>The impression I got after these repetitive comments, was that I wasn’t what they expected but they were willing to give me a try and see if I lived up. For a junior without solid confidence to start with, that extra pressure added a whole lot of insecurities.</p><p>Even organisations that are aware of inclusion and are well intended can miss the mark. I once joined a hackathon at a public organisation with a male colleague doing front-end work. When the date drew close I learned I wasn’t allowed to join my colleague’s team because a different woman was already on that team. Since there were so few women joining, they wanted to spread them out equally across the teams. The organizers meant well by considering diversity, but their choice expressed that the expertise I had to bring was less relevant than my gender. After pointing this out, higher management luckily understood this issue and mixed up the teams again.</p><p>There are also blatantly awkward comments, in which diversity is so explicitly valued that it should make everyone uncomfortable. While working on a project, I was once introduced to the mayor as the first female engineer on the team. They were incredibly glad to have me, the project manager continued, now all they needed was a person of colour. Of course there is no value in being treasured like a rare Pokemon, be it only for a characteristic you have no influence on. Upon leaving the organisation, the manager stressed how sad they were to see me go.</p><p>Specifically, because I was their only female engineer. The tech lead looked genuinely appalled and emphasized I would be missed because of how quickly I had mastered the code base and the impactful contributions I had made. The project manager remained oblivious and complained again about how difficult it was to find women who wrote C++. Do you picture a male project manager? She was in fact a woman.</p><p>Like any other woman in tech, even those who share my luck to have always joined incredibly supportive engineering teams, I have numerous other small but unsettling experiences to recollect. While I’ve left the more disturbing ones out, I hope these examples show just how different a female engineer’s day-to-day interactions can be compared to those of a man.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pUBIdRJ-p7lxlnnUHg52Dw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/z0nVqfrOqWA">Denys Nevozhai</a> on <a href="http://unsplash.com/">Unsplash</a>.</figcaption></figure><h3><strong>Consequences</strong></h3><p>None of these people intentionally meant any harm. Really, at times I also catch myself making unintentionally insensitive comments. But combine these experiences with plenty more, and together they reinforce the image that as a female engineer, you’re the odd one out. It’s a small step towards starting to doubt whether you really belong here. And that’s what female engineers can be battling with on top of any engineer’s regular daily challenges.</p><p>Now for some women, this is a challenge that they face head-on. They feel inspired to speak up and assert themselves stronger. But be conscious of the underlying stress that might be fuelling this assertiveness, or it might lead to burnout in the long run.</p><p>So how did these situations impact me early on in my career? I wouldn’t have acknowledged it out loud back then, but I tweaked my behavior to tackle preconceptions early on.</p><p>I would comfortably wear a skirt or dress to the office, but meeting a client for the first time I would self-consciously wear something less feminine, more neutral. When preparing for a work review, I would consciously check whether I presented as many or more technical details as a male colleague. During introductions, I felt the need to emphasize diplomas, years of experience, and projects I had worked on to back up my credibility. Seeing nods of surprise and approval in return made me feel both reassured and disheartened.</p><p>Whether my lack of credibility was imagined or real, it was fuelled by often being highlighted as the odd one out on the team. Emphasizing gender differences is important, but it also confronts a minority with feeling different.</p><h3><strong>What You Can Do</strong></h3><p>These examples show that supporting women in tech is not just about improving the culture in tech organisations. We need a broader, societal awareness. Especially outside of tech teams. Anyone who ever interacts with women in a male-dominated role can tweak their communication and make the workforce a more inclusive place.</p><p>Trust me, it will pay off. Dropping a woman in a team doesn’t automatically deliver magic. Having a thriving woman on a team does!</p><p>What you could try?</p><h4><strong>Check in</strong></h4><p>If you notice someone acting surprised about a woman working in tech, talk to her about the rude comment afterwards. It will only strengthen your bond. Get to know her, mention how you’d love to speak up but don’t know how that would make her feel. Some women might welcome explicit support on the spot, while others may prefer to let things slide. But almost everyone appreciates it when someone checks in.</p><h4><strong>Flip the sign</strong></h4><p>Whether it’s during introductions or performance feedback, imagine the opposite gender when you define someone’s characteristics. A kind, certain woman, could be described as respectful and result-driven if you instead envision the masculine form of those traits.</p><h4><strong>Use her by default</strong></h4><p>Our CEO silently adopted “her” as the default pronoun in his speech. To women in the organization, this has an empowering effect. It is so common to hear his and him as default pronouns, that this simple switch raises awareness around inclusion in a bold but non-intrusive way.</p><p>Somewhat similarly, no one means harm by saying “Hi guys” to a mixed group of people. But combined with all the other encounters women have, phrases like this can have a compounding effect in creating a feeling of exclusion. “Folks”, or “team”, or “everyone” won’t add any further drops to the bucket.</p><h4><strong>Think twice</strong></h4><p>Don’t emphasise gender if there is no need for it. When your stereotype of what an engineer looks like is challenged, celebrate internally or with your own crew. If you want to compliment someone, compliment the person’s actual work. If you really want to talk about gender, ask about her experience as a woman instead of mentioning how surprised you are to see her do this job. Even then, realise that you’re emphasising to her that you perceive her as an peculiarity. Ask yourself whether that is worth it.</p><h4><strong>It’s not a minefield</strong></h4><p>If you do say something clumsy, don’t feel ashamed. Gracefully acknowledge it if there is an opportunity to do so. There is no reason to bash yourself or let others bash you. You’re learning. I’m learning. We may and will all make mistakes, embrace the awkwardness and move on.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MBmxJmVNzsSINgaGyN1A7w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/g1Kr4Ozfoac">Brooke Cagle</a> on <a href="https://unsplash.com/photos/g1Kr4Ozfoac?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>For female engineers and people managers, these are a few additional pieces of advice.</p><h4><strong>Grow and develop</strong></h4><p>Talk and train about confidence and self-compassion. It is something that can be taught. I don’t believe you can slab it on through external compliments or boasting about successes. Self confidence arises from a deep connection with yourself. A complete acceptance and support of who you are. A commitment to regularly check in with yourself and whatever you find yourself needing, you will make it happen, no matter what.</p><p>I’ve found many young women haven’t had the opportunity to learn how to create this healthy connection with themselves. If you create support through training or counseling, female engineers who need some help will be better equipped to feel composed in questionable situations.</p><h4>Don’t go at it alone</h4><p>Hire the first women on a team in pairs. You can’t guarantee whether they’ll form a strong bond, but at the very least it’s encouraging for them to see more female faces to relate to during daily stand-ups. If you can’t create pairs, arrange an experienced female mentor for your engineer.</p><p>For women: I would generally advise not to be the first woman in a tech department early on in your career. Your first years are all about learning, growing, and finding your unique talents. Make sure you find a place where you feel women fit right in and your worries are limited to keeping your git history clean.</p><h4>Speak up</h4><p>Whether you want to address an insensitive comment head-on, or whether you want to leave it and just voice your frustration to a colleague, remember you don’t need to keep it all to yourself. Most situations feel better once you’ve shared them out in the open.</p><h4>Resist the marketing opportunity</h4><p>To attract more women, organisations often enjoy flaunting the female engineers they have. That can be fine since it serves a goal that benefits everyone on the team. But don’t forget to take your employees’ voices into account.</p><p>At my current company, the people department checks in with all female employees to align on international women’s day activities. If it’s a day about your employees, let them own it.</p><h3>Moving Forward</h3><p>I hope these examples helped grow some awareness of the not so obvious hurdles that women in tech commonly face.</p><p>Overall, I think tech is an amazing place for women to work. It is challenging, creative and extremely versatile. We need more engineers of all kinds, colours and shapes to inspire novel solutions to the pressing problems we face today.</p><p>To everyone, keep an eye out for your female colleagues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zSKUA8besiaQthZfNQ7elQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/nShLC-WruxQ">Lance Grandahl</a> on <a href="https://unsplash.com/photos/nShLC-WruxQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>And, if you’re a female engineer, don’t accept anything less than a place with great leadership that is dedicated to supporting you to thrive.</p><p>Feel free to reach out if you want to chat further!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82005a2e24e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/better-programming/supporting-female-engineers-to-thrive-82005a2e24e7">Supporting Female Engineers to Thrive</a> was originally published in <a href="https://betterprogramming.pub/">Better Programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How an Internal Competition Boosted Our Machine Learning Skills]]></title>
            <link>https://medium.com/data-science/how-an-internal-competition-boosted-our-machine-learning-skills-9fa40efc402e?source=rss-61a43dbb084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fa40efc402e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[innovation]]></category>
            <category><![CDATA[notes-from-industry]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Ayla Kangur]]></dc:creator>
            <pubDate>Tue, 12 Apr 2022 10:22:37 GMT</pubDate>
            <atom:updated>2022-05-18T06:59:31.417Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Fuel your AI innovation while having fun</em></h4><p>We’re big fans of open collaboration to learn, grow, and incite innovation, but sometimes you need to feel the heat of a competitor to push yourself forward. With our company’s internal AI competition, we did just that. We selected a relevant challenge and our engineers competed against each other in small groups to develop — at the same time — both the best and most efficient machine learning model.</p><p>That’s right: We used a trade-off here because for real-world AI problems, you can’t always grab the biggest model with the highest performance. There are cost and time constraints to consider.</p><p>The competition was a part of Slimmer AI’s beloved AI Fellowship program. This program carves out and structures dedicated R&amp;D time in which our machine learning engineers collaborate, experiment, learn, and progress on state-of the-art techniques to solve big problems. The aim is to strengthen both their personal development and progress our near-future company goals. We work in quarterly cycles, so we committed a full three-month cycle to dive into this competition.</p><p>Ultimately the format of the competition will determine whether it helps the company and people to grow, or whether it is just a fun event to pass time. To be intentional with your goals, you will need to find the ideal topic, create the right teams, and craft the perfect conditions.</p><p>In this article, I will share some of the decisions we made and how those were evaluated in hindsight, so that you can roll out an even more successful contest within your own team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AEuE6L13YHsrZbGu" /><figcaption>Photo by <a href="https://unsplash.com/@ba0_tru0ng?utm_source=medium&amp;utm_medium=referral">Bao Truong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3><strong>The rules</strong></h3><h4><strong>The perfect challenge</strong></h4><p>To be maximally effective, the competition had to both strengthen the knowledge we had gained over the past year <em>and</em> contain a novel element to push our expertise further. We chose to work on a challenge within the Natural Language Processing (NLP) domain, since a considerable part of our innovation in the past year had taken place there. Previously, we explored topics such as named entity recognition and few-shot learning and believed it made sense to dive deeper into these concepts by combining them. Furthermore, it made strategic sense to become proficient in multilingual AI solutions in the not-so-distant future for one of our products. We knew we had to tackle that as well.</p><p><a href="https://huggingface.co/datasets">The Hugging Face Hub,</a> which contains thousands of datasets, was an invaluable help in finding the right challenge. It allowed us to discover the <a href="https://github.com/google-research/xtreme">XTREME dataset</a>, which is a multilingual multi-task NLP benchmark. It covers 40 typologically diverse languages and includes nine tasks that require reasoning about different levels of syntax and semantics. Out of the nine tasks, we selected four that were in line with our recent R&amp;D work. Both the multitask and the multilingual aspects added a novel challenge for the team, thereby ensuring that the competition was a relevant learning experience.</p><h4><strong>No opt-out</strong></h4><p>Just like the rest of the Fellowship program, participation in the competition was not optional. The team highly values continuous learning, so active participation in innovation activities is simply a part of the job. In return, half a day per week is reserved for Fellowship activities such as the competition.</p><p>There was another mandatory aspect of the competition that teams took great pride in: coming up with a great team name. We therefore had teams like Ditto (a “Transformer” Pokémon), Neurotic Networks, and Astrology (consisting of former astronomy graduates) trying to secure their first place.</p><h4><strong>Golden couples</strong></h4><p>We divided our team of machine learning engineers into pairs of two. We didn’t want people to work on the challenge alone because we wanted to foster collaboration and learning from each other’s strengths. However, we also didn’t want to make the teams any bigger and create temptation for free riding.</p><p>The selection of the pairs was quite a deliberate process, in which we wanted to match seniors with juniors, have at least one person with relevant topic experience within each pair, and strengthen new bonds by having people join forces who had not collaborated much within the previous year. And of course, the expertise of the teams overall needed to be balanced to make sure everyone had a fair shot. Yes, we were indeed tempted to write an optimization algorithm to sort this out, but we ended up being pretty successful by hand.</p><h4><strong>Efficiently good</strong></h4><p>Upfront we were very clear about the winning criteria. We averaged the scores of the four selected tasks to rank each team’s model in terms of performance.</p><p>However, teams were also scored on efficiency during the test phase. We intended to use the power metric computed by the <a href="https://github.com/Breakend/experiment-impact-tracker">Experiment Impact Tracker,</a> but this didn’t provide the reliable results we were hoping for. We therefore switched to simply using the total duration of the test phase as an approximation of model efficiency. After all, when all models run on the same hardware, models that are less efficient are typically slower.</p><p>To come to a final winner, we created a re-ranking rule for the two teams with the most efficient models. The team with the most efficient model is pushed up two places in the overall performance ranking. The second most efficient team is pushed one place higher. Note that this re-ranking would only apply if the performance difference in average task score is less than 10 on a scale of 100 and the difference in efficiency is higher than 5%. We didn’t want a super fast but random model to creep up the ranks.</p><h4><strong>Independent evaluation</strong></h4><p>While the training dataset was handed over to the competing teams, an evaluation test dataset, and a final test dataset were held back. A non-participating engineer was then assigned to evaluate the models on the held-out data. There were three opportunities to run a model on the evaluation test dataset and after each attempt the intermediate leaderboard was updated. The final test dataset was used only once at the end to determine the final ranking.</p><h4><strong>Collaborative competition</strong></h4><p>Of course, teams needed to compete, but we also wanted people to rapidly learn and innovate based on each other’s findings. We held weekly stand-ups in which people shared interesting methods they had come across or tested. The exact implementations and parameters were kept secret by each team.</p><p>Additionally, all submissions were to be shared after the competition had ended. Although this was done to ensure more learning and promote clean code, it was also a fail-safe against cheating since the test set was freely available online.</p><figure><img alt="A summarization of the 10 steps to running a successful AI competition" src="https://cdn-images-1.medium.com/max/1024/1*CnY-cAqbr95_uIQhAaCwbg.png" /><figcaption>Images courtesy of Slimmer AI</figcaption></figure><h3><strong>The competition</strong></h3><p>Each team had to submit one model that could handle 40 vastly different languages and four different NLP tasks:</p><ul><li>Determine whether a premise sentence entails, contradicts, or is neutral towards a hypothesis sentence.</li><li>Determine whether two sentences are paraphrases of each other.</li><li>Perform part-of-speech tagging (e.g., identify nouns, verbs, pronouns, etc.).</li><li>Perform named entity recognition (e.g., identify named persons, organizations, locations, etc.).</li></ul><p>Four hours a week for three months is not nearly enough time to train a winning model from scratch. Nor should you really have to with the high quality of pre-trained model available open source. Teams experimented with finding and fine-tuning the best suited pre-trained model, always remembering that unnecessary bulkiness would be penalized.</p><h4><strong>Techniques</strong></h4><p>Now this is where we get technical for those who are dying to get a glimpse of what our teams did. If this does not interest you, feel free to skip to the next section.</p><p>Most teams used an mBERT model as their base. Not because it was the best, but because it’s an architecture we’re very familiar with. BERT models only allow a 512 token sequence as input, which was a problem for some of the longer samples in the dataset. Teams experimented with various techniques to best serve longer input sequences, such as not cutting a sequence in the middle of a word or adding more context to follow-up sentences. They also experimented with the model’s architecture. Improved results were obtained by, for example, adding a second layer to the classification head.</p><p>The learning rate is critical during fine-tuning, and two actions proved especially useful. First, some teams did not just train the head, but also unfreezed the encoder and used a continuously lower learning rate for lower layers of the model. Second, a learning rate schedule with warm-up led to enhanced results. During warm-up, the learning rate first rises from a low value to the initial learning rate before decreasing again to lower values.</p><p>One team successfully sped up their model and improved efficiency by not padding their samples. Instead, they attached all the samples back-to-back, using a separator token to signify their division. Of course, in a production system this would only work if samples were also presented in batches. Other significant improvements were found through enabling mixed precision training and parallel tokenization.</p><p>We’re in favor of the <a href="https://datacentricai.org/">data-centric AI movement</a> that Andrew Ng is currently championing. At a certain point, bigger gains can be obtained by improving the data instead of further fine-tuning a model. To boost the performance on uncommon languages, teams successfully experimented with oversampling and adding translated samples of common languages. Instead of training on the languages one by one, sampling from multiple languages in a single batch enhanced the model’s ability to generalize.</p><h4><strong>The winning team</strong></h4><p>In the end, the final results were very close. One team was so bold as to submit an InfoXML architecture instead of using mBERT. Using this beast of a model, they were propelled to first place in terms of performance. However, their model was so inefficient — more than three times slower than the second performing team — that they unfortunately lost their first place during the Great Re-rank (read back if you forgot how we evaluated the models). Actually, this model was so inefficient that even the third performing team moved up ahead of them. This meant that the best performing model ended up third in the final leaderboard. The second performing team came out as the winner. What a ride!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EaHGLxlKxPXBJtx0TSbCgQ.jpeg" /><figcaption><em>The end results of our AI competition. Although the blue team Neurotic Networks scored highest on their final submission (line chart), their model was much slower and inefficient (bar chart), causing them to drop two places due to penalties. The pink runner-up team Garbage Goober went home with first prize. </em>Images courtesy of Slimmer AI.</figcaption></figure><h3><strong>Lessons learned</strong></h3><p>A survey at the end of the competition showed that:</p><ul><li>9 out of 10 engineers felt they had expanded both their knowledge of the topic and their skills in building deep learning models.</li><li>8 out of 10 found the task interesting and the competition itself a valuable to extremely valuable experience.</li><li>Everyone felt capable and supported enough to perform their own experiments.</li><li>A majority felt that there wasn’t enough time and computational resources to perform all the experiments they wanted.</li></ul><p>We’re a data-driven company, so obviously we like quantifiable survey results to numerically track that we’re heading in the right direction. However, we don’t do without the deeper personal feedback received through retrospectives. Those are the insights that help to continuously improve.</p><p>So, what did we learn from the retro?</p><h4><strong>Start with a working version</strong></h4><p>A lot of time was spent on creating the data loaders and getting an end-to-end working pipeline. Leaving less room for actual ML innovation. Although some engineers found this experience very rewarding, we don’t feel like we need to repeat that and will probably supply a baseline model and data loader for our next competition so people can jump into the good stuff straight away.</p><h4><strong>Further refine the criteria</strong></h4><p>In hindsight, severely penalizing a model for being 5% less efficient than its runner up seems a bit too harsh. We lucked out that the re-ranking rule worked out well in our case, because the difference in efficiency between the top performing teams was so large. But next time, we’ll probably calibrate those thresholds given the performance of the baseline model we’ll supply and check-in with the whole team before carving those numbers in stone. We might also experiment with incentivizing models that have been trained less.</p><h4><strong>GPUs for everyone</strong></h4><p>We still have users to serve besides the competition, so the time constraint will remain. However, to overcome the resource limitations, next time we will get a dedicated cloud GPU for each team instead of sharing our in-house GPUs. We will likely give each team the same resource budget to stimulate more efficient and greener training of models.</p><h4><strong>Introduce new tools</strong></h4><p>Although several Deep Learning libraries have been in our tech stack for years, the <a href="https://www.pytorchlightning.ai/">PyTorch Lightning library</a> was new to many engineers and the competition allowed the full team to gain experience with it. Many engineers enjoyed this hands-on experience, and it allowed us to conclusively expand our tech stack now that everyone is familiar with it. Next time, we’ll do a quick scan of useful libraries to incorporate in the competition.</p><h4><strong>Bring back the zen</strong></h4><p>People got so enthusiastic about the competition that it became quite stressful to juggle it alongside other responsibilities. We’re not in the business of producing stress, so that’s something we’ll aim to avoid next time. Bigger teams could help, but we all agree we want to avoid free riding, which can be demotivating for everyone. We’ll therefore probably reward intermediate submissions more during our next competition. We might even declare winners at each intermediate stage, have everyone openly share their code, and then let other teams improve on that for the next submission. Hopefully this will spread the workload evenly and keep the tension at a pleasant level.</p><h4><strong>Keep it academic</strong></h4><p>We discussed whether the somewhat artificial, rather academic nature of the dataset was a good idea. As an applied AI company, shouldn’t we be using real-world data? Overall, we concluded that the chosen dataset worked really well for our purpose. We work on real-world AI problems every day of the year. Focusing on a more academic task gave everyone room to focus on the innovative parts and improve technical skills, instead of trying to grasp their head around an evolving problem statement with mucky data.</p><h4><strong>A little less conversation?</strong></h4><p>We knew from the start that trying to foster a cooperative competition might be a bit silly. Trying to eat your cake and still have it. And indeed, although teams definitely shared progress and breakthroughs during the weekly stand-ups, they also mentioned they were understandably a bit reluctant to share their best ideas. Next time, we will probably use a Q&amp;A format for the stand-ups, since everyone is more than willing to help others who are stuck. That, combined with code sharing after intermediate submissions, might still create an open climate without ruining the competitive element.</p><h3><strong>Conclusion</strong></h3><p>The competition was held to push our technical capabilities forward and to have fun along the way. Although next time we might change a few rules, we’re happy that both goals were evidently reached.</p><p>During the contest we gained novel hands-on experience with training multi-task models and preparing their data. Already in the next quarter, this experience proved useful when code from the competition was directly applicable in the development of a commercial product. Our experience with multi-lingual training currently helps us in the design process of a novel AI application. Because of their practical experience, all engineers are more aware of opportunities and challenges they can expect. And on a more technical level, our entire team gained hands-on experience with a new ML library that significantly speeds up development time for new products.</p><p>But the AI Fellowship and its competition are not <em>only </em>about learning and driving innovation. It’s also a place to connect and celebrate success. While the participants visibly enjoyed the contest, the rest of the company joined in during the weekly huddles in which the intermediate rankings were presented. The winning team was put in the spotlight during our company Christmas party and will find eternal glory on a wall tile with their name on it in our canteen’s Hall of Fame. In a year in which remote work pushed us physically further apart than we wanted, the competition proved a great outlet to have fun and bond over a common goal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FZ29mJU0GjOqCGvztRO78A.png" /><figcaption><em>The competition winners have found eternal glory in our Hall of Fame. </em>Images courtesy of Slimmer AI.</figcaption></figure><p>A special thanks to <a href="https://sybrenjansen.medium.com/">Sybren Jansen</a> — our Head of AI Innovation — for meticulously designing and organizing this event! We might host another competition again soon, but our pile of other fun ideas to push innovation also keeps growing. I guess it’s best to say… stay tuned!</p><p>If you want to know more about our work at Slimmer AI, feel free to reach out or head to <a href="http://www.slimmer.ai/">our website</a> to learn more.</p><p>If you’ve thought of other creative schemes to make continuous learning and innovation fun, please share the joy in a comment!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fa40efc402e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/how-an-internal-competition-boosted-our-machine-learning-skills-9fa40efc402e">How an Internal Competition Boosted Our Machine Learning Skills</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Explainable AI in practice]]></title>
            <link>https://medium.com/data-science/explainable-ai-in-practice-6d82b77bf1a7?source=rss-61a43dbb084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d82b77bf1a7</guid>
            <category><![CDATA[explainable-ai]]></category>
            <category><![CDATA[model-interpretability]]></category>
            <category><![CDATA[editors-pick]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ayla Kangur]]></dc:creator>
            <pubDate>Thu, 24 Dec 2020 09:47:08 GMT</pubDate>
            <atom:updated>2021-06-25T07:26:53.389Z</atom:updated>
            <content:encoded><![CDATA[<h4>Model Interpretability</h4><h4>How committing to transparency made us deliver better AI products</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*Y4svRBDWquV6KBf0HyY_pA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@kumpan_electric">Kumpan Electric</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>There has been quite a bit of debate around black box AI models being applied to real-world problems. Common AI models have become so large and complex, that even the developers and product managers building the thing don’t exactly know what kind of decisions it will make.</p><p>This has resulted in all sorts of unwanted outcomes and potential severe negative consequences for society. These have been evidenced by automated decisions with a <a href="https://algorithmwatch.org/en/story/google-vision-racism/">racist</a> or <a href="https://www.reuters.com/article/us-amazon-com-jobs-automation-insight-idUSKCN1MK08G">sexist</a> bias, such as Apple’s infamous <a href="https://www.bbc.com/news/business-50365609">credit card launch</a> in late 2019. Or other dangerous consequences, such as a <a href="https://www.technologyreview.com/2020/02/19/868188/hackers-can-trick-a-tesla-into-accelerating-by-50-miles-per-hour">Tesla misinterpreting</a> a 35 miles per hour speed limit sign after it had been altered with a small piece of tape.</p><p>Even with these risks, the vast majority of people still believe in the power and potential of AI. This article looks at three real-life cases in which harmful consequences of black-box AI were mitigated. It closes off with a 6-step transparency guideline that we have implemented in our own development process at Slimmer AI to ensure we avoid the pitfalls of back box models.</p><h4>Explainable AI</h4><p>There are techniques and best practices to open up AI models and peek under the hood. Sometimes this is done by selecting a simpler so-called white box model that lets itself be explained more readily. Other times, this entails using novel techniques or grabbing another AI model with the sole task of explaining the first one. The subfield of AI that is concerned with improving model transparency is called explainable AI (or XAI for short). As is perhaps evident by the name, XAI helps human beings understand why the machine reached a particular decision. If humans need to act on decisions made by the system, it’s often very important for these outcomes to be explainable.</p><p>Within explainable AI, there is a noteworthy distinction between global interpretability — which enables you to understand how the model generally responds in any situation — and local explanations — which show why a decision was made in one specific case. Global interpretability is very useful for developers and business operators because it improves debugging, understanding and adherence to regulatory compliance. Local explanations are also important to end users who want to know how an algorithmic decision came to its conclusion in their specific case and whether it used fair criteria in the process.</p><h4>Do we have time for explainable AI?</h4><p>In a typical AI development workflow, putting in the effort to open up a model might oftentimes feel like time you cannot afford. Machine learning engineers have done their data analyses, feature engineering, model selection and (hyper) parameter tuning in several cycles and finally landed on a model that gives satisfactory, may you even say impressive, results. Product managers have become excited about the model’s performance and its implications for business outcomes. Everyone is on fire to get this thing into production.</p><p>Why pause now and take the time off to play around with the outcomes?</p><p>Because, in my five years as a machine learning engineer at Slimmer AI, a company with more than 10 years of experience building over dozens of AI solutions, I have seen quite a few cases where explainable AI saved the day.</p><h3>Three real-life examples</h3><h4>Case 1: Don’t copy that</h4><p>One of the AI products in the Slimmer AI Science team classifies scientific documents based on relevant pharmaceutical information. When development started a few years ago, we were all excited that the first results seemed very promising. With both very high precision and recall, we were able to pinpoint which documents mattered.</p><p>To our customer however, an automated decision wasn’t enough. Their workflow — and the pharmaceutical industry itself — is heavily regulated. They needed to know why a document was classified in one category and not another.</p><p>Initially, we used LIME (<a href="https://arxiv.org/pdf/1602.04938.pdf">paper</a>, <a href="https://github.com/marcotcr/lime">code</a>) to get an approximation of which words in the preprocessed text had contributed most to the results. LIME fits a simple white box model on the feature space directly surrounding a data sample. This way, it learns what subtle differences in input values cause one prediction over another and hence, which features — in this case, words — are most important.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/955/1*NFgbRleThymXOGR1bUh0ow.png" /><figcaption>An example of applying LIME Text Explainer on a scientific document. Highlighted words have contributed the most towards the eventual classification of the paper. Photo by author.</figcaption></figure><p>To everyone’s surprise, one of the most important “words” that popped up in several texts was the number 169 at the end of the last sentence. We were baffled by this random looking number and checked the original text for clues.</p><p>It turned out that texts from one specific source almost always included a copyright mark in html tags at the end of the text. After preprocessing, only the number 169 remained. Typically, texts from this source had a higher likelihood of belonging to one specific category, hence the model had picked up on this by using the copyright reference to discern between categories.</p><p>While it might be a good idea to include a feature that specifies the source of the text, our model would not have been robust if we had put it into production in its current form. All it would take is for this one data source to remove the copyright symbol, or for another source to add it to their texts as well, and our model’s predictions would be incorrect.</p><p>We improved our preprocessing by properly removing whole html tags, increasing our confidence in the outcomes of this new model in production.</p><h4>Case 2: Do you see what I see?</h4><p>In a pan-European medical partnership we were the designated party to automatically detect skin infections surrounding the driveline tube of patients with a ventricular assist device. The final AI product was an app through which patients could check the wound surrounding their driveline. In case of moderate or severe infection, immediate contact with a physician would be warranted.</p><p>In the initial dataset, photos of the driveline entering a patient’s body were categorized by human physicians into one of four categories ranging from no to severe skin infection. Because the physicians sometimes disagreed, it wasn’t possible to obtain a perfect score. Even more, the photos were often cluttered with tissues and bandages and the dataset was relatively small.</p><p>With such ambiguous data, it was even more important to make sure the model made sensible decisions.</p><p>While deep neural networks often get a bad reputation for being opaque black boxes, a technique called Grad-CAM (<a href="https://arxiv.org/pdf/1610.02391v4.pdf">paper</a>, <a href="https://paperswithcode.com/paper/grad-cam-visual-explanations-from-deep">code</a>) enables you to visualize what the network is paying attention to when making its decision. For many use cases, this is a helpful technique to determine whether or not you should trust a prediction at face value.</p><p>Grad-CAM showed that even though our model often made very sensible predictions, it occasionally based its decisions not on the wound surrounding the driveline, but solely on the driveline itself! Presumably the small size of the dataset and the prominent appearance of the driveline had given the model the false impression that the orientation of the driveline contained an important clue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*XkoUyH0dbQZRSpDdR8rM8g.png" /><figcaption>Left image shows the driveline tube as the main area of interest. Right image shows the neural network’s interest in the wound itself. Photo by author.</figcaption></figure><p>This insight prompted us to automatically filter out the driveline from the photos before presenting them to our model. We tested and compared several masking and filling techniques, each time using Grad-CAM to analyze the impact. Eventually, we were able to settle on a specific filling technique that made the model’s predictions a lot more robust.</p><h4>Case 3: Can’t touch this</h4><p>In late 2018, we partnered with an institution to help identify customers at risk of getting into severe debt. The institution intended to reach out to these persons early on to get them on a customized payment plan before their finances would worsen even further.</p><p>Their database consisted of a multiyear fine and transaction history of millions of customers. They also had access to another database from a different institution, containing additional personal information about their customers.</p><p>The domain experts involved intuitively felt that this second database would provide valuable information. However, due to privacy concerns, the organization was wary to combine these two databases unless this proved to be significantly beneficial to the cause.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQWfsU2Xd8x5zu2N2htawg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@farber">Jonathan Farber</a> on <a href="https://unsplash.com/">Unsplash</a></figcaption></figure><p>We trained two models on the data in the first database: a simple logistic regression and a gradient boosted trees model (XGBoost), both using a large collection of engineered features. XGBoost easily outperformed logistic regression, giving us confidence that a more complex AI model was justified.</p><p>Next, we tested if we could make these predictions even better by adding the second database. To everyone’s surprise, the resulting model did not lead to any better results.</p><p>We therefore computed the feature importances of both models. This showed which input characteristics had the largest impact on predicting who would end up with severe debts.</p><p>For the model using only the first database, one particular customer fine in combination with several payment behaviors proved to be most important. For the model using both databases, it turned out that one specific characteristic from the new database was by far the highest contributing feature.</p><p>This meant that the second database indeed contained information that significantly contributed to making a correct prediction, just as the domain experts had suspected. But the same information was already captured in the model using only the first database, albeit through a more complex combination of several manually engineered features.</p><p>This led to a sigh of relief, as the client we had partnered with felt they could safely focus on the first database and uphold their value of privacy by removing any dependency on the second database.</p><h3>Embedding explainable AI into your workflow</h3><p>In the three different problems from the examples above, three different approaches to explainable AI were used. This shows that explainable AI is not just a single trick you can apply to each use case; it is a whole subfield of AI that is waiting to be mastered.</p><p>The main takeaway is that even though it is essential to have concrete metrics such as F1 scores and accuracy, we must also take the time to get to know and understand our models. No metric will capture the insights you can gather from opening up your model and getting an understanding of why it makes the predictions that it does.</p><p>To make the most of explainable AI, we use a 6-step transparency guideline at Slimmer AI when diving into a new AI adventure:</p><h4>1. Agree on the goal</h4><p>Before doing any data prep or model selection, align both engineers and business stakeholders on what the model is going to optimize. When building a predictive engine, how do we represent each category? And what are the business consequences if the model misses an instance or when it makes a mistake? The answers to these questions will determine how the model should be fine-tuned and help establish your first step towards a more transparent model.</p><h4>2. Explore the data</h4><p>Next, get to know your data through descriptive statistics and correlation plots. This will already provide some insight on class distributions, outliers and most relevant features. The results from this step will often cause you to refine the goal from step one. If the data contains personal information, rank the risk of using each feature or specific samples with respect to discriminative outcomes. Unfair bias should be checked at the end of the development cycle, but now is the time to make a first selection.</p><h4>3. Start simple</h4><p>It’s best to start off with the simplest baseline model you can think of to avoid overfitting on your data. Additionally, simple models are often more interpretable out of the box. Although customers and marketing may love the idea of a deep neural network, if a good ol’ linear regression can do the job just as well, then it’s best to stick with the basics.</p><h4>4. Get some perspective</h4><p>Before presenting evaluation scores to your team or other stakeholders, look at the relative importance of each feature. Does this make sense? Does domain expertise acknowledge their importance? Could any of these features indicate unfair bias? Present these global model explanations alongside your evaluation scores and bias report to stakeholders to improve the model’s trustworthiness.</p><h4>5. Zoom in</h4><p>Next, look at the local explanations of both correctly and incorrectly predicted samples. Is it plausible that the samples were misclassified given these features and their values? Often your features can be further fine-tuned based on the information you gather during this review. Once you’re satisfied with the model’s results, report indicative sample explanations so that stakeholders gain an intuitive understanding of the model’s limitations. If possible, present explanations alongside predictions once your model goes into production.</p><h4>6. Monitor</h4><p>Once your model is in production, make sure to continuously check for changes in the input data which could cause your model’s performance to degrade over time. Monitoring data drift and real-time performance will increase confidence in the model’s robustness.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jhncSeqY0K6FWNWt05kCdg.png" /><figcaption>Graphic by Author</figcaption></figure><h3>Closing thoughts</h3><p>I hope these examples have made you excited to embrace explainable AI in your own workflow. It’s a topic I’m very passionate about and at Slimmer AI we are constantly monitoring and testing novel ways to improve our models’ transparency. Our current R&amp;D focuses on whether some of our high performing tree ensembles could potentially be replaced by a more white-box <a href="https://github.com/interpretml/interpret">Explainable Boosting Machine</a>.</p><p>What is your favorite technique? And do you have any other examples where explainable AI saved the day? Please comment here or reach out to me to discuss!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d82b77bf1a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/data-science/explainable-ai-in-practice-6d82b77bf1a7">Explainable AI in practice</a> was originally published in <a href="https://medium.com/data-science">TDS Archive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>