1 Introduction
Over the past decades, online advertising has grown into a huge industry, with many different online publishers offering impression opportunities. Auction theory has played a major role in shaping this ecosystem, and many ad auctions strive to be Incentive Compatible (IC), which means that an advertiser achieves the best outcome by truthfully reporting their willingnesstopay. Despite the role that auction theory has played, the resulting systems may not be IC. For example, intermediaries (called Demand Side Platforms or DSPs) first run an auction to determine the best ad among their clients, and then pass this along to a publisher who runs their own auction including bids from other sources. Even when both auctions in isolation are IC, their composition is not. Furthermore, some publishers use past bids to set a reserve price (or minimum bid), and others are moving to a payyourbid model entirely (which has strong incentives to misreport willingnesstopay) [40, 41].
Recently, there have been several works addressing the problem of determining whether an auction is IC based on statistical tests using only inputs and outputs of an (unobserved) auction mechanism [30, 20]. This gives advertisers the power to test whether an auction is IC without having access to the code. Feng et al. [20] proposed to use regret [24] as a way to measure “how far” an auction is from being IC:
(1) 
where is the true value of advertiser , the bid of , the bids of other advertisers, and the (expected) utility of . ICRegret captures the difference in utility between bidding truthfully, and the maximum utility achievable. By definition, IC mechanisms have ICRegret , while higher ICRegret indicates a stronger incentive to misreport.
While measuring IC is most naturally a concern for advertisers (who cannot observe the auction mechanism directly), it is also both important and nontrivial for the auctioneer. The auctioneer cares about IC auctions because they admit simple optimal bidding strategies (namely truthful reporting), and simple bidding strategies may in turn lead to lower churn of advertisers.^{1}^{1}1Moreover, additional advertisers are better for revenue than being clever about devising a revenueoptimal auction mechanism, see [3] (and followups). Additionally, when auctions are not IC, bidders don’t truthfully report their value, which may harm social welfare^{2}^{2}2While in some cases there are symmetric equilibria in which social welfare is not harmed [44], these need not always exist and bidders may not reach equilibrium [15, 1, 39]. and thus the quality of the service provided to the advertisers. While important, it may not be straightforward for publishers to guarantee that their auction is IC for many different reasons: complex interaction between different layers in the advertising ecosystem, runningtime constraints, bugs in the auction code, and so forth.
Feng et al. [20] proposed a method to determine ICRegret for publishers (by taking a worstcase perspective over the advertiser value ). A downside of their method is that it requires many counterfactual evaluations of the auction’s outcomes for alternative bids. This means that the auction code needs to be run many times over. While this may be the best thing one can do with only blackbox access to the auction mechanism, could we do better if we’re using intermediate data from the auction mechanism?
To overcome the practical difficulties to measure ICRegret, we propose to use Envy [23] as a proxy for ICRegret, by identifying relevant classes of auction mechanisms where Envy and ICRegret coincide or where ICRegret is upper bounded by Envy. So what is Envy? Instead of comparing the advertiser’s utility against her utility for alternative bids, Envy takes a single outcome, and measures to what extend advertisers are happy with the outcome. Ad auctions typically simultaneously sell multiple ad slots with varying clickthrough rates [17, 44]. Let
be an expected allocation vector (where allocation corresponds to the ad being clicked) and
be an expected pricing vector. Envy of bidder given the outcome is:(2) 
Envy is defined with respect to some outcome. However, in an auction, changing ones bid may change the outcome in the auction. Therefore, we define ICEnvy as the Envy experienced in the outcome when a bidder bids truthfully. In the following, let is the expected allocation of all bidders and be the expected payment vector of all bidders, when bidder bids truthfully and for bids of the remaining bidders. ICEnvy is then:
(3)  
(4) 
In arbitrary auction environments, ICEnvy and ICRegret don’t necessarily coincide. There are natural auction environments with envyfree outcomes, that still have positive ICRegret and vice versa.
Example 1.1 (, ICRegret is positive).
Consider a singleitem, firstprice auction, with two bidders with values and and assume bidder 1 bids truthfully. The ICRegret for bidder 1 is for arbitrary small , as the best alternative bid for them is . However, ICEnvy is as the only alternative allocation for bidder 1 is to not receive the item.
Example 1.2 (, ICEnvy is positive).
Consider the IC auction for a single item with 2 bidders who face different reserve prices^{3}^{3}3While nonanonymous reserve prices may seem contrived, they naturally occur e.g. for the revenueoptimal auction on noni.i.d. bidders [34]. and . With bids , bidder 1 received the good at their reserve price of . Bidder 2 has ICEnvy of , but there is no counterfactual bid that will give her positive utility (hence ).
While in general ICRegret and ICEnvy can be quite different, in this paper we show that there are large auction classes for which (and under mild conditions ). Since computing ICEnvy requires no counterfactual evaluation of the algorithm, it can serve as an efficient certificate that ICRegret is low.^{4}^{4}4For an auctioneer who cares about incentive compatibility, false positives (i.e. high ICEnvy but low ICRegret) are acceptable while false negatives are not. Therefore the inequality goes in the right direction. In particular, for the position auction environment [17, 44], we show that a large class of payment rules (which includes VCG and GSP), , and when bids are unique (Section 3). We extend these results to the Ad Types setting [14] (in which ads of different types have different discount curves^{5}^{5}5
This is common for example with heterogeneous ad types in an ad auction: the probability of an impression ad being seen decays differently than the probability of a video ad being watched, or the probability of a linkclick ad being clicked. All discount curves agree on the relative quality of the slots.
) and show that VCG and a generalization of GSP also have (Section 4). In addition to bouding ICRegret in terms of ICEnvy, we also use ICEnvy to bound the loss in social welfare loss due to misreports (Section 5), and finally we show empirically that ICEnvy can be used as a feature in an estimator for ICRegret in auction environments beyond those for which we have theoretical results (Section
6)).1.1 Related Work
We propose to connect ICEnvy and ICRegret directly by defining a large class of auction mechanisms for which (and a larger class where ). The line of work that’s closest in spirit aims to identify classes of auction mechanisms that are simultaneously envyfree and IC (in our notation: classes for which ). Feldman et al. [19] and Goldberg et al. [25] studied the conditions that are required in order to have mechanisms that are efficient, truthful and envyfree and that VCG satisfy these properties for capacitated valuation functions. For homogeneous capacities there’s a class of mechanisms that achieve this, while for heterogeneous capacities there is no mechanisms that simultaneously achieved all 3 conditions. Cohen et al. [9] provided a characterization based on cyclemonotonicity of the allocation functions that are incentivecompatible and envy free without considering the efficiency of the algorithms.
The notion of envyfreeness was initially introduced by Varian [43] and Foley [23]. The key property of an envyfree allocation is that buyers prefer the bundle of goods they receive over any other allocated bundles (given bundle prices). The notion is particularly appealing due to its connection to markets: in an envyfree allocation, given the prices for goods, all buyers prefer to buy the bundle that’s assigned to them. More recently, the notion of envyfreeness has been deeply studied with a different perspective that involves itempricing [26, 12] and bundlepricing [21, 18, 10]. In our setting there is no difference between those two models. A similar line of work focused in studying envyfree algorithms, both in the itempricing and the bundle pricing models, when the bidders have budget constraints [18, 12, 10, 2, 42].
In much of the other related work, envyfreeness is taken as an alternative solution concept to IC (e.g. [27, 16, 11, 18, 13, 21]) and in contexts outside of the auction domain (e.g. [7, 22, 8, 33]). Of particular note: Daskalakis and Syrgkanis [16] address the relation between envyfreeness and incentivecompatibility in the context of algorithmic learning. In particular, the authors discussed the computational complexity of noregret learning algorithms and noenvy algorithms in simultaneous second price auctions. Hartline and Yan [27] studied the relation between envyfreeness and incentive compatibility in revenuemaximizing priorfree mechanisms. Lipton et al. [31] investigated envyfree mechanisms in the context of indivisible items with focus on the computational complexity of finding allocations with minimum envy. Moreover, they proved that is possible to obtain truthful mechanisms with bounded envy. Those results have been simplified and extended by Caragiannis et al. [4]. While this line of work is interesting, it does not quantitatively address the relationship of envy and IC regret.
1.2 Our Contributions
This paper has 4 main contributions:

First, in Section 3, we define a class of auction mechanisms—which includes VCG, GSP, and GFP for position auctions—where ICEnvy is tightly related to ICRegret. For this class we give necessary and sufficient conditions for and mild supplementary conditions under which they are exactly equal.

Finally, in Section 6, we use bidding data from a major online publisher to show that ICEnvy can be used as a feature to learn an estimator for ICRegret. The estimator has low meansquared error, and performs better than comparable estimators that are trained using other features from the auction like values and prices for different slots.
2 Preliminaries
There are bidders and slots. Let be the set of bidders and be an (ordered) set of slots. Each bidder has a valuation vector that is the willingness to pay of bidder for each slot , with , and are unit demand. In the standard position auction environment, slots have common quality factor such that for each bidder and slot we have for private value of the bidder. In the Ad Types setting, each ad has a type and for each type there is a separate discount curve . Note that when there’s is only a single type, the setting specializes to the position auction environment. Unless specified differently, let refer to the type of ad .
The slots are allocated to the bidders by a (directrevelation) mechanism . The mechanism is defined by an allocation function and a payment function . Since bidders’ values are private, the mechanism solicits bids to represent the values, though reports may not be truthful. Let be the valuation vector of all the bidders and the bid vector. After receiving the bids from all the bidders, the mechanism computes an outcome , i.e., and .
describes the allocation of the slots to the bidders and describes how much each bidder is charged for the obtained slot. In particular, where , if the bidder obtains the slot and if she does not receive any slot. And where is the price that the bidder pays for slot .
For an allocation and a valuation vector , the social welfare of the allocation is . The optimal social welfare is . The Social Welfare Loss is . When the valuation vector is clear from the context, we will use , , and . When the mechanism and the truthful valuation vector is clear from context to we use , , and with the understanding that .
Given an outcome , the utility of a bidder with type is . Since the outcome of a mechanism is a function of the bids, and the auctions we consider are not necessarily IC, bidders may be incentivized to report a type different from in order to produce an outcome with higher utility.
ICRegret.
ICRegret describes the outcome for bidding truthfully, compared to the optimal alternative bid (given constant competition ). Formally, the regret of a bidder for bidding truthfully compared to a specific alternative bid is:
(5) 
which is used in the formal definition for ICRegret.
Definition 2.1 (ICRegret).
The ICRegret that bidder experiences is^{6}^{6}6Equation (1) in the introduction takes an expectation over competition since the work of Feng et al. [20] considers the auction mechanism as a black box. In our setting (from the perspective of the auctioneer) the alternative bids are known, and we define ICRegret on an auctionbyauction basis.
ICRegret can be directly connected to incentivecompatibility (IC). Indeed, a mechanism is IC iff for all , , and , we have for all .
ICEnvy.
Given an allocation and payments , Envy describes how much a bidder prefers the allocation and price of another buyer, compared to what they received themselves. Since different bids may lead to a different auction outcome, we define ICEnvy as Envy with respect to the allocation and payments when bidder bids truthfully. ICEnvy is some notion of fairness of the produced outcome whereas ICRegret measures how much the underlying mechanism incentives misreported types.
Formally, for given an allocation and payments , the envy that bidder experiences compared to bidder is
(6) 
and the envy of bidder in the outcome is
(7) 
which is used in the formal definition for ICEnvy.
Definition 2.2 (ICEnvy).
ICEnvy the envy of bidder in the outcome :
Note that computing ICEnvy requires one single execution of the auction whereas the computation of ICRegret requires the execution of the auction for multiple bid values of each bidder.
3 Position Auction Environments
As stated before, ICEnvy and ICRegret measure different things: ICEnvy provides some measure of fairness of the outcome, whereas ICRegret measures the incentivecompatibility of the mechanism. In this section, we focus on position auctions that are widely used in search and feed advertising.^{7}^{7}7In display advertising it is more common to sell ad slots onebyone, which is a special case of position auctions, though one which is arguably mathematically less interesting. We give in the following the definition of regular mechanism for position auctions and we characterize the class of regular mechanisms that have . We assume wlog that the bidders are ordered by nonincreasing bid , with ties broken lexicographically. Therefore, slot is assigned to bidder .
Definition 3.1 (Regular Mechanisms for Position Auctions).
A regular mechanism for position auctions is defined as follows:

Slots are assigned in order of nonincreasing to bidders ordered by nonincreasing bid value . Ties are broken lexicographically.

The payment for bidder is with non negative coefficients
Note that this definition includes several widely used auction mechanisms:

VCG: for , and for .

GSP: for , , and for .

GFP: for , , and for .
In this section we provide necessary and sufficient conditions for a regular mechanism to be individually rational, i.e., no bidder is charged more than her bid, and to have for each bidder ,
Lemma 3.1.
For a regular mechanism for position auctions the following properties hold

Individual Rationality;

,
if and only if, for each slot ,

, and

for .
Proof.
We start by proving the necessity of the first condition of the claim. Conditions , are needed to ensure the individual rationality of the mechanism. Indeed, if there exists a coefficient , , any bidder with will be charged more than its valuation, thus violating individual rationality. Condition is also needed. Otherwise, if , bidder may have while as shown in Example 1.1.
Next, we prove that the second condition of the claim is sufficient. We first prove that regret and envy are for all slots . For envy, we derive:
with the last inequality obtained by the second condition on the payments. For regret, note that for a bid such that , , we have a payment and therefore .
Envy and regret for bidder can only be positive for a slot . if slot can be obtained from bidder by decreasing her bid to a value , then, given the first condition of the theorem, the payment charged to agent for a bid that gives him slot is exactly equal to the payment charged to the bidder that received slot under bid vector , namely, . The reason is that, all the bids that determine the payment are unchanged. Therefore, .
However, not all slots can be obtained from bidder by decreasing her bid since ties are broken lexicographically. If there exists a slot that cannot be obtained from bidder for any bid , then we have still the possibility that , and therefore . ∎
The part where the strict inequality came in was due to the lexicographic tiebreaking when there are ties. When bids are distinct this case disappears and .
Theorem 3.2.
When all bids are different, the conditions of Lemma 3.1 are necessary and sufficient for individual rationality and
Proof.
In addition to the necessary conditions of Lemma 3.1 we prove that is also necessary condition for . By contradiction, consider the largest value of such that . Bidder will envy the allocation of bidder since the marginal utility of having allocated slot instead of slot is positive. On the other hand, increasing the bid of bidder to obtain slot will have negative regret for bidder if bid is enough bigger than bid and therefore the payment of will be increased more than the marginal utility of bidder for slot .
For the sufficient condition, note that, given the fact that all bids are different, we never have ties in the allocation of a slot. Therefore, for every slot , there exists a bid such that produces and the payment is exactly equal to the payment charged to the bidder that received slot under bid vector . Therefore ∎
4 The Ad Types Environment
We now consider a more general setting that position auction, in which bidders can have different types and thus face different discount curves, as proposed by ColiniBaldeschi et al. [14]. Each bidder is associated with a vector of nonincreasing quality values for the slots. The valuation of bidder on slot is . Valuation remains private information of the bidders, while the mechanism knows the quality value vectors for each bidder .
The socialwelfare maximizing allocation is obtained by solving the MaxWeight Perfect Matching (MWPM) problem, for example by using the Hungarian method. This returns a perfect matching together with a dual certificate of its optimality. The certificate is a dual price vector for the slots and a dual utility vector for the bidders , such that the value of the optimal solution is equal to , i.e., the sum of the prices of the slots plus the sum of the utilities of the bidders. If bidder is matched to slot , the dual constraint holds with equality. Let be the set of tight edges in the final solution. The MWPW is therefore a subset of .
In the exposition, we assume that the number of ads is equal to the number of slots and that the matching is unique for each instance of the problem. This can be achieved by first adding slots if that each bidder values at or by removing the lowest slots if , followed by a deterministic perturbation of position discounts to remove ties on the value of any subset of edges. A formal description of this process is given in the appendix (see Appendix A).
The following properties hold for shadow prices when using a suitable variation of the Hungarian method [14, 28, 14]:

Wlog, the Hungarian algorithm can output dual prices that are pointwise minimal over feasible dual solutions of the maxweight allocation [14].

For the minimal dual prices, prices , of the slots are non increasing, and the final slot is free: .

For the minimal dual prices, each bidder is connected with an alternating path to an item with price [28].

The minimum dual prices are market clearing prices, i.e. each bidder is matched with a slot that maximizes their utility.
In addition to the properties above, the following is true (the proof appears in the appendix).
Claim 4.1.
Each bidder is matched to the lowest slot for which .
4.1 The Extended GSP Pricing Scheme
We want to handle pricing schemes for this setting with different discount curves for different ads, but what pricing schemes should be considered? We focus on attention on pricing schemes with the following fundamental properties:

Prices are monotonically non increasing, i.e., for each bidder , slots of lower quality do not have higher price;

The first property is an obvious requirement since the discount curves of all the bidders are nonincreasing. Observe that in this setting, VCG prices satisfy both constraints trivially since , but what about other pricing rules that charge higher prices? GSP for this setting can be generalized, e.g. as done in [6, 5], by considering charging the value for a slot corresponding to the lowest bid that maintains the same allocation. For position auctions, this specializes to the normal GSP pricing scheme. The following example shows that this pricing scheme fails to preserve price monotonicity:
Example 4.1.
Consider three bidders with valuations over three slots . The threshold prices of the three slots are . For the first slot, we need to reduce the valuation of bidder to 2 in order to have the first two slots assigned to bidders and for a total value of . For the second slot, if we scale down by the bid of bidder (we are in a single parameter setting) and we bring the values of bidder to , it is convenient to assign slot to bidder instead of bidder that is now assigned to slot .
Extended GSP.
The extended GSP pricing scheme prices slots based on the the analysis of the set of tight edges connecting a bidder with the slot of price . Indeed, the standard GSP mechanism with bidders of only one ad type prices each slot at the value of bidder for slot , and the highest value of a tight edge on the alternating path from bidder to slot with price .
However, we cannot extend directly this mechanism to the case of different ad types. We show a simple example in which the final prices for the case of three different ad types cannot be higher than the VCG prices.
Example 4.2.
Consider three bidders with valuations over three slots . The optimal VCG solution will match the bidders according to the order and will charge . We also observe that bidder is tight with slots and . However, the values of bidder for slots and are higher than the values of bidders and , respectively. Bidder is also tight with slot but his value is higher than the value of bidder that has assigned slot . We must therefore conclude that the largest price we can charge for the slots are exactly equal to the VCG prices.
The example above suggests to limit the maximum price that a slot can be charged. Consider a bid vector for the bidders.
Definition 4.1.
Extended GSP prices. Consider bidder assigned to slot with VCG clearing price . Let be the set of tight edges , with and bidder matched with an item . Let i.e., the maximum value smaller than of an edge in . We assume if no edge in has value smaller than . We define the extended GSP price of bidder for slot by
(8) 
Observe that the prices are nonanonymous since we must impose a different upper bound on the maximum value that we can charge each bidder for a given slot. Indeed, by similar arguments used for GSP in Section 3, these are intuitively the largest prices we can charge a bidder in a setting with different ad types without violating the property . Any larger value of the payment of bidder for item can only depend on the bid of bidder . If we had this dependence, bidder can decrease his payment by decreasing the bid and therefore ICRegret would be higher than ICEnvy.
We first observe the following:
Claim 4.2.
The extended VCG prices are monotonic, i.e., .
Proof.
Monotonicity follows directly from the definition of extend VCG prices by observing that VCG clearing prices are non increasing, , and, finally, is a vector of non increasing quality values. ∎
We also observe that the extended GSP prices are not monotonic. An open problem that we pose is the one of finding anonymous monotonic prices for different ad types such that .
4.2 for Extended GSP
In the following, we prove for extended that . In order to prove this result, we need to argue as follows. Assume bidder is matched to slot at price with truthful bid , and let us also assume there is envy for slot at price . If bidder modifies the bid to in order to be matched to , then we have , and therefore ICEnvy is at least as large as ICRegret. We use in the following the simple fact that a slot of higher quality value can only be obtained by increasing , and, symmetrically, a slot of lower quality value can only be obtained by decreasing .
Let us start by proving that the set of tight edges can only be larger if bid is increased (proof appears in the appendix).
Claim 4.3.
Let , and let and the slots assigned to bidder with bids and , respectively. Then, and .
The second claim considers the decrease of bid .
Claim 4.4.
Let and let and , the items assigned to bidder with bids and , respectively. Then, and .
We then argue about the relation between ICRegret and ICEnvy when the bid of bidder is modified.
Lemma 4.5.
Let , and let and the slots assigned to bidder with bids and , respectively. Then .
Proof.
Claim 4.3 shows that the increase of bid yields and . Then, the price can only increase if is increased. ∎
Lemma 4.6.
Let , and let and the items assigned to bidder with bids and , respectively. Then .
Proof.
Claim 4.4 implies that and . We therefore conclude that price is not reduced if is decreased. ∎
We therefore conclude with the following:
Theorem 4.7.
For extended it holds .
5 Measuring Social Welfare Loss with ICEnvy
We proved in the previous sections that ICEnvy is an upper bound on ICRegret for a large class of mechanisms and that they are equal under mild conditions on the bid vector.
We next show that ICEnvy can also be used to measure the efficiency of the auction. We show a direct connection between Social Welfare Loss (SWL) and the ICEnvy experienced by all the bidders. This connection will be proved under the assumption that any bidder is bidding a bid that gives a utility not lower than the truthful strategy, namely . Observe that we do not require the bidders to play a minregret strategy, neither we assume the bid vector to be a Nash Equilibrium. Indeed, assuming that the bidders report a bid that is at least as good as their truthful valuations is not too restrictive, since reporting the truthful value is always a feasible option, whereas computing the minregret strategy is computationally expensive.
The connection between SWL and ICEnvy is proved using the notion of smoothness which has been introduced in [37]. This concept was introduced to prove bounds on the price of anarchy [38] of an auction at the equilibrium. We use a relaxation of the notion of smoothness called semismoothness. Semismoothness has been introduced [32] with the goal of studying the efficiency of a position auctions even off equilibrium.
The notion of semismoothness is defined as follows: Given a bid vector , there exists an alternative bid vector such that
for suitable constants and . In our specific case we have and . The state is actually obtained by setting for each bidder .
In order to prove our result, we extend the following claim proved in [32] for GSP to the extended GSP. We remind to the reader that positions are ordered by non increasing quality value . We denote by the advertiser allocated to slot under bid vector . We denote by the slot allocated to bidder under bid vector . Moreover, Let be the maximum regret that the bidder can experience with respect to the bid , i.e.,
All proofs of this section appear in the appendix.
Claim 5.1.
Fix a valuation profile and an agent . Let us denote the optimal assignment to bidder with truthful bids. Consider any bid profile an define . We claim that
By applying the claim above we derive the following:
(9)  
where the first inequality stems from the fact that the maximum regret of bidder playing is lower bounded by the regret obtained when playing and the second inequality derives from the fact that the MWPM can only decrease if the valuation of a bidder decreases.
In the next claim we show that the regret at is larger than the regret at .
Claim 5.2.
We therefore conclude with the following:
Theorem 5.3.
If then .
6 Using Envy as a Feature
In Sections 3 and 4 we showed that for reasonably large classes of mechanisms, ICRegret can be expressed in terms of ICEnvy and the two quantities are equal when all bids are different. In this section we move beyond linear relationships between envy and regret, and show that using envy as a feature can lead to better ML algorithms. In particular, we’ll show that we can predict regret with reasonable accuracy in auction environments that are far more general than the ones discussed on Section 3.
6.1 Sanity Check
Before we focus on using ICEnvyto predict ICRegret, Figure 1 shows a sanity check to see if ICEnvyis a proxy for ICRegretfor auction mechanisms that aren’t explicitly covered by Theorem 3.1. In Figure 1 we plot ICEnvyagainst ICRegretfor approximately 1M auction bids from a major online publisher (collected on February 20, 2019) in approximately 10K auctions. For each set of bids, we simulate a GFP auction using 10 slots with geometric decaying discount curve. We use GFP because it can be expressed as a Regular Mechanism (according to Def 3.1) but it does not satisfy the payment condition in Theorem 3.1. While ICEnvydoes not equal ICRegret, it is an upper bound for it, and the bound is reasonably tight.
6.2 Using Envy to Predict Regret
We now go beyond the linear relationship of envy and regret and will use the former to predict the latter.
6.2.1 Experimental Setup
Auction Environment. We look at auctions with slots, where different bidders have different monotonically decreasing discount curves over the slots (cf. the Ad Types model in Section 4). In this setting, not all ads can target all slots (as a consequence of the different discount curves, not by assumption), and the greedy allocation algorithm is no longer optimal. The auction mechanism that we consider use the greedy allocation (for each slot from highest to lowest, assign the slot to the unassigned ad with the highest discounted value). Using a greedy algorithm instead of the maxweight bipartite matching algorithm means that the theoretical results from Section 4 do not apply here. The goal is to show that ICEnvy is useful even outside the setting covered by the theory. We consider 2 pricing rules:

Generalized Second Price (GSP). The discounted value of the next highest bidder, i.e. during the greedy algorithm, the nexthighest value ad.

Externality pricing.^{8}^{8}8If the allocation algorithm optimized social welfare, then externality pricing would be VCG pricing, and the resulting auction would have envy and regret. Since greedy isn’t optimal, generally both envy and regret are positive. The social welfare loss of other buyers due to the presence of buyer .
Datasets. We generate the datasets by drawing bids from a lognormal distribution^{9}^{9}9
Realworld bids in online auctions typically follow a lognormal distribution, see e.g.
[35]. and using 3 classes of bidders with geometric discount curves with parameters . For each bidder in an auction, a datapoint corresponds to the envy profile (meaning for each of the 5 slots, the unclamped, possibly negative, envy) and the label is the regret.Baseline. We compare the performance of the ML models trained on envy, with models that were trained using the (value, price) profile (meaning for each slot, what is the discounted value, and what is the current slot price).
Implementation. We use scikitlearn [36]
to train the different models. In particular we use support vector regression (SVR) with the RBF kernel; gradientboosted regression trees (GBRT) with leastsquares loss function, learning rate of
, and trees; and neural nets (NN) with 2 hidden layers (of 100, and 20 nodes each) and Adam solver [29].6.2.2 Results
Figure 2 shows the training and crossvalidation meansquared error (MSE) as a function of the number of training samples for the GBDT. The MSE quickly decreases to about after 30K iterations and remains relatively stable after that.
So using envy, we can construct a model that accurately predicts regret. To show that envy uniquely does this compared to reasonable benchmarks, we compare it against models that were trained using price and discounted value for each slot as features; the results are in Table 1. The models here are trained using 100K datapoints, the point being not to train as accurate as possible of a model, but rather to compare the performance of models trained on different features given an equal amount of data. Across all 3 models, the regressor trained on the envy feature alone does better than one that is trained on both the values and prices for slots. This remains qualitatively true for smaller training data sets as well. None of the regressors in the table are necessarily great, but the goal here is not to tweak a regressor to perform well; rather it is to show that using envy as a feature gives better results across a wide variety of models without tuning the model for this particular case.
Price and Value  Envy  

SVR  
GBRT  
NN 
7 Conclusions
In this paper we proposed to use ICEnvy to give insight in an ad auction in four ways. First, we defined a class of auction mechanisms for position auctions—which includes VCG, GSP, and GFP—where ICEnvy and ICRegret are tightly related. For this class we gave necessary and sufficient conditions for ICEnvy to upperbound ICRegret and mild supplementary conditions under which they are exactly equal. Secondly, we consider the Ad Types setting, with multiple discount curves, and show that a suitable generalization of GSP (as well as VCG) continue to have . Thirdly, we upperbounded the social welfare loss in terms of ICEnvyfor the same sets of mechanisms. We show that the social welfare loss is at most (under a technical condition we introduce in the section). Finally, we used bidding data from a major online publisher to show that ICEnvycan be used as a feature to learn an estimator for ICRegret. The estimator has low MSE, and performs better than comparable estimators that are trained using other features from the auction like values and prices for different slots. For future work, we plan to extend our study of the relationship between ICEnvyand ICRegretto the case of bidders with different ad types. Most importantly, we plan to investigate the existence of a mechanism with monotonic anonymous prices such that . On the more practical side, we plan to use ICEnvyas a feature to learn an estimator of the social welfare of the auction.
References

[1]
Yakov Babichenko and Aviad Rubinstein.
Communication complexity of approximate nash equilibria.
In
Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing
, pages 878–889. ACM, 2017.  [2] Simina Brânzei, Aris FilosRatsikas, Peter Bro Miltersen, and Yulong Zeng. Walrasian pricing in multiunit auctions. In Kim G. Larsen, Hans L. Bodlaender, and JeanFrançois Raskin, editors, 42nd International Symposium on Mathematical Foundations of Computer Science, MFCS 2017, August 2125, 2017  Aalborg, Denmark, volume 83 of LIPIcs, pages 80:1–80:14. Schloss Dagstuhl  LeibnizZentrum fuer Informatik, 2017.
 [3] Jeremy Bulow and Paul Klemperer. Auctions vs. negotiations. Technical report, National Bureau of Economic Research, 1994.
 [4] Ioannis Caragiannis, Christos Kaklamanis, Panagiotis Kanellopoulos, and Maria Kyropoulou. On lowenvy truthful allocations. In International Conference on Algorithmic DecisionTheory, pages 111–119. Springer, 2009.
 [5] Ruggiero Cavallo, Maxim Sviridenko, and Christopher A Wilkens. Matching auctions for search and native ads. In Proceedings of the 2018 ACM Conference on Economics and Computation, pages 663–680. ACM, 2018.
 [6] Ruggiero Cavallo and Christopher A. Wilkens. Gsp with general independent clickthroughrates. In TieYan Liu, Qi Qi, and Yinyu Ye, editors, Web and Internet Economics, pages 400–416, Cham, 2014. Springer International Publishing.
 [7] George Christodoulou and Annamária Kovács. A global characterization of envyfree truthful scheduling of two tasks. In International Workshop on Internet and Network Economics, pages 84–96. Springer, 2011.
 [8] Edith Cohen, Michal Feldman, Amos Fiat, Haim Kaplan, and Svetlana Olonetsky. Envyfree makespan approximation. In Proceedings of the 11th ACM conference on Electronic commerce, pages 159–166. ACM, 2010.
 [9] Edith Cohen, Michal Feldman, Amos Fiat, Haim Kaplan, and Svetlana Olonetsky. On the interplay between incentive compatibility and envy freeness. arXiv preprint arXiv:1003.5328, 2010.
 [10] Riccardo ColiniBaldeschi, Stefano Leonardi, Piotr Sankowski, and Qiang Zhang. Revenue maximizing envyfree fixedprice auctions with budgets. In TieYan Liu, Qi Qi, and Yinyu Ye, editors, Web and Internet Economics  10th International Conference, WINE 2014, Beijing, China, December 1417, 2014. Proceedings, volume 8877 of Lecture Notes in Computer Science, pages 233–246. Springer, 2014.
 [11] Riccardo ColiniBaldeschi, Stefano Leonardi, Piotr Sankowski, and Qiang Zhang. Revenue maximizing envyfree fixedprice auctions with budgets. In International Conference on Web and Internet Economics, pages 233–246. Springer, 2014.
 [12] Riccardo ColiniBaldeschi, Stefano Leonardi, and Qiang Zhang. Revenue maximizing envyfree pricing in matching markets with budgets. In Yang Cai and Adrian Vetta, editors, Web and Internet Economics  12th International Conference, WINE 2016, Montreal, Canada, December 1114, 2016, Proceedings, volume 10123 of Lecture Notes in Computer Science, pages 207–220. Springer, 2016.
 [13] Riccardo ColiniBaldeschi, Stefano Leonardi, and Qiang Zhang. Revenue maximizing envyfree pricing in matching markets with budgets. In WINE 2016, Montreal, Canada, December 1114, 2016, Proceedings, pages 207–220, 2016.
 [14] Riccardo ColiniBaldeschi, Julian Mestre, Okke Schrijvers, and Christopher A. Wilkens. The ad types problem. arXiv, preprint arXiv:1907.04400, 2019.
 [15] Constantinos Daskalakis, Paul W Goldberg, and Christos H Papadimitriou. The complexity of computing a nash equilibrium. SIAM Journal on Computing, 39(1):195–259, 2009.
 [16] Constantinos Daskalakis and Vasilis Syrgkanis. Learning in auctions: Regret is hard, envy is easy. In Foundations of Computer Science (FOCS), 2016 IEEE 57th Annual Symposium on, pages 219–228. IEEE, 2016.
 [17] Benjamin Edelman, Michael Ostrovsky, and Michael Schwarz. Internet advertising and the generalized secondprice auction: Selling billions of dollars worth of keywords. American economic review, 97(1):242–259, 2007.
 [18] Michal Feldman, Amos Fiat, Stefano Leonardi, and Piotr Sankowski. Revenue maximizing envyfree multiunit auctions with budgets. In Proceedings of the 13th ACM Conference on Electronic Commerce, pages 532–549. ACM, 2012.

[19]
Michal Feldman and John Lai.
Mechanisms and impossibilities for truthful, envyfree allocations.
In
Algorithmic Game Theory
, pages 120–131. Springer, 2012.  [20] Zhe Feng, Okke Schrijvers, and Eric Sodomka. Online learning for measuring incentive compatibility in ad auctions. In Proceedings of the 2019 World Wide Web Conference, 2019.
 [21] Amos Fiat and Amiram Wingarten. Envy, multi envy, and revenue maximization. In International Workshop on Internet and Network Economics, pages 498–504. Springer, 2009.
 [22] Lisa Fleischer and Zhenghui Wang. Lower bound for envyfree and truthful makespan approximation on related machines. In International Symposium on Algorithmic Game Theory, pages 166–177. Springer, 2011.
 [23] D Foley. Resource allocation and the public sector. Yale Economic Essays, 7:45–98, 1967.
 [24] Yoav Freund and Robert E Schapire. A decisiontheoretic generalization of online learning and an application to boosting. Journal of computer and system sciences, 55(1):119–139, 1997.
 [25] Andrew V Goldberg and Jason D Hartline. Envyfree auctions for digital goods. In Proceedings of the 4th ACM conference on Electronic commerce, pages 29–35. ACM, 2003.
 [26] Venkatesan Guruswami, Jason D Hartline, Anna R Karlin, David Kempe, Claire Kenyon, and Frank McSherry. On profitmaximizing envyfree pricing. In Proceedings of the sixteenth annual ACMSIAM symposium on Discrete algorithms, pages 1164–1173. Society for Industrial and Applied Mathematics, 2005.
 [27] Jason Hartline and Qiqi Yan. Envy, truth, and profit. In Proceedings of the 12th ACM conference on Electronic commerce, pages 243–252. ACM, 2011.
 [28] Walter Kern, Bodo Manthey, and Marc Uetz. Note on VCG vs. price raising for matching markets. CoRR, abs/1604.04157, 2016.
 [29] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
 [30] Sébastien Lahaie, Andrés Munoz Medina, Balasubramanian Sivan, and Sergei Vassilvitskii. Testing incentive compatibility in display ad auctions. In Proceedings of the 2018 World Wide Web Conference on World Wide Web, pages 1419–1428. International World Wide Web Conferences Steering Committee, 2018.
 [31] Richard J Lipton, Evangelos Markakis, Elchanan Mossel, and Amin Saberi. On approximately fair allocations of indivisible goods. In Proceedings of the 5th ACM conference on Electronic commerce, pages 125–131. ACM, 2004.
 [32] Brendan Lucier and Renato Paes Leme. Gsp auctions with correlated types. In Proceedings of the 12th ACM conference on Electronic commerce, pages 71–80. ACM, 2011.
 [33] Ahuva Mu’alem and Michael Schapira. Setting lower bounds on truthfulness. Games and Economic Behavior, 110:174–193, 2018.
 [34] Roger Myerson. Optimal auctions. 1981.
 [35] Michael Ostrovsky and Michael Schwarz. Reserve prices in internet advertising auctions: a field experiment. EC, 11:59–60, 2011.

[36]
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel,
M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos,
D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay.
Scikitlearn: Machine learning in Python.
Journal of Machine Learning Research, 12:2825–2830, 2011.  [37] Tim Roughgarden. Intrinsic robustness of the price of anarchy. J. ACM, 62(5):32:1–32:42, November 2015.
 [38] Tim Roughgarden, Vasilis Syrgkanis, and Éva Tardos. The price of anarchy in auctions. J. Artif. Int. Res., 59(1):59–101, May 2017.
 [39] Aviad Rubinstein. Inapproximability of nash equilibrium. SIAM Journal on Computing, 47(3):917–959, 2018.
 [40] Sarah Sluis. Big changes coming to auctions, as exchanges roll the dice on firstprice. https://adexchanger.com/platforms/bigchangescomingauctionsexchangesrolldicefirstprice/, 2017. Last accessed: 20190523.
 [41] Sarah Sluis. Google switches to firstprice auction. https://adexchanger.com/onlineadvertising/googleswitchestofirstpriceauction/, 2019. Last accessed: 20190523.
 [42] Bo Tang and Jinshan Zhang. Envyfree sponsored search auctions with budgets. In IJCAI, pages 653–659, 2015.
 [43] Hal R Varian. Equity, envy, and efficiency. 1973.
 [44] Hal R Varian. Position auctions. international Journal of industrial Organization, 25(6):1163–1178, 2007.
Appendix A Handling Unbalanced Graphs and Ties
We conclude the section by showing how to handle unbalanced graphs and ties. If the number of advertisers the number of ties, we add slots, and for all slots let for each new slot . Note that we again have a complete bipartite graph, and that the value of the maxweight bipartite matching hasn’t changed. If the number of slots , we can remove the lowest slots. Due to monotonicity of the discount curves, the lowest slots go unassigned in the maxweight matching, hence they can be safely removed.
Finally, we handle ties in the MWPM (including any ties we introduced by adding new slots). We do that by perturbing by suitable small values the quality values and then computing the unique MWPM on the perturbed values. The returned MWPM is also maximum on the original values. The computed payments differ only by small values from the payment computed on the original quality values. However, we obtain the exact same payments on the original quality values by rounding to the closest multiple of the minimum difference between two values.
More formally, let be the minimum difference between two quality values . Assume the minimum valuation of a bidder to be equal to 1. Let us define for a small constant . We order the quality values of the slots in any order and we increase the th quality value in the order by . This ensures that any two subsets of edges have different total value and therefore the MWPM is unique. The payments of the slots are computed as in Definition 8. The VCG price is obtained by subtracting the values of two sets of edges and therefore the absolute difference of the VCG price for a slot computed on the perturbed values and the VCG price computed on the original values is less than . By summing up the perturbed value of an edge, we increase the difference by at most the largest perturbation. In total, we have a difference that is less than . Therefore, we recover the payments computed on the original quality values by rounding to the closest multiple of .
Appendix B Proofs Section 4
b.1 Proof Claim 4.1
To prove this claim, we first rename the bidders from to following the order of the items matched to the bidders. Bidder is therefore matched to item . Denote by the restriction of a set/vector , , and to elements . For the proof of the claim we crucially use the following fact.
Observation B.1.
The alternating path that connects each bidder to the item with price only traverses items from to .
Proof.
We observe that vectors , form an optimal dual solution for the the problem restricted to bidders and items given that the optimal primal solution is formed by a subset of the MWPM computed on and . The optimality of the solution when restricted to bidders and items yields the following fact: ∎
We can now prove the claim.
Proof of Claim 4.1.
For the base of the induction, the claim is clearly true for bidder . Assume it is true for all bidders , we prove it holds for bidder . Observe that, by the inductive hypothesis, bidder is not tight with any item . Path , , is formed by the edge and then by a path from item to item that traverses only bidders and items . For the inductive hypothesis, by contradiction, assume bidder is matched with a slot such that there exists a lower slot such that . That must mean that there exists two distinct alternating paths and from bidder to item . is the path whose existence is guaranteed by the execution of the Hungarian algorithm. is formed by the the edge followed by the path that connects item to item . Paths and must form a cycle given that only traverses items and only traverses items of , i.e., path is not a subset of path
. Given a cycle of tight edges, we can include in the MWPM either the odd or the even edges of the cycles while the dual variables
and are unchanged. This contradicts the uniqueness of the MWPM and therefore we have a contradiction. ∎b.2 Proof Claim 4.3
Proof.
Given that the quality values are non increasing, we can move from bids to bids by considering a sequence of small increases of the bids. We divide the process in two phases. We first bring the values to the final values , and later, in a second phase, we bring the values to the final values .
For the first phase, we increase by the first values for increasing values of . We prove the claim by showing that the set of tight edges does not contract after an increase on the value of bidder on the first slots. If bidder is not tight with any of the slots in , the proof follows immediately from the solution provided by the Hungarian method since the increase of the bids by does not violate any constraint , , if is small enough. If bidder is tight with at least one of the first slots, we increase by the price of all slots while the utility is not modified. For any slot tight with , it still holds . For all other bidders, we reduce by the utility of each bidder that is not tight with any slot in . We observe that all the tight edges for these bidders are still tight. We do not reduce the utility of all bidders, included, that are tight at least with a slot in and therefore the set of tight edges in is not contracted. We have also proved that the value of cannot decrease for each increase in the values of the bids.
Let us now consider the second phase in which we increase by for values for increasing values of till we reach the final values of the bids. We know by Claim 4.1 that bidder is not tight with any slot for the final values . The increase by of the values will therefore not make any additional edge tight, and the set and the VCG clearing price will stay unchanged.
∎
b.3 Proof Claim 4.4
Proof.
The proof is symmetric to the one of Claim 4.3. We first bring the values to the final values . By Claim 4.1, bidder is not tight with any of the slots in and therefore the decrease of the values of will not affect the values of and . In the second phase, we bring the values to the final values . This second operation will preserve the set of tight edges for all bidders that are tight with some slots and will not decrease the GSP clearing price . ∎
Appendix C Proofs Section 5
c.1 Proof Claim 5.1
Proof.
We consider two cases for the proof:

In a first case, by switching his bid from to , player wins some slot . In this case .

Otherwise, by switching his bid from to , player wins some slot . Given that the mechanism computes a MWPM, the player who wins slot under bidding profile is such that assigning slot to bidder and slot to bidder gives a reward that is strictly larger than assigning slot to bidder with bid . In this second case we have
∎
c.2 Proof Claim 5.2
Proof.
By definition,