SlowGuess/NAACL_2021_OCR huggingface dataset:
Table 1: Performance of vocabulary selection methods across datasets and tasks, at a target vocabulary size of  $|V'| = 750$  words (column 3 is initial vocabulary size). Note performance is lower than state-of-the-art methods, as results are based on a significantly reduced vocabulary size (and using a simple LSTM architecture, with no hyperparameter tuning).
Figure 5: Performance on SST-2 of Shapley (red), Logistic-L1 (green), TF (blue) and TF-IDF (orange).
performance. We evaluated whether applying our approach on top of using subword embeddings can still lead to improved performance. We first run a byte-pair encoding (BPE) algorithm (Sennrich et al., 2015; Provilkov et al., 2019; Kudo and Richardson, 2018) over each input vocabulary for a dataset. This algorithm operates by merging together the most frequent sequence of adjacent
tokens in each iteration. We do this for a total number of 10,000 merges, resulting in a smaller vocabulary that now composed of subwords. We then apply Shapley, Banzhaf, TF and TF-IDF rankings of these subword tokens, as we have done in the word-level experiments. Figure 6 shows that we have improved performance over the baselines in the subword case as well.
Figure 6: Performance of Shapley (green), TF (blue) and TF-IDF (orange) when considering subword embeddings on the AG-News dataset.
The results in Section 4 show that a game theoretic approach to vocabulary selection can achieve better tradeoffs between the vocabulary size and model performance than heuristics such as TF and TF-IDF based selection, or a method based on regression coefficients in an  $L_{1}$  regularized logistic regression. This advantage comes at the cost of having a significantly higher computational cost of selecting the vocabulary. Following the expensive selection step, we now have the benefit of a smaller model which is more interpretable and explainable, has a reduced memory consumption and potentially less prone to overfitting. We have proposed several ways to mitigate the compute load of selecting the vocabulary: applying a heuristic pre-filtering step and using logistic regression models rather than the full model while estimating power indices.
We proposed a vocabulary selection method for NLP tasks, using cooperative game theory. We discuss related work on model compression, tailoring the vocabulary in NLP tasks and using subword embeddings, and approximating game theoretic solutions and using them for explainable AI.
Model compression: Using the full vocabulary to train models limits the applicability of models in memory-constrained or computation-constrained scenarios (Faruqui et al., 2015; Yogatama et al., 2015). Earlier work discusses methods for compressing model size. These yield models that are less expensive in memory and compute, and that are also more easily interpretable. Model compression methods include matrix compression methods such as sparsification of weights in a matrix (Wen et al., 2016), Bayesian inference for compression (Molchanov et al., 2017; Neklyudov et al., 2017), feature selection methods such as ANOVA (Girden, 1992), precision reduction methods (Han et al., 2015; Hubara et al., 2017) and approximations of the weight matrix (Tjandra et al., 2017; Le et al., 2015). Our method relies on game theoretic principles; it filters our vocabulary words, and can thus operate with any NLP architecture (i.e. the method is agnostic to the model architecture used). Further, the interpretability in our case stems from having few features, clearly highlighting the most impactful features in the dataset.
Vocabulary selection methods and subword and character level embeddings: earlier work examined selecting a vocabulary for an NLP task. Some alternatives drop out words (Chen et al., 2019), whereas character-level methods that attempt to represent the input text at the level of individual characters (Kim et al., 2015; Lee et al., 2017; Ling et al., 2015) while subword methods attempt to tokenize words into parts of words in a more efficient way (Sennrich et al., 2015; Kudo and Richardson, 2018).
Character level embedding methods decompose words to allow each individual character to have its own embedding. This reduces the vocabulary size to the number of characters, much smaller than the number of words in the full vocabulary. However, this is not applicable for some character-free languages (e.g. Chinese, Japanese, Korean). Also, such methods have reduced performance, and typically use larger embedding sizes than word embedding models to obtain reasonable quality (Zhang et al., 2015; Kim et al., 2015).
In contrast, subword embeddings have shown improved performance for several NLP tasks. Such methods typically merge pairs of frequent character sequences, to get a more optimal token vocabulary from an information-theoretic viewpoint. Byte-pair encoding (BPE) algorithms construct subword vo
cabulary that is less sparse, and increases shared features between words  $^{7}$ , allowing better propagation of semantic meaning. As shown in Section 4, our method can operate on top of subword embeddings, and achieve good tradeoffs between the model size and performance.
Cooperative game theory and applications for explainable AI: we use concepts from game theory, viewing words as players in a game whose goal is to improve model performance. Such settings have been a key topic of study in game theory since the 1950s (Weintraub, 1992). Many solution concepts have been proposed, examining issues such as stability and fairness. Power indices such as the Banzhaf index (Banzhaf III, 1964) and Shapley value (Shapley, 1953) to measure the relative impact players have on the outcome of the game. It is computationally hard to calculate them even in simple games (Matsui and Matsui, 2001; Elkind et al., 2007). We have applied a Monte-Carlo sampling approximation based on existing methods (Fatima et al., 2008; Bachrach et al., 2010).
Our use of the Shapley value is akin to recent explainable AI methods, that attempt to allow AI models to provide human readable insights to explain their decisions (Adadi and Berrada, 2018; Samek et al., 2019). For example, power indices (such as the Shapley value) have been used to explain individual model predictions (Datta et al., 2016; Lundberg and Lee, 2017), by estimating the contribution of individual features on each prediction. This can be done for linear models (Lundberg and Lee, 2017) as well as tree-based models (Lundberg et al., 2020).
Explainable AI methods typically take a trained model and a given instance as input, and perturb the features of the instance, using the same model to output predictions for many perturbed inputs. In contrast, our goal is not to understand the predictions of a given model, but to select an small input vocabulary set for a task, focusing on the most relevant part of the input space and yielding simpler and more interpretable models. Further, we train many models to estimate contributions, rather than perturbing the inputs for a single model.
We proposed a vocabulary selection method based on cooperative game theory and empirically showed improvements over baselines in multiple NLP tasks. Our approach, with its task-specific vocabulary, offers an improved model size and quality tradeoffs.
Several questions remain open for future research on better vocabulary selection. Could alternative power indices, apart from what we have shown using the Shapley and Banzhaf indeces, achieve better performance? Is there a way to better combine our methods with subword embeddings? Moreover, given that our method is computationally demanding during vocabulary construction time, an interesting problem is to explore ways to speed up this process; both theoretically, through a different power index calculation, and practically, through better parallelization.
We would like to acknowledge Thore Graepel for formative advice and discussions at early stages of the project. We would also like to thank Richard Everett, Thomas Anthony, Andrea Tacchetti and Tom Eccles for helpful questions and comments throughout the project, and Ellie Pavlick for suggestions on robustly evaluating NLI models. We would also like to acknowledge the anonymous reviewers and area chairs, whose feedback and suggested changes for additional experiments were hugely helpful in making the paper stronger, more robust, and clearer than before.
Amina Adadi and Mohammed Berrada. 2018. Peeking inside the black-box: A survey on explainable artificial intelligence (xai). IEEE Access, 6:52138-52160.
Haris Aziz, Oded Lachish, Mike Paterson, and Rahul Savani. 2009. Power indices in spanning connectivity games. In International Conference on Algorithmic Applications in Management, pages 55-67. Springer.
Yoram Bachrach. 2010. Honor among thieves: collusion in multi-unit auctions. In AAMAS.
Yoram Bachrach, Edith Elkind, and Piotr Faliszewski. 2011. Coalitional voting manipulation: A game-theoretic perspective. In *IJCAI*.
For instance, the word "sadder" could be split into "sad" and "er", where the ending "er" has a similar meaning in other circumstances — "faster", "nearer" etc.
Yoram Bachrach, Richard Everett, Edward Hughes, Angeliki Lazaridou, Joel Z Leibo, Marc Lanctot, Michael Johanson, Wojciech M Czarnecki, and Thore Graepel. 2020. Negotiating team formation using deep reinforcement learning. AIJ, 288.
Yoram Bachrach, Evangelos Markakis, Ezra Resnick, Ariel D Procaccia, Jeffrey S Rosenschein, and Amin Saberi. 2010. Approximating power indices: theoretical and empirical analysis. JAAMAS, 20(2):105-122.
Dylan Banarse, Yoram Bachrach, Siqi Liu, Guy Lever, Nicolas Heess, Chrisantha Fernando, Pushmeet Kohli, and Thore Graepel. 2019. The body is not a given: Joint agent policy learning and morphology evolution. In AAMAS.
John F Banzhaf III. 1964. Weighted voting doesn't work: A mathematical analysis. *Rutgers L. Rev.*, 19:317.
Jesús Mario Bilbao, Julio R Fernandez, Nieves Jiménez, and Jorge J Lopez. 2002. Voting power in the european union enlargement. *EJOR*, 143(1):181-196.
Gideon Blocq, Yoram Bachrach, and Peter Key. 2014. The shared assignment game and applications to pricing in cloud computing. In AAMAS.
Samuel R Bowman, Gabor Angeli, Christopher Potts, and Christopher D Manning. 2015a. A large annotated corpus for learning natural language inference. arXiv preprint arXiv:1508.05326.
Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015b. A large annotated corpus for learning natural language inference. In EMNLP.
Georgios Chalkiadakis, Edith Elkind, and Michael Wooldridge. 2011. Computational aspects of cooperative game theory. Synthesis Lectures on Artificial Intelligence and Machine Learning, 5(6):1-168.
Wenhu Chen, Yu Su, Yilin Shen, Zhiyu Chen, Xifeng Yan, and William Wang. 2019. How large a vocabulary does text classification need? a variational approach to vocabulary selection. arXiv preprint arXiv:1902.10339.
Anupam Datta, Shayak Sen, and Yair Zick. 2016. Algorithmic transparency via quantitative input influence: Theory and experiments with learning systems. In IEEE SP, pages 598-617.
Li Deng and Yang Liu. 2018. Deep learning in natural language processing. Springer.
Pradeep Dubey. 1975. On the uniqueness of the shapley value. *IJGT*, 4(3):131-139.
Pradeep Dubey and Lloyd S Shapley. 1979. Mathematical properties of the banzhaf power index.  $MOR$ , 4(2):99-131.
Edith Elkind, Leslie Ann Goldberg, Paul Goldberg, and Michael Wooldridge. 2007. Computational complexity of weighted threshold games. In AAAI.
Paul D Ellis. 2010. The essential guide to effect sizes: Statistical power, meta-analysis, and the interpretation of research results. Cambridge University Press.
Manaal Faruqui, Yulia Tsvetkov, Dani Yogatama, Chris Dyer, and Noah Smith. 2015. Sparse overcomplete word vector representations. arXiv preprint arXiv:1506.02004.
Shaheen S Fatima, Michael Wooldridge, and Nicholas R Jennings. 2008. A linear approximation method for the shapley value. AIJ, 172(14):1673-1699.
Yuval Filmus, Joel Oren, Yair Zick, and Yoram Bachrach. 2019. Analyzing power in weighted voting games with super-increasing weights. TCS, 63(1):150-174.
Jerome Friedman, Trevor Hastie, and Rob Tibshirani. 2010. Regularization paths for generalized linear models via coordinate descent. Journal of statistical software, 33(1):1.
Ellen R Girden. 1992. ANOVA: Repeated measures. 84. Sage.
Song Han, Huizi Mao, and William J Dally. 2015. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149.
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. 2017. Quantized neural networks: Training neural networks with low precision weights and activations. JMLR, 18(1):6869-6898.
Sachin Kamboj, Willett Kempton, and Keith S Decker. 2011. Deploying power grid-integrated electric vehicles as a multi-agent system. In AAMAS.
Yoon Kim, Yacine Jernite, David Sontag, and Alexander M Rush. 2015. Character-aware neural language models. arXiv preprint arXiv:1508.06615.
Taku Kudo and John Richardson. 2018. Sentencepiece: A simple and language independent subword tokenizer and tokenizer for neural text processing. arXiv preprint arXiv:1808.06226.
Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. 2015. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941.
Jason Lee, Kyunghyun Cho, and Thomas Hofmann. 2017. Fully character-level neural machine translation without explicit segmentation. Transactions of the Association for Computational Linguistics, 5:365-378.
Gurvan L'Hostis, David Grangier, and Michael Auli. 2016. Vocabulary selection strategies for neural machine translation. arXiv preprint arXiv:1610.00072.
Wang Ling, Isabel Trancoso, Chris Dyer, and Alan W Black. 2015. Character-based neural machine translation. arXiv preprint arXiv:1511.04586.
Scott M Lundberg, Gabriel Erion, Hugh Chen, Alex DeGrave, Jordan M Prutkin, Bala Nair, Ronit Katz, Jonathan Himmelfarb, Nisha Bansal, and Su-In Lee. 2020. From local explanations to global understanding with explainable ai for trees. Nature machine intelligence, 2(1):2522-5839.
Scott M Lundberg and Su-In Lee. 2017. A unified approach to interpreting model predictions. In NIPS.
Moshe Mash, Yoram Bachrach, and Yair Zick. 2017. How to form winning coalitions in mixed humancomputer settings. In IJCAI.
Tomomi Matsui and Yasuko Matsui. 2000. A survey of algorithms for calculating power indices of weighted majority games. Journal of the Operations Research Society of Japan, 43(1):71-86.
Yasuko Matsui and Tomomi Matsui. 2001. Np-completeness for calculating power indices of weighted majority games. TCS, 263(1-2):305-310.
Nicolai Meinshausen and Peter Buhlmann. 2010. Stability selection. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 72(4):417-473.
Dmitry Molchanov, Armenii Ashukha, and Dmitry Vetrov. 2017. Variational dropout sparsifies deep neural networks. arXiv preprint arXiv:1701.05369.
Kirill Neklyudov, Dmitry Molchanov, Armenii Ashukha, and Dmitry P Vetrov. 2017. Structured bayesian pruning via log-normal multiplicative noise. In NIPS.
Kim F Nimon and Frederick L Oswald. 2013. Understanding the results of multiple linear regression: Beyond standardized regression coefficients. Organizational Research Methods, 16(4):650-674.
Ivan Provilkov, Dmitrii Emelianenko, and Elena Voita. 2019. Bpe-dropout: Simple and effective subword regularization. arXiv preprint arXiv:1910.13267.
Juan Ramos et al. 2003. Using tfidf to determine word relevance in document queries. In Instructional conference on machine learning, pages 133-142.
Wojciech Samek, Grégoire Montavon, Andrea Vedaldi, Lars Kai Hansen, and Klaus-Robert Müller. 2019. Explainable AI: interpreting, explaining and visualizing deep learning, volume 11700. Springer Nature.
Rico Sennrich, Barry Haddow, and Alexandra Birch. 2015. Neural machine translation of rare words with subword units. arXiv preprint arXiv:1508.07909.
Lloyd S Shapley. 1953. A value for n-person games. Contributions to the Theory of Games, 2(28):307-317.
Xing Shi and Kevin Knight. 2017. Speeding up neural machine translation decoding by shrinking run-time vocabulary. In ACL.
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. 2013. Recursive deep models for semantic compositionality over a sentiment treebank. In EMNLP.
Philip D Strafiin Jr. 1988. The shapley—shubik and banzhaf power indices as probabilities. The Shapley value: essays in honor of Lloyd S. Shapley, page 71.
Andros Tjandra, Sakriani Sakti, and Satoshi Nakamura. 2017. Compressing recurrent neural network with tensor train. In IJCNN.
Suguru Ueda, Makoto Kitaki, Atsushi Iwasaki, and Makoto Yokoo. 2011. Concise characteristic function representations in coalitional games based on agent types. In *IJCAI*, volume 11, pages 393-399.
Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. 2018. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint arXiv:1804.07461.
Alex Warstadt, Amanpreet Singh, and Samuel R Bowman. 2019. Neural network acceptability judgments. Transactions of the Association for Computational Linguistics, 7:625-641.
E Roy Weintraub. 1992. Toward a history of game theory, volume 24. Duke University Press.
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. 2016. Learning structured sparsity in deep neural networks. arXiv preprint arXiv:1608.03665.
Dani Yogatama, Manaal Faruqui, Chris Dyer, and Noah Smith. 2015. Learning word representations with hierarchical sparse coding. In ICML.
Xiang Zhang, Junbo Zhao, and Yann LeCun. 2015. Character-level convolutional networks for text classification. In NIPS.