Should you build or buy your AI?

Creating effective machine learning algorithms is hard. Is it better to buy off the shelf—or even rent?

Build or buy AI?
  • Union Pacific chose to build 17 proprietary algorithms for rail‑car monitoring
  • Building in‑house algorithms can make sense if they create a first‑mover advantage
  • Training and and maintaining algorithms requires as much effort as building them

Inspecting a train is an arduous process that takes hours to complete. Union Pacific operates hundreds of trains every day, most more than 100 cars long. All those inspection hours add up to a major operational cost.

Luckily, the inspection process has gotten more efficient lately, thanks to lasers, radars, sensors, and the vital component that ties them all together—algorithms.

Union Pacific has built custom‑designed tracking stations into its rail yards in Arkansas, Iowa, and Nebraska. Each “Machine Vision” station scans rail cars as they pass through, using algorithms to spot stressed parts or defects that are undetectable to the human eye.

Machine Vision sensors snap 50,000 high‑definition images per second. Lasers also capture 15 billion data points to create 3D models of each passing car. The models trigger algorithms that hunt for anomalies, says Lynden Tennison, Union Pacific’s CIO. Those algorithms—17 in total, so far—were built in‑house, each for a different train part.

“We were collecting massive amounts of data, so we started by writing a single algorithm to look at a broken spring and went from there,” he says. “We didn’t try to look for every possible defect on every piece of equipment—we’re starting with automating those 17 things first.”

Union Pacific built those algorithms in‑house, using its 25‑employee Machine Vision team. However, the company generally prefers to purchase or adapt open‑source algorithms when possible. “As the market has matured, we’ve been taking advantage of algorithms that others have built,” Tennison says. Through that experience, Union Pacific has developed guidelines to help determine which option is preferable.

With many CIOs just beginning to test the waters of machine intelligence, the build‑or‑buy question is increasingly relevant. Building your own algorithm yields a proprietary, unique product. However, the process is time‑consuming, risky, and requires very particular skill sets.

On the other hand, a growing number of online services offer algorithms as a service or APIs to stitch multiple algorithms together. The downside is that these products aren’t ownable and weren’t designed to meet your particular needs.

There’s also a third option, says Alva Taylor, director of the Center for Digital Strategies at The Tuck School of Business at Dartmouth College. In addition to buying and building, companies can rent algorithms—a middle ground that gives organizations customization options and support.

When is one option more appropriate than the others? The answers aren’t obvious, and depend on multiple variables.

When to buy

Several years ago, Union Pacific purchased speech‑recognition algorithms to assist with help‑desk calls, Tennison says. They chose buying over building because the use case wasn’t domain‑specific, and because they didn’t think speech recognition would provide a strategic advantage.

“Algorithms that make sense to buy are targeted and meet specific, well‑known needs,” says Tennison. “They won’t differentiate you competitively compared to your peers, and they aren’t making strategic decisions.”

So‑called black‑box algorithms are generally easier to implement than custom algorithms, and have low risk profiles. However, it’s a mistake to think they’re ready to go straight out of the box.

“Businesses treat black‑box algorithms like witchcraft,” Tennison says. “You put a lot of ingredients in, stir it around, it smokes for a while, then out pops what you think is the answer, like magic. That’s not how they work. Algorithms can get so complex that when things change, it’s hard to pinpoint why.”

Suppose you’re having trouble with your website’s sales conversion rates. You find an algorithm that tracks how long visitors linger on a picture or page, and then helps you retarget them with sales offers. What the algorithm usually doesn’t know is that customers might be lingering because the product description is confusing, not because they’re about to convert.

“You’re much more susceptible to that when you’re buying,” Tennison says. “These algorithms are built to solve a particular problem, and sometimes that’s not the problem you need solved.”


When to buy > When to buy AI

Union Pacific builds algorithms in cases that meet three conditions:

      • They present a “first mover” advantage in a space where there aren’t a lot of black‑box or open‑source
        options available.
      • They offer specific domain expertise, as with transportation planning systems.
      • The DIY option is considered a strategic move—and intellectual property—worth protecting.

Building is best when the domain is something you need specific expertise in, particularly around understanding the patterns that you input and the ones that come out of it,” Taylor says. “If you’re looking to detect patterns around fraud, for example, you need to be able to quickly identify and update when new types of fraud are identified.”

Building your own algorithms means recruiting and retaining the necessary talent. “The people you need are highly competent in a specific domain,” Tennison says. “You don’t need an army, but you need the right environment to attract and retain them, which is very expensive.”A related challenge is what to do with that talent once you’ve built the algorithm. “The effort it takes to build an algorithm isn’t the same effort it takes to maintain it,” Tennison adds. Unless you have a constant pipeline of work for these workers, their skills and expertise may not be needed long‑term.

Companies also need confidence that they have the right data to train their algorithms, Otherwise the consequences can be disastrous. “The only thing worse than making a bad algorithm purchase is feeding an algorithm bad data,” Tennison says. If you trust bad data and make strategic decisions based on it, it will lead you down bad paths.

When to rent

The other option is renting algorithms, a middle‑ground alternative that’s gaining broader appeal. “We’re going through a period where it’s important to be good at analytics, but it’s hard to do it well, at scale, and in‑house,” says Tennison.

A growing number of firms now specialize in customizing algorithms to your specs through agreements that are typically “pay for play.” Vendors may develop and share IP with client (or customize existing algorithms) or charge licensing fees.

While these services may not know your business, they know how to build good algorithms and will partner with you to customize them. Organizations usually view renting as a bridge rather than a permanent solution.

“You bring these capabilities in‑house with the idea that at some point, you might build your own if you find that they’re core to your business strategies,” Taylor says. “It’s a hedge against making a huge mistake if you’re not equipped to build your own.”

Another potential upside to renting is the hands‑on experience you’ll gain. You’ll learn the difference between a good algorithm and a bad one, for example. Through your interactions with the vendor’s technical team, you’ll also get a sense of what talent might work well in your organization.

AI holds the promise of huge benefits to companies that invest in it and choose the right strategic path with underlying algorithms. As Union Pacific’s experience with rail‑car tracking shows, those algorithms can be just as valuable in an old industry as they are in a new one.