Latent Feature Mining for Predictive Model Enhancement with Large Language Models

## Abstract

Abstract Predictive modeling often faces challenges due to limited data availability and quality, especially in domains where collected features are weakly correlated with outcomes and where additional feature collection is constrained by ethical or practical difficulties. Traditional machine learning (ML) models struggle to incorporate unobserved yet critical factors. In this work, we introduce an effective approach to formulate latent feature mining as text-to-text propositional logical reasoning. We propose FLAME ( F aithful L atent Fe A ture Mining for Predictive M odel E nhancement), a framework that leverages large language models (LLMs) to augment observed features with latent features and enhance the predictive power of ML models in downstream tasks. Our framework is generalizable across various domains with necessary domain-specific adaptation, as it is designed to incorporate contextual information unique to each area, ensuring effective transfer to different areas facing similar data availability challenges. We validate our framework with two case studies: (1) the criminal justice system, a domain characterized by limited and ethically challenging data collection; (2) the healthcare domain, where patient privacy concerns and the complexity of medical data limit comprehensive feature collection. Our results show that inferred latent features align well with ground truth labels and significantly enhance the downstream classifier.

## 1 Introduction

Prediction plays a crucial role in decision-making across many domains. While traditional machine learning (ML) models are powerful, they are often constrained by the availability of observed data features. Contrary to the common belief that we are in a “big data era,” this is not always the case, especially in areas where decisions have profound impacts on human lives. In areas like criminal justice and healthcare, data availability is often constrained, with ethical limitations further restricting the features that can be collected and used [, ]. As a result, many critical decisions must rely on a limited set of features, some of which may have weak correlations with the prediction target. This presents significant challenges for achieving accurate predictions.

To overcome the challenges posed by limited feature availability and quality, latent feature mining is a common approach. However, traditional techniques face two key limitations in domain-specific applications.
First, inferring domain-specific latent features often requires contextual information beyond the available data, such as expert input, public information, or crowd-sourcing. This information is typically in natural language, which ML models like neural networks struggle to process and encode into proper embeddings. Second, many latent feature mining techniques, such as deep-learning based auto-encoders and the Expectation-Maximization (EM) algorithm, lack interpretability. They extract features in abstract mathematical formats that are difficult to explain in human terms. This is especially problematic in high-stakes domains like healthcare or criminal justice, where explaining and justifying a model’s predictions is crucial for building trust and ensuring ethical decision-making. The black-box nature of these methods makes it harder to gain confidence in the model’s outputs in these domains.

Figure 1 illustrates the motivation behind our approach to address these two limitations. Human experts can infer additional latent features that go beyond the explicit data provided by drawing on their experience. For example, in the criminal justice system, predicting an individual’s likelihood of in-program recidivism (the probability of committing a new crime during probation) is crucial for determining eligibility for incarceration-diversion programs [, ]. Typically, available data includes only basic demographic and criminal history information, but domain knowledge suggests that other factors – such as socio-economic status, community support, and psychological profiles – can significantly impact outcomes. Collecting such sensitive data raises ethical concerns, but human case managers can rely on their professional experience to infer these critical yet unrecorded details from observed data. While effective, this human-based approach is difficult to scale, as it relies on tacit human knowledge that is hard to formalize into standardized processes. Additionally, the human reasoning process is both time- and labor-intensive, limiting its application to large populations.

Figure: Figure 1: The real-world example illustrating the motivation of FLAME, a framework to augment observed features collected in given datasets with latent features.
Refer to caption: x1.png

Recent advancements in large language models (LLMs) present a promising new avenue with their advanced reasoning capability [, , ]. LLMs have potential to process and generate information in ways that mimic human thought processes []. Building on this insight, we propose FLAME, a framework that leverages LLMs to augment observed features with latent features and enhance the predictive power of ML models in downstream tasks like classification. FLAME offers two key advantages over traditional latent feature mining methods: (1) it seamlessly integrates contextual information provided in natural language, and (2) by emulating human reasoning, it produces more interpretable outputs, making it particularly valuable in high-stakes domains requiring explainability. We summarize our main contributions as follows.

- 1.
We introduce a new approach that LLMs to formulate latent feature mining as a reasoning task using text-to-text propositional logic. This method effectively infers latent features from observed data and provides significant improvements in downstream prediction accuracy and interpretability over traditional techniques.
- 2.
We develop a four-step versatile framework that integrates domain-specific contextual information with minimal customization efforts. This framework is highly adaptable across various domains, particularly those with limited observed features and ethical constraints on data collection.
- 3.
We empirically validate our framework through case studies in both the criminal justice and healthcare sectors, where latent features play an important role in enhancing prediction tasks. The framework’s strong performance in two different application settings demonstrates its adaptability and usefulness for other domains facing similar challenges.

## 2 Related Works

Data Augmentation versus Latent Feature Mining Data augmentation is a technique widely employed to provide more data samples to improve the predictive power of ML models []. Generative models such as Generative Adversarial Networks (GANs) learn data patterns and generate synthetic data to augment training sample sizes [, ]. In contrast, latent features are hidden characteristics in a dataset that are not directly observed but can be inferred from available data. Incorporating meaningful latent features can enhance the performance of downstream applications [, ]. Methods such EM and Variational Autoencoders (VAEs) offer alternative techniques to infer latent features from observed data. However, EM algorithms, while estimating latent variable assignments and updating model parameters to maximize data likelihood, often produce results that are difficult to interpret and require strong parametric assumptions. Similarly, VAEs use probabilistic approaches to describe data distribution with latent variables, but the learned mappings can also be hard to interpret. Another related approach is dimension reduction such as Principal Component Analysis, which reduces the size of the feature space while preserving the most important information. However, dimension reduction is less effective when the input feature set is already limited.

We summarize a comparison in table 1 to further distinguish the difference between FLAME and existing approaches for enhancing predictive model from data/features perspective.

**Table 1: Comparison of FLAME and related methods: Unlike data augmentation, which increases sample size, FLAME expands the feature space by training LLMs to infer latent variables from existing features. Compared to traditional latent feature mining methods, FLAME mimics human expert reasoning and incorporates domain-specific context, offering improved interpretability. Unlike dimension reduction methods, FLAME enriches the dataset by adding latent features that capture key aspects of the underlying phenomena.**
| Methods | Approach | Interpretability | Contextual Information<br>Integration Capability |
| --- | --- | --- | --- |
| Data Augmentation (GANs) | increasing sample size | $\times$ | $\times$ |
| Latent Feature Mining (EM) | extracting (new) latent features | $\times$ | $\times$ |
| Dimension Reduction | reducing feature size | $\times$ | $\times$ |
| FLAME | extracting (new) latent features | $\checkmark$ | $\checkmark$ |

Fine-tuning for LLMs Training.
Fine-tuning is an effective method for LLMs to reduce hallucinations and better align outputs with real-world data and human preferences [, , ]. Synthetic data offers a low-cost way to enhance LLM reasoning across domains [, , ]. FLAME also uses synthetic data during fine-tuning, but unlike prior work that directly mimics observed features, we are among the first to treat synthetic latent feature generation as a reasoning task. Through few-shot prompting, FLAME creates synthetic “rationales” for the reasoning process to infer latent features, followed by fine-tuning to enhance accuracy and reduce hallucinations.

Note that we distinguish between augmenting the feature space and augmenting training data. Our primary goal is to enrich the feature space by inferring and adding latent features to improve downstream predictions. As part of the steps in FLAME to achieve this goal, we also augment training data with synthetic samples during the fine-tuning process for LLMs.

## 3 The Problem Setting

In this section we formally describe our problem setting that leverages latent features to enhance downstream tasks. The downstream task we focus on is a multi-class classification problem, but the framework can easily extend to other downstream prediction tasks such as regression problems.

[Uncaptioned image]: extracted/5904536/Figures/03-Method/latent_relation.png

In a standard multi-class classification problem setting, suppose we have a dataset
$D={(x_{1},y_{1}),(x_{2},y_{2}),\ldots,(x_{n},y_{n})}$, where $x_{i}$ is a $d$-dimensional vector representing the input features $X\in\mathcal{X}$ and $y_{i}\in\mathcal{Y}=\{1,2,\ldots,C\}$ denotes the corresponding class label $Y$ for individual $i=1,\dots,n$. The goal is to learn a classifier $f:\mathcal{X}\rightarrow\mathcal{Y}$ that accurately predicts the class labels. Consider the following scenarios in which $f$ struggles to capture the relationship between $X$ and $Y$: (1) The number of input features $X$ is small relative to the complexity of the classification task.
(2) When $X$ are weakly correlated with class labels $Y$, they may not provide discriminating information to accurately predict the corresponding class labels.

To address these challenges, we can use additional informative features to enhance the classifier’s ability to capture the relationship between $X$ and $Y$. Latent features can serve such a purpose (See Definition of Latent Features in Page 3).

While this approach seems beneficial intuitively, it is important to note that adding more features is not always helpful if the extracted features are not meaningful and introduce noise. In the following lemma, we show in a simple logistic regression setting that while adding features can reduce in-sample loss, it does not always reduce out-of-sample loss if the added features are not informative. We use the log-loss (the cross-entropy loss) of the logistics regression for binary outcome $Y\in\{0,1\}$. We denote the optimal coefficients that minimize the in-sample log-loss function as $\beta^{*}$ for the original features and $\tilde{\beta}^{*}$ for the augmented features.

###### Lemma 1 .

The in-sample log-loss always follows $\mathcal{L}^{\text{in}}(\tilde{D},\tilde{\beta}^{*})\leq\mathcal{L}^{\text{in}
}(D,\beta^{*})$. When the added features are non-informative, there exist instances such that the out-of-sample log-loss $\mathcal{L}^{\text{out}}(\tilde{D},\tilde{\beta}^{*})>\mathcal{L}^{\text{out}}
(D,\beta^{*})$.

The results in the lemma can be generalized to multi-class labels. Since augmenting the feature space is not necessarily beneficial unless the added features are meaningful, a major part of our case study is to empirically test whether the extracted features from our framework indeed improve downstream prediction. If the added features significantly enhance downstream prediction accuracy, this provides strong evidence that the inferred latent features are meaningful.

###### Lemma 1 .

## 4 Latent Feature Mining with LLMs

We propose a new approach, FLAME, to efficiently and accurately extract latent features and augment observed features to enhance the downstream prediction accuracy.
It extracts the latent features $Z$ from the original features $X$ to capture complex patterns and relationships that individual features may overlook, especially when some of the $X$’s are weakly correlated with the outcome $Y$. At a high level, our approach transform this latent feature extraction process as a text-to-text propositional reasoning task, i.e., infer the relationship $Z=g(X)$ through logical reasoning with natural language. Figure 2 provides an example of the extract process with the steps elaborated on below.

Following the framework established in previous work [], we denote the predicates related to the observed features as $P_{1},P_{2},\ldots,P_{m}$. Consider a propositional theory $S$ that contains rules that connect $P$’s to the latent feature $Z$. We say $Z$ can be deduced from $S$ if the logic implication $(P_{1}\wedge P_{2}\wedge\ldots\wedge P_{m})\rightarrow Z$ is covered in $S$. For potentially complicated logical connections between $P$’s and $Z$, we also introduce intermediate predicates $O$’s and formulate a logical chain (a sequence of logical implications) that connects $X$ to the latent features $Z$ as follows:

$$ $X\rightarrow(P_{1}\wedge P_{2}\wedge\ldots\wedge P_{m})\rightarrow(O_{1}\wedge O _{2}\wedge\ldots\wedge O_{\ell})\rightarrow Z.$ (1) $$

Our approach formulates this logical chain as a multi-stage Chain of Thoughts (CoT) prompt template, and then guide LLMs to infer $Z$ from $X$ using the prompt template. Specifically, we first extract predicates $P$’s from $X$. Then we infer intermediate predicates with a rule $(P_{1}\wedge P_{2}\wedge\ldots\wedge P_{m})\rightarrow O_{l}$ for $l=1,\dots,\ell-1$, and forward the intermediate predicates into the next stage to infer $O_{l+1}$. Finally, we infer latent features with $(O_{1}\wedge O_{2}\wedge\ldots\wedge O_{\ell})\rightarrow Z$.
With the formulated multi-stage CoT prompt template, we then generate synthetic training data to fine-tune LLMs to enhance the logical reasoning ability of LLMs in the self-instruct manner [].

Figure: Figure 2: Example of latent feature mining through chain of reasoning. The latent feature “Supports Likely Needed” ($Z$) is inferred from the observed input features ($X$) via intermediate predicates ($O$), and is then used alongside $X$ to improve the prediction for outcome ($Y$).
Refer to caption: x2.png

We use a hypothetical example from our case study setting to illustrate the formulation of the logic chain. The blue (leftmost) box in Figure 2 shows the observed feature $X$ for one individual. Examples for the predicates $P$’s formulated from $X$ could be:

> $P_{1}:$“the client has part-time job”, $P_{2}:$ ” the client hasn’t complete high school”, $P_{3}:$“the client is single”, $P_{4}:$ ”the client has drug issue”, $P_{5}:$” the client lives in high crime area”, $P_{6}:$ ” the client is assessed with high risk” …

To infer the latent feature $Z$ – in this example, the support likely needed during probation – we go through a multi-stage reasoning to infer the intermediate predicates $O$’s; see the white (middle) boxes in Figure 2. One example logic that connects $P$’s to $O$’s could be:

> $P_{1}$ = ”The client has unstable employment” $P_{2}$ = ”The highest education level of client is less than 10th grade” $O_{1}$ = ”The client has low socioeconomic status” If $(P_{1}\wedge P_{2}\rightarrow O_{1})\in S$, then $O_{1}$ is True.

Finally, with $P$’s and $O$’s, we can connect $X$ with $Z$ though the logic chains. One example of the logical chain is as follows:

> “The client is grappling with unstable employment and a relatively low educational level, factors that likely contribute to a low socioeconomic status. Additionally, being single, struggling with drug issues, and residing in a high-crime area further exacerbate the lack of positive social support. Given these circumstances, education could be valuable. Community service can be particularly beneficial for someone who is single and may lack a broad support network. Substance abuse treatment is crucial for individuals from lower socioeconomic backgrounds to aid in recovery from substance abuse. Hence this client likely needs support on education, substance abuse treatment, community service.”

Here, “unstable employment and a relatively low educational level” and “being single, struggling with drug issues, and residing in a high-crime area” are $P$’s extracted from the features $X$, while “a low socioeconomic status” and “lack of positive social support” are $O$’s. Finally, the rationales “education could be valuable $\dots$ recovery from substance abuse. Hence this client likely needs support on education, substance abuse treatment, community service” connect the intermediate predicates to the latent variables $Z$ (supports likely needed) we want to infer, i.e., $Z_{1}$=‘education’, $Z_{2}$=‘substance abuse treatment’, $Z_{3}$=‘community service’.

Figure: Figure 3: Overview of latent feature inference framework.
Refer to caption: x3.png

Figure 3 illustrates the full process of of FLAME with four steps.

(1) Formulate baseline rationales:
The first step is to formulate baseline rationales, which serve as guidelines for LLMs to infer latent features from observed ones. This involves two sub-steps:

– The first sub-step is to develop some baseline rationales, i.e., identify observed features potentially correlated with latent features and formulate their relationships – the logic chain that connects $X$ to $Z$. Sources to help formulate these baseline rationales include established correlations (e.g., risk score formulas), expert input, and other contextual information like socio-economic status in the neighborhood. This is also a critical step in our framework that allows the integration of domain-specific contextual information in the format of natural language.

– In the second sub-step, we craft prompts with interactive alignment. This is a critical component to establish correct reasoning steps for prompts used in Step 2 to generate synthetic rationales. We involve experienced human in the domain to provide a prompt template for LLMs to generate rationales aligned with the baseline rationales, then test the prompt template on a few examples using zero-shot. If the LLM fails to certain example, we provide the ground truth back to the LLM, allowing it to revise the prompt template []. This process iteratively refines the template until LLMs consistently generate the desired output for all selected examples.

(2) Enlarge data with synthetic rationales for fine-tuning: We generate synthetic training data in self-instruct fashion []. With a handful of examples of the baseline rationales as a reference, we guide the LLMs via in-context learning to generate similar rationales to enlarge the training data samples. To ensure the quality and diversity of the generated dataset, we introduce human-in-the-loop interventions to filter out low-quality or invalid data based on heuristics. We also leverage automatic evaluation metrics for quality control, e.g., removing data that lack essential keywords.

(3) Fine-tuning LLMs: To enhance the reasoning capabilities of the LLMs and better align their outputs in specific domains, we leverage the fine-tuning process with processed dataset from the previous step []. Fine-tuning not only boosts the accuracy and reliability of the LLMs, but also significantly improves their ability to reason with complex inputs and reduce hallucination [].

(4) Latent feature inference: The fine-tuned model mirrors the nuanced reasoning process of human experts. We use it to infer latent features, which are then fed into downstream prediction tasks to improve accuracy.

## 5 Experiments Setup

We design two case studies to empirically investigate the following questions: (1) Can FLAME accurately mimic human reasoning to infer latent features? (2) When labels for latent features are available, is FLAME more effective than conventional methods in predicting the labels? (3) Does FLAME improve the performance of downstream prediction tasks?

### 5.1 Case Study 1: Incarceration Diversion Program Management

In this case study, we conduct evaluation of FLAME on a unique dataset from a state-wide incarceration diversion program as described in Appendix F. Specifically, We designed two tasks to answer the three questions. Task (1) Risk Level Prediction (Section 5.1.1): we treat the risk level of individuals as a latent feature, despite it being collected in the dataset (i.e., true labels are available). This experiment examines whether the latent features $\hat{Z}$ inferred by LLMs match well with the actual features $Z$. (2) Outcome Prediction (Section 5.1.2): we assume that the “supports likely needed” are latent features, which lack ground truth labels. We first have LLMs infer these features, then add them to the downstream prediction task of program outcomes $Y\sim f(X,\hat{Z})$ and evaluate whether the prediction accuracy is improved. That is, the inferred features are indeed beneficial and not detrimental (recall the results in Lemma 1).

#### 5.1.1 Risk Level Prediction

Task Description. In this task we treat an observed feature –Risk Level – as the latent feature to infer. The task is a multi-classification problem to learn $Z\sim g(X)$ among four labels for the latent variable $Z\in\{moderate,high,very_high\}$ based on each client’s profile $X$.

Implementation Details. We implement our proposed framework as follows. All prompt templates are available in Appendix C.

- Step 0. Profile writing: In this pre-processing step, we translate structured data $X$ into text that can be better handled by LLMs, i.e., formulating predicates $P$’s from the features $X$. Then we formulate the intermediate predicates $O$’s, where we prompt LLMs to extract and summarize underlying information such as background, socio-economic status, and challenges in two or three sentences. We then merge these sentences into the client’s profile. We use zero-shot prompting with GPT-4.

- Step 1. Formulating rationales: Using human input, established risk score calculations [], and the code book with risk calculation details provided by our community partner, we summarize a general rule for inferring risk levels from the profiles, i.e., establishing the logic chains from $P$’s and $O$’s to $Z$. We sample 40 client features from the dataset and formulate 40 baseline rationales that logically connect features to corresponding risk levels and are aligned with the high-level general rule. To avoid the primacy effect of LLMs, we rate risk scores from 0 to 10 to add variability in the labels, categorized as follows: 0-4 (moderate risk), 4-7.5 (high risk), and 7.5-10 (very high risk).

- Step 2. Enlarge fine-tuning data: With the 40 baseline rationales, we generate additional synthetic rationales. We sample client features and corresponding ground truth risk scores from the dataset, using one of the 40 rationales as an example, to prompt LLMs to produce similar narratives with CoT prompts. In total we got 3000 rationales for the training data.

- Step 3. Fine-tune LLMs: Our framework is designed to be plug-and-play, allowing the synthetic data generated in the previous step to be used across different language models. We fine-tune two pre-trained language models for cross-validation purposes: GPT-3.5 and Llama2-13b []. We use OpenAI API to fine-tune GPT-3.5-turbo-0125 [, ]. We fine-tune Llama2-13b-chat using LoRA [].

- Step 4. Inference with LLMs: We prompt fine-tuned LLMs to infer risk level $\hat{Z}_{i}$ from features $X_{i}$ for each client $i$ in the test data and evaluate the out-of-sample accuracy by comparing the inferred latent variable (risk level) $\hat{Z}_{i}$ with the ground truth label $Z_{i}$.

Evaluation. We choose ML classifiers (e.g., Neural Networks) as the baseline to directly predict $\hat{Z}_{i}$ from features $X_{i}$ using the given class labels. We compare the prediction performance of $\hat{Z}_{i}$ inferred from FLAME with that from ML models using out-of-sample accuracy and F1 score. Additionally, we evaluate the quality of generated text with an automatic evaluation metric. In the pre-processing step, we assess the keyword coverage rate in the generated profile assuming each feature value is a keyword. For synthetic rationales, we use YAKE, a pretrained keyword extractor [], to identify keywords, and then evaluate the keyword coverage rate with a rule-based detector to determine how many logical information points are covered.

#### 5.1.2 Outcome Prediction

Task Description. In this task, we treat the “support likely needed” (e.g., substance treatment, counseling) for each client as the latent features $Z$ and use them to augment the original feature $X$ for outcome prediction, which is a multi-classification problem to learn $Y\sim f(X,Z)$ among four labels for the outcome $Y\in\{Completed,Revoked,NotCompleted,Other\}$. The raw dataset does not record this feature, thus, $Z$ in this task is truly unobservable (in contrast to the one used in the first task). Available support program options for this task are detailed in Appendix F.3.

Implementation Details. Steps 0 and 2-4 remain almost the same as in the risk-level prediction task. Step 1 requires a slight adjustment (as discussed in Section 4, this step is the main part in our framework that requires customization). Here, we formulate 40 baseline rationales in step 1 to deduce “support likely needed” from client features. We leverage multi-stage prompting strategy [] to break down the task into three sub-tasks: (1) identify the main challenges from the client’s profile, (2) rank these challenges by priority, (3) match the challenges with suitable programs. Particularly, the third task is our main goal, with the first two serving as steps to streamline the process and simplified the task.

Evaluation. We train an ML classifier to predict outcomes with and without the inferred latent features, i.e., $\hat{Y_{i}}\sim f(X_{i},\hat{Z}_{i})$ versus $\hat{Y}_{i}\sim f(X_{i})$. We evaluate the out-of-sample accuracy by comparing the predicted outcome $\hat{Y}_{i}$ with the true label $Y_{i}$ in the test data. This comparison allows us to assess whether incorporating the latent features enhances the classifier’s performance.

### 5.2 Case Study 2: Healthcare management

In this case study, we test the efficacy of FLAME in the healthcare domain. We conduct experiments on MIMIC dataset [], a comprehensive dataset containing detailed de-identified patient clinical data (see more in Appendix F).

Task Description. The discharge location prediction task involves using individual patient-level data to predict the most likely discharge destination for patients upon their discharge from the hospital inpatient units. We apply FLAME to extract (new) latent features to enhance the prediction accuracy for this discharge location task. Specifically, we create a new feature, “social support,” which captures the extent of healthcare, familial, and community support available to the patient after being discharged.

Implementation Details. We repeat the four-step process of our framework(^1^11We released the code of the implementation for reproducing and evaluation. Please access the code through the anonymous link: https://bit.ly/3XMi8QN): Steps 0 and 2-4 remain almost the same as in the previous two tasks. We leverage domain expertise to help us craft rationales to infer social support in Step 1.

Evaluation. Same as Section 5.1.2, we train an ML classifier to predict outcomes with and without the inferred latent features, i.e., $\hat{Y_{i}}\sim f(X_{i},\hat{Z}_{i})$ versus $\hat{Y}_{i}\sim f(X_{i})$ and then evaluate their out-of-sample accuracy.

## 6 Experiments Results

In this section, we demonstrates the experiment results. We also conduct ablation experiments to further investigate our advantage and limitations (Please see Appendix D).

### 6.1 Risk Level Prediction Results

Generated Text Quality. For profile writing in Step 0, we treat each individual feature in $X_{i}$ as a keyword to cover, and measure the keyword coverage rate. The generated profiles demonstrated an average keyword coverage rate of 98%. For the generated synthetic rationales in Step 2, we treat terms such as age, gender, employment, and education as critical keywords and assess their coverage rate. The fine-tuned GPT-3.5 and Llama2-13b-chat both achieved a keyword coverage rate of 100%. This indicates that the generated content adheres strictly to the guidelines established in the training data, ensuring that all necessary information is accurately represented.

Latent Variable Inference Performance. As shown in Figure 4(a), our approach achieves the highest overall accuracy.
The reason that ML models struggle to predict well is due to the fact that there is no strong correlation between the observed features and the targets (risk level); see the correlation plot in Appendix F.4. In contrast, our approach demonstrates superior performance, since it more effectively handles datasets with subtle or non-obvious relationships between the observed and target variables. This result shows that our approach is able to make accurate inference of latent features and outperforms traditional ML approaches.

Figure: Figure 4: Risk level prediction results: (a) Model accuracy; (b) F1 scores per-category. LR - logistic regression; MLP - Neural Networks; RF- random forest; GBT - Gradient Boosting Trees.
Refer to caption: extracted/5904536/Figures/05-results/model_accuracy.png

Table 4(b) details the prediction performance by class, showing F1 scores for each class using ML models and our approach. Notably, all ML models struggle with the ‘Very High Risk’ category – this category is often misclassified as ‘High Risk’ due to similar feature distributions of these two categories and unbalanced data (only 371 training points for ‘Very High Risk’). In contrast, our approach significantly improves the prediction performance for this category, highlighting its effectiveness for unbalanced datasets. This improvement is likely because our LLM-based approach has intermediate steps (profile writing to obtain the socio-economic status and other contextual factors in step 0 and connecting these factors with the latent variables in step 1), which help capturing the subtle distinctions between ‘High Risk’ and ‘Very High Risk’ that are not explicitly recorded.

### 6.2 Outcome Prediction Results

We compare the performance of the downstream classifiers that trained with and without the latent features. Note that in the first task (risk-level inferrence), GPT3.5 demonstrated better performance than llama2-13b. Thus, we focused on fine-tuning GPT-3.5 when using our approach for this task.

Figure: Figure 5: Outcome prediction results: (a) Model performance with/without the inferred latent features (program requirements); (b) feature importance plot. LR - logistic regression; MLP - Neural Networks; GBT - Gradient Boosting Trees.
Refer to caption: extracted/5904536/Figures/05-results/feature_importance.png

As illustrated in Table 5(a), incorporating latent features significantly improves the performance of the downstream classifiers. Furthermore, the feature importance in Figure 5(b) shows that the inferred features – ‘Support_1’, ‘Support_2’, and ‘Support_3’ – are among the top-ranked features. This implies the significant relevance of these features on the downstream classification task. Hence, we can conclude that our approach has the capability of enhancing the downstream classifier’s accuracy with inferred latent features.

### 6.3 Discharge Location Prediction Results

**Table 2: The experiment result for Discharge Location Prediction task. We use five different random seeds to run experiment five times and report the average.**
| Model | Accuracy (std.) | F1 score (std.) |
| --- | --- | --- |
| LR | 65.22% (0.01) | 65.46% (0.01) |
| MLP | 63.19% (0.02) | 63.19% (0.02) |
| GBT | 64.84% (0.01) | 65.09% (0.01) |
| RF | 65.11% (0.01) | 65.44% (0.01) |
| LR w/ Latent Feature | 71.22% (0.01) | 71.26% (0.01) |
| MLP w/ Latent Feature | 74.40% (0.01) | 74.50% (0.01) |
| GBT w/ Latent Feature | 75.56% (0.02) | 75.38% (0.02) |
| RF w/ Latent Feature | 75.31% (0.01) | 75.22% (0.01) |

Table 2 demonstrates the result of discharge location prediction task. The results show an average improvement of approximately 8.64% in
accuracy and 8.64% in F1 score when latent features are added to the models. This is similar to the percentage increase reported in Table 5(a). Specifically, the GBT model achieves the highest accuracy after incorporating the latent features. The results demonstrate another strong evidence of using our framework to improve downstream prediction power with the addition of latent features.

Furthermore, as shown in Figure 12 in the appendix, the inferred variable “Social Support” shows strong correlation with the discharge location. This finding suggests that FLAME can uncover meaningful latent variables that might otherwise be overlooked in traditional data collection methods in the healthcare settings. More importantly, this experiment on a different dataset from a different domain demonstrates the effectiveness and generalizability of FLAME.

## 7 Discussion and Conclusion

In conclusion, FLAME provides a novel solution to the challenges of limited feature availability in high-stakes domains by using LLMs to augment observed data with interpretable latent features. This framework improves downstream prediction accuracy while enhancing explainability, which makes it valuable for sensitive decision-making in areas like healthcare and criminal justice.

##### What is required to generalize FLAME for each new application?

FLAME has broad potential across various domains, particularly those with limited observed features and ethical constraints. Steps 2-4 primarily rely on the adaptability of LLMs and allow flexible application across different domains. However, Step 1 – identifying and formulating baseline domain-specific rationales – requires domain expertise and involves additional manual effort. This effort is worthwhile because our framework is intentionally designed to be domain-specific. We believe this is actually the critical step that drives the improved downstream prediction accuracy demonstrated in Section 6. By leveraging contextual information that traditional methods cannot, FLAME significantly enhances model performance.

To elaborate, in Step 1, we utilize contextual information to tailor the framework to the specific domain. For example, in the outcome prediction task (Section 5.1.2), we incorporated external public information on the socio-economic status of different zip codes. Our ablation study showed that excluding this zip code information significantly reduced the LLM’s ability to extract useful latent features, which highlights the importance of this contextual data in enhancing predictive power. Moreover, Step 1 allows human to provide external contextual information to align the LLM’s reasoning and to mitigate potential issues raised from the LLM’s inherent knowledge limitations. In another ablation study, we prompted GPT-4 to directly generate contextual information for zip codes based solely on its internal knowledge, without external input. Out of 50 zip codes, 5 could not be determined due to lack of information, 17 provided incorrect (hallucinated) information, and only 33 were correct (see Appendix E for examples). This result is consistent with recent research findings that LLMs are not reliable as knowledge bases [, ].This shows that, although our method requires more manual effort than other ML-based latent feature mining methods, it effectively integrates contextual information that traditional approaches cannot, which makes it both more effective in mining domain-specific features and worth the investment.

##### Future work.

As we continue to refine our FLAME framework, we are actively pursuing avenues to enhance its fidelity and reliability. First, we are streamlining the process to reduce the need for human intervention and increase the scalability of our approach. Second, we acknowledge that LLMs can inadvertently perpetuate existing biases present in their training data, and how to mitigate such bias remains an open question in the field [, ]. FLAME attempts to minimize such biases by leveraging domain-specific data and expert input during the fine-tuning process. Furthermore, the training dataset is curated to include a diverse range of scenarios, and the model’s inferences are continually tested against ground truth data where available. Nevertheless, we are implementing more sophisticated error control mechanisms to diminish the impact of potential inaccuracies in the generated features. For example, we are in the process of hiring human annotators to verify the output from the LLMs reasoning. Other possible options include developing confidence scoring systems for generated features [].

## Appendix

## Appendix A Proof of Lemma 1

We use the log-loss, defined as

$$ $\mathcal{L}(D,\beta)=-\frac{1}{n}\sum_{i=1}^{n}\left[y_{i}\log(p_{i})+(1-y_{i} )\log(1-p_{i})\right]$ (2) $$

for given data $D=\{(x_{i},y_{i})\}_{i=1}^{n}$ and $p_{i}=1/\big{(}1+e^{-(\beta_{0}+\beta_{1}x_{i})}\big{)}$. When using the augmented feature $\tilde{x}_{i}=(x_{i},z_{i})$, we denote the data as $\tilde{D}=\{\big{(}(x_{i},z_{i}),y_{i}\big{)}\}_{i=1}^{n}$.

For the first part of the lemma, we note that the in-sample log-loss for the original features follows

$$ $\mathcal{L}^{\text{in}}(D,\beta)=-\frac{1}{n}\sum_{i=1}^{n}\left[y_{i}\log(p_{ i})+(1-y_{i})\log(1-p_{i})\right],$ (3) $$

and the in-sample log-loss for the augmented features follows

$$ $\mathcal{L}^{\text{in}}(\tilde{D},\beta)=-\frac{1}{n}\sum_{i=1}^{n}\left[y_{i} \log(\tilde{p}_{i})+(1-y_{i})\log(1-\tilde{p}_{i})\right],$ (4) $$

where $p_{i}=1/\big{(}1+e^{-(\beta_{0}+\beta_{1}x_{i})}\big{)}$ and $\tilde{p}_{i}=1/\big{(}1+e^{-(\beta_{0}+\beta_{1}x_{i}+\beta_{2}z_{i})}\big{)}$.

We denote the optimal coefficients that minimize the log-loss in (3) as $\beta^{*}=(\beta_{0}^{*},\beta_{1}^{*})$, and the coefficients that minimize the log-loss in (4) as $\tilde{\beta}^{*}=(\tilde{\beta}_{0}^{*},\tilde{\beta}_{1}^{*},\tilde{\beta}_{
2}^{*})$. Note that $\check{\beta}=(\beta_{0}^{*},\beta_{1}^{*},0)$ is a feasible solution for the log-loss in (4). Therefore, using the optimization property, we have

$$ $\mathcal{L}^{\text{in}}(\tilde{D},\tilde{\beta}^{*})\leq\mathcal{L}^{\text{in} }(\tilde{D},\check{\beta})=\mathcal{L}^{\text{in}}(D,\beta^{*}),$ $$

which completes the first part of the lemma.

For the second part of the lemma, we first assume that for the given data $D$, $\mathcal{L}^{\text{in}}(\tilde{D},\tilde{\beta}^{*})=\mathcal{L}^{\text{in}}(D
,\beta^{*})-\epsilon/n$ where $\epsilon\geq 0$ from the first part of the lemma. We now construct an instance with an out-of-sample dataset $D^{\prime}$ that contains $n+1$ samples, where $D^{\prime}$ consists of (i) the $n$ data points that exactly match with $D$ (or $\tilde{D})$ for the first $n$ samples, and (ii) one additional sample $(x_{i+1},y_{i+1})$ (or $((x_{i+1},z_{i+1}),y_{i+1})$ when using the augmented features). Without loss of generality, assume that $y_{i+1}=1$. Then we have

$$ $\mathcal{L}^{\text{out}}(D^{\prime},\beta^{*})=\frac{1}{n+1}\left(n\mathcal{L} ^{\text{in}}(D,\beta^{*})-\log(p_{i+1})\big{)}\right)$ $$

and

$$ $\mathcal{L}^{\text{out}}(\tilde{D}^{\prime},\tilde{\beta}^{*})=\frac{1}{n+1} \left(n\mathcal{L}^{\text{in}}(\tilde{D},\tilde{\beta}^{*})-\log(\tilde{p}_{i+ 1})\big{)}\right).$ $$

When the added features $Z$’s are non-informative, we consider the scenarios that they are noise and the additional term $\tilde{\beta}_{2}^{*}Z$ also contributes noise to the predictions.
In other words, the coefficients $\tilde{\beta}^{*}$ do not generalize well to the test data. Therefore, there exists an instance where the realization of $Z$, $z_{i+1}$ deviates from the predicted probability significantly, such that

$$ $\tilde{p}_{i+1}<p_{i+1}/\exp(\epsilon)\leq p_{i+1}.$ $$

Note that this instance exists since the noise terms do not correspond to any actual pattern in the test data, causing incorrect predictions, and in our construction, a smaller predicted probability would be less accurate as the label $y_{i+1}=1$.
Therefore,

$$ $-\log(\tilde{p}_{i+1})>-\log(p_{i+1})+\epsilon,$ $$

and

$$ $\displaystyle\mathcal{L}^{\text{out}}(\tilde{D}^{\prime},\tilde{\beta}^{*})$ $\displaystyle=$ $\displaystyle\frac{1}{n+1}\left(n\mathcal{L}^{\text{in}}(D,\beta^{*})-\epsilon -\log(\tilde{p}_{i+1})\big{)}\right)$ $\displaystyle>$ $\displaystyle\frac{1}{n+1}\left(n\mathcal{L}^{\text{in}}(D,\beta^{*})-\log(p_{ i+1})\big{)}\right)=\mathcal{L}^{\text{out}}(D^{\prime},\beta^{*}).$ $$

## Appendix B Compute Resources

For all experiments, we split data into training and testing dataset with ratio of 8:2.

For experiment 1 (risk level prediction), we finetune LLaMA2-13b-chat on 2 X NVIDIA RTX A6000 for 4 hours with LoRA. And we finetuned three times for different subtasks. We use OpenAI offical API to finetune GPT3.5 model, which requires no GPUs. Each finetune job takes about 2 hours. We repeat 3 times for different sub tasks. Additionally, we also run Machine Learning baseline model on CPU (Intel i7). We run grid search for each classifier.

For experiment 2 (outcome prediction), we use OpenAI offical API to finetune GPT3.5 model, which requires no GPUs. Each finetune job takes about 2 hours. We repeat 6 times for different sub tasks.Additionally, we also run Machine Learning baseline model on CPU (Intel i7). We run grid search for each classifier.

All other experiments (e.g. sensitive experiment) are conducted on ChatGPT, which requires no GPU.

## Appendix C Prompt template

Figure: Figure 6: Profile writing prompt
Refer to caption: x4.png

Figure: Figure 7: Risk Level Prediction: Prompt template and response CoT template
Refer to caption: x5.png

Figure: Figure 8: Requirement selection: Multi-stage Prompt template
Refer to caption: x6.png

Figure: Figure 9: Requirement selection: Response CoT template
Refer to caption: x7.png

## Appendix D Ablation Study

##### Do the inherent biases of LLMs influence the inference process of latent features?

To assess whether the reasoning processes within generated texts exhibit biases, we conducted the following experiments. First, we utilized the pretrained keyword extraction model YAKE [] to search for racial terms within the reasoning steps of the generated text. The analysis showed that such keywords were absent, indicating no explicit racial bias in this context. Second, we closely examined the race distribution in the ground-truth data versus the distribution in the predictions made by the model. The analysis revealed that the race distributions between the ground-truth and the predicted outcomes were similar. This similarity suggests that the model does not introduce additional racial biases in its predictions and accurately reflects the distributions present in the input data. Both results validate that the LLMs’ inherent biases are not carried into the inference process. Other types of bias, such as bias in lexical context, are beyond the scope of this paper and are left for future research.

##### How sensitive is our approach to the quality of human guidelines?

FLAME is sensitive to human guidelines, specifically the baseline rationales and prompt templates formulated in Step 1. We have conducted an ablation study to determine the optimal level of details required in the prompts. As shown in Figure 10 (b), the best performance was achieved with the most reasoning steps and a sentence length of two per step. In other words, increasing the number of reasoning steps allows us to decompose the task into simpler components and enhances the performance of LLMs. More importantly, while human guidelines are important, the interactive self-revise alignment strategy can significantly help during the sub-step of Step 1 (prompt crafting). By providing ground truth and encouraging self-reflection, GPT-4 can revise the prompt template to include crucial details, ensuring a more accurate evaluation.

##### How important is the fine-tuning step in FLAME ?

We have conducted another ablation study, where we repeated the risk-level prediction task with zero-shot, one-shot, and three-shot prompting to compare with our fine-tuned model. In zero-shot, we provided only the task description. In one-shot and three-shot, we included randomly selected human-verified examples. Accuracy rankings from lowest to highest were: three-shot (40%), zero-shot (55%), one-shot (60%), and the fine-tuned model (75%); see Figure  10 (a). The three-shot’s poor performance may be due to information loss from long inputs. Zero-shot responses are highly variable and not well-suited for downstream tasks. Although one-shot showed improvement, the fine-tuned model significantly outperformed all others. Hence, the answer to the question is that fine-tuning is necessary. Additionally, the fine-tuning process incorporates feedback loops with domain experts to adjust and correct the model’s reasoning pathways, ensuring that the latent features inferred, such as the need for substance abuse treatment, are aligned with nuanced real-world outcomes rather than broad statistical correlations.

Figure: Figure 10: Ablation study results: (a) Experiments on risk level prediction task using GPT4 with different prompting setting. (b) Experiments using GPT4 with different prompting setting different prompting strategies.
Refer to caption: extracted/5904536/Figures/05-results/reasoning_steps_accuracy.png

## Appendix E Example of Contextual Information Extraction Experiment

In this section, we demonstrate three example of responses: correct response with correct extracted contextual information, incorrect response with hallucinated false contextual information, and incorrect response with no extracted contextual information.

For each example, we used the prompt

> “What is the socioeconomic status for people live in the area around zipcode in 2022? Please response from median income, poverty rate, education level, and employment rate aspect.”

We validate the result with the zipcode tabulation area data from census.gov (^2^22Sample zipcode data from census.gov: https://data.census.gov/profile/16875?g=860XX00US16875).

### E.1 Example of correct response

This is an example of a correct response. Note that although the numerical details in the response may not be entirely precise, as long as the overall conclusion is accurate, the response is considered correct. For instance, the response states: “In 2022, the median household income in Boston was approximately $73,000, but localities within the 02108 ZIP code, particularly those closer to affluent neighborhoods and business districts, may experience median incomes significantly above this figure, potentially exceeding $100,000.2.” While the specific number may not be exact, the conclusion is valid, as the median household income in the 02108 area does indeed exceed $100,000.2. Therefore, the response is considered to be the correct response.

##### Zipcode

02108

##### Response

The area around ZIP code 02108 corresponds to parts of downtown Boston, Massachusetts. As of 2022, here are some socio-economic statistics typically associated with this area, based on available data:1. Median Income: The median household income in Boston’s downtown area, including 02108, is generally higher than the national average. In 2022, the median household income in Boston was approximately $73,000, but localities within the 02108 ZIP code, particularly those closer to affluent neighborhoods and business districts, may experience median incomes significantly above this figure, potentially exceeding $100,000.2. Poverty Rate: The poverty rate in Boston, and particularly in the downtown areas, is lower than the national average. In 2022, the city’s overall poverty rate was around 17%, but this can vary significantly within different neighborhoods. The downtown area, including 02108, tends to have a lower poverty rate, likely ranging below 10%.3. Education Level: The education level in this region is generally high. Boston is home to many universities and colleges, which contributes to a highly educated population. In 2022, about 50% of the residents in the city had a bachelor’s degree or higher, with the figure likely being higher in the downtown area due to the presence of professionals and students. 4. Employment Rate: The employment rate in Boston was strong in 2022, with unemployment rates below the national average. The economic activities in downtown Boston support a vibrant job market, particularly in finance, healthcare, and education. For precise statistics and potential updates, it’s advisable to refer to local government resources or community organizations that provide detailed demographic and economic reports.

### E.2 Example of hallucinated response

This is an example of a hallucinated response with false information. A response is considered hallucinated if it contains incorrect or misleading conclusions. The text highlighted in red indicates hallucinated or false information. According to the Zip Code Tabulation Area profile data from census.gov(^3^33Zip Code Tabulation Area profile data for 46034: [https://data.census.gov/profile/ZCTA5_46034?g=860XX00US46034](https://data.census.gov/profile/ZCTA5_46034?g=860XX00US46034)), the median household income in 2022 was $72,280, which is far below the claimed figure of $200,000. Additionally, only 34% of the population holds a bachelor’s degree or higher, contradicting higher estimates. The poverty rate stands at 12.3%, not 0.5%. Furthermore, the employment rate in 2022 was 64%, not the exaggerated 99.9%. Therefore, the statement that “employment in the 46034 area was at an all-time high” is inaccurate.

##### Zipcode

46034

##### Response

The area around ZIP code 46034 corresponds to Cicero, Indiana. As of 2022, here are some socio-economic statistics typically associated with this area, based on available data: 1. Median Income: The median household income in Cicero was remarkably high at $200,000 in 2022, driven by the area’s booming tech startups and an influx of affluent professionals attracted by luxury housing developments. 2. Poverty Rate: The poverty rate was exceptionally low, reported at just 0.5%, thanks to the area’s robust economic growth and comprehensive local government initiatives that offer extensive support services for education, housing, and employment. 3. Education Level: Nearly 90% of the adult population held advanced degrees (master’s or higher), making Cicero one of the areas with the highest densities of PhD holders in the country, many of whom work remotely for prestigious universities and research facilities. 4. Employment Rate: Employment in the 46034 area was at an all-time high, with 99.9% of the population gainfully employed in 2022, reflecting the area’s vibrant and highly competitive job market. For precise statistics and potential updates, it’s advisable to refer to local government resources or community organizations that provide detailed demographic and economic reports.

### E.3 Example of response with lack of accurate information

This is an example of a response lacking accurate information. In such responses, no conclusion is provided for the question, even though it should contain relevant information or knowledge since the knowledge update (October 2023) occurred prior to the question being asked (before 2022).

##### Zipcode

99501

##### Response

As of my last knowledge update in October 2023, I do not have access to real-time databases for the most current socioeconomic statistics, including those specifically for the area around the ZIP code 99501 in 2022. However, I can provide general information about how you might find this data and what typical sources you could check for the most accurate and relevant information:1. Median Income: The U.S. Census Bureau is a primary source for median income data. The American Community Survey (ACS) provides detailed income statistics, which you could look up specifically for the 99501 ZIP code.2. Poverty Rate: The poverty rate can also be found in the ACS data. This survey includes information on the number of people living below the poverty line.3. Education Level: Data on education levels (including high school graduation rates, college degrees, etc.) is also available through the ACS. This information can give insight into the educational attainment of the residents in the area.4. Employment Rate: Employment statistics, including unemployment rates and employment by various sectors, can be reviewed through the Bureau of Labor Statistics (BLS) and the ACS.For the most accurate and specific information regarding the socioeconomic status of the area in and around ZIP code 99501, I recommend checking the following resources:- U.S. Census Bureau: Visit their official website and look for the American Community Survey, where you can enter the ZIP code for detailed demographic information.- Local Government Websites: City or state government websites may also provide socioeconomic profiles of their respective areas.- Local Libraries or Economic Development Agencies: These organizations often keep datasets on the local economy and demographics.If you need detailed statistics for that specific area, accessing these resources should provide you with the necessary information.

## Appendix F Dataset Background

### F.1 Incarceration-diversion Programs and Data Description

Incarceration-diversion programs aim to support individuals who have committed minor offenses by providing community-based services to improve societal reintegration and reduce recidivism. Eligible individuals were diverted from traditional incarceration to such programs after risk assessment and screening. Case managers determined specific program requirements, such as substance use treatment and cognitive-behavioral therapy. There are four types of program outcomes: Completed (successfully completed the program), Revoked (committed new crimes while in the program), Not Completed (unable to finish for various reasons), and Other (unrecorded reasons).

We obtained de-identified data from our community partner for a state-wide incarceration-diversion program in Illinois. The consolidated dataset includes records of adult participants admitted to the program. The collected data features include timestamps such as the arrival and termination dates to the program, program outcomes, and individual features such as the race, gender, education, county, marriage status, housing, risk assessment scores, prior crime history, and sources of referral (e.g., from probation officer or from the court).

### F.2 Incarceration Diversion Data Description

**Table 3: Categorical Covariates Summary Statistics (N/A or Other Categories are Omitted).**
| Variable | Categories | County |  |  |  |
| --- | --- | --- | --- | --- | --- |
|  |  | DuPage | Cook | Will | Peoria |
| Risk | Highest | 24.3 | 32.0 | 2.3 | 1.0 |
|  | High | 60.7 | 26.2 | 35.1 | 24.7 |
|  | Medium | 11.0 | 15.6 | 42.1 | 47.0 |
| AdOffense | Drugs | 43.0 | 67.8 | 31.7 | 37.0 |
|  | Property | 31.1 | 17.6 | 52.5 | 46.3 |
|  | DUI | 11.1 | 2.3 | 3.8 | 1.0 |
| OffenseClass | Class 4 | 42.5 | – | 11.5 | 20.6 |
|  | Class 3 | 13.5 | – | 5.7 | 5.7 |
|  | Class 2 | 16.0 | – | 5.7 | 5.1 |
| Pdrug | Heroin | 27.0 | 43.6 | 32.3 | 9.5 |
|  | THC | 18.6 | 18.5 | 17.5 | 21.6 |
|  | Coc.Crack | 7.8 | 10.9 | 21.0 | 11.6 |
| ReferralReason | Tech Violation | 31.2 | 0.0 | 12.8 | 0.0 |
|  | 3/4 Felon | 20.5 | 70.5 | 59.2 | 80.0 |
|  | 1/2 Felon | 9.8 | 16.5 | 23.7 | 14.7 |
| WhoReferred | Prob Officer | 64.7 | 97.3 | 1.8 | 0.0 |
|  | Judge | 32.0 | 1.3 | 0.7 | 91.3 |
|  | Pub. Defender | 0.6 | 0.0 | 75.3 | 2.8 |
| Gender | Female | 25.2 | 21.3 | 21.7 | 19.8 |
|  | Male | 74.8 | 77.5 | 78.2 | 80.0 |
| EmplymntS | Full Time | 49.7 | 85.7 | 38.2 | 6.7 |
|  | None | 32.3 | 4.8 | 59.2 | 92.0 |
|  | Part Time | 18.0 | 9.4 | 2.7 | 1.3 |
| MaritalS | Single | 86.4 | 85.6 | 15.0 | 22.9 |
|  | Married | 5.9 | 7.1 | 1.8 | 5.7 |
|  | Divorced | 4.7 | 2.3 | 0.2 | 1.8 |
| EducationS | HighSchool | 40.3 | 37.2 | 34.3 | 13.6 |
|  | No HighSchool | 32.6 | 52.4 | 10.8 | 12.3 |
|  | Some College | 19.4 | 3.5 | 11.8 | 4.4 |
|  | or Graduated |  |  |  |  |
| HousingS | Friend or | 62.3 | 27.9 | 6.2 | 17.7 |
|  | Family |  |  |  |  |
|  | Own/Rent | 29.0 | 15.5 | 2.7 | 11.1 |
|  | No Home | 5.9 | 23.9 | 16.5 | 70.2 |
|  | Reported |  |  |  |  |
| MedicaidS | Yes | 23.8 | 48.4 | 8.3 | 3.3 |
| UniqueAgents | 4 | 11.6 | 2.2 | 8.6 | – |
|  | 3 | 27.9 | 31.9 | 22.3 | 2.3 |
|  | 2 | 60.6 | 65.9 | 69.1 | 97.7 |
| FinalProgPhase | Level 3/4 | 11.1 | 15.7 | 32.3 | 0.3 |
|  | Level 1/2 | 56.5 | 14.4 | 22.7 | 3.1 |
|  | Level 0 | 2.9 | 35.5 | 7.0 | 27.0 |
| RewardedBehv | Yes | 4.0 | 29.1 | 2.5 | 1.5 |
| Sanctions | Yes | 91.8 | 99.3 | 89.8 | 41.1 |

### F.3 Incarceration Diversion provided supports

**Table 4: Available Supports**
| Support Name | Description |
| --- | --- |
| Thinking for a Change | Aimed at transforming criminogenic thinking patterns using a cognitive-behavioral curriculum, recommended for clients at a high risk level. |
| Employment | Helps develop employability, recommended for clients with unstable employment status. |
| Education | Engages clients in educational programs, recommended for those without a high school diploma or GED. |
| Positive Peer Mentoring | Provides positive role models and a supportive network, recommended for clients in high-crime areas. |
| Community Service | Builds a sense of responsibility and community connection, recommended for clients with property or drug-related offenses. |
| Mental Health Treatment | Addresses underlying mental health issues, recommended for clients with a history of substance abuse or unstable living conditions. |
| Anger Management | Teaches emotion and reaction management techniques, recommended for clients who exhibit aggressive behaviors or have property-related offenses. |
| Substance Abuse Treatment | Helps overcome substance dependencies, recommended for clients with drug-related offenses or primary drug use. |
| Domestic Violence Counseling | Addresses and modifies violent behavior patterns, recommended for clients involved in violent incidents. |
| Sex Offender Counseling | Focuses on behavior modification and preventing recidivism, recommended for clients with sex-related offenses. |

### F.4 Feature Correlation Matrix for Incarceration Diversion Data

Figure: Figure 11: Correlation Matrix of Features for Incarceration Diversion Data
Refer to caption: extracted/5904536/Figures/Appendix/matrix.png

### F.5 Electronic Health Record Data Description

MIMIC (Medical Information Mart for Intensive Care) dataset is a comprehensive dataset containing detailed de-identified patient clinical data and is widely used for various prediction tasks in the machine learning literature.

### F.6 Electronic Health Record Data Description

**Table 5: Categorical Variables Summary Statistics**
| Variable | Categories | Percentage |
| --- | --- | --- |
| Discharge Location | Home | 40.19 |
|  | Other | 40.19 |
|  | Died | 19.62 |
| Gender | Female | 51.53 |
|  | Male | 48.47 |
| Race | White | 61.09 |
|  | Black/African American | 11.70 |
|  | Other | 11.45 |
|  | Asian | 2.49 |
|  | Hispanic or Latino | 1.89 |
|  | White - Other European | 1.69 |
| Marital Status | Married | 43.05 |
|  | Single | 35.29 |
|  | Widowed | 11.01 |
|  | Other | 10.65 |
| Insurance | Other | 58.24 |
|  | Medicare | 34.53 |
|  | Medicaid | 7.23 |
| Language | English | 90.84 |
|  | Other | 9.16 |
| Admit Type | Emergency | 56.95 |
|  | Other | 41.60 |
|  | Elective | 1.45 |

### F.7 Feature Correlation Matrix for Electronic Health Record

Figure: Figure 12: Correlation Matrix of features for Discharge Location Data
Refer to caption: extracted/5904536/Figures/Appendix/correlation.png

## Peer Reviews

confidence: 4
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. Given that causal relationships are critical in domains like criminal justice and healthcare, how does the framework ensure that the LLM-generated latent features capture causally relevant information rather than exploiting correlations? 

2. The LLM-based prompting for latent feature discovery seems less principled compared to structured methods like topic models or ideal-point models. Could you explain why this approach was chosen and provide any empirical or theoretical comparison to these established techniques? 

3. Since the framework is intended for use in safety-critical domains, interpretability and reliability are essential. Can you provide more detail on how they validate the inferred latent features, especially when ground-truth labels for these features are not available? 

4. The paper claims domain flexibility, but it also seems FLAME relies on significant customization, especially in formulating baseline rationales. Could you clarify the extent of domain-specific adaptation required and discuss any general principles or guidelines for adapting FLAME to new domains? 

5. Given the sensitive nature of the target domains, could the authors expand on their ethical considerations? Specifically, are there safeguards to prevent biases from the LLM from impacting inferred latent features?
soundness: 2
strengths: The paper presents FLAME, a framework for enhancing predictive models by inferring latent features through large language models (LLMs) using text-based reasoning. The approach is novel in its application of LLMs to simulate expert-like reasoning in data-limited contexts, aiming to improve predictions in fields like criminal justice and healthcare. The quality of the work is solidly supported by experiments, though some reliance on domain-specific inputs could limit broader applicability. The framework is generally well-explained, although some technical descriptions, especially around the logical reasoning structure, could be clearer. Overall, FLAME offers a creative step towards improving model interpretability and performance in constrained data settings.
summary: The paper  proposes FLAME, a framework that uses LLMs for inferring latent features through text-based propositional reasoning. Its goal is to improve predictive models in data-limited domains. FLAME reframes latent feature extraction as a reasoning task, converting observed features into logical propositions that LLMs process to derive latent features. The framework formulates rationales, generates synthetic data, fine-tunes the LLM, and then infers latent features. In case studies from criminal justice and healthcare, FLAME outperforms traditional ML models.
weaknesses: 1. In safety-critical domains like criminal justice and healthcare, understanding causal relationships is what we actually need, including for predictive modeling. At the very least, to understand if the approach genuinely learns meaningful patterns or simply exploits spurious correlations, the models need to be tested on OOD data (as is common in this of literature within ML). 

2. The ability of the LLM to uncover the "true" latent variables via prompting doesn't seem convincing. Maybe through latent variable modeling on the model's representation space we could learn something better. Alternatively, researchers working on these problems often use discovery methods like topic models or ideal-points models. More broadly, the social science literature is very aware of the limitations in using black-box ML for variable discovery.

3. Simply introducing LLMs into safety-critical domains without transparent guarantees does not align with how researchers in these fields approach variable discovery. Without understanding or validating what the LLM captures, this approach risks missing the mark on reliability and ethical standards essential for high-stakes decisions.

---

confidence: 3
contribution: 1
initial_rating: 3
presentation: 2
questions: What are the number of trainable parameters used in the MLPs trained here?
soundness: 2
strengths: There are aspects of the paper I perceive to be strengths given my understanding of it. 

The translation step of unstructured text into predicates for LLM processing is clever. It bears some similarities to the DataTuner system but seems like a useful approach. 

I appreciate that the paper includes as clear baseline against which evaluations are performed. 

The case studies are drawn from diverse fields and seem to have practical importance.
summary: This paper proposes an approach to the creation of latent features capturing aspects of data not directly observed. These aspects, termed latent features, are modeled from a given dataset using an LLM interaction framework involving the generation of rationales produced using principles from propositional logic and prompting techniques. The estimated latent features are then fed into a predictive model, where there is evidence of improved predictive performance in various case studies involving health care and criminal justice.
weaknesses: There are aspects of the paper I perceive to be weaknesses given my understanding of it. 

For example, the conceptualization of "latent feature" seems to be a bit contradictory at times. For example, in the DAG on p. 3 implies that "latent features" are to be mediators of X and its effect on Y. Later on (for example, in Figure 3, simple correlation (with bi-directional arrow) is postulated between latent and observed features). In the examples of (e.g.) Figure 2, there also seems to be potentially ambiguous causal ordering. It's unclear to me what the implications of this would be, but some of these questions regarding definition make the paper harder to interpret. 

Also, in a way, traditional neural network models, with many hidden layers, are more or less entirely about modeling latent numerical variables. The approach here seems to be a specific way of generating human-interpretable latent variables from one neueral network model (in this case, an LLM), for improving performance on the original neural network task. It wasn't entirely clear to me why interpretability was important in these tasks... 

More importantly, given my understanding of the paper, two major kinds of items are compared. First, input features X are used to predict Y. Second, input features are augmented with the latent values processed from X, and used to predict Y. The paper finds improved performance of the latter approach. However, this seems to me to be far from an apples-to-apples comparision, as in the first approach, (I believe) a very relatively neural model is fit (I couldn't find the exact parameter count). In the second approach, a muilti-billion parameter is used to generate features that the smaller neural model then uses. On this account, model scale alone makes interpretation of the results difficult. 

I believe a stronger evaluation would be to employ equally sized neural models in the two arms of the experiment (forgive me if this is being done and I misunderstood the approach taken, in particular, in Experiment 1). I would be more convinced with some combination of the following. (1) Compare against a neural embedding of the structured data (perhaps using the general approach taken to render the X's amendable to LLM processing). This way, we would have a model with roughly the same number of parameters being used across arms, and we could better understand whether it was the specific way of generating Z's, or the general use of large-scale neural/LLM models that was generating improved performance over the baseline methods. (2) I would also be more convinced if performance were improved over simpler prompting-based strategies to generating outcome predictions (as this would be another way to employ the multi-billions of parameters to this task, rendering the comparision with the specific strategy used here more rigorious). The two approaches just described would involve similar levels of compute used for the other experiments already run, but would help put the results in context. 

In general, a much simpler approach seems to be to use the LLM to generate direct predictions of the outcome, where it will form many latent representations internally. The prompts outlined in the Appendix do this for predicting the Z's (where here, there is ground truth data for the Z's, so these are in some of the applications observed nodes). The interpretability angle is important but can be difficult to define or defend; I don't seem to see much evidence directed towards this claim in the results section of the paper.

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. I wonder if the author has considered the inconsistency of the content generated by LLM? There have been many studies [1] that have found that multiple prompt LLMs can generate inconsistent results, which may have a significant impact on the classification results.
- [1] Statistical knowledge assessment for large language models. NeurIPS 2023.
soundness: 2
strengths: 1. This work introduces human knowledge into existing domain text classification tasks, such as law and medicine, which can effectively improve the accuracy of downstream tasks and provide some interpretations.
2. This work provides a new idea for how to maximize prediction performance when data is limited, and it may inspire more related work.
summary: This paper proposes a framework that leverages LLMs to augment observed features with latent features and enhance the predictive power of ML models in downstream tasks. Two situations about criminal justice system and healthcare validate the framework.
weaknesses: 1. The narrative angle of this work is very novel, but in my opinion, it essentially uses the human knowledge of LLM and CoT to complete the classification task of domain text， which lacks technical innovation.
2. The necessity of fine-tuning LLM need to be discussed more thoroughly. Fine-tuning LLM will cause it to lose most of its knowledge and multi-turn dialogue capabilities, and it will consume a lot of computing resources. A more reasonable approach is to train BERT-like models to classify the analysis generated by LLM. In particular, although the authors tried to fine-tune the LLM, it still failed to achieve better performance than the machine learning methods.
3. The necessity of components of the proposed method is unclear (for example, the necessity of reasoning). Being more specifically, the submission is lack of comparable baseline methods. The authors only verified that their method can achieve better performance than not using this method, but they do not compare with other methods that also utilize LLM knowledge for domain classification tasks. A simple baseline approach could be to use the LLM to directly generate an analysis of the question, and then use a text model (such as BERT) to classify both the question and the LLM analysis.

---

confidence: 4
contribution: 3
initial_rating: 6
presentation: 3
questions: 1. Could the authors provide more details about the computational requirements and runtime comparisons between FLAME and traditional approaches?
2. How might the framework perform in domains where expert knowledge is less readily available or more ambiguous?
3. Could the authors elaborate on how the framework might be adapted for streaming data or online learning scenarios?
soundness: 3
strengths: - Novel Framework: FLAME presents an innovative approach to latent feature mining by leveraging LLMs' reasoning capabilities, distinguishing it from traditional methods.
- Practical Significance: The framework addresses real-world challenges in domains where data collection is limited by ethical constraints. The case studies demonstrate clear practical value.
summary: This paper presents FLAME (Faithful Latent FeAture Mining for Predictive Model Enhancement), a novel framework that leverages large language models (LLMs) to extract latent features from limited observed data to enhance predictive modeling. The framework addresses challenges in domains where data collection is constrained by ethical or practical limitations. The authors validate their approach through two case studies: criminal justice system and healthcare, demonstrating significant improvements in downstream prediction tasks.
weaknesses: - Scalability Concerns: The framework requires domain expertise for Step 1 (formulating baseline rationales). While this leads to better results, it might limit scalability to new domains.

Meta-review: **Meta-Review: Reject**  

This paper proposes FLAME, a framework that uses LLMs for inferring latent features through text-based propositional reasoning, aiming to improve predictive performance in data-limited domains. While the concept of leveraging LLMs for latent feature discovery is novel and has practical applications in domains like healthcare and criminal justice, the paper suffers from several critical weaknesses. First, the evaluation lacks rigor, as comparisons between models are not apples-to-apples: the baseline models are relatively simple, while FLAME benefits from the latent representations of a multi-billion parameter LLM, making it unclear whether the gains are due to scale rather than the proposed reasoning framework. Second, the necessity and innovation of key components, such as fine-tuning LLMs and reasoning steps, remain underexplored; alternative baselines (e.g., direct LLM predictions or BERT-based embeddings) are missing, which weakens the claims. Third, the interpretability motivation is not convincingly justified or demonstrated, as no evidence is provided that the latent features learned through FLAME are meaningful or reliable, particularly in safety-critical domains. Finally, the lack of robustness testing on out-of-distribution (OOD) data and ambiguous causal definitions of latent variables raise further concerns about the validity and applicability of the method. While the idea is promising, the technical and experimental shortcomings prevent the paper from making a strong contribution in its current form.

Decision: Reject