Constructing Data Transaction Chains Based on Opportunity Cost Exploration
Abstract.
Data trading is increasingly gaining attention. However, the inherent replicability and privacy concerns of data make it challenging to directly apply traditional trading theories to data markets. This paper compares data trading markets with traditional ones, focusing particularly on how the replicability and privacy of data impact data markets. We discuss how data’s replicability fundamentally alters the concept of opportunity cost in traditional microeconomics within the context of data markets. Additionally, we explore how to leverage this change to maximize benefits without compromising data privacy. This paper outlines the constraints for data circulation within the privacy domain chain and presents a model that maximizes data’s value under these constraints. Specific application scenarios are provided, and experiments demonstrate the solvability of this model.
Contents
1. Introduction
Over the past few decades, the pricing and trading of the data, as well as the associated trading markets, have experienced rapid development. There have been many relevant research results, see (Zhang et al., 2023; Pei, 2020).
The design of market mechanisms for data trading is one of the popular research directions recently, with an increasing number of studies focusing on this area. Unlike traditional market trading, the data elements can be replicated at a low cost and the privacy of the data elements need to be protected. It leads to traditional trading mechanisms being impossible to fully graft onto the data transactions. In (Agarwal et al., 2019), the authors introduce an effective data trading mechanism, which gives the strategies for matching buyers and sellers as well as how the market interacts. Additionally, the authors present a robust-to-replication algorithm, ensuring that even if the traded data is replicated, it will not affect its market pricing. In (Chen et al., 2022), the authors introduce another data trading mechanism to prevent the devaluation of the seller’s data after replication. This method involves the seller initially presenting a portion of the data to the buyer as sample data along with a selling price. Then the buyer conducts Bayesian inference to predict the accuracy and quality of the data via the corresponding prior knowledge, thus determining whether to purchase the data at the offered price or not. In terms of privacy protection, (Amiri et al., 2023) presents a trading mechanism that not only protects data privacy but also allows the seller to demonstrate the quality of the data to the buyer. In this paper, the quality of the data depends on the relevance of the sold data to the buyer’s needs. This mechanism incorporates the traditional privacy protection method, i.e., principal component analysis, see also (Mangoubi et al., 2022; Leake et al., 2021).
The valuation of data points, which involves assessing and ranking the importance of each data point within a dataset, is also a crucial aspect of data trading. The most classic data valuation method is the Shapley value method from traditional game theory(Jia et al., 2019; Ghorbani and Zou, 2019), i.e., viewing each data point as a cooperating member, the importance of each data point is evaluated based on the trained model accuracy. We refer to the Shapley value method in Section 5. In (Wang et al., 2020), the authors proposed a valuation algorithm that combines the Shapley value with federated learning. In this case, federated learning ensures data privacy on the client servers, while Shapley value calculation guarantees fairness in data valuation.
We consider the transaction process on a data chain. In (Karlaš et al., 2022), the authors present a data valuation algorithm for assessing the value of each data point at different positions in the data processing chain. The advantage of this algorithm is that the authors no longer focus on a single model training scenario, but rather separate the modeling process for discussion. In (Yu et al., 2023), the authors model the transaction process between nodes as a Markov decision process and use reinforcement learning algorithms for multiple transactions to find the optimal data pricing mechanism.
Our contribution There has been fruitful research on the design of data trading market mechanisms and the valuation of data and models. However, most of them overlook the differences between the data trading market and the traditional trading market, which are influenced by data replicability and privacy, and due to these differences, how to construct models to maximize the benefits for the supply-side nodes. We give two main aspects in this paper. Firstly, the trading field of the data is limited by the privacy. Also, we consider the data trading path to be chain-like in this paper. Due to the replicability, for each node on the data chain, selling the training model to the market, and selling the data itself to the downstream node, which is then used by the downstream node to train the model for sale to the market, are not mutually exclusive. It leads to differences in the opportunity cost of data transactions compared to the opportunity cost proposed in classic microeconomic theory. To the best of our knowledge, we are the first to discuss the opportunity cost in data transactions.
2. Motivation
In microeconomic theory, the concept of opportunity cost is a prevalent notion. It reveals the value that is given up in order to obtain the higher value from the selected opportunity, see (Buchanan, 1991).
We consider the opportunity cost in the traditional industry. The seller has several options to make a profit, such as selling the product directly to the market, or reprocessing the product to obtain a higher unit price and then selling it to the market, along with other options within legal and other limitations, see Figure 1. Rational sellers will always choose the option with the highest total revenue, and the next best alternative not chosen represents the corresponding opportunity cost.
![Refer to caption](extracted/5522854/Picture_1.png)
In the data transaction, such a trade-off naturally exists. However, unlike traditional scenarios, data has two distinctive characteristics, replicability and privacy. The replicability determines that some transaction options are not mutually exclusive. For instance, sellers can both sell the data to others and train the model by themselves at the same time. Selling data to others will result in multiple models based on the same dataset being sold in the market subsequently, and leads to competition. At this point, the seller chooses between two options: directly training models for sale or selling the data to others while simultaneously training models for sale, see Figure 2. The option not chosen represents the corresponding opportunity cost.
Privacy determines that it is also necessary to consider the privacy protection of the data in the transaction. For instance, it is not allowed to sell the data to the market directly even if it generates more revenue, since it leads to data privacy leakage.
![Refer to caption](extracted/5522854/Picture_2.png)
Remark 2.1 ().
In this paper, we assume the privacy of the data must not be compromised in any way. However, in practical scenarios, such as in communication contexts, this condition may not be entirely achievable. In (Shokri et al., 2012), the authors present a strategy for customers to obtain more accurate services by disclosing partial location privacy to the service provider. Moreover, the customers’ disclosure of one-unit privacy in exchange for a one-unit improvement in service is referred to as the shadow price of service.
Remark 2.2 ().
In the data transaction situation, the data can be directly traded within the scope of privacy permissions, or it can be used to train and trade models afterward. Also, both the circulation of data itself and the circulation of models coexist. Then it is hard to distinguish the supply-side and the demand-side. In this paper, for a fixed dataset , we define the supply-side as the field that allows data to circulate directly, and we define the demand-side as the field that can only purchase the trained models.
3. Modeling
In this paper, we focus on designing a mechanism for a data transaction chain to maximize the total revenue, see Figure 3.
![Refer to caption](extracted/5522854/Picture_3.png)
Let be a data transaction chain, and initially, the node possesses a dataset . The notations we use are shown in Table 1.
There are two options for making profits, i.e., training and selling model to market and selling dataset to . The revenue with the transaction not happening of node is . Also, the revenue with the transaction is . The transaction happens only if the node obtains higher revenue, i.e.,
In ’s perspective, the trading between and happens if and only if the revenue surpasses the cost, i.e.,
The transaction between and happens if and only if the solution set of is non-empty, i.e.,
Similarly, the trading between and happens if and only if, in ’s perspective, the revenue with trading happening exceeds the revenue without trading happening, i.e.,
and in ’s perspective, the revenue surpasses the cost, i.e.,
In this case, the transaction between and happens if and only if the solution set of is non-empty, i.e.,
(1) |
Remark 3.1 ().
We give an alternative perspective on this mechanism. From the inter-node transaction’s perspective, (1) provides a necessary and sufficient condition for this transaction to be achieved. Moreover, after re-arranging (1), we have
It mentions that, from the data transaction chain’s perspective, the necessary and sufficient condition for dataset flowing in this arrow is that the difference in profit between node trading and non-trading can cover the downstream node’s model training cost.
Now we give the model. Our goal is to maximize the total revenue within the constraints of (). Also, we need to add the constraints that the trade between and happens. We have
(2) | |||
Remark 3.2 ().
In the previous context, we assume that the training of models in downstream nodes depends on the training results of upstream nodes, meaning that all nodes involved in the data transaction train the data. However, there is another possible scenario in real-world settings that, upstream nodes can choose to sell data directly to downstream nodes. Additionally, downstream model training relies solely on the data itself rather than the training results of upstream nodes. In this case, upstream nodes can assess whether the revenue for selling the model can cover the training cost if they sell the data to downstream nodes simultaneously. The corresponding programming is
Remark 3.3 ().
In some cases, can be reflected as a function of the cost , since both and are related to the model ’s accuracy . We define
Also, by Bayesian inference, we have
It leads to
where is the accuracy profile of the node and and are prior knowledge. Then we have
The method we utilized is referred from (Chen et al., 2022).
4. Optimization
In Section 3, the general data chain optimization model is given. In this section, we consider two simple examples, where is a linear function of , and the cost constraints can be expressed in the form of matrix inequalities, i.e., where is an matrix, and . We define where .
4.1. Linear programming and shadow price
In this case, (2) can be written as
Remark 4.1 ().
We consider the case where and the corresponding dual linear programming is
where , and
This linear programming model solves for minimizing the overall model training cost while ensuring the profit for each node. The cost required for increasing the profit by one unit for each node is the corresponding shadow price.
4.2. Non-linear programming and Lagrange duality
We consider the programming in Remark 3.2 where
(3) | |||
Note that this optimization model is not convex, then we can use Lagrange duality to find a lower bound of the optimal solution. We consider the equivalent form of model (3). We recall and we have
where , and .
The corresponding Lagrange function is
We define and
Since the domain of can be divided into parts and each part can be defined as, let and be a subset of ,
Then can be rewritten as, in the domain ,
Proposition 4.2 ().
In the domain , the Lagrange dual function of is
where
Proof.
We have
If , the corresponding coefficient of is
If , the corresponding coefficient of is
If , the corresponding coefficient of is
The constant term in is
and this proposition is proved. ∎
5. Experiments
5.1. Method
We consider data transaction chain , and initially, the node possesses dataset . In this section, each node trains the model to calculate the Shapley value of each data point in and sells it to the market.
We recall the data valuation using the Shapley value, see also (Jia et al., 2019). Given a dataset consisting of data points, let () be a utility function that reflects the data value of . The Shapley value of a data point can be written as
or
where is the set of members which precede member in a permutation .
Note that it is necessary to train all possible combinations of data points and calculate their marginal contributions. Assume that there are data points in the dataset , and we define a partition where . We assume that the node can train a model with a dataset of size at most . We have Algorithm 1. In this algorithm, we use Monte Carlo sampling to approximate the Shapley value, and at the same time, each node also computes a corresponding value vector for the data points. However, the precision of the results from the intermediate nodes is lower than the precision of the results from the terminal node. We define the accuracy of each node as (). Also, we specify the unit price of each model based on the corresponding accuracy.
5.2. Experimental setup and results
We use Wine(Aeberhard et al., 1994), Cancer(Street et al., 1993), and Adult(Kohavi, 1996) datasets. The size of each dataset and the corresponding partition are shown in Table 2.
Referring to the accuracy of the trained model in Algorithm 1, we give the price for each model where . Also, we use and (), and if the node is not the terminal node and if the node is the terminal node. We use corresponding to the Wine, Cancer, and Adult datasets respectively. Based on these parameters, we have the results in Table 3.
Remark 5.1 ().
We consider (4) because our primary concern is to ensure the existence of the solution, i.e., the constraint space is non-empty. Additionally, we note that the results of these three experiments maximizing the total profit are all generated as the dataset flows to the terminal node. However, whether this result holds in any arbitrary scenario requires further research. Therefore, we propose a hypothesis: The longer the dataset is traded along the data chain, the greater the total profit made.
5.3. Error analysis
The goal of this subsection is to compare the error with the models in different nodes with the same round , i.e., the number of the permutations being sampled in Algorithm 1. We recall the Bennett inequality at first.
Lemma 5.2 ().
(Bennett inequality(Bennett, 1962))Let be the independent random variables with and , then we have
where and .
By abuse of notation, we define . As node can select up to data points for model training, the strategy for node to calculate the Shapley value is to first select points from the dataset, and then compute the marginal contribution for each data point. Note that when the number of data points is less than , we directly utilize the computation results of node to save computational costs. Let be the corresponding approximation value. A similar approximation algorithm is mentioned in (Liu et al., 2023), and we refer to the error analysis computation therein. Also, for the sample value of the marginal contribution from data point , we assume .
We denote be the indicator of whether the data point has been chosen or not, i.e.,
Let , we have
and
using Bennett’s inequality and the error analysis in (Liu et al., 2023),
6. Conclusion
This paper compares the differences between the data transaction market and traditional transaction markets due to the replicability and privacy of data, especially focusing on the differences in opportunity costs. We introduce a chain-like data transaction scenario and a linear programming model based on opportunity cost comparison. In the experimental section, a data trading scenario based on computing and trading the Shapley value of each data point is given, along with providing the solution and error analysis of the models from the nodes.
7. Limitations and Outlook
This paper exists three limitations, which could be further studied. We assume the sales volume of the model in the market is a linear function of the corresponding training cost. However, in real-world scenarios, the relationship between the two is more complex. Whether the constructed model corresponds to a convex optimization problem, and how the model is solved, need to be further studied.
Secondly, we provide a chain-like data trading mechanism. However, in real-world scenarios, downstream nodes often receive datasets from different upstream nodes for model training, such as in federated learning. Therefore, how our constructed data trading process integrates with the federated learning scenario is also a question.
Thirdly, in data trading, we always assume that data is completely traded. However, downstream nodes can also choose to purchase partial data. For instance, we can refer to the algorithm design in (Yu et al., 2023) to frame the trade between two nodes as a Markov decision process, utilizing reinforcement learning algorithms to find the optimal data trading ratio and strategy.
References
- (1)
- Aeberhard et al. (1994) Stefan Aeberhard, Danny Coomans, and Olivier de Vel. 1994. Comparative analysis of statistical pattern recognition methods in high dimensional settings. Pattern Recognition 27, 8 (1994), 1065–1077. https://doi.org/10.1016/0031-3203(94)90145-7
- Agarwal et al. (2019) Anish Agarwal, Munther Dahleh, and Tuhin Sarkar. 2019. A marketplace for data: An algorithmic solution. In Proceedings of the 2019 ACM Conference on Economics and Computation. 701–726.
- Amiri et al. (2023) Mohammad Mohammadi Amiri, Frederic Berdoz, and Ramesh Raskar. 2023. Fundamentals of task-agnostic data valuation. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 37. 9226–9234.
- Bennett (1962) George Bennett. 1962. Probability Inequalities for the Sum of Independent Random Variables. J. Amer. Statist. Assoc. 57, 297 (1962), 33–45. https://doi.org/10.1080/01621459.1962.10482149 arXiv:https://www.tandfonline.com/doi/pdf/10.1080/01621459.1962.10482149
- Buchanan (1991) James M. Buchanan. 1991. Opportunity Cost. Palgrave Macmillan UK, London, 520–525. https://doi.org/10.1007/978-1-349-21315-3_69
- Chen et al. (2022) Junjie Chen, Minming Li, and Haifeng Xu. 2022. Selling data to a machine learner: Pricing via costly signaling. In International Conference on Machine Learning. PMLR, 3336–3359.
- Ghorbani and Zou (2019) Amirata Ghorbani and James Zou. 2019. Data shapley: Equitable valuation of data for machine learning. In International Conference on Machine Learning. PMLR, 2242–2251.
- Jia et al. (2019) Ruoxi Jia, David Dao, Boxin Wang, Frances Ann Hubis, Nick Hynes, Nezihe Merve Gürel, Bo Li, Ce Zhang, Dawn Song, and Costas J Spanos. 2019. Towards efficient data valuation based on the shapley value. In The 22nd International Conference on Artificial Intelligence and Statistics. PMLR, 1167–1176.
- Karlaš et al. (2022) Bojan Karlaš, David Dao, Matteo Interlandi, Bo Li, Sebastian Schelter, Wentao Wu, and Ce Zhang. 2022. Data debugging with shapley importance over end-to-end machine learning pipelines. arXiv preprint arXiv:2204.11131 (2022).
- Kohavi (1996) Ron Kohavi. 1996. Scaling up the accuracy of Naive-Bayes classifiers: a decision-tree hybrid. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (Portland, Oregon) (KDD’96). AAAI Press, 202–207.
- Leake et al. (2021) Jonathan Leake, Colin McSwiggen, and Nisheeth K Vishnoi. 2021. Sampling matrices from Harish-Chandra–Itzykson–Zuber densities with applications to Quantum inference and differential privacy. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing. 1384–1397.
- Liu et al. (2023) Jie Liu, Peizheng Wang, and Chao Wu. 2023. Data valuation: The partial ordinal Shapley value for machine learning. arXiv preprint arXiv:2305.01660 (2023).
- Mangoubi et al. (2022) Oren Mangoubi, Yikai Wu, Satyen Kale, Abhradeep Thakurta, and Nisheeth K Vishnoi. 2022. Private Matrix Approximation and Geometry of Unitary Orbits. In Conference on Learning Theory. PMLR, 3547–3588.
- Pei (2020) Jian Pei. 2020. A survey on data pricing: from economics to data science. IEEE Transactions on knowledge and Data Engineering 34, 10 (2020), 4586–4608.
- Shokri et al. (2012) Reza Shokri, George Theodorakopoulos, Carmela Troncoso, Jean-Pierre Hubaux, and Jean-Yves Le Boudec. 2012. Protecting location privacy: optimal strategy against localization attacks. In Proceedings of the 2012 ACM conference on Computer and communications security. 617–627.
- Street et al. (1993) William Nick Street, William H. Wolberg, and Olvi L. Mangasarian. 1993. Nuclear feature extraction for breast tumor diagnosis. In Electronic imaging. https://api.semanticscholar.org/CorpusID:14922543
- Wang et al. (2020) Tianhao Wang, Johannes Rausch, Ce Zhang, Ruoxi Jia, and Dawn Song. 2020. A principled approach to data valuation for federated learning. Federated Learning: Privacy and Incentive (2020), 153–167.
- Yu et al. (2023) Yi Yu, Shengyue Yao, Juanjuan Li, Fei-Yue Wang, and Yilun Lin. 2023. SWDPM: A Social Welfare-Optimized Data Pricing Mechanism. arXiv preprint arXiv:2305.06357 (2023).
- Zhang et al. (2023) Mengxiao Zhang, Fernando Beltrán, and Jiamou Liu. 2023. A Survey of Data Pricing for Data Marketplaces. IEEE Transactions on Big Data (2023).