# HLFSRNN-MIL: A Hybrid Multi-Instance Learning Model for 3D CT Image Classification. _Applied_
## 3 Proposed Methods
### Multiple Instance Learning  
Unlike typical binary supervised learning problems, the objective of prediction in the Multiple Instance Learning (MIL) problem involves a collection of instances comprising numerous instances, denoted as \(X=\{x_{1},x_{2},\ldots,x_{K}\}\). Instances within the collection exhibit no interdependence or ordering among each other. Throughout this process, it is presumed that the value of \(K\) may vary across different collections, with a package label \(Y\) associated with each collection, existing independently and denoted as \(Y\ \in\ \{0,\ 1\}\). Traditional multi-instance learning assumes that each instance in the bag possesses an individual label \(Y=\{y_{1},y_{2},\ldots,y_{K}\}\) and \(y_{k}\in\ \{0,\ 1\}\)[37]. The assumption underlying the MIL problem can be articulated as follows:  
\[Y=\begin{cases}0,&\text{iff}\underset{k}{\sum}y_{k}=0\\ 1,&\text{otherwise}\end{cases} \tag{1}\]  
However, obtaining labels at the instance level can be challenging and time-consuming in many practical scenarios. For instance, in CT images of lung cancer and COVID-19, medical professionals must examine all slices to identify lesion locations, where a lesion may span across a contiguous series of adjacent slices. Therefore, it becomes imperative to define an aggregation function \(R(\cdot)\) that aggregates the spatial features of instances within a specified range, such as:  
\[A_{i}(x_{a})=R\left(x_{a-\frac{w}{2}},\ldots,x_{a+\frac{w}{2}}\right) \tag{2}\]where \(A_{i}(x_{a})\) is the result of the \(a\)-th instance aggregation, \(i\) denotes the number of primary aggregations within the package, with \(i=k-W+1\), where \(W\) is a hyperparameter signifying the range requiring particular attention for the instance.  
In many cases, the number of instances with actual corresponding labels in the positive bag may be limited and non-contiguous, influenced by factors such as slice thickness during CT scanning and the actual number of lesions present in the patient. Given this scenario, it becomes essential to adapt the two requisite transformation functions \(f(\cdot)\) and \(g(\cdot)\), of the prediction model for the MIL problem, as follows:  
\[P(X)=g\Bigg{(}f\Bigg{(}\sum_{i}A_{i}(x_{a})\Bigg{)}\Bigg{)} \tag{3}\]  
In the current study, the selection of types for \(f(\cdot)\) and \(g(\cdot)\) is approached from different perspectives to address the problem [38]. Firstly, the focus lies on the instance-based method. Here, the transformation function \(f(\cdot)\) is regarded as an instance-level classifier, while \(g(\cdot)\) is considered an identity function that consolidates instance scores. While this method offers high interpretability, scholars [39] have observed its inferior effectiveness compared to the embedding-based approach across all facets. The embedding method utilizes \(f(\cdot)\) as a low-dimensional embedding feature extractor, with \(g(\cdot)\) serving as a packet-level aggregation operator. By aggregating sample-level features into packet-level features, predictions for package labels can be made.