Quanta Magazine

Many aspects of modern applied research rely on a crucial algorithm called gradient descent. This is a procedure generally used for finding the largest or smallest values of a particular mathematical function — a process known as optimizing the function. It can be used to calculate anything from the most profitable way to manufacture a product to the best way to assign shifts to workers.

Yet despite this widespread usefulness, researchers have never fully understood which situations the algorithm struggles with most. Now, new work explains it, establishing that gradient descent, at heart, tackles a fundamentally difficult computational problem. The new result places limits on the type of performance researchers can expect from the technique in particular applications.

“There is a kind of worst-case hardness to it that is worth knowing about,” said Paul Goldberg of the University of Oxford, co-author of the work along with John Fearnley and Rahul Savani of the University of Liverpool and Alexandros Hollender of Oxford. The result received a Best Paper Award in June at the annual Symposium on Theory of Computing.

You can imagine a function as a landscape, where the elevation of the land is equal to the value of the function (the “profit”) at that particular spot. Gradient descent searches for the function’s local minimum by looking for the direction of steepest ascent at a given location and searching downhill away from it. The slope of the landscape is called the gradient, hence the name gradient descent.

Gradient descent is an essential tool of modern applied research, but there are many common problems for which it does not work well. But before this research, there was no comprehensive understanding of exactly what makes gradient descent struggle and when — questions another area of computer science known as computational complexity theory helped to answer.

“A lot of the work in gradient descent was not talking with complexity theory,” said Costis Daskalakis of the Massachusetts Institute of Technology.

Computational complexity is the study of the resources, often computation time, required to solve or verify the solutions to different computing problems. Researchers sort problems into different classes, with all problems in the same class sharing some fundamental computational characteristics.

To take an example — one that’s relevant to the new paper — imagine a town where there are more people than houses and everyone lives in a house. You’re given a phone book with the names and addresses of everyone in town, and you’re asked to find two people who live in the same house. You know you can find an answer, because there are more people than houses, but it may take some looking (especially if they don’t share a last name).

This question belongs to a complexity class called TFNP, short for “total function nondeterministic polynomial.” It is the collection of all computational problems that are guaranteed to have solutions and whose solutions can be checked for correctness quickly. The researchers focused on the intersection of two subsets of problems within TFNP.

 The first subset is called PLS (polynomial local search). This is a collection of problems that involve finding the minimum or maximum value of a function in a particular region. These problems are guaranteed to have answers that can be found through relatively straightforward reasoning.

One problem that falls into the PLS category is the task of planning a route that allows you to visit some fixed number of cities with the shortest travel distance possible given that you can only ever change the trip by switching the order of any pair of consecutive cities in the tour. It’s easy to calculate the length of any proposed route and, with a limit on the ways you can tweak the itinerary, it’s easy to see which changes shorten the trip. You’re guaranteed to eventually find a route you can’t improve with an acceptable move — a local minimum.

The second subset of problems is PPAD (polynomial parity arguments on directed graphs). These problems have solutions that emerge from a more complicated process called Brouwer’s fixed point theorem. The theorem says that for any continuous function, there is guaranteed to be one point that the function leaves unchanged — a fixed point, as it’s known. This is true in daily life. If you stir a glass of water, the theorem guarantees that there absolutely must be one particle of water that will end up in the same place it started from.

The intersection of the PLS and PPAD classes itself forms a class of problems known as PLS int PPAD. It contains many natural problems relevant to complexity researchers. However, until now, researchers were unable to find a natural problem that’s complete for PLS int PPAD — meaning that it is an example of the hardest possible problems that fall within the class.

Prior to this paper, the only known PLS int PPAD-complete problem was a rather artificial construction — a problem sometimes called “Either-Solution.” This problem glued together a complete problem from PLS and a complete problem from PPAD, forming something a researcher would be unlikely to encounter outside this context. In the new paper, the researchers proved that gradient descent is as hard as Either-Solution, making gradient descent itself PLS int PPAD-complete.

“[The nature of computation] is something that we as a species should try to understand deeply in all of its many forms. And I think that should be reason enough to be excited about this result,” said Tim Roughgarden of Columbia University.

None of this means that gradient descent will always struggle. In fact, it’s just as fast and effective as ever for most uses.

“There’s a slightly humorous stereotype about computational complexity that says what we often end up doing is taking a problem that is solved a lot of the time in practice and proving that it’s actually very difficult,” said Goldberg.

But the result does mean applied researchers shouldn’t expect gradient descent to provide precise solutions for some problems where precision is important.

The question of precision speaks to the central concern of computational complexity — the evaluation of resource requirements. There is a fundamental link between precision and speed in many complexity questions. For an algorithm to be considered efficient, you must be able to increase the precision of a solution without paying a correspondingly high price in the amount of time it takes to find that solution. The new result means that for applications which require very precise solutions, gradient descent might not be a workable approach.

For example, gradient descent is often used in machine learning in ways that don’t require extreme precision. But a machine learning researcher might want to double the precision of an experiment. In that case, the new result implies that they might have to quadruple the running time of their gradient descent algorithm. That’s not ideal, but it is not a deal breaker.

But for other applications, like in numerical analysis, researchers might need to square their precision. To achieve such an improvement, they might have to square the running time of gradient descent, making the calculation completely intractable.

“[It] puts the brakes on what [they] can possibly shoot for,” said Daskalakis.

They must, and in practice do, compromise somewhere. They either accept a less precise solution, limit themselves to slightly easier problems, or find a way to manage an unwieldy runtime.

But this is not to say a fast algorithm for gradient descent doesn’t exist. It might. But the result does mean that any such algorithm would immediately imply the existence of fast algorithms for all other problems in PLS int PPAD — a much higher bar than merely finding a fast algorithm for gradient descent itself.

“Many problems that may be some advance in mathematics could crack,” said Daskalakis. “That’s why we like to have a very natural problem like gradient descent that captures the complexity of the whole intersection.”

rnnn","settings":"socialLinks":["type":"facebook","label":"Facebook","url":"https://www.facebook.com/QuantaNews","__typename":"SocialMediaLink","type":"twitter","label":"Twitter","url":"https://twitter.com/QuantaMagazine","__typename":"SocialMediaLink","type":"youtube","label":"YouTube","url":"http://youtube.com/c/QuantamagazineOrgNews","__typename":"SocialMediaLink","type":"instagram","label":"Instagram","url":"https://instagram.com/quantamag","__typename":"SocialMediaLink","type":"rss","label":"RSS","url":"https://api.quantamagazine.org/feed/","__typename":"SocialMediaLink"],"newsletterAction":"https://quantamagazine.us1.list-manage.com/subscribe/post?u=0d6ddf7dc1a0b7297c8e06618&id=f0cb61321c","newsletterUrl":"http://us1.campaign-archive2.com/home/?u=0d6ddf7dc1a0b7297c8e06618&id=f0cb61321c","commentsHeader":"

n","itunesSubscribe":"https://itunes.apple.com/us/podcast/quanta-science-podcast/id1021340531?mt=2&ls=1","androidSubscribe":"https://podcasts.google.com/feed/aHR0cHM6Ly93d3cucXVhbnRhbWFnYXppbmUub3JnL2ZlZWQvcG9kY2FzdC8","spotifySubscribe":"https://open.spotify.com/show/7oKXOpbHzbICFUcJNbZ5wF","itunesJoyOfX":"https://podcasts.apple.com/us/podcast/the-joy-of-x/id1495067186","androidJoyOfX":"https://podcasts.google.com/feed/aHR0cHM6Ly9hcGkucXVhbnRhbWFnYXppbmUub3JnL2ZlZWQvdGhlLWpveS1vZi14Lw","spotifyJoyOfX":"https://open.spotify.com/show/5HcCtKPH5gnOjRiMtTdC07","popularSearches":["term":"math","label":"Mathematics","__typename":"PopularSearch","term":"physics","label":"Physics","__typename":"PopularSearch","term":"black holes","label":"Black Holes","__typename":"PopularSearch","term":"evolution","label":"Evolution","__typename":"PopularSearch"],"searchTopics":["type":"Tag","label":"Podcasts","tag":"name":"podcast","slug":"podcast","term_id":"552","__typename":"Term","category":"name":null,"slug":null,"term_id":null,"__typename":"Term","__typename":"SearchTopic","type":"Tag","label":"Columns","tag":"name":"Quantized Columns","slug":"quantized","term_id":"551","__typename":"Term","category":"name":null,"slug":null,"term_id":null,"__typename":"Term","__typename":"SearchTopic","type":"Series","label":"Series","tag":"name":null,"slug":null,"term_id":null,"__typename":"Term","category":"name":null,"slug":null,"term_id":null,"__typename":"Term","__typename":"SearchTopic","type":"Category","label":"Interviews","tag":"name":"Q&A","slug":"qa","term_id":"567","__typename":"Term","category":"name":"Q&A","slug":"qa","term_id":"176","__typename":"Term","__typename":"SearchTopic","type":"Category","label":"Multimedia","tag":"name":null,"slug":null,"term_id":null,"__typename":"Term","category":"name":"Multimedia","slug":"multimedia","term_id":"43","__typename":"Term","__typename":"SearchTopic","type":"Category","label":"Puzzles","tag":"name":"puzzles","slug":"puzzles","term_id":"542","__typename":"Term","category":"name":"Puzzles","slug":"puzzles","term_id":"546","__typename":"Term","__typename":"SearchTopic","type":"Category","label":"Blog Posts","tag":"name":null,"slug":null,"term_id":null,"__typename":"Term","category":"name":"Abstractions blog","slug":"abstractions","term_id":"619","__typename":"Term","__typename":"SearchTopic","type":"news","label":"News Articles","tag":"name":null,"slug":null,"term_id":null,"__typename":"Term","category":"name":null,"slug":null,"term_id":null,"__typename":"Term","__typename":"SearchTopic","type":"videos","label":"Videos","tag":"name":null,"slug":null,"term_id":null,"__typename":"Term","category":"name":null,"slug":null,"term_id":null,"__typename":"Term","__typename":"SearchTopic"],"searchSections":["name":"Mathematics","slug":"mathematics","term_id":"188","__typename":"Term","name":"Physics","slug":"physics","term_id":"189","__typename":"Term","name":"Biology","slug":"biology","term_id":"191","__typename":"Term","name":"Computer Science","slug":"computer-science","term_id":"190","__typename":"Term"],"searchAuthors":["id":"28087","name":"Adam Mann","__typename":"AuthorList","id":"29794","name":"Alex Kontorovich","__typename":"AuthorList","id":"56","name":"Alla Katsnelson","__typename":"AuthorList","id":"29458","name":"Allison Whitten","__typename":"AuthorList","id":"73","name":"Amanda Gefter","__typename":"AuthorList","id":"59","name":"Andreas von Bubnoff","__typename":"AuthorList","id":"8728","name":"Anil Ananthaswamy","__typename":"AuthorList","id":"11648","name":"Ann Finkbeiner","__typename":"AuthorList","id":"95","name":"Ariel Bleicher","__typename":"AuthorList","id":"15493","name":"Ashley Smart","__typename":"AuthorList","id":"450","name":"Ashley Yeager","__typename":"AuthorList","id":"36490","name":"Ben Brubaker","__typename":"AuthorList","id":"16315","name":"Bill Andrews","__typename":"AuthorList","id":"2752","name":"Bob Henderson","__typename":"AuthorList","id":"15492","name":"Brendan Z. Foster","__typename":"AuthorList","id":"68","name":"Brooke Borel","__typename":"AuthorList","id":"62","name":"Carl Zimmer","__typename":"AuthorList","id":"13691","name":"Caroline Lee","__typename":"AuthorList","id":"50","name":"Carrie Arnold","__typename":"AuthorList","id":"15142","name":"Chanda Prescod-Weinstein","__typename":"AuthorList","id":"8084","name":"Charlie Wood","__typename":"AuthorList","id":"742","name":"Christie Wilcox","__typename":"AuthorList","id":"11543","name":"Claudia Dreifus","__typename":"AuthorList","id":"57","name":"Courtney Humphries","__typename":"AuthorList","id":"7262","name":"Dalmeet Singh Chawla","__typename":"AuthorList","id":"70","name":"Dan Falk","__typename":"AuthorList","id":"19918","name":"Dana Najjar","__typename":"AuthorList","id":"32676","name":"Daniel S. Freed","__typename":"AuthorList","id":"13724","name":"David H. Freedman","__typename":"AuthorList","id":"26310","name":"David S. Richeson","__typename":"AuthorList","id":"30207","name":"David Tse","__typename":"AuthorList","id":"19266","name":"Devin Powell","__typename":"AuthorList","id":"13251","name":"Diana Kwon","__typename":"AuthorList","id":"17000","name":"Elena Renken","__typename":"AuthorList","id":"17149","name":"Elizabeth Landau","__typename":"AuthorList","id":"5279","name":"Elizabeth Preston","__typename":"AuthorList","id":"58","name":"Elizabeth Svoboda","__typename":"AuthorList","id":"32612","name":"Ellen Horne","__typename":"AuthorList","id":"25173","name":"Emily Levesque","__typename":"AuthorList","id":"64","name":"Emily Singer","__typename":"AuthorList","id":"47","name":"Erica Klarreich","__typename":"AuthorList","id":"14784","name":"Erika K. Carlson","__typename":"AuthorList","id":"98","name":"Esther Landhuis","__typename":"AuthorList","id":"5830","name":"Eva Silverstein","__typename":"AuthorList","id":"6793","name":"Evelyn Lamb","__typename":"AuthorList","id":"75","name":"Ferris Jabr","__typename":"AuthorList","id":"52","name":"Frank Wilczek","__typename":"AuthorList","id":"69","name":"Gabriel Popkin","__typename":"AuthorList","id":"77","name":"George Musser","__typename":"AuthorList","id":"19092","name":"Grant Sanderson","__typename":"AuthorList","id":"20557","name":"Howard Lee","__typename":"AuthorList","id":"66","name":"Ingrid Daubechies","__typename":"AuthorList","id":"85","name":"Ivan Amato","__typename":"AuthorList","id":"37141","name":"Jake Buehler","__typename":"AuthorList","id":"12170","name":"Janna Levin","__typename":"AuthorList","id":"32","name":"Jeanette Kazmierczak","__typename":"AuthorList","id":"51","name":"Jennifer Ouellette","__typename":"AuthorList","id":"72","name":"John Pavlus","__typename":"AuthorList","id":"16475","name":"John Preskill","__typename":"AuthorList","id":"91","name":"John Rennie","__typename":"AuthorList","id":"10351","name":"Jonathan Lambert","__typename":"AuthorList","id":"31716","name":"Jonathan O'Callaghan","__typename":"AuthorList","id":"1241","name":"Jordana Cepelewicz","__typename":"AuthorList","id":"8463","name":"Joshua Roebke","__typename":"AuthorList","id":"49","name":"Joshua Sokol","__typename":"AuthorList","id":"67","name":"K.C. Cole","__typename":"AuthorList","id":"37462","name":"Karmela Padavic-Callaghan","__typename":"AuthorList","id":"87","name":"Kat McGowan","__typename":"AuthorList","id":"36139","name":"Katarina Zimmer","__typename":"AuthorList","id":"20556","name":"Katherine Harmon Courage","__typename":"AuthorList","id":"90","name":"Katia Moskvitch","__typename":"AuthorList","id":"27374","name":"Kelsey Houston-Edwards","__typename":"AuthorList","id":"40","name":"Kevin Hartnett","__typename":"AuthorList","id":"12570","name":"Laura Poppick","__typename":"AuthorList","id":"23451","name":"Liam Drew","__typename":"AuthorList","id":"79","name":"Liz Kruesi","__typename":"AuthorList","id":"60","name":"Maggie McKee","__typename":"AuthorList","id":"2333","name":"Mallory Locklear","__typename":"AuthorList","id":"3569","name":"Marcus Woo","__typename":"AuthorList","id":"414","name":"Mark H. Kim","__typename":"AuthorList","id":"17147","name":"Matthew Hutson","__typename":"AuthorList","id":"30953","name":"Max G. Levy","__typename":"AuthorList","id":"32437","name":"Max Kozlov","__typename":"AuthorList","id":"7186","name":"Melinda Wenner Moyer","__typename":"AuthorList","id":"14093","name":"Michael Harris","__typename":"AuthorList","id":"23","name":"Michael Moyer","__typename":"AuthorList","id":"74","name":"Michael Nielsen","__typename":"AuthorList","id":"19093","name":"Michele Bannister","__typename":"AuthorList","id":"1472","name":"Moira Chas","__typename":"AuthorList","id":"6476","name":"Monique Brouillette","__typename":"AuthorList","id":"35407","name":"Mordechai Rorvig","__typename":"AuthorList","id":"10","name":"Natalie Wolchover","__typename":"AuthorList","id":"37605","name":"Nick Thieme","__typename":"AuthorList","id":"37428","name":"Nima Arkani-Hamed","__typename":"AuthorList","id":"19962","name":"Nola Taylor Redd","__typename":"AuthorList","id":"24","name":"Olena Shmahalo","__typename":"AuthorList","id":"1816","name":"Patrick Honner","__typename":"AuthorList","id":"84","name":"Peter Byrne","__typename":"AuthorList","id":"55","name":"Philip Ball","__typename":"AuthorList","id":"31","name":"Pradeep Mutalik","__typename":"AuthorList","id":"24011","name":"Puja Changoiwala","__typename":"AuthorList","id":"100","name":"Quanta Magazine","__typename":"AuthorList","id":"2784","name":"R. Douglas Fields","__typename":"AuthorList","id":"26114","name":"Rachel Crowell","__typename":"AuthorList","id":"9412","name":"Raleigh McElvery","__typename":"AuthorList","id":"820","name":"Ramin Skibba","__typename":"AuthorList","id":"1666","name":"Rebecca Boyle","__typename":"AuthorList","id":"20950","name":"Richard Masland","__typename":"AuthorList","id":"48","name":"Robbert Dijkgraaf","__typename":"AuthorList","id":"80","name":"Roberta Kwok","__typename":"AuthorList","id":"15681","name":"Robin George Andrews","__typename":"AuthorList","id":"24577","name":"Rodrigo Pérez Ortega","__typename":"AuthorList","id":"78","name":"Sabine Hossenfelder","__typename":"AuthorList","id":"83","name":"Sarah Lewin","__typename":"AuthorList","id":"35441","name":"Scott Aaronson","__typename":"AuthorList","id":"76","name":"Sean B. Carroll","__typename":"AuthorList","id":"15680","name":"Sean Carroll","__typename":"AuthorList","id":"7239","name":"Shannon Hall","__typename":"AuthorList","id":"65","name":"Siobhan Roberts","__typename":"AuthorList","id":"5944","name":"Sophia Chen","__typename":"AuthorList","id":"61","name":"Steph Yin","__typename":"AuthorList","id":"63","name":"Stephanie Bucklin","__typename":"AuthorList","id":"26311","name":"Stephanie DeMarco","__typename":"AuthorList","id":"71","name":"Stephen Ornes","__typename":"AuthorList","id":"17148","name":"Steve Nadis","__typename":"AuthorList","id":"13356","name":"Steven Strogatz","__typename":"AuthorList","id":"17150","name":"Susan D'Agostino","__typename":"AuthorList","id":"2960","name":"Tara C. Smith","__typename":"AuthorList","id":"14785","name":"Thomas Lewton","__typename":"AuthorList","id":"3","name":"Thomas Lin","__typename":"AuthorList","id":"54","name":"Tim Vernimmen","__typename":"AuthorList","id":"88","name":"Tom Siegfried","__typename":"AuthorList","id":"12964","name":"Vanessa Schipani","__typename":"AuthorList","id":"53","name":"Veronique Greenwood","__typename":"AuthorList","id":"86","name":"Virginia Hughes","__typename":"AuthorList","id":"3244","name":"Viviane Callier","__typename":"AuthorList","id":"89","name":"Wynne Parry","__typename":"AuthorList","id":"15913","name":"XiaoZhi Lim","__typename":"AuthorList"],"adBehavior":"everywhere","adUrl":"https://www.quantamagazine.org/gift-store","adAlt":"Alice and Bob Meet the Wall of Fire - The Biggest Ideas in Science from Quanta – Available now!","adImageHome":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2019/01/Ad_Default_250x342_2x_Science.jpg","adImageArticle":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2019/01/Ad_Article_320x600_Science.jpg","adImageTablet":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2019/01/Ad_Tablet_890x250_2x_Science.jpg","adImageMobile":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2019/01/Ad_Mobile_250x200_2x_Science.jpg","trackingScripts":"rn","theme":"page":"accent":"#ff8600","text":"#1a1a1a","background":"white","header":"type":"default","gradient":"color":"white","solid":"primary":"#1a1a1a","secondary":"#999999","hover":"#ff8600","transparent":"primary":"white","secondary":"white","hover":"#ff8600","redirect":null,"fallbackImage":"alt":"","caption":"","url":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default.gif","width":1200,"height":600,"sizes":"thumbnail":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default-520x260.gif","square_small":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default-160x160.gif","square_large":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default-520x520.gif","medium":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default.gif","medium_large":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default-768x384.gif","large":"https://d2r55xnwy6nx47.cloudfront.net/uploads/2017/04/default.gif","__typename":"ImageSizes","__typename":"Image"},"modals":"loginModal":false,"signUpModal":false,"forgotPasswordModal":false,"resetPasswordModal":false,"lightboxModal":false,"callback":null,"props":null,"podcast":"id":null,"playing":false,"duration":0,"currentTime":0,"user":"loggedIn":false,"savedArticleIDs":[],"userEmail":"","editor":false,"comments":"open":false,"cookies":"acceptedCookie":false},
env:
APP_URL: 'https://www.quantamagazine.org',
NODE_ENV: 'production',
WP_URL: 'https://api.quantamagazine.org',
HAS_GOOGLE_ID: true,
HAS_FACEBOOK_ID: true,
,
}