A strip ridge regression input optimization method, device, equipment, medium and product
Patent Information
- Application Number
- CN202610821290.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-09
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-06-09
AI Technical Summary
[0004]但是,传统带状岭回归仍存在一个关键问题,即“带”如何定义
本申请提供了一种带状岭回归输入优化方法、装置、设备、介质及产品,面向多个原始特征空间联合建模的场景,先根据各原始特征空间在样本维度上诱导的核结构相似性进行聚类重组,再将聚类得到的特征簇作为带状岭回归中的低层特征空间分别施加正则化约束(带状岭回归输入优化结果包括正则化参数),从而实现对“带”的数据驱动定义;通过在回归之前引入特征空间相似性聚类,带状岭回归中的“带”不再由人工经验直接指定,而是由数据驱动形成,从而使组内共享正则化尺度的假设更合理;通过将多个统计结构相近的原始特征空间重组为簇级特征空间,减少了待优化的正则化参数数量,降低了超参数搜索空间和计算复杂度。
Smart Images

Figure CN122346832B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of machine learning and data processing technology, and in particular to a method, apparatus, device, medium and product for optimizing the input of a banded ridge regression. Background Technology
[0002] In natural stimulus brain imaging studies, machine learning multi-feature joint modeling, and other multi-source high-dimensional signal prediction tasks, it is often necessary to use multiple feature spaces simultaneously to represent the same external stimulus or the same system state. For example, in natural speech fMRI coding modeling, low-level acoustic and linguistic features such as phoneme indicators, phoneme rates, word rates, fundamental frequencies, short-time Fourier transforms, cochlear spectra, loudness, envelopes, and power spectra may be used, while high-level contextual semantic embeddings generated by large language models may also be introduced. Different feature spaces often exhibit significant differences in dimensionality, covariance structure, information granularity, and redundancy.
[0003] In related approaches, ordinary ridge regression typically applies a uniform regularization strength to all features, implicitly assuming that all parameter directions have the same shrinkage scale, which often fails in scenarios involving joint modeling of multiple feature spaces. To address this issue, banded ridge regression allows different feature spaces to set independent regularization parameters, thereby achieving differentiated shrinkage.
[0004] However, traditional banded ridge regression still faces a key problem: how to define a "band". If the original feature space is directly mapped one-to-one to independent bands, too many bands will lead to excessively high hyperparameter dimensionality, rapid expansion of the search space, significant increase in computational cost, and difficulty in finding the optimal solution. If multiple heterogeneous feature spaces are roughly pieced together into a few large feature spaces, the significance of the "grouping differentiation constraint" of banded ridge regression will be weakened.
[0005] Therefore, a method is needed to perform data-driven reorganization of the original feature space before entering the ridge regression. Summary of the Invention
[0006] The purpose of this application is to provide a method, apparatus, device, medium, and product for optimizing the input of a banded ridge regression, which can make the feature space within the same band as similar as possible in statistical structure, while making different bands as different as possible, thereby simultaneously taking into account computational efficiency, prediction performance, and interpretability.
[0007] To achieve the above objectives, this application provides the following solution: Firstly, this application provides a method for optimizing the input of a ridge regression pattern, including: Acquire target stimulus data and target response data corresponding to the target stimulus data; Feature extraction is performed on the target stimulus data to obtain multiple raw feature space data; A kernel representation matrix is constructed for each of the original feature space data, and each kernel representation matrix is normalized to obtain a normalized kernel matrix; the similarity between pairs of original feature space data is calculated based on the normalized kernel matrix of each pair of original feature space data, and the similarity between pairs of original feature space data is converted into a distance matrix between pairs of original feature space data. Hierarchical clustering is performed based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters; The cluster-level feature space and target response data corresponding to all feature clusters are input into the ridge regression model for joint modeling to obtain the ridge regression input optimization model. Solve the ridge regression input optimization model to obtain the ridge regression input optimization result; the ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space and the regularization parameter corresponding to each cluster-level feature space.
[0008] Secondly, this application provides a ridge regression input optimization device, comprising: The data acquisition module is used to acquire target stimulus data and target response data corresponding to the target stimulus data; The low-level feature extraction module is used to extract features from the target stimulus data to obtain multiple raw feature space data. The similarity analysis module is used to construct a kernel representation matrix for each of the original feature space data, and to normalize each kernel representation matrix to obtain a normalized kernel matrix; to calculate the similarity between pairs of original feature space data based on the normalized kernel matrix of each pair of original feature space data, and to convert the similarity between pairs of original feature space data into a distance matrix between pairs of original feature space data. The feature cluster reconstruction module is used to perform hierarchical clustering based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. The ridge regression modeling module is used to input the cluster-level feature space and target response data corresponding to all feature clusters into the ridge regression model for joint modeling, and obtain the ridge regression input optimization model. The result output module is used to solve the banded ridge regression input optimization model to obtain the banded ridge regression input optimization result; the banded ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space and the regularization parameter corresponding to each cluster-level feature space.
[0009] Thirdly, this application provides a computer device, including: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the steps of the above-described band ridge regression input optimization method.
[0010] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described band ridge regression input optimization method.
[0011] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described band ridge regression input optimization method.
[0012] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method, apparatus, device, medium, and product for optimizing the input of a banded ridge regression, targeting scenarios involving joint modeling of multiple original feature spaces. First, it clusters and reorganizes the original feature spaces based on the similarity of their kernel structures induced in the sample dimension. Then, it applies regularization constraints (the optimization result of the banded ridge regression input includes regularization parameters) to the feature clusters obtained from the clustering as the lower-level feature spaces in the banded ridge regression, thereby achieving a data-driven definition of the "band". By introducing feature space similarity clustering before regression, the "band" in the banded ridge regression is no longer directly specified by human experience but is formed by data, making the assumption of shared regularization scale within groups more reasonable. By reorganizing multiple original feature spaces with similar statistical structures into a cluster-level feature space, the number of regularization parameters to be optimized is reduced, lowering the hyperparameter search space and computational complexity. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly described below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort: Figure 1 This is an application environment diagram of a ridge regression input optimization method according to an embodiment of this application; Figure 2 A flowchart illustrating a method for optimizing the input of a ridge regression model, provided in an embodiment of this application; Figure 3 A schematic diagram illustrating the specific process of the band ridge regression input optimization method in a natural language-stimulated fMRI brain coding modeling scenario provided in an embodiment of this application; Figure 4A schematic diagram of the functional modules of a ridge regression input optimization device provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] The ridge regression input optimization method provided in this application can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server. Terminal 102 can send target stimulus data and target response data to server 104. After receiving the target stimulus data and target response data, server 104 can extract features from the target stimulus data to obtain multiple original feature space data. A kernel representation matrix is constructed for each original feature space data, and each kernel representation matrix is normalized. Similarity is calculated based on the normalized kernel matrices of pairwise original feature space data, and the similarity is converted into a distance matrix between pairwise original feature space data. Hierarchical clustering is performed based on the distance matrices between all pairwise original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. Based on the cluster-level feature spaces corresponding to all feature clusters and the target response data, a joint model is built, and the resulting ridge regression input optimization model is solved to obtain the ridge regression input optimization result. Server 104 can feed back the obtained ridge regression input optimization result to terminal 102. In addition, in some embodiments, the band ridge regression input optimization method can also be implemented by the server 104 or the terminal 102 separately. For example, the terminal 102 can directly perform band ridge regression input optimization on the target stimulus data and target response data, or the server 104 can obtain the target stimulus data and target response data from the data storage system and perform band ridge regression input optimization on the target stimulus data and target response data.
[0017] The terminal 102 can be, but is not limited to, various desktop computers and laptops. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers, or it can be a cloud server.
[0018] In one exemplary embodiment, such as Figure 2 As shown, a method for optimizing the input of a ridge regression pattern is provided. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps 201 to 206.
[0019] Step 201: Obtain the target stimulus data and the target response data corresponding to the target stimulus data.
[0020] Step 202: Extract features from the target stimulus data to obtain multiple original feature space data.
[0021] Step 203: Construct a kernel representation matrix for each of the original feature space data, and normalize each kernel representation matrix to obtain a normalized kernel matrix; calculate the similarity between pairs of original feature space data based on the normalized kernel matrices of each pair of original feature space data, and convert the similarity between pairs of original feature space data into a distance matrix between pairs of original feature space data.
[0022] Step 204: Perform hierarchical clustering based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters.
[0023] Step 205: Input the cluster-level feature space and target response data corresponding to all feature clusters into the ridge regression model for joint modeling to obtain the ridge regression input optimization model.
[0024] Step 206: Solve the ridge regression input optimization model to obtain the ridge regression input optimization result; the ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space and the regularization parameter corresponding to each cluster-level feature space.
[0025] Implementing steps 201 to 206 above, for scenarios involving joint modeling of multiple original feature spaces, first, clustering and recombination are performed based on the similarity of the kernel structure induced by each original feature space in the sample dimension. Then, the clustered feature clusters are used as independent feature spaces in the ridge regression, and regularization constraints are applied to them respectively (the optimization result of the ridge regression input includes regularization parameters), thereby achieving a data-driven definition of the "band". By introducing feature space similarity clustering before regression, the "band" in the ridge regression is no longer directly specified by human experience, but is formed by data, making the assumption of shared regularization scale within groups more reasonable. By recombinating multiple original feature spaces with similar statistical structures into cluster-level feature spaces, the number of regularization parameters to be optimized is reduced, and the hyperparameter search space and computational complexity are lowered. This scheme does not simply change the regressor itself, but adds a feature space recombination step before entering the ridge regression, making the features within groups as homogeneous as possible in statistical structure and the features between groups as heterogeneous as possible, thereby reducing the dimensionality of hyperparameter optimization and retaining the ability of differentiated regularization.
[0026] This application can be applied to fMRI coding modeling, EEG, speech recognition, video understanding, remote sensing temporal prediction, other multi-feature spatial joint modeling, and other multi-source high-dimensional input grouping regularization prediction tasks. The following is a detailed introduction to the above-mentioned band ridge regression input optimization method, taking the fMRI brain coding modeling scenario under natural language stimulation as an example.
[0027] In practical fMRI modeling, especially when the time length of a single voxel is limited and the signal-to-noise ratio is low, the optimal constraint hyperparameters given by cross-validation are crucial. Hyperparameters are often unstable and prone to significant fluctuations due to accidental noise or differences in classification, leading to a "disordered" distribution of hyperparameters within the same functional region, which in turn affects the model's prediction accuracy and spatial interpretability. In the fMRI brain coding modeling scenario under natural language stimulation, the target stimulus data is the natural language stimulus, and the target response data is the brain response data collected from the subject during the natural stimulus. In a specific embodiment, the natural language stimulus can be natural speech material, and the target response data can be the brain response signal collected synchronously with the natural speech material, specifically the fMRI BOLD brain response signal collected synchronously with the natural speech stimulus. The optimized band ridge regression input result is used to perform brain region activity analysis based on the target response data. This reduces the number of regularization parameters to be optimized, lowers the hyperparameter search space and computational complexity, thereby enabling better brain region activity analysis and improving the model's prediction accuracy and spatial interpretability.
[0028] Taking fMRI brain coding modeling under natural speech stimulation as an example: While listening to continuous speech material, subjects simultaneously acquire brain response data. This brain response data serves as the target response data for fMRI brain coding modeling under natural speech stimulation, and multiple raw feature space data are extracted from the same natural speech stimulus. These raw feature space data can include low-level features such as phoneme indication, phoneme rate, word rate, fundamental frequency F0, short-time Fourier transform (STFT), cochlear spectrum, loudness, speech envelope, and power spectrum.
[0029] The computer reads the target response data and its corresponding raw feature space data, and performs preprocessing steps such as time alignment, missing value handling, mean removal, and standardization. Let the sample size be... The total number of original feature spaces is , No. The design matrix of the original feature space is denoted as . , , For the first The feature dimension of the original feature space; Represents the set of real numbers; the target response data is denoted as , It unifies the input scale and time benchmark of different feature spaces, providing a comparable basis for subsequent kernel representation construction, similarity measurement and grouped regularization modeling.
[0030] Furthermore, the contextual semantic features corresponding to the text transcription results can be extracted from the large language model and used as a high-level feature space for subsequent joint modeling. Using a large language model, the text transcription results corresponding to the target stimulus data are converted into token sequences, and then contextual semantic representation extraction is performed to obtain the contextual semantic representation extraction results corresponding to the target stimulus data. In this embodiment, large language models such as OpenLlama and Deepseek can be used. After obtaining the contextual semantic representation extraction results, they are then time-aligned to form a feature matrix synchronized with the brain response. The contextual semantic representation extraction results are then a high-level semantic feature matrix aligned with time samples, or they can be used as an independent high-level feature space denoted as X_LLM. Each row of the matrix corresponds to a time sample, and each column corresponds to a semantic representation dimension on that time sample.
[0031] In this fMRI brain coding modeling scenario under natural language stimulation, the original feature space data is represented in matrix form. The design matrix (original feature space data) of the original feature space can be denoted as: Its dimension is "number of time samples". "Feature dimension". Among them, the number of time samples can preferably be the number of fMRI TRs (TR refers to the time interval between two consecutive magnetic resonance images) aligned with the brain response data; each row corresponds to a time slice, each column corresponds to a feature dimension in the original feature space, and the matrix elements represent the value of the corresponding feature dimension in the time slice.
[0032] For example: the word rate feature space can be represented as a single-column matrix, where each element represents the number of words appearing within a given TR; the phoneme rate feature space can be represented as a single-column matrix, where each element represents the number of phonemes appearing within a given TR; the phoneme indicator feature space can be represented as a multi-column binary matrix, where an element being 1 indicates that the corresponding phoneme category appears at least once within that TR, otherwise it is 0; acoustic feature spaces such as STFT, cochlear spectrum, loudness, envelope, and power spectrum can be represented as "time samples". A matrix of "frequency band or acoustic dimension", where the matrix elements represent the statistical values of the corresponding acoustic dimension within the corresponding time slice.
[0033] In step 203 above, constructing a kernel representation matrix for each of the original feature space data specifically includes: constructing a kernel representation matrix for each of the original feature space data using a linear kernel, a polynomial kernel, or a Gaussian kernel. Kernel representations are constructed for multiple low-level feature spaces respectively, and the similarity and distance relationships between feature spaces are calculated under a unified representation framework, thereby mapping heterogeneous low-level features to a comparable representation space.
[0034] Taking a linear kernel as an example, for each original feature space data First, z-score standardization is performed to obtain the original feature space data with z-score standardization. Then, the linear kernel matrix is constructed using the original feature space data with z-score standardization as the kernel representation matrix. Subsequently, trace normalization is performed on the kernel representation matrix to eliminate the bias caused by the difference in energy scale between different feature spaces. (1); (2); in, Indicates the first The linear kernel matrix corresponding to each original feature space data; Represents the normalized kernel matrix; express Transpose of; Represents the matrix trace. It unifies the mapping of original feature spaces with different dimensions and scales to the sample relationship structure level, so that subsequent similarity comparisons no longer directly depend on the original feature dimensions.
[0035] In addition to linear kernels, polynomial kernels, or Gaussian kernels, other kernel representations that can characterize the sample relationship structure can also be used, as long as the original feature space can be transformed into a comparable sample relationship matrix.
[0036] In step 203 above, the similarity between pairs of original feature space data is calculated based on the normalized kernel matrix of each pair of original feature space data. Specifically, this includes: using the centered kernel alignment or Frobenius norm cosine similarity method to calculate the similarity between pairs of original feature space data based on the normalized kernel matrix of each pair of original feature space data.
[0037] When using the Frobenius norm cosine similarity method, the similarity between any two original feature spaces is calculated based on the Frobenius structural similarity between the normalized kernel matrices, and a distance matrix is further constructed: (3); (4); in, Indicates the first The and the first The similarity between the original feature space data; Represents the Frobenius inner product; They represent the first The and the first Normalized kernel matrix of the original feature space data; Denotes the Frobenius norm; Indicates the first The and the first The distance between the original feature space data is used to measure the statistical proximity between feature spaces based on the sample relationship structure rather than the original feature surface form, providing a distance basis for subsequent clustering.
[0038] Regarding similarity metrics, any one of the following methods can be used to calculate the similarity between pairwise original feature space data: centered kernel alignment, matrix-vector correlation coefficient or other matrix similarity indices, Frobenius norm cosine similarity, etc. For distance definition, alternative methods can also be used. Monotonic transformations outside.
[0039] In step 204 above, hierarchical clustering is performed based on the distance matrix between all pairwise original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. Specifically, this includes using the average linking method, the full linking method, or the Ward method to perform hierarchical clustering based on the distance matrix between all pairwise original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. That is, based on the similarity analysis results of step 203, hierarchical clustering is performed on multiple low-level original feature space data, and the original feature space data belonging to the same cluster are combined to form a cluster-level feature space.
[0040] With distance matrix D As input, agglomerative hierarchical clustering is performed on the original feature space. In terms of clustering methods, average linkage, full linkage, Ward's method, or other unsupervised grouping methods can be used to generate cluster-level feature spaces.
[0041] The average linking method is preferred, which divides the clustering tree according to a preset set of candidate clusters or a distance threshold to obtain... Each feature cluster is a feature space. The original feature spaces within the same feature cluster are concatenated column-wise to form a cluster-level feature space. The original feature space data used in the splicing all belong to the first... A feature cluster, D Indicates by The distance matrix formed; Indicates the first Each feature cluster corresponds to a cluster-level feature space. Original feature spaces with similar statistical structures and should accept similar contraction intensities are merged into the same band, thereby reducing the hyperparameter dimensionality and improving the rationality of the band definition.
[0042] After hierarchical clustering of the nine low-level original feature spaces, five stable clusters are formed: C1 is the phoneme indicator feature cluster, C2 is the phoneme rate and word rate feature cluster, C3 is the fundamental frequency (F0) feature cluster, C4 is the STFT, cochlear spectrum, and loudness feature cluster, and C5 is the speech envelope and power spectrum feature cluster. Through the above clustering reconstruction process, the original nine low-level feature spaces can be reorganized into five cluster-level low-level feature spaces, thus providing a data-driven grouping basis for the grouping regularization in subsequent band ridge regression.
[0043] Each cluster-level feature space As an independent feature space in the ridge regression model, regularization parameters are configured for each feature space. The optimization objective of the model can be summarized as "prediction residual term + grouping regularization term". The ridge regression input optimization model is represented as follows: (5); (6); (7); in, This represents the objective function of the ridge regression input optimization model; These are the prediction residual term and the grouping regularization term, respectively; the prediction residual term is based on the true response values at each time sample. Compared with model predictions ( The difference between them is calculated; the grouping regularization term corresponds to the weighted L2 shrinkage of different cluster coefficient vectors; Represents the L2 norm; Represents the square of the L2 norm; For target response data; Indicates the first Cluster-level feature spaces corresponding to each feature cluster; Indicates the first The regression coefficient vector corresponding to each feature cluster; This represents the number of feature clusters obtained after clustering. Indicates the first Regularization parameters for each feature cluster. While preserving the differentiated constraint capabilities of different feature clusters, cluster-level modeling is used to reduce the difficulty of solving hyperparameters caused by an excessive amount of original feature space.
[0044] In step 205 above, the cluster-level feature spaces corresponding to all feature clusters and the target response data are input into the banded ridge regression model for joint modeling to obtain the banded ridge regression input optimization model. Specifically, this includes: using a large language model to extract contextual semantic representations from the text transcription results corresponding to the target stimulus data, obtaining the contextual semantic representation extraction results corresponding to the target stimulus data; inputting the cluster-level feature spaces corresponding to all feature clusters, the target response data, and the contextual semantic representation extraction results corresponding to the target stimulus data into the banded ridge regression model for joint modeling to obtain the banded ridge regression input optimization model; the banded ridge regression input optimization results include the optimal number of feature clusters in the cluster-level feature space, the regularization parameters corresponding to each cluster-level feature space, and the regularization parameters corresponding to the contextual semantic representation extraction results. For example... Figure 3 As shown, the context semantic representation extraction result is used as an independent high-level feature space, which is input into the ridge regression model together with the cluster-level feature spaces formed in step 204 for joint modeling. Specifically, the context semantic representation extraction result is used as an independent feature space and participates in grouping regularization modeling together with the cluster-level feature spaces formed by clustering.
[0045] When joint modeling is performed using the cluster-level feature spaces corresponding to all feature clusters, the target response data, and the contextual semantic representation extraction results corresponding to the target stimulus data, the grouping regularization term is: ,in, The total number of results extracted from feature clusters and contextual semantic representations; For the first Regularization parameters for each independent feature space, where the independent feature space is either a cluster-level feature space or the result of extracting contextual semantic representations; For the first A vector of regression coefficients in an independent feature space.
[0046] Step 206 above includes: using cross-validation or nested cross-validation to search for the optimal combination within the candidate cluster set and the corresponding regularization parameter range, aiming at prediction performance or consistency index, jointly determining the clustering granularity and the regularization strength of each cluster, and achieving feature space-level contraction and selection. When the contextual semantic representation extraction results are not used for joint modeling, the banded ridge regression is used as the input optimization result. When using contextual semantic representation extraction results for joint modeling, the ridge regression input optimization results ;in, Indicates the optimal number of feature clusters; This represents the performance metric for cross-validation, and the appropriate coefficients can be selected based on the specific task, such as correlation coefficient, coefficient of determination, mean squared error, and consistency correlation coefficient. It avoids the need for manual, subjective specification of the number of bands and regularization strength, ensuring that both the grouping granularity and the strength of regression constraints are determined by data.
[0047] The output of this application includes: the optimal number of feature clusters, the regularization parameters corresponding to each feature cluster, the trained banded ridge regression model, and the prediction or interpretation results for the target response data. The interpretation results can provide information on the contribution of different feature clusters to the prediction task. Furthermore, specific experiments show that C2 and C4 contribute significantly to improving model performance, and the combination of C2+C4 can approach the performance of a fully clustered model. This indicates that inputting low-level features after clustering helps improve the rationality of the band definition and reduces the interference of redundant low-level features on the modeling process.
[0048] In brain coding scenarios, the contribution analysis results of different feature clusters on different brain regions and voxels can be further output.
[0049] This application first extracts low-level linguistic / acoustic features and contextual features from a large language model from natural language stimuli; then, through kernel similarity analysis and hierarchical clustering, it reconstructs multiple low-level feature spaces into approximately five cluster-level low-level feature spaces; finally, it inputs the clustered low-level features and large language model features into a banded ridge regression model for joint modeling and prediction output. Compared with related technologies, this application can transform the feature group definition, which originally relied on manual experience in banded ridge regression, into a data-driven automatic construction process, thereby improving the rationality of grouping, reducing the complexity of parameter search, and enhancing the stability, interpretability, and predictive performance of the model.
[0050] This application has at least the following technical advantages: First, by introducing feature space similarity clustering before regression, the "bands" in ridge regression are no longer directly specified by human experience, but are formed by data, thus making the assumption of shared regularization scale within groups more reasonable. Second, by reorganizing multiple original feature spaces with similar statistical structures into cluster-level feature spaces, the number of regularization parameters to be optimized is reduced, lowering the hyperparameter search space and computational complexity. Third, this application does not degenerate into the uniform constraint of ordinary ridge regression, but still retains the ability of different feature clusters to adopt different shrinkage intensities, thus better distinguishing high-value feature clusters from redundant feature clusters. Fourth, in natural stimulus brain coding applications, this method is beneficial for more stably absorbing low-level collinear structures, reducing unnecessary feature space competition, and improving prediction accuracy, model stability, and result interpretability.
[0051] This application also provides an application scenario in which the above-mentioned banded ridge regression input optimization method is applied. Specifically, the banded ridge regression input optimization method provided in this embodiment can be applied in an fMRI brain coding modeling scenario. The fMRI brain coding modeling scenario includes a content production stage, a banded ridge regression input optimization link, and an fMRI brain coding modeling stage; the target response data enters the banded ridge regression input optimization link from the content production stage, obtains the corresponding banded ridge regression input optimization result through human-computer collaboration, and then enters the downstream fMRI brain coding modeling stage. The banded ridge regression input optimization method provided in this embodiment belongs to the banded ridge regression input optimization link. Specifically, in the process of optimizing the band ridge regression input for target response data, multiple original feature space data can be obtained by extracting features from the stimulus data. A kernel representation matrix is constructed for each original feature space data, and each kernel representation matrix is normalized. The similarity is calculated based on the normalized kernel matrices of each pair of original feature space data, and the similarity is converted into a distance matrix between each pair of original feature space data. Hierarchical clustering is performed based on the distance matrices between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. Based on the cluster-level feature spaces corresponding to all feature clusters and the target response data, a joint model is built, and the band ridge regression input optimization model obtained by the modeling is solved to obtain the band ridge regression input optimization result.
[0052] Based on the same inventive concept, this application also provides a ridge regression input optimization device for implementing the ridge regression input optimization method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more ridge regression input optimization device embodiments provided below can be found in the limitations of the ridge regression input optimization method described above, and will not be repeated here.
[0053] In one exemplary embodiment, such as Figure 4 As shown, a ridge regression input optimization device is provided, comprising a data acquisition module T1, a low-level feature extraction module T2, a similarity analysis module T3, a feature cluster reconstruction module T4, a ridge regression modeling module T5, and a result output module T6.
[0054] The data acquisition module T1 is used to acquire target stimulus data and target response data corresponding to the target stimulus data.
[0055] The low-level feature extraction module T2 is used to extract features from the target stimulus data to obtain multiple raw feature space data.
[0056] The similarity analysis module T3 is used to construct a kernel representation matrix for each of the original feature space data, and to normalize each kernel representation matrix to obtain a normalized kernel matrix; to calculate the similarity between pairs of original feature space data based on the normalized kernel matrix of each pair of original feature space data, and to convert the similarity between pairs of original feature space data into a distance matrix between pairs of original feature space data.
[0057] The feature cluster reconstruction module T4 is used to perform hierarchical clustering based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters.
[0058] The ridge regression modeling module T5 is used to input the cluster-level feature space and target response data corresponding to all feature clusters into the ridge regression model for joint modeling, and obtain the ridge regression input optimization model.
[0059] The result output module T6 is used to solve the banded ridge regression input optimization model to obtain the banded ridge regression input optimization result; the banded ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space and the regularization parameters corresponding to each cluster-level feature space.
[0060] As an optional implementation, the device further includes a large language model feature extraction module; the large language model feature extraction module is used to: use a large language model to extract contextual semantic representations from the text transcription results corresponding to the target stimulus data, and obtain the contextual semantic representation extraction results corresponding to the target stimulus data.
[0061] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 5As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores band ridge regression input optimization data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a band ridge regression input optimization method.
[0062] Figure 5 The structures shown are merely block diagrams of some structures related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0063] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0064] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0065] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant regulations and be authorized by the owner of the corresponding device.
[0066] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0067] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0068] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0069] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for optimizing inputs in a ridge regression model, characterized in that, The method includes: Acquire target stimulus data and target response data corresponding to the target stimulus data; Feature extraction is performed on the target stimulus data to obtain multiple raw feature space data; A kernel representation matrix is constructed for each of the original feature space data, and each kernel representation matrix is normalized to obtain a normalized kernel matrix; the similarity between pairs of original feature space data is calculated based on the normalized kernel matrix of each pair of original feature space data, and the similarity between pairs of original feature space data is converted into a distance matrix between pairs of original feature space data. Hierarchical clustering is performed based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters; The cluster-level feature space and target response data corresponding to all feature clusters are input into the ridge regression model for joint modeling to obtain the ridge regression input optimization model. Solving the banded ridge regression input optimization model yields the banded ridge regression input optimization result, specifically including: using a large language model to extract contextual semantic representations from the text transcription results corresponding to the target stimulus data, obtaining the contextual semantic representation extraction result corresponding to the target stimulus data; inputting the cluster-level feature spaces corresponding to all feature clusters, the target response data, and the contextual semantic representation extraction result corresponding to the target stimulus data into the banded ridge regression model for joint modeling, obtaining the banded ridge regression input optimization model; the banded ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space, the regularization parameter corresponding to each cluster-level feature space, and the regularization parameter corresponding to the contextual semantic representation extraction result; The ridge regression input optimization model is represented as follows: ; ; ; in, This represents the objective function of the ridge regression input optimization model; These are the prediction residual term and the grouping regularization term, respectively. Represents the L2 norm; For target response data; Indicates the first Cluster-level feature spaces corresponding to each feature cluster; Indicates the first The regression coefficient vector corresponding to each feature cluster; This represents the number of feature clusters obtained after clustering. Indicates the first The regularization parameters for each feature cluster.
2. The method for optimizing the input of a ridge regression pattern according to claim 1, characterized in that, Constructing a kernel representation matrix for each of the original feature space data specifically includes: A kernel representation matrix is constructed for each of the original feature space data using a linear kernel, a polynomial kernel, or a Gaussian kernel.
3. The method for optimizing the input of a ridge regression pattern according to claim 1, characterized in that, The similarity between pairs of original feature space data is calculated based on the normalized kernel matrix of each pair of original feature space data. Specifically, this includes: The similarity between pairs of original feature space data is calculated using the centered kernel alignment or Frobenius norm cosine similarity method, based on the normalized kernel matrix of each pair of original feature space data.
4. The method for optimizing the input of a ridge regression pattern according to claim 1, characterized in that, Hierarchical clustering is performed based on the distance matrix between all pairwise original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters, specifically including: Using the average linkage method, the full linkage method, the Ward method, or the spectral clustering method, hierarchical clustering is performed based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters.
5. A ridge regression input optimization device based on the ridge regression input optimization method of claim 1, characterized in that, The device includes: The data acquisition module is used to acquire target stimulus data and target response data corresponding to the target stimulus data; The low-level feature extraction module is used to extract features from the target stimulus data to obtain multiple raw feature space data. The similarity analysis module is used to construct a kernel representation matrix for each of the original feature space data, and to normalize each kernel representation matrix to obtain a normalized kernel matrix; to calculate the similarity between pairs of original feature space data based on the normalized kernel matrix of each pair of original feature space data, and to convert the similarity between pairs of original feature space data into a distance matrix between pairs of original feature space data. The feature cluster reconstruction module is used to perform hierarchical clustering based on the distance matrix between all pairs of original feature space data to obtain cluster-level feature spaces corresponding to several feature clusters. The ridge regression modeling module is used to input the cluster-level feature space and target response data corresponding to all feature clusters into the ridge regression model for joint modeling, and obtain the ridge regression input optimization model. The result output module is used to solve the banded ridge regression input optimization model to obtain the banded ridge regression input optimization result; the banded ridge regression input optimization result includes the optimal number of feature clusters in the cluster-level feature space and the regularization parameter corresponding to each cluster-level feature space.
6. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that the processor executes the computer program to implement the banded ridge regression input optimization method according to any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the ridge regression input optimization method as described in any one of claims 1-4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the ridge regression input optimization method as described in any one of claims 1-4.
Citation Information
Patent Citations
reconstruction method and system of aerosol chemical components based on CNN-BiLSTM-BO
US20250336487A1
Risk prediction method and apparatus based on reinforcement learning, and device and storage medium
WO2023108987A1
