Friday, April 23, 2021

Computational Stress in Production


Last night I attended MiniCAST, an online version of the Association for Software Testing's famous CAST conference. I've never been to CAST in person but I can say that the vibe here was great, much more informal and peer-based than the presenter-audience split I've seen elsewhere. It ran for four hours and squeezed in four talks on two tracks, several socialising sessions, and a keynote from Rachel Kibler.

Rachel spoke about stress cases, those scenarios when context, or the product, or both in tandem distress the user. For example, the health-tracking app that excluded women because it didn't include menstrual cycles, or the social media app that pushed a daughter's photo into a dad's timeline with a celebratory whoop ... on the anniversary of her death, or the ride-share app with numerous pop-ups that is hard to use in the dark, walking fast, with low battery, trying to get a lift out of a bad neighbourhood.

These kinds of threats to inclusivity, emotional stability, and personal security are seen in development process with low diversity, a focus on success, and a lack of interest in users and their real life situations. 

While not always common, stress cases should not be dismissed as simple edge cases (traditionally, a situation where some parameter is pushed to an extreme value). They affect real people in real, tangible, consequential ways. In our ROI-driven world this may not be enough of an argument for some software producers, but the potential for reputational damage probably is.

To help to avoid cases of stress in the wild, Rachel suggested a few approaches in development:

  • Have a designated dissenter, someone whose role is to look for the flaws, find the stress points, advocate for those who find themselves off the happy path.
  • Run pre-mortems, where the potential bad outcomes are written up as headlines and then routes to avoid them are found.
  • Read copy aloud in a bright voice. How does it sound when the content doesn't fit that medium?
  • Give some of your personas traumatic back history.
  • Put yourself under stress when testing. How does that feel? Where does the product fail (you)?
  • Be bold in telling management to be kind, considerate, and ethical.

Remember, there is no average user and someone is always having a bad day.


 Sarah Aslanifar talked about computational thinking which she described as:
an iterative system of generative reasoning in which people build models of a subject in a notation capable of being executed objectively and automatically be a machine, with observable and falsifiable output.
This style of thinking is the result of a logical progression from concrete to abstract thought through human history: oral, written, and now computational. As I understood it, at each stage it was possible for there to be dialogue at a greater remove from reality and at a greater distance between participants.

We're in the computational phase now and our abstractions, or models, have the potential to be encoded and executed. Monte Carlo simulation, where scenarios are run numerous times to understand the space of possible outcomes from some starting situation and with some set of constraints, might be an example.

I don't think Sarah said it explicitly, but the key thing here seems to be the use of the computer as a tool to aid thinking. Exercising a model independently of our own heads gives us a chance to reflect on where it is successful and where it deviates from reality. Analysis of the results can help us to determine what to alter to try to make it better.

Machine learning seems like an interesting area of this space. It is notoriously hard to interrogate, although it is certainly possible to experiment with parameters to improve its outcomes. A generate-and-test strategy is reasonable for exploring an unknown area, but it's not clear to me that it would qualify as computational thinking, not least because of the falsifiability requirement in Sarah's definition.

Perhaps I should have asked Alex Eftimiades about that. He presented on the challenges and value of testing machine learning systems in production. Production for him is financial systems, and the goal of his work is to inspect the firehose of data looking for potentially fraudulent transactions.


One of the points he made early on was that in the "traditional" software testing world, there is a culture of binary pass/fail decisions, where a fail typically indicates some kind of bug. In the machine learning world that sharp distinction is smooshed out into a probability distribution where uncertainty around a result is the norm.

Without a guillotine oracle, the approaches open to testers are to question performance and divergences. These are still comparisons, because testing is about finding differences that make a difference, but they are now statistical in nature. 

Without going into the technical weeds too much, Alex asked questions like does the performance of the system on its training and production data differ by an amount that is not explained by baseline variation? If I tweak the inputs to the system in known ways does the output of the system change in step in ways that are explainable and reasonable? Can I create a threshold for alerting by adjusting it until the balance of true and false positives is acceptable to me, in this context, at this time?

No comments:

Post a Comment