Foundation model domain and task-specific fine-tuning
The method of partial-parameter fine-tuning with task and domain-specific importance matrices addresses inefficiencies in LLMs by selectively updating crucial weights, ensuring efficient adaptation to new tasks and domains while preserving general capabilities.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- VISA INTERNATIONAL SERVICE ASSOCIATION
- Filing Date
- 2026-01-12
- Publication Date
- 2026-07-30
AI Technical Summary
Existing machine learning models, particularly large language models (LLMs), struggle to perform optimally in specific tasks and domains due to computational inefficiencies and loss of general capabilities during full-parameter fine-tuning, while partial-parameter fine-tuning fails to effectively 'memorize' new data.
A method involving partial-parameter fine-tuning that separates and scores task-specific and domain-specific parameters using importance matrices, selectively updating only crucial weights based on combined importance values, preserving general capabilities.
Enhances computational efficiency and accuracy by focusing updates on relevant parameters, enabling models to adapt to novel tasks and domains while maintaining broad applicability.
Smart Images

Figure US2026010889_30072026_PF_FP_ABST
Abstract
Description
PATENT Atorney Docket No.: 079900-1528468-9589W001Client Reference No.: 9589WO01 FOUNDATION MODEL DOMAIN AND TASK-SPECIFIC FINETUNING CROSS-REFERENCE TO RELATED APPLICATION
[0001] This application claims the benefit and priority of U.S. Provisional Patent Application No. 63 / 749,225, filed January 24, 2025, entitled “FOUNDATION MODEL DOMAIN AND TASK-SPECIFIC FINE-TUNING”, which is hereby incorporated by reference in its entirety.BACKGROUND
[0002] Foundational models are typically trained generally, and thus might not perform well for a particular purpose. For example, a large language model (LLM) trained for writing may not work well for financial transactions. Fine tuning is a process that can updated an LLM to work better for a particular purpose. A full parameter tuning can be performed using new training data and updating the parameters of the model. However, the full parameter training approach is computationally intensive.
[0003] In contrast, partial-parameter fine tuning includes updating a portion of the weights or approximation of all weights using less parameters. Partial-parameter fine tuning is very efficient considering it takes very large GPU memory to fine tune a foundational model, however it is hard for the model to “memorize” or perform well with new data. Even if particular parameters are selected, accuracy and control still suffer.
[0004] Embodiments of the disclosure address these problems and other problems individually and collectively.SUMMARY
[0005] Certain embodiments of the present disclosure can provide methods, systems, and apparatuses for fine-tuning machine learning models. In an example, a computer implemented method includes loading a machine learning model having a set of parameters that are trained using initial training data. The method also includes receiving new training data. The method also includes determining a set of importance values for the set of parameters using the new training data, where the set of importance values indicate a measureof importance for a given parameter to affect an accuracy of an output of the machine learning model. The method also includes loading a first plurality of task-specific importance values that are each determined for a particular task using a respective task-specific training set. The method also includes loading a second plurality of domain-specific importance values that are each determined for a particular domain using a respective domain-specific training set. The method also includes determining combined importance values for the set of parameters using the set of importance values, the first plurality of task-specific importance values, and the second plurality of domain-specific importance values. The method also includes training the machine learning model using the new training data and the combined importance values to determine fine-tuned values for the set of parameters.
[0006] Implementations may include one or more of the following features: The method where the particular task is a plurality of tasks selected from a set of predefined tasks for which task-specific importance values are stored, and where the particular domain is a plurality of domains selected from a set of predefined domains for which domain-specific importance values are stored. The new training data includes task-specific training data and domain-specific training data. Training the machine learning model includes: training a first fine-tuned model using the task-specific training data, training a second fine-tuned model using the domain-specific training data, and generating a final machine learning model by merging values of the set of parameters for each of the first fine-tuned model and the second fine-tuned model. The set of importance values includes (1) a first set of importance values determined based on the task-specific training data and (2) a second set of importance values determined based on the domain-specific training data, and where merging the values of the set of parameters uses the first set of importance values and the second set of importance values. Training the machine learning model may include: determining a first subset of the parameters having combined importance values below a threshold; freezing the first subset of the parameters; determining a second subset of parameters not in the first subset; and finetuning the second subset of the parameters of the machine learning model as part of training the machine learning model using the new training data. Training the machine learning model may include: determining a third subset of the parameters having combined importance values greater than a threshold, determining a fourth subset of parameters not in the third subset, freezing the fourth subset of parameters, and fine tuning the third subset of the parameters of the machine learning model as part of training the machine learning model using new training data. Determining the combined importance values may include: for eachparameter of the set of parameters: determining one or more task-specific importance values of the first plurality of task-specific importance values that correspond to the parameter; determining one or more domain-specific importance values of the second plurality of domain-specific importance values that correspond to the parameter; determining one or more of the set of importance values of the new training data corresponding to the parameter; determining a statistical value using the one or more task-specific importance values, the one or more domain-specific importance values, and the one or more of the set of importance values; and determining the combined importance value for the parameter using the statistical value.
[0007] These and other embodiments of the disclosure are described in detail below. For example, other embodiments are directed to systems, devices, and computer readable media associated with methods described herein.
[0008] A better understanding of the nature and advantages of embodiments of the present disclosure may be gained with reference to the following detailed description and the accompanying drawings.
[0009] Reference to the remaining portions of the specification, including the drawings and claims, will realize other features and advantages of the present disclosure. Further features and advantages of the present disclosure, as well as the structure and operation of various embodiments of the present disclosure, are described in detail below with respect to the accompanying drawings. In the drawings, like reference numbers can indicate identical or functionally similar elements.BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
[0011] FIG. 1 illustrates a system from determining domain and task-specific importance values, according to some embodiments.
[0012] FIG. 2 illustrates an example flow for determining task and domain weight importance, according to some embodiments.
[0013] FIG. 3 illustrates an example matrix for determining a final importance score, according to some embodiments.
[0014] FIG. 4 illustrates an example system for domain and task-specific fine tuning, according to some embodiments.
[0015] FIG. 5 illustrates an example flow of tasks and domains fine-tuning a model with frozen weights, according to some embodiments.
[0016] FIG. 6 illustrates a method of domain and task-specific fine tuning, according to some embodiments.
[0017] FIG. 7 shows a block diagram of an example computer system usable with systems and methods according to embodiments of the present disclosure.TERMS
[0018] A “ machine learning moder (ML model) can refer to a software module configured to be run on one or more processors to provide a classification or numerical value of a property of one or more samples. An ML model can include various parameters (e.g., for coefficients, weights, thresholds, functional properties of function, such as activation functions). As examples, an ML model can include at least 10, 100, 1,000, 5,000, 10,000, 50,000, 100,000, or one million parameters. An ML model can be generated using sample data (e.g., training samples) to make predictions on test data. Various number of training samples can be used, e.g., at least 10, 100, 1,000, 5,000, 10,000, 50,000, 100,000, or at least 200,000 training samples. One example is an unsupervised learning model such as hidden Markov model (HMM), clustering (e.g., hierarchical clustering, k-means, mixture models, model-based clustering, density-based spatial clustering of applications with noise (DBSCAN), and OPTICS algorithm), approaches for learning latent variable models such as Expectation-maximization algorithm (EM), method of moments, and blind signal separation techniques (e.g., principal component analysis, independent component analysis, nonnegative matrix factorization, singular value decomposition), and anomaly detection (e.g., local outlier factor and isolation forest). Another example type of model is supervised learning that can be used with embodiments of the present disclosure. Example supervised learning models may include different approaches and algorithms including analytical learning, statistical models, artificial neural network (e.g. including convolutional and / or transformer layers) that may have 1-10 layers as examples, recurrent neural network (e.g., long short term memory, LSTM), boosting (meta-algorithm), bootstrap aggregating (bagging) such as random forests, support vector machine (SVM), support vector (SVR), Bayesian statistics, case-based reasoning, decision tree learning, inductive logic programming, linearregression, logistic regression, Gaussian process regression, genetic programming, group method of data handling, kernel estimators, learning automata, learning classifier systems, minimum message length (decision trees, decision graphs, etc.), multilinear subspace learning, naive Bayes classifier, maximum entropy classifier, conditional random field, nearest neighbor algorithm, probably approximately correct learning (PAC) learning, ripple down rules, a knowledge acquisition methodology, symbolic machine learning algorithms, subsymbolic machine learning algorithms, minimum complexity machines (MCM), ordinal classification, data pre-processing, handling imbalanced datasets, statistical relational learning, or Proaftn (a multicriteria classification algorithm), or an ensemble of any of these types. Supervised learning models can be trained in various ways using various cost / loss functions that define the error from the known label (e.g., least squares and absolute difference from known classification) and various optimization techniques, e.g., using backpropagation, steepest descent, conjugate gradient, and Newton and quasi-Newton techniques.DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure discuss various domain and task-specific fine tuning approaches for specialized applications by utilizing unique combinations of tasks and domains to refine a model for a particular task. While pre-trained machine learning models possess broad general capabilities, these models may require further adaptation to achieve optimal performance in specific contexts, such as fraud detection in finance or sentiment analysis in e-commerce. These embodiments can include identifying and prioritizing the model’s parameters that are most relevant to the given task or domain through techniques like weight probing and importance scoring. By applying selective fine-tuning strategies, a model can be updated only in areas related to a new application, ensuring computational efficiency while preserving the general knowledge of the model.
[0020] Instead of just determining the importance of new training data as a while and updating related parameters having an importance above a threshold, embodiments of the present disclosure account for parameter importance of predetermined tasks and domains. For example, a set of predetermined tasks can include writing, reasoning, and math, and parameter importance values can be determined for each of these tasks. As another example, a set of predetermined domains can include biology, physics, new, text, etc. Parameter importance values can be determined for each of the domains in the set. Then, these parameter importance values for tasks and domains can be combined with importance valuesfor the new training data to identify a better set of combined parameter importance values that should be updated. The new data can then be used to update the model, thereby making the fine-tuned model more accurate while not losing any of the original capabilities of the generally-trained model.
[0021] Further, the new training data can be separated into different tasks and domains. Combined parameter importance values can be determined for each task and each domain, and an updated model (i.e., with trained parameters) can be determined for each task and each domain. The importance values can then be used as weights to combine the parameters of the respective models. In some embodiments, all or some of the new training data can be used, e.g., to tailor the new model for a particular set of tasks and domains.
[0022] The partial fine tuning can then be performed in various ways. For example, unimportant weights of a model, i.e., weights that have an importance score (also referred to herein as importance value) below a threshold value, can be frozen and the finetuning can occur on the important weights, i.e., weights that have an importance score greater than a threshold value. In another example, the important weights are frozen, and the unimportant parameters can be fine-tuned. Each approach and task / domain combination cane be considered a different task / domain.
[0023] Embodiments of the present disclosure provide several technical advantages over conventional ML fine-tuning techniques. For instance, the ability to distinguish between tasks and domains and handle novel combinations of tasks and domains provides an improved fine-tuning approach that does not merely fine-tune the model for individual tasks or domains but introduces a systematic way of combining task and domain-specific importance scores to address scenarios where new combinations (e.g., "transaction decisioning" as a mix of finance, reasoning, and customer behavior) can be used.Additionally, the approach demonstrates remarkable efficiency in fine-tuning, as it requires adjusting only a specific portion of the model weights, thereby optimizing resource use and time allowing for scalability. The described embodiments also exhibit the capability to "memorize" relevant data effectively by tuning only the segments crucial for specific tasks, leveraging the provided dataset. Furthermore, the embodiments preserve the model's general task capabilities by avoiding alterations to the segments pertinent to broader, more generalized tasks, ensuring robust and versatile performance. The embodiments are designed to be a comprehensive, once-for-all effort for varied fine-tuning requirements, withdomain / task-agnostic parameters that can be seamlessly applied across different scenarios. The embodiments are extendable to foundational models such as large language models (LLMs) in specialized domains which is particularly advantageous, as it only necessitates updating probes with a specialized corpus and more detailed task / domain labels for further fine-tuning. Additionally, this approach enhances model merging capabilities in terms of performance and universality through intrinsic sparsity achieved via weight pruning and freezing during the fine-tuning process, ensuring optimal and streamlined model integration.
[0024] Before the present disclosure is described in greater detail, it is to be understood that this invention is not limited to particular embodiments described, as such may vary. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting, since the scope of the present disclosure will be limited only by the appended claims.I. FINE-TUNING
[0025] Fine-tuning is a machine learning process where a pre-trained model is further trained on a specific dataset to adapt its capabilities to a narrower domain or set of tasks. Pretrained models, like large language models (LLMs), are initially trained on massive, diverse datasets to develop a broad understanding of language or other data types. However, these models may not perform optimally on specialized tasks or domains without additional training. Fine-tuning addresses this by updating the model's parameters based on task-specific or domain-specific data, thereby improving its performance in those areas. This process can involve training all parameters of the model (full-parameter fine-tuning) or selectively updating only a subset of the parameters (partial-parameter fine-tuning) to balance computational efficiency and performance.
[0026] Full-parameter fine-tuning involves training all weights of the model, but this approach often requires significant computational resources and can diminish the model's ability to generalize across tasks. On the other hand, partial-parameter fine-tuning updates only a portion of the model's parameters, such as specific layers, blocks, or groups of weights, making it more resource-efficient. This selective approach can preserve the model's general capabilities while adapting it to new tasks. Typically, determining which parameters to update is guided by methods like pruning or probing, where the importance of parameters is evaluated based on their contribution to task-specific accuracy.
[0027] Embodiments of the present disclosure include improved fine-tuning systems and methods that can adapt large language models (LLMs) for specific tasks and domains, such as fraud detection or transaction approval. As discussed in greater detail below, the approach can include explicitly separating task-specific and domain-specific parameters. These parameters can involve identifying which parameters are used to particular tasks or domains using techniques like weight probing or importance scoring. For example, a model can be fine-tuned to handle new combinations of tasks and domains, such as transaction decisioning, by leveraging existing task and domain knowledge and combining them.
[0028] According to some embodiments, a task-domain importance scoring mechanism can evaluate the relevance of specific parameters for both new and existing tasks and domains. This scoring can involve calculating task-agnostic and domain-agnostic importance scores, which can then be combined with task-specific and domain-specific scores to determine the final importance of parameters. Additionally, the fine-tuned models from multiple tasks and domains can be merged into a single model, ensuring that the resulting model retains its general capabilities while excelling in specialized areas. This process can involve weighted aggregation of parameter updates, guided by the importance scores.
[0029] The described embodiments are designed to be computationally efficient and highly adaptable. By focusing on partial-parameter fine-tuning and selectively updating only the most important weights, the approach minimizes the need for extensive computational resources. Additionally, the system is flexible, allowing for the fine-tuning of models for highly specific tasks or combinations of tasks and domains, even when they are novel or underrepresented in the pretraining data. This method is particularly valuable in real-world applications where models must be capable of handling diverse and complex tasks like fraud detection, risk evaluation, and transaction approval efficiently and effectively.II. DOMAINS AND TASKS
[0030] As described above, the disclosure relates to improved fine-tuning systems and methods that can adapt large language models (LLMs) for specific tasks and domains. The approach can include explicitly separating task-specific and domain-specific parameters. These parameters can involve identifying which parameters are important to particular tasks or domains using techniques like weight probing or importance scoring.A. Defining Domains and Tasks
[0031] In machine learning, particularly in the context of large language models (LLMs), "tasks" and "domains" are foundational concepts that guide the fine-tuning and application of these models. A "task" refers to a specific capability or function the model performs, such as reasoning, fraud detection, or risk evaluation. A "domain," on the other hand, defines the subject matter or context in which the task is performed, such as finance, biology, or news. Together, tasks and domains define the scope of a model's applicability, and understanding their interplay is crucial for fine-tuning models to achieve optimal performance. Tasks are typically specific actions or problem-solving capabilities that a model is trained to handle. For example, tasks can include transaction approval, fraud detection, and mathematical reasoning. Domain, in contrast, represent areas of knowledge or contexts within which the tasks are performed. For example, the financial domain may encompass tasks like identifying fraudulent transactions of approving payments, while the biology domain may involve tasks like classifying organisms or identifying biological processes. Although tasks and domains are distinct, they can be interrelated, such as tasks requiring knowledge and context from one or more domains. To illustrate, tasks such as determining whether a credit transaction should be approved or declined are specific to the financial domain. Another example is fraud detection, which can span multiple domains, such as finance (detecting fraudulent credit card charges) and risk management. Tasks and domains may also be combined, such as merging financial transaction data with general reasoning or mathematical analysis to make accurate predictions.
[0032] An advantage of the present disclosure includes the combination of tasks and domains. Often, new applications require models to perform tasks that have not been explicitly included in the pretraining data, or to operate in domains that were underrepresented during training. For example, a model trained on general-purpose data may struggle to perform well on a specific combination of tasks (e.g., fraud detection) and domains (e.g., finance) without additional fine-tuning. This is particularly relevant where tasks like transaction decisioning require integrating knowledge from multiple domains such as finance, risk evaluation, and even customer behavior analysis. Embodiments of the present disclosure address these challenges by explicitly separating and scoring tasks and domains, described in greater detail below. Using a task-domain probe approach, the system evaluates which parameters of the model are important for specific tasks and domains. The identification of parameters that have a high importance score (e.g., their value is large) canbe performed using weight probing, where parameters are analyzed to determine their importance for a given task or domain. See, Ma, Xinyin, Gongfan Fang, and Xinchao Wang. "Llm-pruner: On the structural pruning of large language models." Advances in neural information processing systems 36 (2023): 21702-21720. For instance, in the financial domain, certain parameters may be identified as important for detecting anomalies in transaction patterns (fraud detection task), while others may support general reasoning tasks.
[0033] According to some embodiments, task-specific and domain-specific importance scores may be used to guide fine-tuning. For example, in the context of biology, weights important for identifying biological entities may differ from those important for financial tasks like assessing transaction risks. By assigning importance scores to parameters based on their relevance to tasks and domains, the system ensures that fine-tuning is focused on the most important aspects of the model, improving both efficiency and accuracy. Additionally, the combination of tasks can further improve accuracy and efficiency. For example, a new domain like transaction decisioning may require combining knowledge from existing domains such as finance, risk management, and reasoning. Similarly, a new task like fraud detection in international transactions may draw from general fraud detection techniques and adapt them to the specific context of international finance.
[0034] While fine-tuning enables the model to excel in specific tasks and domains, the system ensures that the model retains its general capabilities across a broader range of tasks and domains. This is achieved through weighted aggregation of fine-tuned parameters, balancing task-specific and domain-specific adaptations with the model’s general knowledge. In the context of payment card services, such as Visa, the interplay of tasks and domains is particularly relevant for applications like fraud detection, transaction approval, and risk evaluation. These tasks require models to adapt to highly specialized domains such as financial data analysis, while also retaining the ability to handle general tasks like reasoning and language understanding. The approaches described herein ensure that models can handles these specialized tasks while maintaining their general capabilities.B. Importance Matrices
[0035] Understanding the interplay between tasks and domains can be helpful for optimizing the fine-tuning process of large language models (LLMs). Tasks, which define the specific capabilities or functions a model performs, and domains, which provide the contextual subject matter or knowledge areas, together establish the scope of a model'sadaptability and performance. While these concepts are distinct, their relationship becomes useful when fine-tuning LLMs for specialized applications that often require integrating knowledge from multiple tasks and domains. Therefore, importance matrices can be used; such importances matrices may be structured representations that quantify the relevance of specific model parameters (weights) to particular tasks and domains. These matrices can serve as a bridge between understanding tasks and domains conceptually and implementing an efficient, targeted fine-tuning process. These matrices are helpful for fine-tuning large language models (LLMs) as they allow the model to adapt to specific tasks and domains while retaining its general capabilities.
[0036] According to some embodiments, each matrix is essentially a multi-dimensional table that organizes the importance scores or weights of the model's parameters, with rows typically representing tasks or domains and columns corresponding to individual parameters or groups of parameters. These matrices serve as a foundation for identifying which parts of the model are most relevant to specific contexts, thereby guiding the fine-tuning process. The importance matrices can be created by evaluating the contribution of each parameter to the accuracy or performance of specific tasks or domains. For example, a matrix for tasks might have rows representing different tasks, such as fraud detection or reasoning, and columns representing groups of parameters in the model. Similarly, a matrix for domains might have rows for domains like finance, biology, or news. Each cell in the matrix contains a numerical value, importance score, that quantifies how important a given parameter or parameter group is for the corresponding task or domain. These matrices are populated using techniques such as weight probing, where parameters are systematically manipulated (e.g., frozen or set to zero) to measure their impact on task or domain performance.
[0037] These matrices can be used in guiding selective fine-tuning. Rather than updating all parameters of the model, which is computationally expensive and risks overfitting, the matrices allow for partial-parameter fine-tuning. By focusing only on the most relevant parameters for a given task or domain — those with the highest importance scores — the finetuning process becomes more efficient and targeted. For instance, if a model is being finetuned for fraud detection in the financial domain, the matrices ensure that only the parameters most important for this combination are updated, preserving the model's overall capabilities.
[0038] Another key function of these matrices is their ability to facilitate the combination of tasks and domains, enabling the model to adapt to novel or complex applications. Newtasks or domains, such as transaction decisioning, can be represented as combinations of existing tasks and domains. This can be achieved by aggregating the importance scores from the relevant rows of the task and domain matrices. For example, the row representing a new domain like transaction decisioning might be derived by combining the importance scores of related domains, such as finance, risk management, and reasoning. This capability is crucial for extending the model to handle specialized applications that were not part of its original training.
[0039] Further, importance matrices can be useful in merging fine-tuned models for multiple tasks and domains into a single, cohesive model. Fine-tuning for each task or domain yields separate weight matrices, which are then combined using a weighted aggregation process. The weights for this aggregation can be derived from the importance scores in the task and domain matrices, ensuring that the final model is optimized for both specific and general applications.
[0040] It is important to note that these matrices, while visually and conceptually depicted as matrices for convenience, are essentially just organized sets of values representing the importance of specific model parameters for tasks and domains. The values can be represented in various other forms, such as tensors, vectors, or lists, depending on the specific requirements of implementation or analysis. The matrix representation does not alter the core function of these values, which is to quantify the relevance of model parameters to specific tasks and domains and guide the fine-tuning process accordingly.C. Template Domain and Task-Specific Importance Values
[0041] FIG. 1 illustrates a system 100 from determining domain and task-specific importance values, according to some embodiments. Weight importance values can be used in fine-tuning foundational models, such as large language models (LLMs), to adapt them for specific tasks and domains. These methods aim to identify and quantify the importance of specific parameters (weights) in a pre-trained model for performing particular tasks or understanding certain domains. To start, the datasets can be labeled into distinct tasks (e.g., reasoning, fraud detection) and domains (e.g., biology, finance) and the weights can be separated for the identified tasks and domains. The labeling, whether automated via prompts or manual, can create a structured dataset that can be used to evaluate the model's parameter relevance. For example, the labeling can be done using a pre-trained machine learning model trained to assign labels to datasets where each parameters in the set is based on an identifieddomain or task. A pre-trained model can be prompted to assign a domain or a task label to a particular sample. A dataset can then be generated representing parameters and their associated labels. Then the importance values for each parameters in the dataset can be determined and the output importance values can then be merged. The ultimate goal of weight probing is to determine which parameters are important for specific tasks and domains, enabling selective fine-tuning to enhance efficiency and performance.
[0042] As shown in FIG. 1, text data set 112 is labeled with a set of predefined domains 114 and a set of predefined tasks 116. This can be achieved through a combination of automated and manual methods, leveraging the capabilities of pre-trained foundational models. For instances, task and domain labeling can be performed using large language models and predefined prompts. An automated process, for example, can assign labels to public datasets, such as "biology" or "finance" for domains and "reasoning" or "calculation" for tasks. The labeling process creates a structured dataset that explicitly links text samples to their associated tasks and domains. Alternative approaches include semi-supervised approaches, where a smaller labeled subset is used to train a classifier that labels the remaining data.
[0043] Then weight probing can be used to determine weight importance 118 for different domains and tasks. This involves systematically evaluating the model's parameters to determine their importance for specific tasks and domains. This may be done using established methods such as setting certain weights to zero or freezing them to measure their impact on model performance. If altering a weight significantly changes the model's accuracy for a given task or domain, that weight can be deemed important. For example, in the financial domain, certain weights may prove particularly useful for detecting anomalies in transaction patterns (fraud detection), while others may primarily support general reasoning tasks. The output of weight importance 118 can be matrices that represent the importance of model parameters for specific tasks and domains, domains importance values 120 and / or tasks importance values 122, which are depicted as importance matrices for convenience of illustration but can be represented via any suitable data structure. Then, for each important parameters for tasks and domains, an importance score can be determined.D. Merging Importance Values For Domains and Tasks
[0044] As discussed above, for each parameter, an importance score can be determined for particular tasks and domains. Thus, a plurality of task-specific and a plurality of domain-specific importance values can be determined for a parameter Additionally importance values of the new training data corresponding to the parameter can be determined. These various importance values may then be aggregated to produce a final importance score. Various methods of determining statistical values of the importance values is described in greater detail below. The multiple determined importance values for the parameter can then be combined using the statistical value, such as an average of the importance scores. The importance values can be represented as a matrix for example. In another example, the importance values can be represented as a 2-dimensional array. It should be understood that, although for clarity the importance values are represented as a matrix, the importance values may be represented in a number of ways and the figures and corresponding description should not be construed as limiting.
[0045] By combining the various importance values to generate a final (combined) importance value for each parameter, fine-tuning can be implemented in a more strategic manner resulting in a more robust model and preserving the models general knowledge. Additionally, these embodiments provide the ability for a unique combination of tasks and domains to be selected for specific applications of a machine learning model.
[0046] FIG. 2 illustrates an example flow 200 for determining combined importance values using task and domain importance values, according to some embodiments. When finetuning, new training data is used for the fine-tuning. Such new training data (e.g., new training data 211) may or may not be segmented into task data 207 and domain data 209, which of which may be further segmented into multiple tasks and multiple domains. The new training data 211 can be used to generate new task importance 208 and new domain importance 210 which can be importance scores derived from the new training data 211.
[0047] As shown in FIG. 2, combined importance values 212 can be determined using selected one or more of domains importance values 202 and selected one or more of tasks importance values 204 by task and domain importance scoring 206. Additionally, importance values for new training data 211, which can include task data 207 and domain data 209, can be used. All these importance values can be combined into combined importance values 212.
[0048] A user can select which tasks and domains from a library (e.g., from domains 114 and tasks 116) are to be used to generate combined importance values 212. In this manner, auser can fine tune to cover specific tasks and domains so that the new training data is sufficiently robust but also tailored to the specific goals of the user.
[0049] For example, task data may include specific objectives such as reasoning or fraud detection, while domain data might represent contexts like finance or biology. The matrices produced reflect the importance of each weight for a given task or domain, enabling finetuning to focus on the most relevant parameters. For tasks, if the variance of the weight group’s importance score between tasks is large, the weight group should be more taskspecific, and it is therefore less important in specific tasks. For domains, if the variance of the weight group’s importance score between domains is small and the importance score is large, the weight group should be more important to different tasks and domain-specific, and it is therefore more important in specific domains. These importance scores can guide the selective fine-tuning process by identifying which parameters should be updated and which should remain frozen. There may be various types of importance scores, such as taskagnostic, task-specific, domain-agnostic, and domain-specific. According to some embodiments, normalization techniques can be used to ensure that importance scores are comparable across tasks and domains. For example, the task-agnostic and domain-agnostic scores can be normalized using measures like variance and mean. This ensures that the final group importance scores used in fine-tuning and model merging are balanced and meaningful.
[0050] A task-agnostic score measures the general importance of a group of parameters across tasks. If the variance (standard deviation) of the importance score across tasks is large, the group is considered task-specific, and its task-agnostic score is lower. This score is calculated as the inverse of the standard deviation across tasks. Equation 1 shows an example equation for determining a task-agnostic group importance score. / TA_P= / std(dg),d E Tasks, g E Groups
[0051] [Equation 1]
[0052] A task-specific group importance score measures the importance of a group of parameters for a specific task. It is derived from the pruner importance score, which evaluates the impact of a parameter on the task’s accuracy. Equation 2 shows an example equation for determining a task-specific group importance score.s _g =pruner_importance_score(Dour_tasksJ
[0053] [Equation 2]
[0054] A domain-agnostic group importance score, similar to the task-agnostic score, this measures the general importance of a group of parameters across domains. If the variance across domains is small and the mean importance is high, the group is deemed more domainspecific. Equation 3 shows an example equation for determining a domain-agnostic group importance score.
[0055] [Equation s]= meanae) / s (lag),d e Domains, g e Groups
[0056] A domain-specific group importance score measures the importance of a group of parameters for a specific domain. Equation 4 shows an example equation for determining a domain-specific group importance score.IDS _g = pruner_importance_score(Dour domainsJ
[0057] [Equation 4]
[0058] These scores can then be combined to create a final group importance score 312 that reflects the relevance of parameters to both tasks and domains. This involves aggregating scores from existing tasks and domains as well as the new task or domain that the model is being fine-tuned for. Equation 5 shows an example equation for determining the final group importance score 312.
[0059] [Equation 5]
[0060] FIG. 3 illustrates an example matrix 300 for determining a final importance score, according to some embodiments. Matrix 300 can be the same as or similar to combined importance values 212 as shown in reference to FIG. 2. The identified tasks and domain can be represented in a matrix with the task and domain indexes 304 along the y-axis and the group parameter index 302 along the x-axis. For each given new task, there may be task importance 306 which represents training data for importance weights for the new task. If there is more than one task, there may be multiple tasks importance scores for each task. For each new given domain, there may be domain importance 308 which represented training data for important weights for new domains. If there is more than one task, there may be multiple importance scores for each domain. The task importance scores can be combined to generate a final importance 310 which represents a final importance score for the combined tasks and domains.III. DOMAIN AND TASK-SPECIFIC FINE TUNING
[0061] As discussed above, pre-trained machine learning models can possess broad general capabilities, however such models may require further adaptation to achieve optimal performance in specific contexts, such as fraud detection in finance or sentiment analysis in e-commerce. The embodiments described herein can include identifying and prioritizing the model’s parameters that are most relevant to the given task or domain through techniques like weight probing and importance scoring. By applying selective fine-tuning strategies, a model can be updated on in areas specific to a new application, ensuring computational efficiency while preserving the general knowledge of the model.A. Overview Domain and Task-Specific Fine Tuning
[0062] FIG. 4 illustrates an example system 400 for domain and task-specific fine tuning, according to some embodiments. The system 400 can start by topic weight probing 410. Topic weight probing 410 can include collecting a large corpus of text data 412 spanning various domains (e.g., biology, finance, news) and tasks (e.g., reasoning, calculation). The text data 412 can be public text data used as the initial knowledge base of a foundational model, such as a large language model (LLM). The text data 412 can be diverse and unlabeled for tasks or domains and may include any publicly available data relevant to the intended applications.
[0063] Text data 412 can then be labelled at labeling 414. Labeling 414 can include labeling text data 412 explicitly with task and domain tags, i.e., multiple-label classification. For example, a piece of text about financial transactions might be labeled under the "finance" domain, while a text discussing reasoning or mathematical problems might be tagged with the "reasoning" task. This labeling step can involve the use of prompting techniques in large language models or manual curation to associate each text sample with its corresponding domain and task. According to some embodiments, the labeling 414 can be automated using pre-trained foundational models with predefined prompts. Alternatively, a semi-supervised learning approach can be used where a smaller subset of manually labeled data is used to train a model that labels the remainder of the dataset.
[0064] Once the data is labeled, the next step is to probe the pre-trained foundational models to identify the importance of specific parameters (weights) for each task and domain. This involves analyzing how changes to particular parameters affect the model’s performance on labeled tasks and domains. The goal is to generate a matrix (or type of tensor) ofimportance scores for each parameter, corresponding to its relevance for specific tasks (taskspecific scores) or domains (domain-specific scores). Existing techniques, such as setting weights to zero and observing performance degradation, can be used for this purpose.Alternative methods such as pruning algorithms or gradient-based importance scoring may also be used to derive parameter importance.
[0065] Next, system 400 involves tasks and domain weight importance 420. Topic weight probing 410 can result in matrices such as biology matrix 422 and calculation matrix 424. As discussed with reference to FIG. 3, each matrix can be a multi-dimensional table that organizes the importance scores or weights of the model's parameters for the given task or domain. The importance scores obtained from topic weight probing 410 can be used to guide task and domain weight importance 420. Various strategies may then be used to weight selections.
[0066] For example, the weight selection can include selecting weights relevant to the downstream tasks and domain and freezing the rest, resulting in importance score A 427. This ensures that only the most important weights for the specific task / domain are updated during fine-tuning, preserving the model’s general capabilities. On the other hand, weight selection can include selecting weights based on task and domain abilities that the model should retain, and freezing those weights, resulting in importance scores B 429. This approach allows the model to maintain general knowledge while focusing updates on less important weights. These strategies can be applied independently or in combination, depending on the use case. For instance, a hybrid approach might allocate a portion of weights for task-specific finetuning while preserving others for general domain knowledge.
[0067] Next, the system 400 can proceed to tasks and domain fine-tuning with frozen weights 430. Using the selected weights, importance score A 427 and / or importance scores B 429, from tasks and domain weight importance 420, fine-tuning can be done using new training data 432. As discussed with reference to FIG. 2, the new training data 432 can include task data 407 and domain data 409, and the importance scores for each (e.g., as depicted in FIG. 2) can be generated and used. For fine-tuning under type 1 426, unimportant weights are frozen, i.e., weights that have an importance score below a threshold value, the finetuning can occur on the important weights, i.e., weights that have an importance score greater than a threshold value. For type 2428, important weights are frozen, and the unimportant weights are fine-tuned, enabling the model to adapt while retaining its broadercapabilities. Example thresholds can be .5, .6, .7, .8, etc. Tasks and domains fine-tuning with frozen weights 430 involves iterative training on the task / domain data, and the darker grey sections in the figure indicate the parts of the weight matrices that are updated during finetuning. Alternatives to this process could involve techniques like low-rank adaptation (LoRA) or adapters, which allow for efficient parameter updates without retraining the entire model.
[0068] The output of the fine-tuning process can be one or more sets of updated weight matrices for each tasks and domain, updated weight matrix A 437 and / or updated weight matrix B 439. These matrices represent the model’s specialized knowledge for the given task and domain. Depending on the number of tasks and domains, multiple fine-tuned weight matrices may be generated. For instance, if a model is fine-tuned for two tasks (e.g., fraud detection and transaction approval) across two domains (e.g., finance and customer behavior), four separate weight matrices may be produced.
[0069] To ensure that the final model retains both specialized and general capabilities, the fine-tuned weight matrices can be merged into a single model. This can involve aggregating the updates from the individual matrices using a weighted summation method, where the weights are determined by the importance scores calculated during the probing stage, e.g., as described in more detail in section IV. The merging process, discussed in greater detail below, balances the contributions of task-specific and domain-specific fine-tuning while maintaining the model’s general knowledge base. Alternative aggregation methods may also be used, such as ensemble learning or multi-task learning frameworks. The merged model can be evaluated to ensure it meets performance criteria for both specific tasks / domains and general applications. This evaluation may involve standard metrics like accuracy, precision, and recall for specific tasks, as well as broader benchmarks to assess general language understanding. If the model fails to meet desired performance levels, the process may loop back to earlier steps for further fine-tuning or adjustment.B. Tasks And domains fine-tuning with frozen weights
[0070] FIG. 5 illustrates an example flow 500 of tasks and domains fine-tuning a model with frozen weights, according to some embodiments. As shown in FIG. 5, importance scores 502 can be used to fine tune a model using new training data 504 (similar to the new training data discussed in reference to FIGS. 2 and 4) which can be training data that can be directed to specific tasks and domains. The model can be fine-tuned in various ways. For example, new models may be generated by updating parameters (weights) of a base model. Below wediscuss two types of fine tuning, but it should be understood that there can be additional variations. One or more strategies can be applied independently or in combination, depending on the requirements of the task-domain combination.1. Fine-Tuning Type 1
[0071] In type 1 506, weights that are deemed unimportant for a specific task or domain are frozen, and only the important weights are updated during fine-tuning. This approach allows the model to specialize in the new task / domain without modifying parameters that are important for generalization or other tasks. This approach allows the model to achieve high performance on the new task or domain while preserving the general-purpose functionality of the frozen parameters. By restricting updates to a subset of weights, this method ensures computational efficiency and minimizes the risk of degrading the model’s performance on unrelated tasks.
[0072] The process begins by identifying the task and domain for which the model is to be fine-tuned. Once the fine-tuning dataset is determined, the weights of the model are ranked based on their importance scores (denoted as / p) from largest to smallest. These importance scores are calculated using weight-probing techniques, which evaluate how important each parameter is to the target task or domain. After the ranking, a top percentile of the weights is selected, representing the parameters that contribute most significantly to performance in the specific task or domain. Finally, fine-tuning is performed exclusively on this selected group of weights, leaving the remaining weights frozen. This ensures that the model adapts specifically to the new task or domain without altering weights that are important for generalization or other tasks.2. Fine-Tuning Type 2
[0073] In type 2508, the important weights for general capabilities are frozen, and less important weights are fine-tuned. This ensures that the model retains its broad generalization capabilities while adapting to the specific task or domain. This strategy prioritizes maintaining the model’s versatility while still enabling targeted adaptation.
[0074] The process begins by determining the tasks and domains associated with each part of the model’s weights. Once this mapping is complete, the specific tasks and domains that the fine-tuned model should retain its capabilities for are identified. Similar to Type 1, the weights are ranked based on their importance scores Ig), and the top percentile of weights isselected. However, in this case, the selected weights — those deemed most important for generalization — are frozen. The remaining weights, which are less important for retaining general-purpose functionality, are used for fine-tuning with the target task / domain dataset. This approach ensures that the model retains its general capabilities while gaining specialization in the desired area, enabling a balanced performance across both new and existing tasks or domains.
[0075] After fine-tuning, the model generates updated weight matrices first fine-tuned model and second fine-tuned model, illustrated as model weight 510 and model weight 512, which reflect the specialized knowledge the model has learned for specific tasks and domains. These weight matrices are then aggregated through importance score-based merging 514, discussed in greater detail below. This step ensures that the specialized updates from different tasks and domains are integrated into a single cohesive model. This merging process can utilize the previously calculated importance scores to guide the weighted aggregation of updated weights. Parameters with higher importance scores for specific tasks or domains are prioritized in the merging process, ensuring that the final model is capable of handling both specialized and general tasks.
[0076] The final output of the process is a single, model weight 516, which can be a foundational model that balances task / domain-specific specialization with general capabilities. By leveraging the task and domain importance scores throughout the process, the model achieves computational efficiency and adaptability to novel and complex task-domain combinations. This methodology is particularly valuable in real-world scenarios, such as those described in the transcripts, where models must handle diverse applications like fraud detection, transaction approval, and risk evaluation, all while maintaining their general language understanding abilities.IV. MERGING OF MODELS
[0077] As described above, different models, as represented by respective weights, can be generated based on the different types of training as well as for task and domain specific models. These models can be merged together to form the final model, performed by merging the weights for each of these models. The updated weights matrices, accordingly, can be merged using an importance score merging process. In some examples, merging can be done per parameter, per model, and / or statistical analysis can be used to compare the importance values of model weights.
[0078] The merging process integrates the updated weights from fine-tuned models for individual tasks and domains back into the base model, balancing specialization with generalization. This is achieved by leveraging weight importance and group importance to guide the merging process. This approach addresses challenges such as parameter interference and redundancy, which can degrade performance if not properly managed during model integration.
[0079] Utilizing the weight importance and group importance for task-specific and domain specific finetuning, multiple fine-tuned models can be obtained for multiple tasks and domains. The merging process begins with the base model, 0Base, which serves as the starting point for fine-tuning across various tasks and domains. Fine-tuning on each specific task or domain generates a separate weight matrix 0;- that reflects the updates that may be needed for that particular task or domain. These fine-tuned weight metrices can then be merged with the base model using the sample equation 6 below.
[0080] [Equation 6]&
[0081] Here, 0;- is the finetuned model weights on ith of the N specific tasks and domains, 0Base is the starting point model for finetuning, I / F;- is the fraction of the importance from selected groups in total importance during weights selection for finetuned model i, and A is the scaling factor between different finetuned models to adjust the importance between different tasks or domains.
[0082] The fraction of the importance I / F;- is calculated using group importance values, which quantify the relevance of specific groups of parameters for a given task or domain. An example equation for I / F;- is shown in equation 7 below.
[0083] [Equation 7] Wt=
[0084] For calculation of Wt, Ig is the group importance of jth largest importance group among G groups in ith model, and k is the number of selected groups. This step ensures that each fine-tuned model contributes to the merged model in proportion to the relevance of its parameters, prioritizing more important updates while maintaining computational efficiency.
[0085] The merged model ^Merged achieves a balance between task / domain specialization and general-purpose capabilities. By integrating updates from multiple fine-tuned models in astructured and efficient manner, this approach allows the final model to perform well across a wide range of applications. Techniques like pruning and freezing ensure that weight changes are distributed sparsely across the model, reducing redundancy and parameter interference between different fine-tuned models. For example, during the fine-tuning process, changes to weights may occur in distinct parts of the model depending on the task or domain. By selectively aggregating these sparse updates using the importance scores, the merged model avoids performance degradation caused by overlapping or redundant weight changes.V. EXAMPLES OF FINE TUNINGA. Single Set Of New Training Data
[0086] Although, the new training data discussed above with reference to FIGS. 2, 4, and 5 can include a breakdown of data into tasks and domains, the new training data can be as a whole, without distinction between tasks and domains. Additionally, type 1 fine tuning can be used or only type 2 fine-tuning can be used, resulting in only a single weight matrix.Therefore, no merging of models may be needed.
[0087] For example, if the new training data is focused on classifying transaction fraud, the model can be fine-tuned using the training data as a whole. The weight probing and importance scoring techniques can be applied globally to identify which parameters in the model are most important for this specific task and domain. Fine-tuning then updates only these relevant weights, ensuring computational efficiency and task-specific optimization.B. New Training Data Split Into Task And Domain
[0088] When the new training data encompasses multiple tasks and domains, it can first be split into subsets corresponding to each specific task and domain. For example, if the dataset includes customer sentiment analysis (task) in finance (domain) and fraud detection (task) in e-commerce (domain), the data is divided accordingly. Each subset is then processed independently to calculate task-specific and domain-specific importance scores for the model's parameters. This enables the fine-tuning process to focus on the unique requirements of each task-domain pair.
[0089] In this example, the fine-tuning process can result in more than one weight matrix which can then be merged to produce a final fine-tuned model.C. Use Of Single Training Data With Type 1 And Type 2 Optimization
[0090] In this example, a single training dataset is fine-tuned using both Type 1 and Type 2 optimization strategies. First, the dataset is used to calculate importance scores for the model's parameters. In Type 1 fine-tuning, the weights deemed most important for the specific task or domain can be updated, while unimportant weights can be frozen. This enables the model to specialize in the task or domain without modifying parameters important for generalization. Conversely, in Type 2 fine-tuning, the weights deemed important for retaining general capabilities can be frozen, while less important weights can be fine-tuned to adapt to the new task or domain. The two approaches can be applied sequentially or in parallel, depending on the desired balance between specialization and generalization. For instance, a model fine-tuned for financial fraud detection using Type 1 would prioritize task-specific performance, while Type 2 would ensure the model retains its ability to handle broader financial tasks. In this example, the fine-tuning process can also result in more than one weight matrix which can then be merged to produce a final fine-tuned model.D. Task And Domain With Type 1 And Type 2
[0091] This example involves fine-tuning a model on multiple tasks and domains using both Type 1 and Type 2 optimization strategies. For instance, consider a training dataset that includes tasks like customer sentiment analysis and fraud detection across domains such as e-commerce and finance. Each task-domain pair is processed independently to calculate taskspecific and domain-specific importance scores. Using Type 1 optimization, weights important to each specific task-domain pair can be updated, while unimportant weights can be frozen. This ensures the model specializes in the individual task-domain pair. With Type 2 optimization, weights important for general capabilities across multiple tasks and domains can be frozen, while less important weights can be fine-tuned for adaptation. Finally, the updates from each task-domain pair can be merged using importance score-based aggregation to create a unified model that excels in specialized tasks while maintaining general versatility. In this example, the fine-tuning process can also result in more than one weight matrix which can then be merged to produce a final fine-tuned model.VI. METHOD
[0092] FIG. 6 illustrates a method 600 of domain and task-specific fine tuning, according to some embodiments. Method 600 can be performed by one or more processors of a computer. Method 600 and any of the methods described herein may be totally or partially performed with a computer system including one or more processors, which can be configured to perform the steps. Thus, embodiments are directed to computer systems configured to perform the steps of any of the methods described herein, potentially with different components performing a respective step or a respective group of steps.
[0093] At step 602, a machine learning model is loaded having a set of parameters that are trained using initial training data. These parameters represent the general knowledge the model has already acquired, such as its ability to understand language patterns, reasoning, or domain-specific content like finance or biology. The model may already have general capabilities across tasks and domains. However, fine-tuning can be used to adapt the model to specific tasks and domains.
[0094] At step 604, new training data is received. According to some embodiments, the new training data can include task-specific training data and / or domain-specific training data. The new training data may be specific to the tasks and domains the model needs to adapt to. The new training data can include, for example, transactional records for fraud detection in finance, sentiment analysis in e-commerce, or risk evaluation in healthcare. The new training data can range from single-task and single-domain datasets to multi-task and multi-domain combinations. For multi-task or multi-domain datasets, the data may later be further divided into subsets for independent processing.
[0095] At step 606, a set of importance values is determined for each of the set of parameters using the new training data. The set of importance values can indicate a measure of importance for a given parameter to affect an accuracy of an output of the machine learning model. Techniques like weight probing can be used, where parameters can be systematically manipulated (e.g., frozen, zeroed, or updated) to evaluate their contribution to the task or domain. The importance values can be calculated for both task-specific and domain-specific contexts, resulting in matrices that quantify parameter relevance. These values guide the selective fine-tuning process by highlighting which parameters should be updated and which should be frozen. Determining importance values is discussed in greater detail with reference to FIGS. 1-4.
[0096] At step 608, a first plurality of task-specific importance values are loaded that are each determined for a particular task using a respective task-specific training set. At step 610, a second plurality of domain-specific importance values are loaded that each determined for a particular domain using a respective domain-specific training set. These values, stored as matrices, represent the contributions of parameters to previously known tasks and domains. These task and domain-specific importance values can be derived from new training data as discussed with reference to FIGS. 2 and 4. According to some embodiments, the plurality of tasks can be a plurality of tasks selected from a set of predefined tasks for which task-specific importance values are stores, and the particular domain can be a plurality of domains selected from a set of predefined domains for which domain-specific importance values are stores.
[0097] At step 612, a combined importance value is determined for the set of parameters using the set of importance values, the first plurality of task-specific importance values, and the second plurality of domain-specific importance values. This combination can involve statistical techniques like normalization and weighting, ensuring that the final importance values are balanced and meaningful. For example, the task-agnostic and domain-agnostic scores can be normalized using measures like variance and mean. Various approaches are discussed in greater detail in section Il.d. Then the task-agnostic and domain-agnostic importance scores can be combined with task-specific and domain-specific scores to produce a single, unified importance value for each parameter group. Combining the importance values is discussed in greater detail with reference to FIG. 2.
[0098] According to some embodiments, the combined importance values can be determined by, for each parameters of a set of parameters of a model, determining one or more task-specific importance values of the first plurality of task-specific importance values that correspond to the parameter and determining one or more domain-specific importance values of the second plurality of domain-specific importance values that correspond to the parameters. According to some embodiments, one or more of the set of importance values of the new training data corresponding to the parameter. Thus, a plurality of task-specific and a plurality of domain-specific importance values can be determined for a parameter Additionally importance values of the new training data corresponding to the parameter can be determined. A statistical value, such as an average, can then be determined using the one or more task-specific importance values, the one or more domain-specific importance values, and the one or more of the set of importance values of the new training data. Then, using the statistical value, a combined importance score can be generated for the parameter.
[0099] At step 614, the machine learning model can be trained using the combined importance values to determine fine-tuned values for the set of parameters. Here, the model is fine-tuned by leveraging pre-trained knowledge and new training data in a targeted manner. This is discussed in greater detail with reference to FIG. 5.
[0100] According to some embodiments, training the machine learning model can include training a fine-tuned model using task-specific training data and / or training another finetuned model using domain-specific training data and generating a final machine learning model by merging the values of the set of parameters for each of the plurality of fine-tuned models. According to some embodiments, the set of importance values can include (1) a set of importance values determined based on task-specific training data and / or (2) a set of importance values determined based on domain-specific training data. Then, merging the values of the set of parameters can use the plurality of sets of importance values.
[0101] As discussed in greater detail with reference to FIG. 5, according to some embodiments, the machine learning model can be trained using a fine-tuning process that includes fine-tuning on a subset of a model’s weights while freezing a second subset of the model’s weights. In one example, Type 1, training a machine learning model can include determining a first subset of the set of parameters of the model having a combined importance score below a threshold value. Example threshold values can be .5, .6, .7, .8, etc. The first subset can be frozen and then a second subset can be determined which consists of the set of parameters not in the first subset. Then, the machine learning model can be trained by fine-tuning the second subset of the set of parameters of the machine learning model using the new training data.
[0102] In another example, Type 2, training a machine learning model can include determining a subset of the set of parameters having combined importance values greater than a threshold. Then a subset of the set of parameters not in the subset of the set of parameters having combined importance values greater than a threshold can be determined and frozen. Then, the machine learning model can be trained by fine-tuning the subset of the set of parameters having combined importance values greater than the threshold using the new training data. In another example, the machine learning model may be trained by combining both Type 1 and Type 2.VII. COMPUTER SYSTEM
[0103] FIG. 7 shows a block diagram of an example computer system usable with systems and methods according to embodiments of the present disclosure. Any of the computer systems mentioned herein may utilize any suitable number of subsystems. Examples of such subsystems are shown in FIG. 7 in computer system 700. In some embodiments, a computer system includes a single computer apparatus, where the subsystems can be the components of the computer apparatus. In other embodiments, a computer system can include multiple computer apparatuses, each being a subsystem, with internal components. A computer system can include desktop and laptop computers, tablets, mobile phones and other mobile devices.
[0104] The subsystems shown in FIG. 7 are interconnected via a system bus 712.Additional subsystems such as a printer 708, keyboard 718, storage device(s) 720, monitor 724 (e.g., a display screen, such as an LED), which is coupled to display adapter 714, and others are shown. Peripherals and input / output (I / O) devices, which couple to I / O controller 702, can be connected to the computer system by any number of means known in the art such as input / output (I / O) port 716 (e.g., USB, FireWire®). For example, I / O port 716 or external interface 722 (e.g., Ethernet, Wi-Fi, etc.) can be used to connect computer system 700 to a wide area network such as the Internet, a mouse input device, or a scanner. The interconnection via system bus 712 allows the central processor 706 to communicate with each subsystem and to control the execution of a plurality of instructions from system memory 704 or the storage device(s) 720 (e.g., a fixed disk, such as a hard drive, or optical disk), as well as the exchange of information between subsystems. The system memory 704 and / or the storage device(s) 720 may embody a computer readable medium. Another subsystem is a data collection device 710, such as a camera, microphone, accelerometer, and the like. Any of the data mentioned herein can be output from one component to another component and / or can be output to a user.
[0105] A computer system can include a plurality of the same components or subsystems, e.g., connected together by external interface 722, by an internal interface, or via removable storage devices that can be connected and removed from one component to another component. In some embodiments, computer systems, subsystem, or apparatuses can communicate over a network. In such instances, one computer can be considered a client and another computer a server, where each can be part of a same computer system. A client and aserver can each include multiple systems, subsystems, or components. In various embodiments, methods may involve various numbers of clients and / or servers, including at least 10, 20, 50, 100, 200, 500, 1,000, or 10,000 devices. Methods can include various numbers of communication messages between devices, including at least 100, 200, 500, 1,000, 10,000, 50,000, 100,000, 500,00, or one million communication messages. Such communications can involve at least 1 MB, 10 MB, 100 MB, 1 GB, 10 GB, or 100 GB of data.
[0106] Aspects of embodiments can be implemented in the form of control logic using hardware circuitry (e.g., an application specific integrated circuit or field programmable gate array) and / or using computer software stored in a memory with a generally programmable processor in a modular or integrated manner, and thus a processor can include memory storing software instructions that configure hardware circuitry, as well as an FPGA with configuration instructions or an ASIC. As used herein, a processor can include a single-core processor, multi-core processor on a same integrated chip, or multiple processing units on a single circuit board or networked, as well as dedicated hardware. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will know and appreciate other ways and / or methods to implement embodiments of the present disclosure using hardware and a combination of hardware and software.
[0107] Any of the software components or functions described in this application may be implemented as software code to be executed by a processor using any suitable computer language such as, for example, Java, C, C++, C#, Objective-C, Swift, or scripting language such as Perl or Python using, for example, conventional or object-oriented techniques. The software code may be stored as a series of instructions or commands on a computer readable medium for storage and / or transmission. A suitable non-transitory computer readable medium can include random access memory (RAM), a read only memory (ROM), a magnetic medium such as a hard-drive or a floppy disk, or an optical medium such as a compact disk (CD) or DVD (digital versatile disk) or Blu-ray disk, flash memory, and the like. The computer readable medium may be any combination of such devices. In addition, the order of operations may be re-arranged. A process can be terminated when its operations are completed but could have additional steps not included in a figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc. When a process corresponds to a function, its termination may correspond to a return of the function to the calling function or the main function.
[0108] Such programs may also be encoded and transmitted using carrier signals adapted for transmission via wired, optical, and / or wireless networks conforming to a variety of protocols, including the Internet. As such, a computer readable medium may be created using a data signal encoded with such programs. Computer readable media encoded with the program code may be packaged with a compatible device (e.g., as firmware) or provided separately from other devices (e.g., via Internet download). Any such computer readable medium may reside on or within a single computer product (e.g., a hard drive, a CD, or an entire computer system), and may be present on or within different computer products within a system or network. A computer system may include a monitor, printer, or other suitable display for providing any of the results mentioned herein to a user.
[0109] Any of the methods described herein may be totally or partially performed with a computer system including one or more processors, which can be configured to perform the steps. Any operations performed with a processor may be performed in real-time. The term "real-time" may refer to computing operations or processes that are completed within a certain time constraint. As examples, a time constraint may be 30 seconds, 1 minute, 10 minutes, 30 minutes, 1 hour, 4 hours, 1 day, or 7 days. Thus, embodiments can be directed to computer systems configured to perform the steps of any of the methods described herein, potentially with different components performing a respective step or a respective group of steps. Although presented as numbered steps, steps of methods herein can be performed at a same time or at different times or in a different order. Additionally, portions of these steps may be used with portions of other steps from other methods. Also, all or portions of a step may be optional. Additionally, any of the steps of any of the methods can be performed with modules, units, circuits, or other means of a system for performing these steps.
[0110] The specific details of particular embodiments may be combined in any suitable manner without departing from the spirit and scope of embodiments of the disclosure.However, other embodiments of the disclosure may be directed to specific embodiments relating to each individual aspect, or specific combinations of these individual aspects.[OHl] The above description of example embodiments of the present disclosure has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to limit the disclosure to the precise form described, and many modifications and variations are possible in light of the teaching above.
[0112] A recitation of "a", "an" or "the" is intended to mean "one or more" unless specifically indicated to the contrary. The use of “or” is intended to mean an “inclusive or,” and not an “exclusive or” unless specifically indicated to the contrary. Reference to a “first” component does not necessarily require that a second component be provided. Moreover, reference to a “first” or a “second” component does not limit the referenced component to a particular location unless expressly stated. The term “based on” is intended to mean “based at least in part on.”
[0113] The claims may be drafted to exclude any element which may be optional. As such, this statement is intended to serve as antecedent basis for use of such exclusive terminology as “solely”, “only”, and the like in connection with the recitation of claim elements, or the use of a “negative” limitation.
[0114] All patents, patent applications, publications, and descriptions mentioned herein are incorporated by reference in their entirety for all purposes. None is admitted as prior art. Where a conflict exists between the instant application and a reference provided herein, the instant application shall dominate.
[0115] The specific details of particular embodiments may be combined in any suitable manner or varied from those shown and described herein without departing from the spirit and scope of embodiments of the invention.
Claims
WHAT IS CLAIMED IS:
1. A method comprising:loading a machine learning model having a set of parameters that are trained using initial training data;receiving new training data;determining a set of importance values for the set of parameters using the new training data, wherein the set of importance values indicate a measure of importance for a given parameter to affect an accuracy of an output of the machine learning model;loading a first plurality of task-specific importance values that are each determined for a particular task using a respective task-specific training set;loading a second plurality of domain-specific importance values that are each determined for a particular domain using a respective domain-specific training set;determining combined importance values for the set of parameters using the set of importance values, the first plurality of task-specific importance values, and the second plurality of domain-specific importance values; andtraining the machine learning model using the new training data and the combined importance values to determine fine-tuned values for the set of parameters.
2. The method of claim 1, wherein the particular task is a plurality of tasks selected from a set of predefined tasks for which task-specific importance values are stored, and wherein the particular domain is a plurality of domains selected from a set of predefined domains for which domain-specific importance values are stored.
3. The method of claim 1, wherein the new training data includes taskspecific training data and domain-specific training data.
4. The method of claim 3 wherein training the machine learning model includes:training a first fine-tuned model using the task-specific training data; training a second fine-tuned model using the domain-specific training data; andgenerating a final machine learning model by merging values of the set of parameters for each of the first fine-tuned model and the second fine-tuned model.
5. The method of claim 4, wherein the set of importance values includes (1) a first set of importance values determined based on the task-specific training data and (2) a second set of importance values determined based on the domain-specific training data, and wherein merging the values of the set of parameters uses the first set of importance values and the second set of importance values.
6. The method of any preceding claim, wherein training the machine learning model comprises:determining a first subset of the set of parameters having combined importance values below a threshold;freezing the first subset of the set of parameters;determining a second subset of the set of parameters not in the first subset; and fine-tuning the second subset of the set of parameters of the machine learning model as part of training the machine learning model using the new training data.
7. The method of claim 1 or 6 wherein training the machine learning model comprises:determining a third subset of the set of parameters having combined importance values greater than a threshold;determining a fourth subset of the set of parameters not in the third subset; freezing the fourth subset of the set of parameters; andfine tuning the third subset of the set of parameters of the machine learning model as part of training the machine learning model using new training data.
8. The method of claim 1, wherein determining the combined importance values comprises:for each parameter of the set of parameters:determining one or more task-specific importance values of the first plurality of task-specific importance values that correspond to the parameter;determining one or more domain-specific importance values of the second plurality of domain-specific importance values that correspond to the parameter;determining one or more of the set of importance values of the new training data corresponding to the parameter;determining a statistical value using the one or more task-specific importance values, the one or more domain-specific importance values, and the one or more of the set of importance values; anddetermining the combined importance values for the parameter using the statistical value.
9. A system comprising one or more processors configured to perform the method of any one of the preceding claims.
10. A computer product comprising a non-transitory computer readable medium storing a plurality of instructions that, when executed, cause a computer system to perform the method of any one of the preceding claims.