I haven't been sleeping much lately so so I'm gonna I think in the interest of time I'm gonna skip over some of the introductory material here we've heard a lot about ride-sharing platforms already so let me just skip that I think at this point in the week between the the talk that was given by Christos Co on Monday and then also the industrial visitors day we had last week we all are familiar


with uber and lyft and sidecar and platforms like this so what's our goal in our work oh and I should actually start preface this by saying this is joint work with Sid Banerjee who's an assistant professor at Cornell he was doing a postdoc with me and Carlos raqami who's a student of mine at Stanford and also Sid did an internship with lyft and with their data science

Dynamic Pricing in Ride-Sharing Platforms


team and so some of the inspiration for this work came from from talking and working with them so I guess what but I'm interested in getting across to you and what I found exciting about this problem is that there was a combination of maybe three things that we needed to somehow include in one model and and then use that to actually say something useful about the you know the strategy


that the platform takes and that's basically that there's passengers and drivers who are strategic the platform is setting you know a pricing rule a decision for how transaction prices are set on each on each interaction and then there's this kind of underlying queueing dynamic that governs you know the number of rides that are requested and the number of drivers that are available and


in isolation we have a lot of you know different models and in various literature's that tell us about any one of these three problems one of the things that makes us really interesting to me is the fact that all three kind of come together in one place so this would just be I think you know a pure theoretical exercise it would be fun to build a model of something like that now


of course you want to do that with some purpose in mind in our case the motivation for wanting to do this in the first place is that we sort of wanted to try to understand what the advantages were of using a dynamic pricing policy over static price policy and I'll explain more what I mean by that as we go on so I'll skip this side as well I just want to briefly


point out that there's a wide range of literature in very different communities actually that touches on this so at the same time that you know we've been thinking about matching markets whether an econ or in in the UC community it's been interesting to see in the applied probability community there's been a huge amount a huge surge of interest in models of queuing systems with matching


behavior and so I think you know for those of you that are working on matching markets I would strongly recommend sort of looking into some of the some of the work that I think really starts with the Donna and bison goes from there there's a lot of work on strategic queuing models two-sided platforms revenue management so like I said you know there's there's a lot


there and and and and one of the things that made this fun is sitting at an intersection of those of those topics okay so let me tell you a bit about the model so the model is something where we need to capture three features so one is that I need to be able to say something about you know the platform's goals right you know how is it setting a pricing policy I need to be able to tell


you what the incentives are of passengers and what the incentives are our drivers and that's all sort of the strategic aspect of the model I also want to be able to tell you you know exactly even fixing all of this you know how how does the system evolve what are the dynamics of drivers and passengers okay so some an apology I want to interject here is that I think this is a


talk I personally view as sort of at the tip of a very large iceberg and in many ways I think the work that we were doing raises more questions than it answers so I'm happy with some of the answers we got but I also want to be very kind of explicit with you where I think there's important things missing okay so some of them are on this slide and some of them all mentioned as we go


through so one of them is that we're gonna focus on just a single block of time and what do I mean by a block I mean something like let's say rush hour or you know maybe for those of you that were here for Christmas goes talk a block of time might be you know a window of time around when bars close on a Friday or Saturday evening so why is that important in many ways what I want


to focus on here is not I want to avoid talking about predictable changes in demand okay so everybody knows there's going to be more demand around rush hour than there is in the afternoon alright so I want to avoid that and indeed the platform's avoid that so even even before surge pricing became sort of something which is changing at a minute-to-minute basis you


know it was the case that they would know in advance that there's going to be greater demand let's say around rush hour or bars closing and and the the surge market multiplier would be higher in those intervals so when I talk about static pricing I don't mean a fixed price over the entire week I mean static over something like you know a few hours a block of time okay the next thing is


in the talk I'm only going to focus on a single region now of course you know cities are not just a single region and I think even Chris on Monday mentioned that you know the pricing involves multiple neighborhoods in in the work that we've done in the paper we do have the main insights that we have do generalized to networks there's some sort of exceptions to that but I'm not


going to devolve that in the talk I think one important problem that my focusing on a single region completely ignores and even the work on networks completely ignores is I guess there's two issues that that that sort of eliminates right so one is the notion of an estimated time arrival or ETA and I think as you heard from Chris and as anyone who actually uses uber or lyft


would know you know in addition to whether or not their search pricing you're very sensitive to when you think you're actually going to get a ride note so what the ETA actually is so sort of by fixing the network and you'll see more in the models sort of how this plays out now one of the things we don't actually have much to say about is how passengers are sensitive to etas and


sort of in particular you know one thing that might mean is that the design of the regions themselves like what you consider to be a region is not a topic that we address at all right so you so you may want to make your regions more granular so that you're able to better you know acclimatize a better match supply and demand on a very local scale but as you do that you will also want to


make sure that drivers who are nearby are able to move in or out okay so we're not really we're not really accounting for those effects in the kinds of network model that we build and I think so so thinking about ETA s and and how the platform actually designs you know designs it's it's topology I think that's I think that's a really interesting direction of work it's


something sedan I've talked about we haven't really done much with it yet and find the last thing I'll mention is the objective function I'm going to focus on is is throughput the rate of completed rides there's at least three objectives that you you know might care about there's throughput there's profit and then there's welfare so we we have results for throughput that sort of have no


qualification whatsoever we have results for profit when the system is supplied limited in a sense I'll make precise and then there's similar numerical results for welfare but the theory there is actually a bit more challenging and so I'm not going to claim anything for that in the talk okay so let me start by modeling sort of the strategic side of the problem and this is another point


which we'd say you know very little about we don't say anything in our paper on and I think it's an interesting issue is that we're going to just assert that the platform takes a fixed fraction of every dollar that's spent and you know I think that's fairly consistent with how the platform's work today but it's kind of interesting I mean it's a mechanism designer you might actually think this


is one of the very first things you would want to design you'd want to optimize over so our work does not optimize over this it kind of holds that as an exogenous constant I think one of the most interesting things to do is to kind of a lot of questions during chrises talk on Monday I think alluded to this that it's interesting to think about whether the platform should be


sort of varying the the share that it takes perhaps you know based on the state of the system there's a good reasons why most platforms don't really change this on a very fast timescale you know I mean this is the type of thing that would be updated you know over months or something like that if at all and it's really a I think I think it's it's more of a sort of cultural issue


right i mean i think i think drivers and passengers are not drivers would not be very happy if they if they kind of were subject to to a rapidly varying share of earnings it becomes very unpredictable from their perspective of course the platform needs both drivers and passengers and it uses pricing to align the two sides one note on terminology in the platform's literature you know in


economics if you use the word pricing you have to be a little clearer about you means so pricing might mean the fee structure which is the gamaheer for example or pricing might mean actually setting the transaction price and one of the reasons that ride-sharing platforms were fun to think about in contrast to other kinds of platforms that I find interesting is because they


actually directly set the transaction price so that like that's why this is an interesting question you know if you come compare that with something like let's say op work or Airbnb they have a lot of influence on what the transaction prices might be like but they don't actually directly set them okay so here when I use the word pricing I actually mean the platform is setting the


transaction price and so they're able to use their mechanism for setting the transaction price to align the two sides so the first bit of notation is that the way I'm going to model the platform setting the transaction price is just as a function of the number of available drivers remember I'm focused on only one region there's a number of available drivers right now in that region I'll


imagine there's some function that the platform uses to map the number of available drivers to the price that you're going to get charged if you if you take a ride right now okay all right next qualifier so when I say price you know I'm saying you're setting the transaction price and again it's not directly the transaction price that's being set in in the ride-sharing


platforms it's a multiplier on the transact on a base price okay so the way these platforms are work they'll have a published formula that's time and distance dependant that's on their website and if you use a fare estimator you can actually directly calculate this so that's what they call the base price and any price manipulation that's happening on a faster time scale is


happening through a multiplier once the lift calls it prime time pricing uber calls it surge pricing and so you know what's happening is that they will they will tell you that there's some percentage that's going to get added on top of the base price because of that sort of current state of the market so when I use the word price in the talk what I'm really talking about is this


multiplier okay that raises yet another interesting question which is of course you know Los Angeles and San Francisco are very different markets and in Los Angeles in particular you know there may be a very large cost to pulling drivers from you know that look available from further away to come pick up a ride and that ride you know that cost as part of a distance dependent so these kinds of


things you know it's often a question that comes up here is well why is this also not a matter of manipulation not just a multiplier on type on top of a formula but why not actually just directly be sort of manipulating prices in a way that that you're not just picking a single multiplier regardless of what the time the distance is going to be and again something I'm not touching I think this


is another one of those things just thinking about from regulatory perspective you know ride-sharing platforms are fighting against the taxi industry and that's you know the taxi sort of industry has you know published fare schedules like this it's already challenging enough to convince the public that you know surge pricing or primetime pricing is palatable I find


that shocking I have to confess but that that's the way it is so given that that's hard enough I think varying this is also going to be you know politically even more difficult but that's said from a you know market design standpoint I think it's a reasonable question to ask okay so that's the platform yeah multiplier number of available drivers yes I'm gonna have a model where the


state of the system is the number of available drivers and this doesn't do that that's right yeah I think there's a lot of different things that are being left out here so that's part of it and as you're gonna see in a second in I'm taking in my talk in extreme view where drivers are making entry decisions over longer time skills now if you think about some of the tools that platforms


are using and and you know Chris talked about some of these on Monday another thing that's left out here is not just sort of the number of available drivers right now but let's say a forecast that I have of how many available drivers there will be all that kind of stuff is just left out of it I think there's a lot of interesting things to do there in terms of the


richness of the pricing policy okay so with the passengers what do passengers do act fairly simple model of passengers every passenger is one ride so passenger equals one ride request I don't model any sort of longitudinal behavior of the passenger it's just simple and basically I'm just gonna model the passengers as entering if their price exceeds if their reservation value exceeds the current


price in the system okay so to model that I think of every every ride request is being drawn iid from some valuation distribution and if if the value that's drawn is bigger than the current price they enter there's some eggs agenda straight of what I'll call app opens Chris talked about the same thing and that's basically like I open the app and looked do I want to request a ride and then


look at the price and determine whether I actually request a ride so from that it's pretty easy to work out based on the pricing you know formula what is the rate of ride requests it's the exogenous rate times the tail probability that the valuation exceeds the the current price okay so this F bar is the tail tail CDF of the evaluation distribution right so that's the passengers it's relatively


simple the drivers I think is where it gets a little bit more interesting this is maybe the one place where our motivation for choosing this model kind of came from what what seemed to us to be like a natural distinction between drivers and passengers I would say that I think of this as kind of a stylized extreme point and there you know especially as the platform's changed the


technology that they use to induce drivers to enter or exit I think we can get we can bisque and get a lot more interesting but let me tell you what this is basically the point that that we make here is that we think of drivers is making decisions on just a substantively different time scale than passengers okay so if a driver is thinking about whether to drive for example in the


early days of lyft you know you had like a booking calendar when you would essentially say like when you wanted to be on or off the platform and the time interval over which you were choosing to drive or not is probably something on the order of hours and so essentially what we do is we say well kind of from a driver's perspective they're not responding to the


instantaneous state of the system instead what they're thinking is if I enter what's the expected earnings that that I'll receive if I'm if I'm part of the platform and what they do is they compare the expected earnings they'll make while they're in the system to essentially be expected you know the kind of a reservation earnings that they want to reservation earnings rate okay


this is also really interesting so this is kind of a target earning model of the driver like basically they have some fixed mental model of how much they want to be able to make and they enter if it exceeds that you know I think Chris pointed to examples of a lot of different driver behavior in their data and you know you would certainly see that across all the platforms so I think


that's that's a that's a really interesting direction also first of all just do you have the right kind of utility model for drivers I think this is when I say you know when I say that we're taking an extreme point what I mean is this time scale separation between drivers and passengers is a fundamental part of the model it would be interesting to think about what


starts happening if drivers are responding more directly to instantaneous state and in particular I think the the way this comes together with the network's comment earlier is if I'm able to provide signals to drivers that say this is a place where I think demand is locally higher than supply and what I'm doing is I want to induce drivers to move in that direction and


when I'm trading off the effects I'm trading off are that it takes drivers time to move to a new area it takes drivers away from the area that they were in you know so I sort of I think that that's that's really where the the network modeling gets gets especially interesting so that's kind of one of the things that we want to keep doing with this work as with the passengers I'm


going to model this reservation earnings rate is iid across the drivers so similarly you can work out what is the actual rate at which drivers enter there's some exogenous rate drivers will enter if their earnings you know desired kind of reservation earnings rate is is lower than what they think they're going to make in you know per unit time and so expected earnings divided by expected


time okay you don't have to worry too much about the fact that the expected czar both the numerator and denominator here there's sort of a waltz identity argument that lets you do away with that passenger model yeah oh yeah sorry that's a great point so so you're right this is not the number of rides that actually gets served this is a number of ride requests and so what will happen is


that if there's no driver there your ride request will be blocked and it'll be dropped no but what I mean is might decision as to whether or not to even make the request that my available drag yeah yeah so so that's a really good point so first of all when I said earlier that I wasn't dealing with ETA that's what I meant that I'm not modeling so in queueing models where you think


about and you know this is not necessarily something specific to me I'd say that this type of trade-off exists everywhere let's just think about like so I'm using a model where essentially the passengers cost is blocking right they may not get served well in a real queuing system like blocking and delay are not completely dissimilar from each other in the sense that if I get blocked but that


really is saying is I just have to wait longer to get done with whatever I want to get done right and so I I think like the right there's two ways you can think about blocking it's like actually what the cost is it's I tried to get a ride and I couldn't say New Year's Eve or you could think about it as I didn't get the right and that means I have to wait you know longer to


be able to get a ride and and I think I think if this is a very very course sort of 0th order approximation to the right thing to do and the right thing to do would be to actually include ETS in the model and model that yeah that's a good question okay so that's the drivers so let me just quickly run through what the queueing model is basically the queueing model is now when I be my queueing model


isn't in describing this to you I'm not going to say anything about why drivers and passengers are coming in at the rates that they're coming in they just are and then let's so I've already told you that I have some model that's strategic for how I'll determine the rate at which rides are requested how I'll determine the rate at which drivers actually entered the system now let me


tell you sort of what actually happens inside the model but those you know rates of arrival of drivers and passengers so basically drivers enter at some rate lambda and when there's a drivers available ride requests arrive at some rate which depends on the number of available drivers that's what we computed earlier um if a driver is available the ride is served otherwise


it's blocked rides lasts an exponential time with mean tau in the network model this sort of involves a random walk around the network so it's a little more complicated than that and after right completions this is another point where I think someone could do something interesting with this so after ride completion there's some exogenous probability that the driver signs out or


it becomes available okay so another thing that could be interesting that you can do here is make the exit probability dependent on their experience in the system for obvious reasons that leads to a much more complicated game so this is a you know far simplified version of that I would say that I'm actually less sort of concerned about this assumption that this is exogenous because drivers


are still making entry decisions based on their kind of expected earnings in the platform so it's not as if they're completely ignoring how they're going to do but I think if you wanted to refine it a bit you could think about making this something which is endogenous okay so that's that's basically the the model of what's going on and so if you look at the picture of what's happening here


there's two reasons that there's available drivers there's either new entry from the outside world or there's a driver who was busy who became available and and came back into the system who chose not to exit okay so there's some queue that's going up and down available drivers coming in and then when rides are requested this cue gets served down okay so a major sort of simplification for us


and one of the reasons for exactly the lining of the assumptions we had is that this type of queueing model turns out to be what's called a Jackson Network and this is more generally true for the network model and Jackson networks are great because they're steady-state distribution is a product alright so despite the fact that there's all these dependencies in the queuing


network the the steady-state distribution has the property that in steady state the queue lengths in the different you know parts of the network look like they're independent okay so in particular here what it means is that the number of available drivers is something which we have like an exact expression for the for the for the steady-state distribution okay so I'll


skip this slide I sorry I won't go through everything in detail what I mean is I just want to tell you what an equilibrium of our system is so an equilibrium of our system involves basically saying I connect together the strategic behavior of the passengers and drivers the pricing policy and the queueing model and so what I do is I say okay let me take the queueing model


compute a steady-state distribution from it using the steady-state distribution for every driver I can work out what is their expected earnings that they'll make while they're in the system and what's the expected time they're gonna live I can use that to then work out what's the entry rate of drivers and then for every passenger I can work out you know sort of for the passenger kind


of the steady-state condition is easy it's the same one we had before that passengers will enter as long as the price is going to be is going to be lower than their reservation value and that goes in the entry rate of ride requests so all this comes back together again and I need a consistency check that the steady-state distribution actually came from these things that I


just computed alright so you can do that and that's kind of a definition of a system equilibrium in our model and you know what we show is that basically as long as you have very mild regularity conditions on the system namely among other things that the price increases when the number of available drivers decreases so this is a condition on the pricing function then equilibria always


exist and their unique under reasonable sort of smoothness conditions so oh we go that that is so let me talk about sort of nicely smooth those conditions here I mean on the distributions so let me let me sort of move on to how we want to use this so I guess you know part half the talk is like here's a model that sort of sits on some knife at knife edge of tractability and still capturing a bunch


of effects that are important I've already pointed out to you at least five or six different ways that I think you would want to do things to the model to capture effects that are that are important in practice that said at least in our experience thinking about it adding any one of those things made the model much harder to work with so in order to in order to make progress


beyond what we had I think part of the question is going to be you know where you get technical simplicity despite having at it in these communities additional complications and I think one thing for us even with the model that we had that is very helpful is to use awesome products to simplify the analysis this is something which is now by now very standard in in analyzing


these types of matching markets Eric bhootish and Eduardo Acevedo have a really nice paper that sort of talks about some of the things that you can do using this type of approach so in our case the the limiting approach that we use is that we have a sequence of systems we consider in the end system I'm basically scaling up the exogenous rates the arrival rates of passengers


and of drivers and in the end system I have some pricing policy that's actually indexed by in okay and I'll talk to you a little bit about how that how that works so in each system this gives rise to a system equilibrium and we basically analyze pricing by looking at the asymptotics of these equilibrium ok so that's what I'm going to show you I'll show you a bunch of pictures that


explain what's going on and there's corresponding theorems behind it so let me start with static pricing again static pricing doesn't mean there's a single multiplier the whole day it means that I have a predictable uncertainty on the order of hours or something like that that I use to set a multiplier but I don't change the multiplier on the basis of the exact number of available


drivers that are in the system so but you should be thinking when I say static is that idiosyncratic stochastic fluctuations are not being captured by the by the dynamic pricing policy so so in math this means that P of a is a constant for all a that no matter what the level of the queue is I'm setting the same multiplier so there's a theorem here that you know don't worry about


reading the technical sort of expressions carefully but here's basically what's going on what it says is that you pick the multiplier that you're going to use at all eh okay once you've done that then if I scale and there's there's this should be scaled by and this should be our n over and its a scaled completed it's obviously the rate of completed rides is going to go to infinity if if n


goes to infinity it's the scaled rate of completed rides that that's normalized so if I take our n over n the rate of completed rides divided by n that has a really natural sort of interpretation imagine sort of two unconstrained systems one in which as a passenger whenever I request a ride there's always a driver waiting for me all right and another in which as a driver whenever I


finish driving there's always a passenger right there requesting a ride that I can get matched to okay so in one of them demand is not a canoe in the first system I just described supply is not a constraint the second one demand is not a constraint so each of these two sort of naturally give you a supply curve in a demand curve this expression is basically how many drivers would


enter if they knew that whenever they were available there would be a passenger immediately there for them and this expression is how many passengers would enter if they knew that whenever they requested a ride there would be immediately be a driver there to serve them that's the same entry rate we had before and so that's that's what put is basically available the throughput is a


min of available supply and available demand so that's really nice because you can visualize it as sort of a demand and supply curve crossing each other this green curve here is the demand curve this green curve here is the supply curve they cross right at this point now what's the x-axis this is different than a usual plot in in economics the x-axis here is price the y-axis is throughput


so I'll tell you about the red curves in a second so what I'm saying here is that you pick a multiplier on the x-axis and the the actual throughput that you're going to see in the system is the minimum of this green curve and this green curve okay so this sort of pyramid shape thing is what the overall throughput is as you vary the multiplier and you can see that if your only choice


was what multiplier to pick and you didn't have any dynamic pricing available the multiplier you would pick is the one where they intersect right that's the peak and so that's that's what we're gonna call that the balance price for the rest of the talk the red curves are just depicting what happens as n increases all right so these are simulations for finite n and the green


is the theory in the in the limiting system all right everybody okay with that so basically what I'm saying is that there's like a natural notion of available supply and available demand and I can use that to say that if what I want to do is maximize throughput then the multiplier would pick is the one balances the two of them it's pretty intuitive it's just nice to get that out


of the out of out of the primitives so I'll skip this slide I just said that so now let's talk about dynamic pricing and what we did is we decided to focus on a particular family of dynamic pricing policies there's there's a small part of the paper that says something on slightly more complex policies but it's actually it is actually a little bit harder to deal with sort of arbitrary


dynamic pricing policies and come up with exactly the same conclusions so what we do is we focus on threshold policies and and these are very natural because they match exactly with what's done in practice which is basically that I have a threshold and then if the number of available drivers drops below that threshold I set a multiplier that's a high multiplier if the number of driver


available drivers goes above that threshold I set a multiplier that's a low multiplier okay so I'm kind of moving between these two multipliers the slightly more general thing we looked at is a finite number of thresholds okay and then you know the more general thing obviously would be that the the price curve can be anything across the number of Avila's and so this has kind of


inspired the reason we specifically focused on this is because we wanted to try to say something about what search and prime-time policies are actually doing and they basically have this flavor that there's kind of thresholds that when they're crossed the the multiplier is going to go up or down as a result okay so I think I can convey kind of what our theorem is with


pictures more easily than the results I'll show you in a second so let's let me just sort of parse this picture for you okay so on the x-axis sorry on the x-axis what I'm plotting again is the multiplier right so it's going from from 0 up to 5 here that's the price multiplier that I'm going to use the blue curve is the throughput that I obtain if I just set that multiplier


regardless of the number of available drivers same basically as the curves that were showing you in the previous graph which is pure static pricing okay the purple curve is what I get with a very particular dynamic pricing policy the dynamic pricing policy is one where one of the two multipliers is set at green at this at this point right here and the other multiplier is the one


that's bearing on the x-axis okay now what does that mean if I'm on this side then it means is that the high multiplier is this value and the low multiplier is down here and if I'm on this side it means that the low multiplier is this value and high multiplier is the one on this axis that make sense okay so that's that's kind of how you can do a 1d visualization of a family of dynamic


pricing policies in this graph and that's also why there's a kink right here okay so this then the purple curve is the throughput that I get with that particular dynamic pricing policy as I vary on the x-axis and what I'll do is I'll just make n larger and as n gets larger what you notice is what you should see is that the static curve and the dynamic curve the peaks are going to


come together okay and so that's what happens in the limit here so this this is the limiting value with n going to infinity the purple curve is what I get from dynamic pricing again defined the way that I talked about it where this is one of the two prices and the other price is varying on the x-axis and the blue curve is the one I just showed you a few minutes ago which is what I get


from static pricing and what's the important point to notice from this graph is that both of them coincide at their peak okay so what that's basically saying is that in the fluid limit and this in this kind of hydrodynamic limit where we're scaling you know down by n that you're not getting anything by using a dynamic pricing policy over a static pricing policy you know there's a


bunch of suppressed in these graphs okay number one it's numeric so obviously I haven't convinced you about other potential values for prices that I could use number two I didn't say anything about the threshold right so like what's going on with the threshold and so in I'll show you the theorem in a second one of one of the things we're doing in the background here is that as n is


getting larger we're varying the threshold that we use and we're doing so in an optimal way given the two prices that are chosen right so we're kind of favorably biasing the dynamic pricing policy to pick the best threshold that we could given the two prices that were used and so really the result is saying here is feel free to pick the threshold and the two prices however you want and


you're never gonna do better than what what static pricing gets you yeah okay now B I should be done before that already okay so this is the limit and what it basically says is let our n star be the rate of completed rides in the n system using the optimal static price and let our n double star be the rate of completed rise in the n system using the optimal threshold pricing strategy


then if the valuation distribution has a monotone hazard rate I'll talk more about this in a second then the the difference between these two scaled by n goes to zero okay so some comments on this first of all I want to point out so there's this is a really important restriction in the result and the proof of the result what ends up happening is that we need to look at sort of how the


level of demand changes as you vary the pricing policy and it turns out that some condition on the valuation distribution is is sort of necessary it's a little bit looser than this it doesn't quite have to be that strong that that's probably most interpretable definition what's interesting is that there's no condition on the on the Preferences of the drivers FC does not


enter into this theorem so FC could be arbitrary it's the the restriction is only on that fee okay that's one point the second point is I guess what I find interesting about this result it the way I would state it I I think like the the more glib statement is there's no value to dynamic pricing I think the way I would stated that's a bit more precise is that there's only second-order


benefit to dynamic pricing right so to the extent that you see benefits from dynamic pricing it's happening because it's happening because you're actually able to sort of correct things in the in the sort of a Gaussian term not in the not in the fluid term the third comment I want to make is that maybe one naive view you might have on this result as well of course because you took the


limit you got rid of all stochasticity but the thing is that's not true so that the drivers went there is actually a well-defined steady state distribution that's seen sorry/not drivers by passengers when they enter even in the limiting system okay so when a passenger arrives it is the case that the the number of available drivers that they see is a random variable and that


remains true even when you pass to the limit okay so it's it is true that we're speeding up the system but from a passengers perspective they're always reacting an instantaneous state so that stochasticity is still relevant and then i think that's part of what makes the makes the fact that this happens a little bit surprising so one comment i want to make is that


these types of results are similar to stuff that's kind of long-standing in the revenue management literature where in the early results in that literature you know it was established that that fluid pricing policies of the sort that we were talking about are not going to be better than dynamic pricing and there's been a lot of work extending those types of results but one


interesting thing in that literature is they're not really been any work that looks at two-sided markets so that literature usually what happens is you're kind of given a fixed basket of stuff to sell and then you're allowed to use whatever mechanism you want to sell up to a deadline and like the canonical example is airline tickets so you're an airline you're selling seats and so you


have like planes that are empty and you have a bunch of seats to sell up to a deadline when the plane actually takes off you're allowed to use whatever pricing policy you want to set prices for the seats okay in our case kind of one of the things I think that makes this really interesting is that we have this you know that the seats are strategic the seats are the drivers and


and they're they're entering because of because of what we're doing so you know that's one of the big differences and so again just to point out kind of why this is interesting to work on is I think there are if you look at the problems that are faced by many platforms in managing inventory internally so the analog in air B&B would be sort of managing the inventory of hotel rooms


they look like classic revenue management problems but with strategic supply and so that that you know that perspective is something which opens up I think a range of algorithmic insight that isn't there yet in the literature so I'm going to skip the proof just because we're already well over time for this session I'm happy to talk to you about that offline if you want or if you


play back the video and look at the slide slowly you should be able to make it out so last thing I'll tell you is and this result I think is less surprising it's just I just like it because of the nature of how we formulated it so dynamic pricing is obviously helpful all right and and already there's a hint in this second-order effect that I mentioned and really like why do we use it well one


reason we use it is because we don't want to have to sit and futz around with what we think the system parameters are actually going to be even when it's predictable uncertainty all right so one thing that's nice about dynamic pricing is it sort of naturally adjusts itself to wherever the system is living okay and somehow you would like to be able to make a statement that that captures that


robustness that if the system parameters are known yeah then maybe static pricing is at least as good as there never is you know doing as good as dynamic pricing but when system parameters are unknown presumably you should gain something in robustness because you were using a dynamic pricing policy so there are a lot of different ways to give these kinds of robustness results and


again in the revenue management literature it usually involves taking the second-order limit like looking at a fusion limit of the system and there those are nice but but definitely technically complex what we want to do is take maybe a more of a robust optimization viewpoint where we basically said let's ask can we get sort of dynamic pricing to be near optimal


across a wide range of system parameters okay so again I'll just tell you that the result in pictures so here what I'm doing is I'm picking one of the parameters let's say the exoticness arrival rate of passengers and of you know app opens and what I'm plotting here is this is the throughput I would get if regardless of what the you know for each value the system parameter I


set the optimal static price okay this is the blue curve is what I get if I set the optimal strategy for static price believing that the exogenous rate of customer arrivals was mutant was a 4.0 but in fact it ended up being something different and so yeah right here obviously it's it's optimal but then it really degrades quickly as I move away right well you really want like is the


difference between these two things now suppose that what I tell myself is okay you know I don't know what me zero is going to be exactly but I think it's gonna be between three point six and four point four so let me take each of those to compute the corresponding static prices for each of those to the optimal static prices and use these two as the two prices in a dynamic pricing


scheme okay again buried in the background is what threshold do I set to move between these two and I'll just tell you that that we're using the same sort of optimality result that was in the proof to be able to set that threshold between once you give me the two prices I can set the optimal threshold right and what you find is that if you now plot how dynamic


pricing does using these two prices the two prices from the extremes then yeah it degrades badly outside of that uncertainty set but inside the uncertainty set and what we can show is that dynamic pricing always gets you at least the linear interpolation between these two optimal values okay and at least in the numerical experiments we've done that tends to be quite good this


the the green curve is is concave and all the experiments we've looked at so far numerical experiments so basically the point is the result we have is something which characterizes the robustness of dynamic pricing through this notion of an uncertainty set over system parameters and says that you always do at least as well as the linear interpolation from the endpoints of your


uncertainty set and this kind of a technical statement of that okay so let me conclude so a bunch of different things that we were trying to do in this in this work and so some things I didn't you know managed to get to network modeling with multiple regions when I say our main insights generalize I mean they generalize sort of to the extent that we're you know


able to characterize this difference between static and dynamic pricing we haven't accounted for ETA sort of in the way that David asked about right aggregate welfare is something like I said numerically we get very similar insights but but we're trying to work the theory out there and I think it really gets interesting when you start changing you know when you start asking


you know much more foundational design questions so one thing that that I think Chris even pointed out is that you know you can imagine showing drivers these heat maps where we're saying like here is a place where there's there's more or less demand available we have some model inside the queueing model we've we've come up with some nice sort of tractable ways to deal with this but extending it


then to add in the strategic the strategic component has not been so easy but I think that again this is a really important direction to take the work it's be structure changing the percentage we talked about already and finally I think that there's sort of changing the matching algorithm there's something which has really not discussed a lot if you ask you know uber or lyft


I'm sure they would say that they want it to be fairly transparent so you're match to the nearest driver there's all kinds of really good reasons why you might want to manage inventory very differently across the network especially if you for those of you that were here for the industry the reverse field trip day you know they were talking about this sort of you know


tessellation of the earth into smaller regions than what they've been using before and once you start doing that I absolutely think you would want your match algorithm to occasionally pick people from adjacent regions you know depending on you know or another example this would be the Chris on Monday mentioned that uber wants to be able to accommodate driver preferences it use


either Chris or last week that if a driver says hey I want to be able to be get back to the East Bay in an hour I'm gonna accommodate well that's gonna change the match algorithm you're not going to give it to the nearest driver necessarily and I think this is again one of these things with sort of geographic matching you would have to have a good queueing model and you would


once it is set maybe high level vision show some of the ideas I think are the big ideas in future learning I think the agenda of deep learning as the idea of using brain simulations to make learning algorithms might better than easy to use and also make revolution advances in machine learning and AI so come back to this later but you know once upon a time I guess when I

Andrew Ng: "Deep Learning, Self-Taught Learning and Unsupervised Feature Learning"


was in high school I think I joined the field of machine learning because I want to work on AI but somehow that got lost and instead of actually doing AI we wound up spending our lives doing curve fitting which is not what I signed up to do uh and and deep learning was for the first time in many years made me think about the bigger dreams again I should come back and say a bit more about that


and and again I would say you know the sort of vision and ideas on a share is really not mine but as I think shared by large community including you know young Jeff Fenton yoshua bengio and many others that you hear from in the next couple weeks what about computers do with our data right we want to talk with images and label them lock of audio listen to audio


and do speech recognition have text and do stuff with text and it turns out that machine learning is our best shot and most of these applications today but it is very difficult to get these applications work right so while back i ôll some of my students at stanford to use like a state-of-the-art computer vision algorithm to to write the motorcycle detector and this was the


resulting god and this is typical in computer vision right so um well even though learning algorithms works each of those lines is like a you know six months to two years of work for a team of engineers and and we like these algorithms to be less work to build and also maybe perform better so let me start to explain some of these ideas using computer vision but and then I


will talk about about audio and apply these albums other modalities as well so why is this problem hard right so obviously a motorcycle how on earth could a computer fail to recognize what this is zooming into small part of the image zooming into whether little red square is where you and I see a motorcycle the computer sees this so the computer vision problem is to


look at all those pixel intensity values and tell you that all those numbers represent the exhaust pipe of a motorcycle seems like you need a very complicated function to do that and how do we do this so machine learning you know machine learning guys like me say oh just feed the data to the learning algorithm and let the learning algorithm do its job right when I teach my machine


learning cause I draw pictures like this and this is just not how it works so let's pick a couple pixels and let's plot some examples right so take that image there and because pixel one is relatively dark and pixel two is relatively bright that image you know it has has that position in this figure now let's take a different example a different motorcycle image has a this


has a bright two pixel one in the darker pixel too so that second image gets passed a different location and then let's do this for a few negative examples as well no motorcycles and what you find is that if you plot a set of positive and negative motorcycle and non motorcycle images that your positive negative examples are extremely jumbled together and so if you feed this data to


you know certainly a linear classifier it doesn't work so what is done is that the machine learning is that we want to be nice if you could come up with what's called a feature representation if you could write a piece of code that tells you does this image have handlebars in it does this image have tires or wheels in it and if you could do that then your data looks more like this on the lower


right and it then becomes easy much easier for say a linear classifier like a swivel vector machine the logistic regression to distinguish the motorcycles from the banal motor signals right but the story goes on so will this in this illustrative example or saying well whether we could write a piece of code to tell us that their handlebars and wheels but we don't actually know


how to do that and so in computer vision what is done is actually the following this is how people actually come up with features in computer vision this kind of notional illustrative example but this is what I wanna do when I take my motorcycle I make I'm going to detect edges at four different orientations so look for vertical edges horizontal edges 45-degree ages 135


degree edges and then what this number or point seven and the upper right means right that number is saying that the density of vertical edges in the upper right hand quadrant of my image is 0.7 and what and what this number down here says is that the density of horizontal edges you know in the lower right hand quadrant of my image is 0.5 and in case you're getting the sense that sort of


like oh my god what on earth is going on there this seems hardly complicated how interrupts it will come up with this piece of code you know that's that's that's the point and sadly this is the way that a lot of computer vision is done today so we'll probably this notion of a feature representation is pervasive throughout machine learning in fact I guess I live in I live in Silicon Valley


and if you walk around Silicon Valley and look at what where people are spending all the engineering time is often in coming up with these feature representations so let's let's look what's delve deeper right so where do these features come from um since they're the primary lens through which our algorithms see the world this gives them a certain importance right so how


about computer vision oh and then facts are interesting and in fact this notion of feature representations is pervasive you know for vision audio text even other applications so what do you get the features from in computer vision the state of the art answer for where the features come from is that teams of tens hundreds or teams of some of tens hundreds or maybe thousands of computer


vision researchers have spent decades of their lives hand engineering features for computer vision the figure on the upper left is a figure that I took from the stiff paper the stiff paper is the single most highly cited paper in computer vision like fifteen years and I read the paper maybe about five times now and I still have no idea what it's doing right this is


something so complex piece of code that David loathes good friend David will tell you this himself it took David literally ten years I'm knocking he's he'll say 10 years himself of you know filling with pieces of the code in order to come up with the SIP feature which works pretty well but you know you have to ask is there a better way to design features than this


that's vision how about audio same thing right teams of tens hundreds of thousands of audio researchers working on features for audio ever CC is shown on the upper right that's actually a pretty clever surprisingly hard to beat but again you know honestly to this day I have a hard time understanding what some bits of the M FCC album are doing and natural language in fact I think


most of natural language processing text processing today is unapologetically about finding better features so think about pauses right there's a lot of NLP work on parsers um this piece of software that tells you where the noun phrases are in your sentence I mean why on earth do I care where the noun phrases are in my sentences I really don't need software to tell me that the


only reason we spend so much time working on pauses is because we hope that this will give us useful features to then feed to some later downstream application like anti-spam web search machine translation that we actually care about so common features is difficult time consuming requires expert knowledge and we're working with them applications machine learning you know


we spent a long time there's a way if you look at apply machine learning where they will walk anew oh the company local people doing apply machine learning this is really what they spend the vast majority of the time on it's coming up with features so can we do better so the next piece in a lot of deep learning there's a like many people in very like many of you I


tend to treat biological inspiration with a great deal of caution and even a healthy dose of skepticism but for me a lot of the some of my thinking about deep learning has been taken inspiration from biology so I only share of you but you know some some cool cool ideas from really by washing inspiration so turns out there's a fascinating hypothesis that much of human intelligence can be


explained by a single learning algorithm since cause the one learning our hypothesis let me share with you some evidence for this right so this one's experiment first done on ferrets in MIT on that very piece of brain tissue shown on the slide that's your auditory cortex the way that your understanding my words now is that your ears is routing the sound signal to that piece of great


brain tissue and this processing the sound and then that's how you you eventually get to understand what I'm saying so neuroscientists did the following experiments which is in cut the wire between the ears and the auditory cortex and do what's called a neural rewiring experiment so that eventually the signal from the eyes gets routed to the auditory cortex it turns


out if you do this that great piece of brain tissue learns to see and this is the word see this has been replicated in multiple labs on four species of animals and these animals can quote see in every single sense of the word that I know how to use the word see these animals they can do visual discrimination talks we can look at things and make correct decisions based on you know an image in


front of them using that rare piece of brain tissue another example this rare piece of brain tissue is your somatosensory cortex is responsible for your sense of touch do a similar neural rewiring experiment and your somatosensory cortex Lucy um so more generally this is idea that if the same physical piece of brain tissue right the same physical bit of your brain can process sight or sound or


touch or maybe even other things then maybe there's a single learning algorithm they can process sight or sound or touch or maybe other things and that it can you know discover some approximation to that learning algorithm when we discover a totally different algorithm but it accomplishes the same thing then that might be a better way to us making progress in AI then hand


engineering separate pieces of code in each of these individual application silos which which we have been doing for decades now just a few more fun examples it turns out you can plug in other sensors to the brain and the brain kind of figures out how to do of it shown on the upper left is a scene with your tongue right so this is actually undergoing FDA trials of now to help


blind people see a system called brain port so the way it works is you strap a camera as your forehead takes a low-resolution grayscale image of what's in front of you run a wire to a rectangular array of electrodes that you place on top of the tongue so the each pixel maps to a point on your tongue and maybe a high voltage is a bright pixel and a low voltage is a dark pixel and


even as adults you and I today would be able to learn to see you about tongues in like tens they only ten-thirty 10 20 minutes human echolocation well you need a you know snap your fingers right I'll click your tongue and there are there actually schools today training blind children to learn to interpret the pattern of sounds bouncing off the environments as human sonar a haptic


belt is you know bring a buzzes around your waist program the one facing off the bus and then you get the directions and you just magically know where North is or similar to how birds sense direction you can plug a third eye into frog and you know the farm learns how to how to deal with it it doesn't work in every single instance there are cases where this doesn't work but I think to a


surprisingly large extent it's almost as if you can plug in you know not quite any sensor but almost the large range of sensors onto almost any part of the brain kind of going to do of it so want to be cool if you get a learning algorithm to do the same so let's see oh let's take a break could you guys on I think you now know enough to work look at the questions one


through three in the handout do you guys want to take a few minutes so just write down do write down what you think is the right answer and when you've done so you know discuss what you wrote down with your neighbors and and see if you agree or disagree for question one I had d4 question two I had auditory cortex learns to see and the question three I don't know different people have


different ideas I guess I tend to use the wording that much of human intelligence can be explained by a single learning algorithm but there are lots of other Worthing's that lots of other ways of distracting it alright so given this you know what are the implications for machine learning right so here if we think that without visual system computes an incredibly


complicated function of the input right it looks all those numbers and those pixel values and tells you that that's the motorcycle exhaust pipe and so two approaches that we could try to build such a system as you could try to directly implement this complicated function which is what I think of as a hand engineering approach or maybe you can try to learn this function instead


right and in kind of a side comment maybe only for the aficionados the machine learning is that if you look at a train learning algorithm you know a learning algorithm after has trained with all the parameter values there's a very complex thing but the learning algorithm itself is relatively simple most learning algorithms can be described in like half a page of


pseudocode so the complexity of the things we're training usually comes from the complexity of the data rather than the complexity of the algorithm and then that's a good thing because we know how to get complex data you just year which is an images or around us but coming up with complex algorithms is hot right so here's a here's a problem that I guess I post a


few years ago which is you know can we learn a better feature representation for vision or audio or what have you so concretely can you come up with an algorithm they just examine examine it's a bunch of images like these and automatically comes up with a better way to represent images than the raw pixels and if you can do that maybe you can apply the same algorithm to audio and


have the same algorithm trained along a bunch of audio clips and have it find a better way to represent audio than the raw data okay so let's let's write down the mathematical formalism of this problem right which is given a 14 by 14 image X image patch X one way to represent the image patch is with a list of 196 row numbers corresponding to the pixel intensity values the probably one


opposes can we come up with a better feature vector to represent those pixels okay and if you can do so then this is what you can do here's a problem called a self-taught learning I guess which is well so in in traditional machine learning right if you want to learn to distinguish your motorcycles from non motorcycles you have a training set with some and this is a pain because there's


a lot of work to come up with a lot of pictures and motorcycles it was like tens of thousands of them so in the unsupervised feature learning on the self or learning problem what you do is instead we're going to give you a large source of unlabeled images then give you an infinite source of unlabeled images because of the web where we all have an effectively infinite source of images


and the task is can all those random images up there somehow can pictures of trees and sunsets and horses and so on can that help you to do a better job figuring out that this picture down here is a mobile cycle okay and so one way to do that is that we have an algorithm that can look at these on label images and learn a much better representation of images than


just the raw pixels and if that superior representation allows us to then look at a small label training set and this my superior representation allows us to use the small label training set to do a much better job figuring out what this tested images okay so I guess in machine learning there are sort of three standard three and a few common formalisms right there's the supervised


learning setting which is the olders will standard one that most you best know so let's see it goes to record distinguish between cars and motorcycles right so the standard Nero school like 50 year old supervised learning setting 30 year old supervisor is I think you need to come a large training set up a bottle cause a lot of motorcycles okay Oh about 10 15 years ago deciding Andrew


McCollum Tom Mitchell or maybe even others before them start to talk about semi-supervised learning the idea of using unlabeled data and that was exciting but in semi-supervised learning as is simply conceived um you know the ability to use unlabeled data is great but in semi supervised learning typically the unlabeled data is all images or causing over cycles and it


turns out that this is a semi-supervised learning this sort of model is not widely used because it turns out that um you know rarely do you have a data set of where all the images are either caused or motorcycles and nothing else but the only thing we're doing is just missing the label so this is kind of useful but isn't why they use where as in um what I call self-taught learning


the goal is to take you know totally random images that may be caused may be old cycles may be totally other random things and to can you can use somehow use this to learn to distinguish the miles and many cycles and one weight is what would I like to think about it is that you know the first time that a child sees a new object where someone invents a new vehicle right the first


time that you and I saw a Segway we learn to recognize the Segway very quickly just from seeing it once and I think the reason that we learn to recognize a Segway very quickly is because you're in my visual system prior to that had had several decades of experience looking at random natural images just seeing the world and was by looking at these random unlabeled images


that allow us that allowed you in my visual system to learn enough about the structure of the world to come up with better features if you will so that the first time you saw a Segway you very quickly learn to recognize what a Segway is right so just to make sure you've got this concept could you please a look at question four and just do that map this to a new example and so someone called


the answer what first first part a PCOD second part and third part all right also all right that was easy cool so how do you actually do this in order to come up with an algorithm to learn features let's turn one last time to biological motivation turns out that when your brain gets an image the first thing it does is look for edges in the image right so first stage of visual


processing on the brain is called visual cortical area view what I think y'all might have mentioned is yesterday and the first thing it does is look for edges or lines I'm going to use the term lines and edges interchangeably so in your brain right now there's probably a neuron that is looking for a 45 degree line 45-degree edge like this shown on the left with the dark region next to a


bright region and there's probably a different neuron in your brain right now there's looking for a vertical line like this one right here okay so um how can we get our software to maybe mimic the brain and also find edges like this what we don't want to do is code this up by hand because you know what I don't want to do is tell us the neuroscientist and then work really hard to right hand


engineer software the replica I think what's most much more interesting is we can have an algorithm learn these things by itself and that there is such an algorithm very old ones like a what 16 year old result now do 200 thousand a few called sparse coding you talked about this a bit yesterday did you write cool so now go through this very quickly even a small coding


was obviously conceived as like a theoretical neuroscience model so you know Brunello thousand will tell you right he never envisioned that this would be used as a machine learning algorithm this is like a theoretical neuroscience result used to try to explain you know computations in the brain or something like that right and this is how the atom works is an


unsupervised learning algorithm so the way where else is you feed it a set of m images X 1 X 2 up to X M so each input example is and let's say an N by n matrix yo quicker like a 14 by 14 image patch what's fast coding does is it learns the dictionary of basis functions Phi 1 Phi 2 up to 5 K such that each of your training images X subject to the constraint that the a J's are mostly 0


sparse and then the way this is implemented is on with a l1 constraint where both work you know minimize the sum of absolute value terms on the on their coefficients AJ okay the sparsity penalty term and so if you do this then on by the way I think this is the only equation I have for this first hour so I hope you enjoyed it so same thing in pictures if you train sparse coding on unnatural


images every single time you're on it they'll learn the set of basis functions that look a lot like the edge detectors that you know we believe visual protocol error view one is looking for and then given a test example give it a test image X right what what what they will do is it will select out let's say three out of my 64 basis functions here and it will take that test example and explain


it or decompose it into a linear combination of in this case just three out of 64 of my basis functions okay so speaking loosely this algorithm has to quote invented edge detection right the algorithm is free to choose absolutely any basis functions at once but it shows but you know if you run it every time it chooses to learn basis functions that look like these edges and


what this decomposition says is that this image X is 0.8 times H number 36 plus 0.3 times H number 42 plus 0.5 times H number 63 okay so if you will this is saying this is now decompose the image in terms of what edges appear in this image and this gives a high-level more succinct more compact representation of the image and also probably a more useful one right because


it's more useful to know where the edges are in the image that you know where the pixels are moreover this gives us a alternative way to represent the image instead of representing the image patch using a list of 196 pixel values we can instead using this vector of numbers a 1 through a 64 these are the coefficients multiplying into the basis functions just a few more examples so the method


in density attention those represent an image in terms a just appear in it and it turns out that a funeral scientists have done that had to invent a chef have done quantitative comparisons between sparse coding and oh and visual cortical area v1 and found that you know it's not as by no means a perfect explanation of visual to everyone but but it matches of unknown so surprisingly well on not all


but on many dimensions so that's vision power other input modalities so this is a slide I got from Evan Smith from his PhD thesis work with Michael Ricky so what Evan did was he appoints false coding to audio data and what I've shown here is 20 basis functions learned by sparse coding when trained on natural sounds ok so this is a grid of 5 by 4 you know what 5 by 4 the lower audio


clips I guess audio basis functions so this 20 basis functions learn by sparse coding um what he did was he then went to the cat or the tree system since the biologists in Boston had been you know using electro recordings to figure out what early auditory processing in a cat does and for each of these 20 things learned by his algorithm he found the closest match in the


biological data and the closest matches are shown over the in red ok so the same algorithm that only one hand gives a you know he's an explanation for early visual processing and on the other hand use may be a you know by no means perfect but but the reason why X which is some explanation for review of it auditory processing as well and it turns out you can do a similar study on them


early somatosensory processing as well this is work done by Andrew Sacco Stanford where he collected touch data how do you call it touch data right so the way that done Andrew Andrew Sachs did it was um you know so we hold things of our hands all the time when I'm holding this thing but how do you how do you actually collect data for how I'm holding it so the way


Andrew Sachs did it was um he took a cloth and he took an object and he sprayed talcum powder all over the object and then when you take a glove and you hope this object and then you let go the pattern of talcum powder you know on your glove tells you where you came into contact with the object and moreover the density of talcum powder actually corresponds a little bit to the


to the pressure and and he not sure why he did this but um he didn't actually found so so what type of objects do people hold or I won't we don't know so we're collecting data you want to be representative of what animals do so fortunately it turns out that there were two biologists that has spent about a year of their lives sitting on some Island watching monkeys and carefully


documenting every single way that monkeys pick up different things so thank God I'm up computer science is right and so Andrew Sachs you know took that distribution of data and he wearing his glove picked up objects using the same distribution of drawers as was documented in these monkeys on an island oh and that was his data um I think that story was pretty fun but totally


unnecessary oh but but Carlyle sorry showing a zero so training training on data like this that turns out that you learn basic functions using sparse coding there are I should say by no means a perfect match to one to what is known to what is believed to happen in somatosensory cortex but this may be a surprisingly good match dimensions right so that's fast coding


um and let me could you take could you do a five and six on the handle so it was the answer four five and six wait what's wait once what is must actually where was it four six again okay come on all right be right all right cool let success on the same for every image but is the coefficients they want to vacate the look features for the specific image okay um all right great


so that's sparse coding and it turns out that on the different ways to implement you know sparse coding and what what I just talked about was maybe the the original way biocells and view in 1986 they're much route there there are different ways now I think young mother talked about encoded decode architectures I'll talk a bit more about that later today but I think this


intuition of learning sparse features has been kind of key for is one of the ideas I guess that allows us to learn very useful features even from unlabeled data come back to this later as well there are there other ways to do it if any of you are familiar with ICA actually how many of you have heard of the ICA independent components out oh cool all of you awesome so it turns out


that there's a you know the deep mathematical relationship between ICA and sparse coding with the turns out the two algorithms are doing something very similar for me personally these days I tend to use the ICA version so sparse coding rather than the version I just talked about but later today also talked about about sparse altering colors different ways of learning sparse


features we'll get to that later but so what do you do instead of your we just described is you know one layer of one of these spas feature learning algorithms maybe sparse coding may be as possible to encoder may be a sparse VPN or sparse RBM and turns out what you can do really building on a jet engines work what you can do is recursively apply this procedure where instead of just


going from pixels to images excuse me pixels to edges you can recursively apply this procedure and you know just as you can group together pixels to form agency can group together edges to form combinations of edges and group together combinations of edges to form higher level features so let me show an example that this is an example run by Hall actually it's not a michigan professor


but what huh laughs did was she trained one air of virtuous paws dbn and first layer you know Avram mercy group together pixels for mages another level up learn significant edges to form models of object parts right so this I should say this was an example of sparse coding train just on pictures of faces so the entire dataset was pictures of faces right and then I'm requesting you apply


this the next level up and doing some more complete models of faces so let me make sure that this visualization makes sense right um when I have this little square here shown here what this little red tag what does little square means is that I have learned a neuron in the first level that is looking for a vertical edge like that one okay going one level up and and and I've shown all


these rectangles the same size but higher up features are actually looking at bigger regions of the image okay it's just a resize all of the same but one level up this is actually looking at the bigger vision of the image but one level up you know this rectangle here means that at that next level one of the neurons has learned to detect eyes that look like that great and then the


highest level you know if you look at the upper leftmost square say with that visualization is showing that there's a neuron that has learned to detect faces that you look local bit like that person okay if you train the same algorithm on different object classes you end up with different decompositions of different option classes into different object parts then more complete models of


objects if you train the algorithm on a mix of four different classes of objects so there's an algorithm trained on a data set that includes cars faces bikes and airplanes then you know you end up with at the mid level you get features that are shared among the different object classes where I don't know maybe what I guess are new cars and motorbikes both have real tire like shapes or your


features that kind of shared between multiple object parts and then the highest level you get object specific features okay yeah is there any sort of variance in see yes there is there's a point so because of the nature of the visualization I showed them as though images but yeah it it there's some amounts of Indians that's hard to visualize it oh I remember I have a


better example later today of a where where we more carefully document the invariant zones have a better example later okay so was this good for when you when when you hear your research isn't deep learning like me talk you you see people like yawn in me and Jeff intern is hello stories IQs but you know so you can learn features so what is it good for well it turns out the Hollywood to


benchmark could stand the benchmark in computer vision where the task is to watch a short video clip and decide whether you know any of a small number of activities took place in this video you know whether two people kids to do hugs almost driving so as eating's or was running the visor activities like the theater computer vision has tried out many different combinations that


features last year probably soon as standard found that by learning rather than hand engineering the features he was able to significantly outperform the previous AVR all right how about audio it turns out you can apply similar ideas to audio so this is a spectrogram which is a different representation for audio you can take slices of spectrograms and apply sparse coding to that it turns out


if you do this then on this is a dictionary of basis functions learning for speech I guess I'm not an excellent speech but in impervia probably a slightly optimistic as a reading of these you know the basis functions learn by sparse coding correspond roughly to phonemes there's a slightly optimistic interpretation I should say and so but if under this slightly optimistic interpretation when


say informally that sparse coding has learned to decompose speech data you know very loosely into it because the phonemes to the appearance speech and moreover you can take this recursively apply this idea just as we saw earlier to build higher and higher level features and I guess a few years ago oh how likely so against the timid benchmark is a data set that many speech


researchers work on this is one of those datasets where you know if you do point 1 percent better you write a paper um and a few years ago Holland was able to you know make what correspondent so I think we worked out something like like two thirds of a decade work for progress or something on this data set just by learning in this chart is outdated I made this child I think back when


pauillac was publishing this paper since publishing this paper geoff hinton and others have surpassed this also using deep learning techniques right um and then I was referring as was preparing this talk I best prefer practice I ask my students to help me put together a chart of the social results where you know we or others or whatever holders through the odd benchmark result using


deep learning and there were surprisingly many of them from us Stanford from other groups on I say yeah I worked on machine learning for a long time I've never in my life seen anyone technology not go over benchmarks like this quickly this is the whole view the deep learning is like knocking over benchmark like nobody's business um there's actually a lot more


than fits on one slide I think if I put all the ones I'm aware of it'd be about three slides like this what's left to be done right so and I know that some of you are you know here because uh you want to learn how to apply these things and I know some of you are here because you might be even interested in doing research yourselves and writing research papers yourselves in deep learning and


future learning so I want to share of you I'll do this later to talk more about the state later as well I'll share of you what I think of as a as a good way as one as one of many promising directions in which to you know take research for for deep learning I think that's a scaling up so and happy how do we build effective deep learning algorithms right how do you get these


animals work well well in fact how do you build effective machine learning algorithms you know so let's not back in history right about 20 years ago oh there were these debates about you know where these different supervised learning algorithms so no feature learning yourself or learning pursue these supervised learning algorithms and they used to be all these debates about


you know is this your album better is my album better so um michelle banko and eric bro did one of the studies that most influenced my thinking where they took maybe four of the state of the art learning algorithms of the day I guess back in 2001 azn's were not yet popular so didn't actually study SVM's but they took a natural language processing house on which they


had a effectively unlimited source of label data and they trained for learning algorithms and plotted on the x-axis is a training set size parts on the y-axis is the performance is the accuracy all the algorithms do about the same is the amount of data you have and even a quote superior algorithm often lose to a quote inferior algorithm if only you can give the inferior


algorithm or data to train on yeah so I think this results like these that has led to this Maxim in machine learning that you know says that often is not who is the best album that witnesses who has the most data and then I definitely see this over and over and slip the value of you if you look at think about the most commercially successful websites you know the ones making large amounts of


money in that you use per every day many of those algorithms are incredibly simple is like logistic regression but the secret is that those albums will fit far more data than anyone else has so how about so this is supervised learning um how about unsupervised learning so Adam coats as you who who helped prepare this handout a few years ago actually and a half ago did this interesting


study right where he took all of the unsupervised feature learning algorithms of the day that you know that there's guys like us I guess debate as my averin better as your oven better weather and he took a bunch of these algorithms and ran all of them and they read the model size so for unsupervised feature learning all of us have a have a large amount of data right if you know you're


doing if you're learning from unlabeled images from natural images um you have an infinite amount of data right new and so the parameters the very is not the amount of data is the size of the models of how many features do you learn those coefficients a 1 just in the or the example we had 64 coefficients a 1 through a 64 for sparse coding but let's set that bigger let's learn a thousand


features instead or 10,000 whatever let's learn much larger number features and what Adam found was that you know the album does matter maybe it matters more than know maybe matters more than we respond supervised learning because these albums are less patrol but they can be sort of silver result where the bigger the model the better it does and in fact one interesting historical aside


so see part n we actually went back and historically creates though you know I mean we like to publish paper and saying my oberyn's better than yours yours valine whatever right went back and traced all the sequence of papers with you know person a published as a result on C far person B published paper saying oh I did better than person C published an LP say even better and then the one


says oh I do even better a new idea invert we traced though a couple sequences of look of that of supposedly benchmarks of advances in benchmark that was supposedly do 200 miles better than yours as I do better and we believe that a lot of those results of the supposed progress was actually because the models got bigger right it's not that my album is actually better it just I don't know


most law had more time to work and so I trained mine better and so I'm going to write a paper saying my albums better in the stuff I've done the one most reliable way to get better results has been to train a bigger model if I change the algorithm sometimes it makes it better sometimes not but in fact I you know look at the literature I feel like a lot of work by a lot of


different research groups has been in some ways on on trying to get these models to just train bigger right so in this world of a supervised learning where all of us have an infinite amount of data you know I feel like we're not limited by what data we have were much more limited by our ability to process the infinite amount of data that all of us have alright so


you know many attempts to come more efficient algorithms parallelization I say John's done very cool work on the FPGA and a second plantation oh I think I brought I'm going to take credit for bringing GPUs to the deep learning world and and so on as well work like this um and in fact looking at this chart my personal interpretation which others will disagree with is that those results


were achieved to a very large part because of scalability issues right but this is my personal interpretation which others may disagree with could you through the questions 7 & 8 on the handout so question 7 whether you have which which ones did you check off 2 & 3 cool I'll take your word for it and for question 8 oh and I just actually a question I checked off


everything except DNA computing them it off my answer anyway yeah I thought of floating quantum in there too but I think someone actually is working on quantum computing yes yeah all right cool so um let's see you know what there's something else I could talk about I think I'll do that towards the end um so you know just to wrap up this piece I think talk about the high level


vision of less learning rather than manually designing our features but again kind of for me you know this isn't just about machine learning anymore this is I feel like um can we really learn something about a I especially perceptual ai ai ai and human intelligence is very broad I think you know we're we're starting to get a handle maybe the perceptual part of AI


which is maybe like you know 40 to 60 percent of many animal brains right so this big part of the brain and so what I'd like to do is as I state you know thank you for your attention and for your patience or need to do these things I hope that was somewhat fun what I like to do is let's break and later on in the in the next couple sessions where you know die slightly deeper into technical


details go for the basics talk about neural networks and builders the algorithms also to point out that you know after you later today or whatever if you want to go through a deeper highly technical tutorial with exercises in everything there's one up there this is the URL is also given at the bottom left of the handout but you can you can check that out later after


hi everyone I hope everyone here okay so I'm pleased to be here with you today to share with you some of my experience in Catalan during several years so the title is called is easy so it's quite different from other talks where it was more technical about how to win competitions here I will keep it rather simple and I will talk about what I was doing before and what I started doing to

Gold is easy: Kaggle tips and tricks | by Chahhou Mohamed | Kaggle Days Dubai | Kaggle


improve myself so I will start by giving some general advices that everyone should follow and I will talk about some technical sir they me about how to improve or to check for improvements in your models and then I will talk quickly about some case studies and see that you will see that getting a gold medal is not sometimes well most of the times not that difficult


so starting with the advices first advice positive mind if others can do it you can also do it that is how I started when I started kaggle I said if those people can do it I can do it I compete a lot and I managed to become again my second advice understand the problem I try to find you IDs never starts fine-tuning your put your model during the first week while you are still doing


some feature engineering steps you are still looking for a good architectures you will just waste most of your time doing by training spend this time trying different approaches different architectures to come up with different models for your final example turtle bites don't use caramels when you start a competition you will mostly end up using a slice variation of that


kernel so don't look at caramels when you start try doing that data analysis by yourself try to come up with your own models with your or Peter engineering you will end up with models that are different from doors that you will find on Kegel later on you can use ideas you can borrow ideas from cattle camels to help your model improve even better if you have the chance to work in teams


don't share anything except some important insights so when I work in team with my teammates we don't share the architectures of our models we don't share the features that we create we only share important insights that we find by doing the analysis of the data if something doesn't work don't stick to it you will mainly waste your time find a different approach try different


modeling approaches to your problem you will end up with different solutions let me help you another advice is you should always keep it simple we saw previously in different competitions some awesome solutions that use hundreds of models which stuck in and as a as beginners or even at some advanced levels you may say that I can will never be able to do something like


this stuck in is very an advanced topic so try to to make simple models simple models will also work and to help you to get a gold medal don't understa mage the power of neural networks even on tabular data mostly on tabular data people try to use only gradient boosting decision trees because they are so powerful moral networks can be as good as present boosting decision trees if you are able


to come up with a good architectures and it will also help you your final ensemble if you are working with two models right inputs boosting decision trees and or immensely another point is throws for IDs that's how a college is try to work on different fields to image images in AP time series suppler don't mean classification regression try to work on as many different topics as possible


ideas that you may use in in images for example can be used on tabular data if you know how to model your problem in order to use such ideas and the last idea and the last point is thinking outside of the box don't think don't try to do what other people does do because we'll end up with the same solution and you will end up with the same idea try to do it things that people don't think


about trying new thoughts new new ideas most of the time there will be crazy ideas that may not work but you have to try them and if one of those ideas work it will get you the gold medal so checking for improvement I would start talking talking about Peter importance how to assess the importance of so one thing that's all so what does I have no ties among calculus is that they are always trying


to eliminate features looking for the lorikeets filters trying to eliminate them in order to improve the performance of the model and to make it faster to trade so I never do that when I start a competition but let's say I never do that it's during the first modelling approach but later on you have to do it so why I don't use it I thought eliminates ranking filters when I thought because


you may have correlated features that they explain the low ranking of some filters when we will do feature engineering new filters that will you will end up coming with may have some good interactions with the lower ranking filters and you will see an increase if they're in their importance and also the ranking of the filters is dependent of the complexity of the models some low


ranking filters may have they become really important if you increase the complexity or if you decrease the complexity some some high important filters may decrease so here is an example using the Titanic exam so on the left you can see the original row features and on the right I just added a new feature that I called noise filter that I made from a normal distribution


and as you can see I made a grid search trying to find the best parameters for the two models and you can see here that the noisy feature is ranking third which doesn't make sense this is just random noise so if you start looking at the lorikeets features you will try to eliminate some of those filters and will completely forget about the noisy filter so this is something I


have noticed when I was working on the first silicon petition I made up hundreds of meters and I tried to use the the noise Peter trick which is just made a noisy filter and see the ranking and if anything is rank it below the noisy filter it just means that it it's just noise you can eliminate this but it happens that in practice doesn't work and my noisy Peter


even though I have hundreds of meters was always ranking in the top five filters so don't look at the low ranking Peters but start looking at those that are ranking very very high your model is probably overfitting on some noisy filters and by eliminating those features first because the low rugged Peters may become more important because your model will try to use them instead


of using the noisy Peters so the main purpose is to detect the overfitting meters you have two choices you remove them if it helps your cross-validation and if it hurts your cross-validation then just try to apply some transformation on those filters to have a better generalization so the second part of checking the improvements is about Twitter engineering and this is


quite tricky to to find what feature is working or not so when you come up with a new Peter and you want to check if this feature is helpful in your model or not well if you see very important increase in your score you know for sure that the Peter is helpful but most of the time the filters just give you some little improvements from literally trees of maybe decrease in your first


validation spot so how will you assess that for example the third change happens from using this filter or is it just from some random seeds that you are you into your model so first approach that you can use is doing bucket so what is bunion is just use the same model with different seats and try to to average the predictions out of those models and see the final your final


cross-validation spot so instead of using a five fold cross validation this will allow you to use just one one random seat it's just one model I prefer using three bucks or 3/4 is almost as fast as doing a 5 first foundation because you have less training data and which just refers instead of 5 volts oils almost as fast that it allows me to use 3 different models with 3


differences and by beginners blending those models I somehow gets rid of the randomness of somebody my final score is not really dependent of the seat that have been used in my model and I can be quite sure that the improvements that I see is not coming from randomness but really from the improvement so this is one way to do it the second way and this is how I do


things when I I mean I do Peter engineering if I never use or I never test only one feature at once I create what I call or I will be back to this line later on I always do what I call a bunch of features so I create let's say for example five features and instead of trying those features one by one I try to fill the full bunch of features at once and if improvement there is it will


be not very small improvement but rather a quite important improvement and this works very very well so why does it work so well well let's imagine that you have two features a future one which is just a mean computed on some feature X grouped by future while and some other filter to that use the feature one but you just remove the mean from your filter types


you may end up if you try those features one by one you will may end up but not see but not seeing any improvement in your model but using them but in your model you may come up with some interesting improvements why because those two features are quite related between them one is the mean of the group and the other is just the difference of the filter X to the two


this mean and maybe this feature two is not working quite good by itself unless it sees to have some kind of interaction with the mean of the group so by creating a bunch a bunch of features you are allowing for more interactions then trying feature by filter and when you are done with this bunch of feature you make for example five features and you see improvements at that point you can


start looking if you have any overfitting features and you can sometimes but say what I do is starting doing feature selection during my bunch of future creation so I create like 10 meters I see improvement I check for overfitting features I remove them and see if all the filters are useful so in some users may not be used for into these bands by just remove it


one of the most powerful features that I have found so far and almost always work is this veto this kind of features you provide some feature wide and you compute some statistics using another feature and then you just remove that beam from the original row so you can apply you apply this on categorical filter features you can also do it on discrete amiracle meters and you can