Primary and Secondary Factor Consistency as Domain Knowledge to Guide Happiness Computing in Online Assessment

Xiaohua Wu, Lin Li, Xiaohui Tao, Frank Xing, Jingling YuanarXiv 2024 · DOI

Introduction

In the era of data-driven governance, "happiness computing" has emerged as a vital tool for assessing societal well-being. By leveraging social media and survey data, researchers aim to quantify the happiness levels of populations to inform policy. However, a significant hurdle remains: the "black box" nature of deep learning. While models like Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) networks achieve high accuracy, they often lack interpretability. Crucially, different models may predict the same happiness level based on contradictory internal logic—one prioritizing income while another focuses on leisure. This lack of explanation consistency undermines trust for policymakers who require stable, evidence-based insights.

Methodology and Framework

To address this, we propose a framework that integrates social science domain knowledge into the training of deep learning models. The goal is to ensure that models are "right for the right reasons."

The proposed framework for happiness computing, integrating online data collection with deep learning models guided by domain knowledge.

The framework consists of an online data collection phase—utilizing questionnaires, self-reports, and social network analysis—followed by a Deep Neural Network (DNN) for happiness computing and explanation. We introduce two core technical components:

  1. Additive Factor Attribution: Using Shapley values from cooperative game theory, we quantify the contribution of individual factors (e.g., health, marriage, income) to a prediction.
  2. Explanation Consistency Loss ($L_{exp}$): We implement a loss function based on Kullback-Leibler (KL) Divergence. This penalizes models when their internal factor importance distribution deviates from a "global importance distribution" derived from ensemble knowledge.

The study utilized two extensive datasets: the Chinese General Social Survey (CGSS) 2015 (8,000+ samples, 124 factors) and the European Social Survey (ESS) 2018 (50,000+ samples, 102 factors).

Theoretical Framework: Primary and Secondary Factors

The cornerstone of our approach is the mathematical encoding of "Primary/Secondary" factor theory. Social science research suggests that certain factors, such as health and family, are "primary"—meaning their influence on happiness is relatively stable across different demographic groups. Other factors, like car ownership or specific hobbies, are "secondary" and vary more widely.

Word clouds illustrating (a) primary and (b) secondary factors identified through social science domain knowledge.

By treating these relationships as domain knowledge, we "nudge" the neural network to align its reasoning with established social science patterns. This prevents the model from latching onto spurious correlations and ensures its logic is socially relevant.

Key Results and Discussion

Our experiments demonstrate that enforcing explanation consistency does not come at the cost of performance; rather, it enhances it.

  • Accuracy Improvements: Across various models, the inclusion of domain knowledge constraints led to performance gains. Notably, the WideDeep model achieved a 7.33% increase in Macro_F1 score for the elderly demographic in the CGSS dataset.
  • Enhanced Stability: Models trained with these constraints exhibited significantly lower variance across training runs, indicating higher reliability.
  • Logic Alignment: Consistency was measured using Kendall’s tau coefficient. Without constraints, inter-model consistency was often below 0.3. With our framework, scores improved to as high as 0.56, showing that different architectures (CNN, LSTM, etc.) began to agree on the most important drivers of happiness.
  • Demographic Insights: The models identified distinct priorities: "equity" and "depression" were paramount for younger populations, whereas "status" and "leisure" were more influential for the elderly.

Conclusion

By bridging the gap between social science theory and deep learning, we have developed a more trustworthy approach to happiness computing. While currently focused on structured survey data, future research will extend this methodology to unstructured web data and natural language processing. Ensuring that AI assessments of well-being are both accurate and logically consistent is a critical step toward responsible data-driven governance.

Summary updated

Abstract

Happiness computing based on large-scale online web data and machine learning methods is an emerging research topic that underpins a range of issues, from personal growth to social stability. Many advanced Machine Learning (ML) models with explanations are used to compute the happiness online assessment while maintaining high accuracy of results. However, domain knowledge constraints, such as the primary and secondary relations of happiness factors, are absent from these models, which limits the association between computing results and the right reasons for why they occurred. This article attempts to provide new insights into the explanation consistency from an empirical study perspective. Then we study how to represent and introduce domain knowledge constraints to make ML models more trustworthy. We achieve this through: (1) proving that multiple prediction models with additive factor attributions will have the desirable property of primary and secondary relations consistency, and (2) showing that factor relations with quantity can be represented as an importance distribution for encoding domain knowledge. Factor explanation difference is penalized by the Kullback-Leibler divergence-based loss among computing models. Experimental results using two online web datasets show that domain knowledge of stable factor relations exists. Using this knowledge not only improves happiness computing accuracy but also reveals more significative happiness factors for assisting decisions well.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
CGSS 2015 · elder groupCNN with domain knowledgeKendall's tau coefficient0.35Happiness Assessment · subset=elder group
Source quote
L285: As shown in Figure~\ref{kendall_tau_result}, the averages of Kendall's tau coefficient between the pairwise factor distribution results of models are presented. The results with domain knowledge constraint have significant Kendall's tau coefficient improvements in \texttt{young} and \texttt{elder} groups. On the \texttt{young} group of CGSS dataset, BiLSTMA has the best ordinal consistency improvement up to 0.50, and LR achieves 0.26 improvements gain and up to 0.43. Moreover, for the elder group in the CGSS and ESS datasets, there are 0.35 and 0.22 gains of the CNN with domain knowledge, and up to 0.56 and 0.54, respectively. Similarly, there are significant improvements in ESS dataset, which is present in the deep learning models. The best results are generated by MoMLP, CNN, and BiLSTM, and up to 0.56 in the \texttt{young} group of ESS. In summary, domain knowledge can balance the tension between accuracy and factor explanation, making the right predictions for the right reasons.
ESS 2018, elder groupCNN with domain knowledgeKendall's tau coefficient0.22Happiness Assessment · subset=elder group
Source quote
L285: As shown in Figure~\ref{kendall_tau_result}, the averages of Kendall's tau coefficient between the pairwise factor distribution results of models are presented. The results with domain knowledge constraint have significant Kendall's tau coefficient improvements in \texttt{young} and \texttt{elder} groups. On the \texttt{young} group of CGSS dataset, BiLSTMA has the best ordinal consistency improvement up to 0.50, and LR achieves 0.26 improvements gain and up to 0.43. Moreover, for the elder group in the CGSS and ESS datasets, there are 0.35 and 0.22 gains of the CNN with domain knowledge, and up to 0.56 and 0.54, respectively. Similarly, there are significant improvements in ESS dataset, which is present in the deep learning models. The best results are generated by MoMLP, CNN, and BiLSTM, and up to 0.56 in the \texttt{young} group of ESS. In summary, domain knowledge can balance the tension between accuracy and factor explanation, making the right predictions for the right reasons.
BibTeX
@misc{wu2024primary,
  author = {Xiaohua Wu and Lin Li and Xiaohui Tao and Frank Xing and Jingling Yuan},
  title = {{Primary and Secondary Factor Consistency as Domain Knowledge to Guide Happiness Computing in Online Assessment}},
  year = {2024},
  eprint = {2402.12398},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.12398},
}
Figure