Envy, Regret, and Social Welfare Loss

Incentive compatibility (IC) is one of the most fundamental properties of an auction mechanism, including those used for online advertising. Recent methods by Feng et al. and Lahaie et al. show that counterfactual runs of the auction mechanism with different bids can be used to determine whether an auction is IC. In this paper we show that a similar result can be obtained by looking at the advertisers' envy, which can be computed with one single execution of the auction. We introduce two metrics to evaluate the incentive-compatibility of an auction: IC-Regret and IC-Envy. For position auction environments, we show that for a large class of pricing schemes (which includes e.g. VCG and GSP), IC-Envy $\ge$ IC-Regret (and IC-Envy = IC-Regret when bids are distinct). We consider non-separable discounts in the Ad Types environment of Colini-Baldeschi et al. where we show that for a generalization of GSP also IC-Envy $\ge$ IC-Regret. Our final theoretical result is that in all these settings IC-Envy be used to bound the loss in social welfare due advertiser misreports. Finally, we show that IC-Envy is useful as a feature to predict IC-Regret in auction environments beyond the ones for which we show theoretical results. In particular, using IC-Envy yields better results than training models using only price and value features.


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 willingness-to-pay. 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 pay-your-bid model entirely (which has strong incentives to misreport willingness-to-pay) [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: where v i is the true value of advertiser i, b i the bid of i, b −i the bids of other advertisers, and u i (·) the (expected) utility of i. IC-Regret captures the difference in utility between bidding truthfully, and the maximum utility achievable. By definition, IC mechanisms have IC-Regret 0, while higher IC-Regret 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 non-trivial 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 Additionally, when auctions are not IC, bidders don't truthfully report their value, which may harm social welfare 2 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, running-time constraints, bugs in the auction code, and so forth.
Feng et al. [20] proposed a method to determine IC-Regret for publishers (by taking a worstcase perspective over the advertiser value v i ). 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 black-box 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 IC-Regret, we propose to use Envy [23] as a proxy for IC-Regret, by identifying relevant classes of auction mechanisms where Envy and IC-Regret coincide or where IC-Regret 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 click-through rates [17,44]. Let x be an expected allocation vector (where allocation corresponds to the ad being clicked) and p be an expected pricing vector. Envy of bidder i given the outcome (x, p) is: 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 IC-Envy as the Envy experienced in the outcome when a bidder bids truthfully. In the following, let x(v i , b −i ) is the expected allocation of all bidders and p(v i , b −i ) be the expected payment vector of all bidders, when bidder i bids truthfully and for bids b −i of the remaining bidders. IC-Envy is then: In arbitrary auction environments, IC-Envy and IC-Regret don't necessarily coincide. There are natural auction environments with envy-free outcomes, that still have positive IC-Regret and vice versa.
Example 1.1 (IC-Envy = 0, IC-Regret is positive). Consider a single-item, first-price auction, with two bidders with values v 1 = $10 and v 2 = $8 and assume bidder 1 bids truthfully. The IC-Regret for bidder 1 is $2 − for arbitrary small , as the best alternative bid for them is $8 + . However, IC-Envy is $0 as the only alternative allocation for bidder 1 is to not receive the item.
Example 1.2 (IC-Regret = 0, IC-Envy is positive). Consider the IC auction for a single item with 2 bidders who face different reserve prices 3 r 1 = $1 and r 2 = $5. With bids b 1 = b 2 = $3, bidder 1 received the good at their reserve price of $1. Bidder 2 has IC-Envy of $2, but there is no counterfactual bid that will give her positive utility (hence IC-Regret = 0).
While in general IC-Regret and IC-Envy can be quite different, in this paper we show that there are large auction classes for which IC-Regret ≤ IC-Envy (and under mild conditions IC-Regret = IC-Envy). Since computing IC-Envy requires no counterfactual evaluation of the algorithm, it can serve as an efficient certificate that IC-Regret is low. 4 In particular, for the position auction environment [17,44], we show that a large class of payment rules (which includes VCG and GSP), IC-Envy ≥ IC-Regret, and IC-Envy = IC-Regret 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 ) and show that VCG and a generalization of GSP also have IC-Envy ≥ IC-Regret (Section 4). In addition to bouding IC-Regret in terms of IC-Envy, we also use IC-Envy to bound the loss in social welfare loss due to misreports (Section 5), and finally we show empirically that IC-Envy can be used as a feature in an estimator for IC-Regret in auction environments beyond those for which we have theoretical results (Section 6)).

Related Work
We propose to connect IC-Envy and IC-Regret directly by defining a large class of auction mechanisms for which IC-Envy = IC-Regret (and a larger class where IC-Envy ≥ IC-Regret). The line of work that's closest in spirit aims to identify classes of auction mechanisms that are simultaneously envy-free and IC (in our notation: classes for which IC-Regret = IC-Envy = 0). 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 envy-free 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 cycle-monotonicity of the allocation functions that are incentive-compatible and envy free without considering the efficiency of the algorithms.
The notion of envy-freeness was initially introduced by Varian [43] and Foley [23]. The key property of an envy-free 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 envy-free allocation, given the prices for goods, all buyers prefer to buy the bundle that's assigned to them. More recently, the notion of envy-freeness has been deeply studied with a different perspective that involves item-pricing [26,12] and bundle-pricing [21,18,10]. In our setting there is no difference between those two models. A similar line of work focused in studying envy-free algorithms, both in the item-pricing and the bundle pricing models, when the bidders have budget constraints [18,12,10,2,42].
In much of the other related work, envy-freeness 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 envy-freeness and incentive-compatibility in the context of algorithmic learning. In particular, the authors discussed the computational complexity of no-regret learning algorithms and no-envy algorithms in simultaneous second price auctions. Hartline and Yan [27] studied the relation between envy-freeness and incentive compatibility in revenue-maximizing prior-free mechanisms. Lipton et al. [31] investigated envy-free 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.

Our Contributions
This paper has 4 main contributions: 1. First, in Section 3, we define a class of auction mechanisms-which includes VCG, GSP, and GFP for position auctions-where IC-Envy is tightly related to IC-Regret. For this class we give necessary and sufficient conditions for IC-Envy ≥ IC-Regret and mild supplementary conditions under which they are exactly equal.
2. Secondly, in Section 4 we consider the more general Ad Types auction environment [14] in which different ads have different discount curves. We show that for VCG and a suitable generalization of GSP it still holds that IC-Envy ≥ IC-Regret.
3. Third, in Section 5, we upperbound the social welfare loss in terms of IC-Envy for the same sets of mechanisms introduced in Sections 3 and 4. We show that in equilibrium, the social welfare loss is at most 4 · IC-Envy (under a technical condition we introduce in the section).
4. Finally, in Section 6, we use bidding data from a major online publisher to show that IC-Envy can be used as a feature to learn an estimator for IC-Regret. 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.

Preliminaries
There are n bidders and m slots. Let I be the set of bidders and J be an (ordered) set of slots. Each bidder i ∈ I has a valuation vector v i = v i,1 , v i,2 , . . . , v i,m that is the willingness to pay of bidder i for each slot j, with v i,1 ≥ v i,2 ≥ . . . ≥ v i,m , and are unit demand. In the standard position auction environment, slots have common quality factor α 1 ≥ α 2 ≥ . . . ≥ α m such that for each bidder i and slot j we have v i,j = v i · α j for private value v i ∈ R of the bidder. In the Ad Types setting, each ad has a type θ and for each type there is a separate discount curve α θ,1 ≥ α θ,1 ≥ ... ≥ α θ,m . Note that when there's is only a single type, the setting specializes to the position auction environment. Unless specified differently, let θ i refer to the type of ad i. The slots are allocated to the bidders by a (direct-revelation) mechanism M. The mechanism M is defined by an allocation function A : R n → N n and a payment function P : R n → R n . Since bidders' values v i are private, the mechanism solicits bids b i to represent the values, though reports may not be truthful. Let v be the valuation vector of all the bidders and b the bid vector. After receiving the bids from all the bidders, the mechanism M = A, P computes an outcome X, p , i.e., A(b) = X and P(b) = p.
X describes the allocation of the slots to the bidders and p describes how much each bidder is charged for the obtained slot. In particular, X = X 1 , X 2 , . . . , X n where X i = j, if the bidder i obtains the slot j and 0 if she does not receive any slot. And p = p 1 , p 2 , . . . , p n where p i ∈ R ≥0 is the price that the bidder i pays for slot X i .
For an allocation X and a valuation vector v, the social welfare of the allocation . When the valuation vector v is clear from the context, we will use SW (X), SW OP T , and SW L(X). When the mechanism M and the truthful valuation vector v is clear from context to we use SW (b), SW OP T , and SW L(b) with the understanding that X = A(b).
Given an outcome X, p , the utility of a bidder i with type Since the outcome of a mechanism M is a function of the bids, and the auctions we consider are not necessarily IC, bidders may be incentivized to report a type b different from v in order to produce an outcome with higher utility.
IC-Regret. IC-Regret describes the outcome for bidding truthfully, compared to the optimal alternative bid (given constant competition b −i ). Formally, the regret of a bidder i for bidding truthfully compared to a specific alternative bid b i is: which is used in the formal definition for IC-Regret.
IC-Envy. Given an allocation X and payments p, 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 IC-Envy as Envy with respect to the allocation X and payments p when bidder i bids truthfully. IC-Envy is some notion of fairness of the produced outcome whereas IC-Regret measures how much the underlying mechanism incentives misreported types.
Formally, for given an allocation X and payments p, the envy that bidder i experiences compared to bidder j is and the envy of bidder i in the outcome X, p is which is used in the formal definition for IC-Envy.
Note that computing IC-Envy requires one single execution of the auction whereas the computation of IC-Regret requires the execution of the auction for multiple bid values of each bidder.

Position Auction Environments
As stated before, IC-Envy and IC-Regret measure different things: IC-Envy provides some measure of fairness of the outcome, whereas IC-Regret measures the incentive-compatibility of the mechanism. In this section, we focus on position auctions that are widely used in search and feed advertising. 7 We give in the following the definition of regular mechanism for position auctions and we characterize the class of regular mechanisms that have IC-Envy ≥ IC-Regret. We assume wlog that the bidders are ordered by non-increasing bid b i , with ties broken lexicographically. Therefore, slot i is assigned to bidder i. 1. Slots are assigned in order of non-increasing α i to bidders ordered by non-increasing bid value b i . Ties are broken lexicographically.
2. The payment for bidder i is p i = n k=1 a i,k · b k with non negative coefficients a i,k ≥ 0.
• GFP: 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 i, Lemma 3.1. For a regular mechanism for position auctions the following properties hold i Individual Rationality; 7 In display advertising it is more common to sell ad slots one-by-one, which is a special case of position auctions, though one which is arguably mathematically less interesting.
if and only if, for each slot i, • a i,k = 0, k = 1, . . . , i, and Proof. We start by proving the necessity of the first condition of the claim. Conditions a i,k = 0, k = 1, . . . , i − 1 are needed to ensure the individual rationality of the mechanism. Indeed, if there exists a coefficient a i,k > 0, k < i, any bidder i with v i < a i,k b k will be charged more than its valuation, thus violating individual rationality. Condition Next, we prove that the second condition of the claim is sufficient. We first prove that regret and envy are 0 for all slots j < i. For envy, we derive: with the last inequality obtained by the second condition on the payments. For regret, note that for a bid b i such that Envy and regret for bidder i can only be positive for a slot j > i. if slot j can be obtained from bidder i by decreasing her bid to a value b i , then, given the first condition of the theorem, the payment charged to agent i for a bid b i that gives him slot j ≥ i is exactly equal to the payment charged to the bidder that received slot j under bid vector The reason is that, all the bids b j+1 , . . . , b n that determine the payment are unchanged.
However, not all slots j > i can be obtained from bidder i by decreasing her bid since ties are broken lexicographically. If there exists a slot j > i that cannot be obtained from bidder i for any bid b i < v i , then we have still the possibility that e j i (X, p) The part where the strict inequality IC-Envy(v i ) > IC-Regret(v i ) came in was due to the lexicographic tie-breaking when there are ties. When bids are distinct this case disappears and IC-Envy Proof. In addition to the necessary conditions of Lemma 3.1 we prove that is also necessary condition for IC-Regret(v i ) = IC-Envy(v i ). By contradiction, consider the largest value of i such that p i − p i+1 < (α i − α i+1 )b i+1 . Bidder i + 1 will envy the allocation of bidder i since the marginal utility of having allocated slot i instead of slot i + 1 is positive. On the other hand, increasing the bid of bidder i + 1 to obtain slot i will have negative regret for bidder i + 1 if bid b i is enough bigger than bid b i+1 and therefore the payment of p i will be increased more than the marginal utility of bidder i + 1 for slot i.
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 j > X i , there exists a bid b i such that A(b , b −i ) produces X i = j, and the payment is exactly equal to the payment charged to the bidder that received slot j under bid vector b = (v i , b −i ). Therefore IC-Regret(v i ) = IC-Envy(v i ). Lemma 3.1 and Theorem 3.2 hold for mechanisms like VCG, GSP, and any combination of the two. The first condition is clearly true for the two mechanisms. The second condition is true with On the contrary, even the first condition of the theorem is violated for GFP.

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 Colini-Baldeschi et al. [14]. Each bidder i ∈ I is associated with a vector α i,1 , . . . , α i,m of non-increasing quality values for the m slots. The valuation of bidder i on slot j is v i,j = v i · α i,j . Valuation v i remains private information of the bidders, while the mechanism knows the quality value vectors α i for each bidder i.
The social-welfare maximizing allocation is obtained by solving the Max-Weight Perfect Matching (MWPM) problem, for example by using the Hungarian method. This returns a perfect matching M together with a dual certificate of its optimality. The certificate is a dual price vector p for the m slots J and a dual utility vector q for the n bidders I, such that the value of the optimal solution is equal to i p i + j q j , i.e., the sum of the prices of the slots plus the sum of the utilities of the bidders. If bidder i is matched to slot j, the dual constraint p j + q i ≥ v i,j holds with equality. Let E = be the set of tight edges in the final solution. The MWPW M is therefore a subset of E = .
In the exposition, we assume that the number of ads n is equal to the number of slots m and that the matching M is unique for each instance of the problem. This can be achieved by first adding slots if n > m that each bidder values at 0 or by removing the lowest slots if n < m, 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]: 1. Wlog, the Hungarian algorithm can output dual prices p that are pointwise minimal over feasible dual solutions of the max-weight allocation [14].
2. For the minimal dual prices, prices p j , j = 1, . . . , m of the slots are non increasing, and the final slot is free: p m = 0.
3. For the minimal dual prices, each bidder j is connected with an alternating path P j ⊆ E = to an item j with price p j = 0 [28].
4. 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).

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: 1. Prices are monotonically non increasing, i.e., for each bidder i, slots of lower quality do not have higher price;

IC-Envy ≤ IC-Regret
The first property is an obvious requirement since the discount curves of all the bidders are non-increasing. Observe that in this setting, VCG prices satisfy both constraints trivially since IC-Envy = IC-Regret = 0, 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 (10,9,8), (7, 6, 4)(4, 0, 0). The threshold prices of the three slots are p 1 = 2, p 2 = 3, p 3 = 0. For the first slot, we need to reduce the valuation of bidder 3 to 2 in order to have the first two slots assigned to bidders 1 and 2 for a total value of 16. For the second slot, if we scale down by 1/2 the bid of bidder 2 (we are in a single parameter setting) and we bring the values of bidder 2 to (3.5, 3, 2), it is convenient to assign slot 2 to bidder 1 instead of bidder 2 that is now assigned to slot 3.
Extended GSP. The extended GSP pricing scheme prices slots based on the the analysis of the set E = of tight edges connecting a bidder i with the slot of price 0. Indeed, the standard GSP mechanism with bidders of only one ad type prices each slot i at the value of bidder i + 1 for slot i, and the highest value of a tight edge on the alternating path from bidder i to slot m with price p m = 0.
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 (10,9,8), (7, 6, 4)(4, 0, 0). The optimal VCG solution will match the bidders according to the order 3, 2, 1 and will charge p 1 = 2, p 2 = 1, p 3 = 0. We also observe that bidder 1 is tight with slots 1 and 2. However, the values of bidder 1 for slots 1 and 2 are higher than the values of bidders 3 and 2, respectively. Bidder 2 is also tight with slot 1 but his value is higher than the value of bidder 3 that has assigned slot 1. 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 b for the n bidders.
i.e., the maximum value smaller than b i,j of an edge in E = j . We assume t i,j = 0 if no edge in E = j has value smaller than b i,j . We define the extended GSP price of bidder i for slot j by Observe that the prices are non-anonymous 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 IC-Envy ≥ IC-Regret. Any larger value of the payment of bidder i for item j can only depend on the bid of bidder i. If we had this dependence, bidder i can decrease his payment by decreasing the bid and therefore IC-Regret would be higher than IC-Envy.
We first observe the following: Proof. Monotonicity follows directly from the definition of extend VCG prices by observing that VCG clearing prices p j are non increasing, E = j ⊆ E = j−1 , and, finally, α i 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 IC-Envy ≥ IC-Regret.

IC-Envy ≥ IC-Regret for Extended GSP
In the following, we prove for extended GSP that IC-Envy ≥ IC-Regret. In order to prove this result, we need to argue as follows. Assume bidder i is matched to slot j at price gsp i,j with truthful bid b i = v i , and let us also assume there is envy for slotj at price gsp i,j . If bidder i modifies the bid tob i in order to be matched toj, then we haveg sp i,j ≥ gsp i,j , and therefore IC-Envy is at least as large as IC-Regret. We use in the following the simple fact that a slot of higher quality value can only be obtained by increasing b i , and, symmetrically, a slot of lower quality value can only be obtained by decreasing b i .
Let us start by proving that the set of tight edges E = j can only be larger if bid b i is increased (proof appears in the appendix).  We then argue about the relation between IC-Regret and IC-Envy when the bid b i of bidder i is modified.  Proof. Claim 4.4 implies thatẼ = j = E = j and pj =pj. We therefore conclude that price gsp(i,j) is not reduced if b i is decreased.
We therefore conclude with the following: Theorem 4.7. For extended GSP it holds IC-Regret ≤ ICEnvy.

Measuring Social Welfare Loss with IC-Envy
We proved in the previous sections that IC-Envy is an upper bound on IC-Regret for a large class of mechanisms and that they are equal under mild conditions on the bid vector.
We next show that IC-Envy can also be used to measure the efficiency of the auction. We show a direct connection between Social Welfare Loss (SWL) and the IC-Envy experienced by all the bidders. This connection will be proved under the assumption that any bidder i is bidding a bid b i that gives a utility not lower than the truthful strategy, namely Observe that we do not require the bidders to play a min-regret strategy, neither we assume the bid vector b 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 min-regret strategy is computationally expensive.
The connection between SWL and IC-Envy 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. Semi-smoothness has been introduced [32] with the goal of studying the efficiency of a position auctions even off equilibrium.
The notion of semi-smoothness is defined as follows: Given a bid vector b, there exists an alternative bid vector b such that for suitable constants λ and µ. In our specific case we have λ = 1/2 and µ = 1. The state b is actually obtained by setting for each bidder b i = v i /2.
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 α j . We denote by π(b, j) the advertiser allocated to slot j under bid vector b. We denote by X(b, i) the slot allocated to bidder i under bid vector b. Moreover, Let R i (b i , b −i ) be the maximum regret that the bidder i can experience with respect to the bid b i , i.e., All proofs of this section appear in the appendix.
Claim 5.1. Fix a valuation profile v and an agent i. Let us denote j = X(v, i) the optimal assignment to bidder i with truthful bids. Consider any bid profile b an define b i = v i /2. We claim that By applying the claim above we derive the following: where the first inequality stems from the fact that the maximum regret of bidder i playing b i is lower bounded by the regret obtained when playing b i 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 v i is larger than the regret at b i .
We therefore conclude with the following:

Using Envy as a Feature
In Sections 3 and 4 we showed that for reasonably large classes of mechanisms, IC-Regret can be expressed in terms of IC-Envy 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.

Sanity Check
Before we focus on using IC-Envyto predict IC-Regret, Figure 1 shows a sanity check to see if IC-Envyis a proxy for IC-Regretfor auction mechanisms that aren't explicitly covered by Theorem 3.1. In Figure 1 we plot IC-Envyagainst IC-Regretfor 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 IC-Envydoes not equal IC-Regret, it is an upper bound for it, and the bound is reasonably tight.

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.

Experimental Setup
Auction Environment. We look at auctions with 5 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 max-weight bipartite matching algorithm means that the theoretical results from Section 4 do not apply here. The goal is to show that IC-Envy 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 next-highest value ad.
• Externality pricing. 8 The social welfare loss of other buyers due to the presence of buyer i.
Datasets. We generate the datasets by drawing bids from a lognormal distribution 9 and using 3 classes of bidders with geometric discount curves with parameters α 1 = 0.9, α 2 = 0.7, α 3 = 0.5. 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 scikit-learn [36] to train the different models. In particular we use support vector regression (SVR) with the RBF kernel; gradient-boosted regression trees (GBRT) with least-squares loss function, learning rate of 0.1, and 100 trees; and neural nets (NN) with 2 hidden layers (of 100, and 20 nodes each) and Adam solver [29].    Figure 2 shows the training and cross-validation mean-squared error (MSE) as a function of the number of training samples for the GBDT. The MSE quickly decreases to about 0.02 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.

Conclusions
In this paper we proposed to use IC-Envy 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 IC-Envy and IC-Regret are tightly related. For this class we gave necessary and sufficient conditions for IC-Envy to upperbound IC-Regret 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 IC-Envy ≥ IC-Regret. Thirdly, we upperbounded the social welfare loss in terms of IC-Envyfor the same sets of mechanisms. We show that the social welfare loss is at most 4 · IC-Envy (under a technical condition we introduce in the section). Finally, we used bidding data from a major online publisher to show that IC-Envycan be used as a feature to learn an estimator for IC-Regret. 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 IC-Envyand IC-Regretto 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 IC-Envy ≥ IC-Regret. On the more practical side, we plan to use IC-Envyas a feature to learn an estimator of the social welfare of the auction.

B Proofs Section 4 B.1 Proof Claim 4.1
To prove this claim, we first rename the bidders from 1 to m following the order of the items matched to the bidders. Bidder i is therefore matched to item i. Denote by X ≥i the restriction of a set/vector I, J, p and q to elements [i + 1, . . . , m]. For the proof of the claim we crucially use the following fact.
Observation B.1. The alternating path P i ⊆ E = that connects each bidder i to the item m with price p m = 0 only traverses items from i to m.
Proof. We observe that vectors p ≥i , q ≥i form an optimal dual solution for the the problem restricted to bidders I ≥i and items J ≥i given that the optimal primal solution is formed by a subset of the MWPM computed on I and J. The optimality of the solution when restricted to bidders and items ≥ i 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 m. Assume it is true for all bidders I ≥i+1 , we prove it holds for bidder i. Observe that, by the inductive hypothesis, bidder k is not tight with any item > k. Path P k , k > i, is formed by the edge (k, k) and then by a path from item k to item m that traverses only bidders I >k and items J >k . For the inductive hypothesis, by contradiction, assume bidder i is matched with a slot i such that there exists a lower slot k ≥ i such that (i, k) ∈ E = . That must mean that there exists two distinct alternating paths P i ⊆ E = and P i ⊆ E = from bidder i to item m. P i is the path whose existence is guaranteed by the execution of the Hungarian algorithm. P i is formed by the the edge (i, k) followed by the path that connects item k to item m. Paths P i and P i must form a cycle given that P i only traverses items ≥ i and P i only traverses items of ≥ k, i.e., path P i is not a subset of path P k . 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 p and q 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 α i,j are non increasing, we can move from bids b i,1 , . . . , b i,m to bidsb i,1 , . . . ,b i,m by considering a sequence of small increases of the bids. We divide the process in two phases. We first bring the values b i,1 , . . . , b i,j to the final valuesb i,1 , . . . ,b i,j , and later, in a second phase, we bring the values b i,j+1 , . . . , b i,m to the final valuesb i,j+1 , . . . ,b i,m .
For the first phase, we increase by the first k values b i,1 , . . . , b i,k for increasing values of k ≤j. We prove the claim by showing that the set E = j of tight edges does not contract after an increase on the value of bidder i on the first k slots. If bidder i is not tight with any of the slots in {1, . . . , k}, the proof follows immediately from the solution provided by the Hungarian method since the increase of the bids by does not violate any constraint q i + p l ≥ b i,l , l = 1, . . . , k, if is small enough. If bidder i is tight with at least one of the first k slots, we increase by the price of all slots [1, . . . , k] while the utility q i is not modified. For any slot l ∈ [1, k] tight with i, it still holds q i + p l = b i,l . For all other bidders, we reduce by the utility q i of each bidder i that is not tight with any slot in [k + 1, . . . , m]. We observe that all the tight edges for these bidders are still tight. We do not reduce the utility of all bidders, i included, that are tight at least with a slot in [k + 1, . . . , m] and therefore the set of tight edges in E = j is not contracted. We have also proved that the value of pj 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 b i,j+1 , . . . , b i,j+k for increasing values of k till we reach the final values of the bids. We know by Claim 4.1 that bidder i is not tight with any slot k >j for the final valuesb i,1 , . . . ,b i,m . The increase by of the k values b i,j+1 , . . . , b i,j+k will therefore not make any additional edge tight, and the set E = j and the VCG clearing price p j 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 b i,j+1 , . . . , b i,m to the final valuesb i,j+1 , . . . ,b i,m . By Claim 4.1, bidder i is not tight with any of the slots in [j + 1, . . . , m] and therefore the decrease of the values ofb i,j+1 , . . . ,b i,m will not affect the values of E = j and pj. In the second phase, we bring the values b i,1 , . . . , b i,j to the final valuesb i,1 , . . . ,b i,j . This second operation will preserve the set Ej of tight edges for all bidders that are tight with some slots k >j and will not decrease the GSP clearing price pj.
C Proofs Section 5 C.1 Proof Claim 5.1 Proof. We consider two cases for the proof: 1. In a first case, by switching his bid from b i to v i /2, player i wins some slot k ≤ X(v, i). In this case u i (v i /2, b −i ) ≥ 1/2α i,X(v,i) v i .

2.
Otherwise, by switching his bid from b i to b i = v i /2, player i wins some slot k ≤ X(v, i). Given that the mechanism computes a MWPM, the player who wins slot j = X(v, i) under bidding profile (v i /2, b −i ) is such that assigning slot j to bidder π((v i /2, b −i ), j) and slot X((v i /2, b −i ), i) to bidder i gives a reward that is strictly larger than assigning slot X(v, i) to bidder i with bid b i = v i /2. In this second case we have

C.2 Proof Claim 5.2
Proof. By definition, where the last inequality follows from u ) that stems for the fact that bid b i has a regret smaller that truthful strategy v i .

C.3 Proof Theorem 5.3
Proof. The proof follows since by Theorem 3.1 and Claim 5.2, we obtain with the second to last inequality following from SW OP T (v) ≥ 8SW (b).