Monday, February 29, 2016

Interview with Philip Thomas, CEO/Founder of Staffjoy

What does your company do?
Staffjoy automatically schedules people so that they work when they want and the business saves money. What we are trying to do is create flexibility for workers and businesses to help them thrive. The first place where we are starting to do that is the scheduling of shifts for hourly employees.

What caused you to start Staffjoy?
Staffjoy started as my senior research project at Washington University in St. Louis. I had been doing a lot of applied mathematics work, and for my senior project I had decided that I wanted to try to make something interesting and novel, rather than partner with a corporation like a lot of other students did. I worked on developing new techniques for scheduling workers that aimed to put them into the shifts that they prefered. My senior project was nowhere near where Staffjoy is today, but my interests began with that project, and I continued working on it on the side for a few years before my friend Andrew Hess joined in to work on turning some of these ideas into real production systems. And then shortly after that we closed our first customer. In October of 2015, Staffjoy transitioned from being a part time pursuit to being our full-time job. So we are now a team of three people with number four starting in a week and a half.

What makes Staffjoy a AI start up?
So I originally struggled with the question of whether to classify Staffjoy as “Artificial Intelligence” or “Operations Research”. In general, I have moved towards calling it more of an “applied mathematics” company. However,, external sources have often referred to us as an AI company. For instance, LAUNCH Festival named us a “Top 10 Emerging Startup in Artificial Intelligence and Machine Learning”.. And this is something that I think is an interesting question - What defines Artificial Intelligence? I wrote a blog post on the topic, but the question kind of becomes "Is Artificial Intelligence defined by the work the agent does, or by how the agent does the work?". So what we're doing at Staffjoy is automating the decisions that humans make, and we are able to replicate or outperform humans in terms of the quality of those decisions. But what makes Staffjoy more in the realm of Operations Research is that there is a measurable quality to some of these answers. For instance, there is a minimum number of labor hours needed to meet business needs. In that case it is definitely more of an Operations Research approach, because you're doing convergent optimization. I think that this tends to be a little bit outside of the scope of academic artificial intelligence.

I tend to think of hard Artificial Intelligence as a neural networks and science that attempts to replicate human thought patterns in order to do work. But Staffjoy is mainly an Artificial Intelligence company in the sense that it replicates decisions made by humans and does so better than a human. But the question still remains to be seen, "Do we define Artificial Intelligence as the work done, where it literally makes decisions that are typically done by an intelligent human? Or, do we define it by how it performs the work?" We don't really outwardly talk about the work we do at Staffjoy as “Artificial Intelligence,” but others have described what we do as just that.

If I understand correctly, the goal of your AI or algorithm is to optimize staffing?
The first problem we worked on solving was generating shifts of dynamic length for a group of workers that meet business needs. A business has varying needs throughout the day. If we are looking at something like a coffee shop, they know that traffic levels will be low at 8 am, slightly higher at 9 am, and at a peak at 10 am, and then start to decrease from 11 am. So there is this need to vary staffing levels because if they maintain the same number of workers throughout the morning then that means that either at the beginning of the morning when things are slow they have more workers than they need so they are over-scheduled and paying more money than they need to. But, it might also mean that at 10 am when they are at the peak traffic, the number of workers might not be high enough,  so they may be understaffed and unable to provide service at the level of quality that they need.
That's part one, looking at the demand of the business, which can be forecasted by looking at historical sales numbers, and matching scheduling to dynamically increase and decrease throughout the day based on the needs of the business. So take forecasted demands, convert it to minimum staffing levels, and then we optimize schedules to meet as precisely as possible to meet  varying demand levels throughout the day.
This is subject to a lot of rules. Let's just talk about some of California's compliance rules. Depending on how a “workweek” is defined, in general working 6 or more days consecutively in a workweek means that somebody qualifies for overtime pay. If they work more than 8 hours in a workday then they are subject to overtime pay. If they work more than 40 hours in a workweek, they can be subject to overtime pay. So, what starts to come down is this pretty basic model of match labor to business needs, but then you layer on top all of this compliance and it becomes significantly more difficult as you have a basic, quantifiable objective function -  “minimize my labor costs” -  but then you have to make that subject to a many different compliance constraints. And then there's real world constraints - maybe one of the workers is a college student and is only available to work on Monday, Wednesday, and Friday or Saturday after 1 pm. As you start to layer in all these different constraints it starts to become extremely difficult, not only to match the business needs, but also minimize the labor costs. At the core that's the mathematical problem that we are solving for many workers is scheduling them to work when they are available to, subject to all of these constraints.
What we're working on doing right now is releasing an even more advanced version of this algorithm. For a given business there may be billions of possible schedules that are feasible and meet the constraints. Out of those billions of schedules, we generally estimate that a few thousand are optima. What we try to do is, after we find the threshold of optimality, we try to search for basically what amounts to canonical optimal solutions that still meet the business needs but try to put people into the shifts that they prefer. So what do I mean by prefer? We actually try to quantify that right now by asking workers for their preferences. Those preferences may be "I like to work mornings,” "I like to work afternoons,” things like that. And we've developed an economic model for scoring shifts for these workers.
This is all starting to sound really complex, so taking a step back, what are the actual benefits to the business and the workers? The benefits to the business are that they have optimal staffing levels and on average our data is showing that we can decrease overall labor costs to these businesses by about 10% through more optimal staffing. But then on the workers, what do they gain? Well they gain flexibility, because they are able to have more control over when they work. So, a morning person will not get scheduled in the closing shift, making them happier and more productive. We're able to start to collect a lot of data that can make even more knowledgeable solutions in the future.

Can you describe how you go about building a better algorithm?
When we originally wrote the first version of the Staffjoy algorithm, it was a basic branch and bound algorithm implementation and we were so excited because we we had all of the constraints programmed in, we had the objective function of minimizing labor costs and it worked. And then we got data from an early user. They sent us the actual inputs for 30 of their workers, then Andrew and I spent hours turning the spreadsheets into code, because we didn't have any automated way of doing that yet, and we hit “run “on this 32-core EC2 Machine, an Amazon server, a really big one, and we stepped back. We waited, and we waited. After three days and about seventy dollars in pure server compute costs we finally got an answer and it was correct. But that was extremely expensive to compute because the cost of the server was more than the money we would have hypothetically been saving some of these businesses.

So then we went back to the drawing board. And a lot of the work that we've done recently has focused on the realization that viewing the scheduling problem as a perfect convergent optimization solution isn't always the best for both parties because, by looking to be within a few percentage points of perfect convergent optimization, we're able to significantly speed up the calculation using a variety of different techniques that we've developed. Our work has focused on sub-problem generation,heuristics ,and tuning production models. The basic core thing we've realized is that an NP hard problem, when you split it into two separate problems, the sum of the time it takes to solve the two child problems is significantly less than that it would take to solve the parent problem. That's a lot easier said than done, though.

Why do you think there is so much excitement about AI and start-ups?
Looking at our customers, very specifically, why is it exciting? It's exciting to them because our algorithms decrease their labor costs by about ten percent. Meaning, we have one customer that has been using us for a long time, we compared their manually created schedules with our Staffjoy created schedules and we decreased this company's labor costs by eleven percent without decreasing the quality of service. In fact we actually increased the quality of service because it turned out that for about four percent of the time throughout a week they were under-scheduled and losing business.
Labor is about a quarter of the costs of most businesses, so a ten percent decrease in labor costs results in a massive increase in overall business profitability because labor is such a high cost. So that's Staffjoy, we are able to do really interesting things with specialized algorithms that replace human decision makers, and along the way save money.

But in the broader perspective, why are these businesses so eager to adopt AI? I think we are seeing a movement towards businesses feeling comfortable pushing decisions to computers. For instance, one of the things we've had to do is un-train a lot of managers from feeling the need to push an “accept” button or a “publish” button on some of the outputs of our software. That's because they've started to shift more confidence into the ability of computers and specialized algorithms to make decisions that don't need necessarily as much oversight. I think this is a special time because this means that it opens up the ability for computers to be able to replace humans and be able to run by themselves with a degree of autonomy. I think it's just fascinating that technology is moving from being a tool to gaining its own credibility across fields to make decisions autonomously. The cool part of Artificial Intelligence is that we can talk about what is the difference between soft AI and hard AI, like a neural network, but the fact that people are finally embracing technology to make decisions for them in environments like businesses where the costs and ways of doing things are often ingrained in the mindset of the people running them is really fascinating. And I'm starting to see in my own life the hypothetical Turing tests everyday as I email people and then I realize after the fact that some of the assistants were human, others were robots, and I had no ability to distinguish between AI assistants and human assistants myself. I now see that people are becoming more accepting of technology not just as a tool or an app, but asba decision maker

No comments:

Post a Comment