Search

CN-121996021-A - Light calculation weight generation and adaptation system and method

CN121996021ACN 121996021 ACN121996021 ACN 121996021ACN-121996021-A

Abstract

The application provides a system and a method for generating and adapting light calculation weights, wherein the system comprises a weight generation input module, a weight generation module and an adaptation module, wherein the weight generation input module is used for acquiring task information of a target calculation task, structure information of a target light calculation structure and application constraint information, encoding and generating input conditions for weight generation, the weight generation module is used for generating general initial weight configuration of the target light calculation structure according to the input conditions for weight generation, and the adaptation module is used for configuring the initial weight configuration to the target light calculation structure, adjusting preset adjustable parameters according to the target calculation task and determining an adapted light calculation model. According to the application, the general weight generation process is separated from the model deployment process, the full retraining of the optical computing model is not needed, the rapid adaptation of a new task and a new application scene is realized, the deployment cost and the debugging time of the optical computing model are reduced, and the universality, the flexibility and the expandability of the optical computing system in complex intelligent tasks are improved.

Inventors

  • CHEN YITONG
  • LI XINYUE
  • ZHAI GUANGTAO
  • TANG MIN

Assignees

  • 上海交通大学

Dates

Publication Date
20260508
Application Date
20260310

Claims (10)

  1. 1. A light calculation weight generation and adaptation system, comprising: The weight generation input module is used for acquiring task information of a target calculation task, structural information of a target light calculation structure and application constraint information, and encoding to generate input conditions for weight generation; the weight generation module is used for generating general initial weight configuration of the target light calculation structure according to the input conditions generated by the weights; The adaptation module is used for configuring the initial weight configuration to the target light calculation structure, adjusting preset adjustable parameters of the target light calculation structure according to the target calculation task and determining an adapted light calculation model.
  2. 2. The light computing weight generation and adaptation system of claim 1, wherein the weight generation input module comprises: the task description unit is used for acquiring task information of the target computing task and converting the task information into structural representation information, wherein the structural representation information is used for representing task types and/or task targets of the target computing task; A structural parameter obtaining unit, configured to obtain structural information of the target optical computing structure, where the structural information of the target optical computing structure includes scale information, topology information, and parameter constraint information; And the constraint coding unit is used for acquiring the application constraint information and coding the task information of the target calculation task, the structure information of the target light calculation structure and the application information into the input condition generated by the weight.
  3. 3. The light computing weight generation and adaptation system of claim 1, wherein the weight generation module comprises: A weight generating unit, configured to generate a general initial weight configuration of the target light computing structure according to the input condition of weight generation; The universal training unit is used for training the weight generating module by adopting multi-domain data in a training stage, and determining the trained weight generating module, wherein the multi-domain data represents data under various tasks or various application scene conditions; and the parameter freezing unit is used for freezing the core parameters of the trained weight generating module in the model deployment stage.
  4. 4. The light computing weight generation and adaptation system of claim 1, wherein the adaptation module comprises: A weight configuration unit configured to configure the initial weight configuration to the target light calculation structure; an adjustable parameter unit, configured to store an adjustable parameter set of the target light computing structure, where the adjustable parameter set includes a preset adjustable parameter; and the adaptation unit is used for adjusting preset adjustable parameters of the target light calculation structure according to the target calculation task and determining the adapted light calculation model.
  5. 5. A light calculation weight generation and adaptation method, characterized in that it is implemented by the light calculation weight generation and adaptation system according to any one of claims 1 to 4, comprising: Acquiring task information of a target computing task, structural information of a target light computing structure and application constraint information by adopting a weight generation input module, and encoding an input condition for generating weight; inputting the input conditions of weight generation into a trained weight generation module, and determining the general initial weight configuration of the target light calculation structure; And configuring the general initial weight configuration of the target light computing structure to the target light computing structure by adopting the adaptation module, adjusting preset adjustable parameters of the target light computing structure according to a target computing task, and determining an adapted light computing model.
  6. 6. The method for generating and adapting light calculation weights according to claim 5, wherein the weight generating input module comprises a task description unit, a structural parameter acquisition unit, and a constraint coding unit; The method for generating the input conditions of weight generation by adopting the weight generation input module to acquire task information of a target calculation task, structural information of a target light calculation structure and application constraint information comprises the following steps: Acquiring task information of the target computing task by adopting the task description unit, and converting the task information into structural representation information, wherein the structural representation information is used for representing the task type and/or the task target of the target computing task; The structural parameter obtaining unit is used for obtaining structural information of the target light calculation structure, wherein the target light calculation structure information comprises scale information, topology information and parameter constraint information; and acquiring the application constraint information by adopting the constraint coding unit, and coding the task information of the target calculation task, the structural information of the target light calculation structure and the application constraint information into the input condition generated by the weight.
  7. 7. The light computing weight generation and adaptation method according to claim 5, wherein the weight generation module comprises a weight generation unit, a general training unit, and a parameter freezing unit; The method further comprises the steps of: In the training stage, the weight generating module is trained by adopting a general training unit in the weight generating module according to multi-domain data, and the trained weight generating module is determined, wherein the multi-domain data represents data under the conditions of various tasks or various application scenes. The method further comprises the steps of: And in a model deployment stage, freezing core parameters of the trained weight generation module by adopting a parameter freezing unit of the weight generation module.
  8. 8. The light computing weight generation and adaptation method of claim 7, wherein the inputting the weight generated input conditions into a trained weight generation module determines a generic initial weight configuration for the target light computing structure, comprising: the input conditions of the weight generation are input to the weight generation unit of the trained weight generation module, and a general initial weight configuration of the target light calculation structure is generated.
  9. 9. The method for generating and adapting light calculation weights according to claim 5, wherein the adaptation module comprises a weight configuration unit, an adjustable parameter unit and an adaptation unit; the configuring the general initial weight configuration of the target light computing structure to the target light computing structure by adopting the adapting module, adjusting preset adjustable parameters of the target light computing structure according to a target computing task, and determining an adapted light computing model, including: configuring a general initial weight configuration of the target light computing structure to the target light computing structure by adopting the weight configuration unit; And according to a target calculation task, adjusting preset adjustable parameters of the target light calculation structure in the adjustable parameter unit by adopting the adaptation unit, and determining the adapted light calculation model.
  10. 10. An image classification method, characterized in that the light calculation weight generation and adaptation system according to claims 1 to 4 is used for realizing the image classification task, comprising: acquiring an image to be classified and a target light calculation structure; Acquiring task information of an image classification task, structural information of the target light calculation structure and application constraint information by adopting a weight generation input module, and encoding and generating input conditions for weight generation, wherein the task information of the image classification task comprises category information, data characteristics and task targets of the image classification task, and the structural information of the target light calculation structure comprises structural information of a diffraction optical layer, a phase modulator array and an optical propagation module; Inputting the input conditions of weight generation into a trained weight generation module, and determining the general initial weight configuration of the target light calculation structure; configuring the general initial weight configuration of the target light computing structure to the target light computing structure by adopting the adaptation module, adjusting preset adjustable parameters of the target light computing structure according to the image classification task, and determining a light computing model for image classification; Encoding an image to be classified into a light field signal; inputting the light field signals into the light calculation model for image classification to perform optical calculation, and determining output light signals; And acquiring the output optical signals by adopting a photoelectric detector, converting the output optical signals into electronic signals, and determining an image classification result of the image to be classified.

Description

Light calculation weight generation and adaptation system and method Technical Field The application relates to the technical field of optical computing, in particular to an optical computing weight generation and adaptation system and an optical computing weight generation and adaptation method. Background With the rapid development of artificial intelligence technology, machine learning models are widely used in the fields of visual perception, signal processing, pattern recognition and the like. At the same time, the continuous growth of model size and computational complexity has led to the challenge of traditional electronic computing platforms in terms of computational power, energy consumption and parallelism. In order to break through the physical bottleneck of the electronic computing architecture, optical computing and photoelectric hybrid computing are taken as a novel computing paradigm, and are gradually and widely focused due to the advantages of higher parallelism, higher bandwidth, lower power consumption and the like. Existing light computing research has focused on implementing specific forms of computing functions with optics or optical structures, such as performing linear or nonlinear operations with fixed or adjustable optical parameters, to construct light computing models to perform specific tasks. In practical applications, such optical computing models usually need to be specially designed and optimized for specific tasks, specific data distribution or specific device conditions, such as image classification tasks, matrix computing tasks and neural network reasoning tasks, and weights or parameters thereof are often obtained through offline simulation or iterative optimization. For example, in the patent CN119940443a, the intelligent optical computing general propagation model, architecture and system includes a model training module, which is configured to perform full training on the initial optical computing general propagation model according to a specific target optical computing task, so as to obtain a target optical computing general propagation model, and further be used for modulating an optical input signal encoded by input data, so as to obtain an optical computing result signal. Once a task or an application scene changes, a corresponding general propagation model for optical computation is often required to be regenerated or retrained, so that the model deployment period is longer, the adaptation cost is higher, and the requirements of quick iteration and flexible application are difficult to meet. In addition, because of the differences of different light calculation structures in terms of physical constraints, parameter forms, adjustable degrees of freedom and the like, the existing method generally lacks a unified and reusable weight generation mechanism, so that the existing training results and parameter experience are difficult to share among light calculation models. Under the condition, when the light calculation model faces a new task, a new application scene or device deviation, such as an image classification task, a matrix calculation task and a neural network reasoning task, the light calculation model still highly depends on full-scale parameter adjustment or redesign, and popularization and application of the light calculation technology in a complex intelligent system are limited. Therefore, how to realize efficient generation and rapid adaptation of the light calculation weight without depending on the whole weight or the total weight retraining of the light calculation model, reduce the model deployment and migration cost, and improve the universality and flexibility of the light calculation system has become a technical problem to be solved in the art. Disclosure of Invention In view of the foregoing, it is an object of the present application to provide a system and method for generating and adapting light calculation weights. In a first aspect of the present application, there is provided a light calculation weight generation and adaptation system, comprising: The weight generation input module is used for acquiring task information of a target calculation task, structural information of a target light calculation structure and application constraint information, and encoding to generate input conditions for weight generation; the weight generation module is used for generating general initial weight configuration of the target light calculation structure according to the input conditions generated by the weights; The adaptation module is used for configuring the initial weight configuration to the target light calculation structure, adjusting preset adjustable parameters of the target light calculation structure according to the target calculation task and determining an adapted light calculation model. Optionally, the weight generation input module includes: the task description unit is used for acquiring task information of the target computing