Adaptive-reflective-based tool-augmented imaging optical system automatic design method
Patent Information
- Application Number
- CN202610838063.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2046-06-11
AI Technical Summary
[0063]本发明的自动设计方法与现有的传统阻尼最小二乘法/全局优化算法相比具有:
Smart Images

Figure CN122413982B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of imaging optical system design technology, and in particular to a tool-enhanced automatic design method for imaging optical systems based on adaptive reflection. Background Technology
[0002] The design of an imaging optical system is essentially a multi-objective optimization process within a high-dimensional, nonlinear, and multimodal parameter space. Designers must simultaneously satisfy first-order optical characteristics such as focal length, f-number, and field of view, while minimizing various aberrations including spherical aberration, coma, astigmatism, field curvature, distortion, and chromatic aberration. They must also consider engineering constraints such as lens material cost, manufacturability, system size and weight, and environmental adaptability. Traditional optical design processes typically begin with the designer manually selecting an "initial structure" from a manual or patent database based on strong theoretical knowledge and extensive practical experience. This is followed by iterative optimization using local or global optimizers built into optical design software, such as those based on damped least squares or genetic algorithms. However, this classic paradigm has significant limitations. First, gradient-based local optimization algorithms, such as damped least squares, are highly dependent on the initial structure. If the initial point is not chosen appropriately, the algorithm can easily get trapped in tens of thousands of local minima, leading to a final design that fails to meet imaging quality requirements. Secondly, although global optimization algorithms can theoretically traverse a wider solution space, their computational cost increases exponentially with the number of variables. For modern lens systems containing a dozen or even dozens of optical surfaces, their convergence time is often unacceptable.
[0003] More importantly, while the development of deep learning technology has led to the emergence of some initial structure generation methods based on neural networks, most of these methods are "black box" models, lacking a deep understanding of optical physics and the ability to reason causally. They often can only provide parameter predictions based on statistical laws, and when the design results are unsatisfactory, they cannot, like human experts, use optical aberration theory to "reflect" and analyze which lens's power distribution is unreasonable or which glass material's dispersion characteristics are mismatched, thus failing to adjust and optimize strategies in a targeted manner. Furthermore, the field of optical design has accumulated a vast amount of patent literature, textbook theories, and glass material data. This valuable external knowledge currently exists mainly in the form of unstructured text or semi-structured data. Existing AI design models cannot efficiently and accurately retrieve and utilize this knowledge to assist design decisions, often leading to "reinventing the wheel" or producing "illusions" that violate physical common sense during the design process.
[0004] The most similar implementations to this invention can be mainly categorized into two types:
[0005] The first category is expert system-based design solutions. These solutions attempt to encode the design rules of optical experts (such as "achromatic correction requires using glass combinations with different Abbe numbers" and "reducing field curvature requires separating positive and negative optical powers") into computer programs, guiding the optimization process through rule-based reasoning. However, the knowledge base of expert systems is usually static, making it difficult to adapt to the rapidly evolving optical technologies, and the maintenance and expansion of rules are extremely costly. Furthermore, expert systems lack learning capabilities and cannot learn from failed design cases.
[0006] The second category is optical question answering and code generation schemes based on general large language models. With the emergence of large models such as GPT-4, researchers have begun to utilize large language models to assist in optical design. For example, large language models are used to generate macro scripts that control Zemax or CodeV, or to answer questions about optical principles. Some schemes combine retrieval-enhanced generation techniques, using optics textbooks or documents to improve the accuracy of the large language model's answers. However, these general retrieval-enhanced generation techniques perform poorly when dealing with structured data specific to the field of optics. General text embedding models struggle to capture the essential geometric and topological differences between "double Gaussian structures" and "Cook's three-piece structures." Furthermore, existing schemes based on large language models are typically open-loop, meaning that after the model generates a script, it cannot perform deep self-reflection and strategy adjustments based on the simulation software's results. Once the script encounters errors or the optimization results are unsatisfactory, the task fails.
[0007] In summary, existing technologies either get bogged down in local minima, lack physical interpretability, or fail to efficiently utilize external expertise. Currently, no technology can organically integrate the reflective reasoning abilities of human experts, the ability to retrieve mixed structured / unstructured knowledge, and the self-evolutionary capabilities of reinforcement learning for the automated design of imaging optical systems. Summary of the Invention
[0008] In view of this, the purpose of this invention is to provide an automatic design method for tool-enhanced imaging optical systems based on adaptive reflection.
[0009] To achieve the above objectives, the technical solution of the present invention is as follows:
[0010] An automated design method for tool-enhanced imaging optics based on adaptive reflection includes the following steps:
[0011] Step 1: Construction and representation of a hybrid knowledge base in the field of optics;
[0012] Construct a hybrid knowledge base for the optical domain that includes both unstructured and structured data;
[0013] Step 2: Define the action space and reasoning logic based on the reflective thinking chain;
[0014] Define the action thinking chain and model the optical design process as a sequential decision-making process;
[0015] Step 3: Establish an adaptive hybrid knowledge routing retrieval mechanism;
[0016] When an agent generates a retrieval action, the adaptive routing controller determines the retrieval strategy based on the current question type and context state;
[0017] Step 4: A two-stage reinforcement learning training process based on group-relative policy optimization and restart exploration mechanism, including:
[0018] Phase 1: Format fine-tuning based on synthetic trajectories;
[0019] Synthetic data is generated using a generator-critic architecture, and the trajectory generator is fine-tuned using this synthetic data to obtain a supervised fine-tuning model.
[0020] Phase Two: Self-evolution of reinforcement learning based on group-relative policy optimization and restart exploration mechanism;
[0021] Based on the supervised fine-tuning model, a group relative strategy optimization algorithm and a restart and exploration mechanism are adopted to carry out reinforcement learning through large-scale interaction with the optical simulation environment.
[0022] In the above technical solution, step 1 specifically includes:
[0023] Step 1.1 Construction of the unstructured optical text library;
[0024] The collected technical document texts are cleaned, denoised, and segmented, and then transformed into high-dimensional vector indices using a pre-trained scientific domain embedding model.
[0025] Step 1.2 Construction of a structured optical knowledge graph;
[0026] Construct knowledge graphs for specific ontology based on different types of data.
[0027] In the above technical solution, step 2, the definition of the action mind chain specifically includes:
[0028] Reasoning and planning actions: The model generates natural language text, analyzes the requirements of the current design task, and plans the design path;
[0029] Retrieval action: triggered when the model finds that it lacks the necessary knowledge or data;
[0030] Optical manipulation actions: The model generates instruction codes that are executed by the optical simulation environment;
[0031] Reflection Action: After the simulation environment returns the image quality assessment report, the model generates reflection content;
[0032] Exploratory Action: Triggered when multiple optimization attempts after reflection actions fail to improve performance or the model gets stuck in a local minimum; the model decides to abandon the current local optimization path, revert to a previous state, and try a completely different strategy.
[0033] In the above technical solution, the retrieval strategy in step 3 includes the following modes:
[0034] Text mode: The retrieval system performs dense vector retrieval in an unstructured optical text database and returns relevant text fragments;
[0035] Graph pattern: The retrieval tool parses the natural language query into a graph query language, or maps the query into a node representation in the graph. By calculating the similarity between nodes or performing subgraph matching, it retrieves optical system entities and their parameters that meet the optical indicators and topological constraints in the structured optical knowledge graph.
[0036] Hybrid mode: The system performs text retrieval and graph retrieval in parallel, and then uses the inverse ranking fusion algorithm to merge and sort the results;
[0037] The search results are formatted into specific tags and inserted into the model's context as a basis for subsequent reasoning.
[0038] In the above technical solution, the formula for the reciprocal ranking fusion algorithm in the hybrid mode is as follows:
[0039]
[0040] In the formula, Represents candidate documents or graph entities The comprehensive ranking score obtained after fusing different retrieval modes indicates that the candidate document or graph entity is more relevant to the current query. Candidate documents or graph entities; Is it the candidate document or graph entity? In search mode The ranking below; It is a smoothing constant; This is the search mode, and ,in This indicates a text retrieval mode based on an unstructured optical text database. This represents a graph retrieval mode based on structured optical knowledge graphs.
[0041] In the above technical solution, step 4 specifically includes:
[0042] Phase 1: Format fine-tuning based on synthetic trajectories;
[0043] (1) Trajectory generation: The trajectory generator attempts to generate design steps for thousands of randomly generated optical design tasks;
[0044] (2) Comments and corrections: Detecting errors in the design; using a teacher model as a commentator to generate correction suggestions for errors;
[0045] (3) Data filtering: Collect the trajectories that have been successfully designed after correction;
[0046] (4) Supervised fine-tuning: The trajectory generator is fine-tuned using the collected successful synthetic trajectories, so that it learns the reflective thinking chain reasoning mode and the routing retrieval calling norm, and obtains the supervised fine-tuning model;
[0047] Phase Two: Self-evolution of reinforcement learning based on group-relative policy optimization and restart exploration mechanism;
[0048] (1) Group sampling: For each design task ,Strategy Samples are generated in parallel to form a set A different design trajectory ; Indicates the total number of trajectories;
[0049] (2) Restart the exploration mechanism: Maintain a trajectory buffer pool to store intermediate states in historically generated trajectories; when generating a new trajectory, restart the exploration mechanism with a certain probability. Instead of starting from scratch, it randomly selects an intermediate state from the trajectory buffer pool to restart and forces model generation. <reflect>or <explore>The token forces the model to attempt a different action branch from the original trajectory in that state;
[0050] (3) Design of composite reward function: Define the total reward function as follows:
[0051]
[0052] in, It is a result reward based on the optical evaluation function; This represents a complete design trajectory generated by the intelligent agent under the current optical design task, which includes inference, retrieval, manipulation, reflection, and exploration actions.
[0053] Rewards for efficiency:
[0054]
[0055] in, This refers to the number of retrievals and inference tokens consumed by the current trajectory. It is the average consumption of all trajectories within the current batch. A coefficient for efficiency rewards;
[0056] (4) Strategy update: Calculate the advantage of each trajectory relative to the average reward within the group. :
[0057]
[0058] in, and Within the group The mean and standard deviation of the trajectory rewards; Indicates the first Trajectory The corresponding total reward value, Indicates the first A trajectory, The trajectory number is selected from... ;
[0059] Optimize objective function To maximize:
[0060]
[0061] in, The function is based on probability. This limits the magnitude of policy updates, ensuring training stability; Kullback-Leibler divergence to prevent new strategies The deviation from the reference model is too large; This indicates the advantage of the trajectory relative to the average reward within the group; This represents the mathematical expectation of a sampling task and its corresponding trajectory set. Represents the probability distribution from the optical design task An optical design task obtained from mid-sample; Represents the probability distribution of the optical design task; Indicates a given optical design task The design trajectory random variable generated by the old strategy model under the given conditions; Indicates the first Trajectory New strategy Compared to the old strategy The probability ratio below, The coefficients are those of the objective function.
[0062] The present invention has the following beneficial effects:
[0063] The automatic design method of this invention has the following advantages compared with existing traditional damped least squares / global optimization algorithms:
[0064] Advantage 1: Possesses a global perspective and strategic approach. Traditional algorithms, like "blind men touching an elephant" in the parameter space, are prone to getting trapped in local minima. This invention addresses this by implementing a restart exploration mechanism and... <explore>When the system detects that optimization has stalled, it can proactively backtrack and attempt structural changes to find the global optimal solution at the structural level.
[0065] Advantage 2: High cold start efficiency. Traditional algorithms rely on manual provision of a good initial structure. This invention, through graph retrieval, can directly find the patent structure closest to the design specifications as a starting point, greatly shortening the search time.
[0066] The automatic design method of the present invention has the following advantages compared with existing optical design methods based on pure deep learning:
[0067] Advantage 3: High interpretability. Deep learning models are typically black boxes. This invention, based on a thought chain, can output a complete design report, detailing the decision-making logic at each step, greatly enhancing the tool's credibility and facilitating review by human experts.
[0068] Advantage 4: High accuracy of knowledge. Purely generative models are prone to generating non-existent glass materials or physically infeasible structures. This invention ensures the authenticity and reliability of the referenced material and structural data by retrieving structured maps, and is subject to strict constraints from the physical simulation engine.
[0069] The automatic design method of the present invention has the following advantages compared with the generation scheme of existing general retrieval enhanced question answering systems:
[0070] Advantage 5: Closed-loop execution and self-evolution. General retrieval enhancement is merely theoretical and cannot be applied to design software. This invention integrates tool invocation capabilities, enabling actual design execution and iteration based on feedback. Furthermore, through reinforcement learning training, the model can learn from failures and continuously improve its design capabilities, whereas general retrieval enhancement is typically static.
[0071] Advantage 6: Balancing efficiency. General search enhancements often perform searches for every query, which is slow. This invention introduces an efficiency reward, training the model to search only when necessary, achieving a balance between accuracy and speed. Attached Figure Description
[0072] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0073] Figure 1 A schematic diagram of the overall architecture process for designing an intelligent agent for optics.
[0074] Figure 2 This is a schematic diagram of the graphical representation of an optical system.
[0075] Figure 3 This is a schematic diagram of the state transition logic judgment process of an intelligent agent during the design process.
[0076] Figure 4 This is a schematic diagram illustrating the logic of training data construction and updating based on the group-relative strategy optimization and restart exploration mechanism. Detailed Implementation
[0077] The inventive concept of this invention is as follows:
[0078] This invention is primarily dedicated to solving several long-standing core technical challenges in the field of precision imaging optical system design. In particular, it addresses a series of technical problems faced by complex optical systems in the automated design process, such as over-reliance on human expert experience, the tendency of traditional optimization algorithms to get trapped in local minima in non-convex solution spaces, and the lack of logical reasoning ability and effective utilization of external knowledge in existing artificial intelligence-aided design methods.
[0079] This invention aims to construct an intelligent agent for automatic design of imaging optical systems by integrating a thought chain reasoning mechanism with self-reflective capabilities with a graph-text hybrid retrieval routing strategy tailored to the characteristics of the optical field. This agent possesses metacognitive capabilities, can autonomously retrieve and utilize external professional knowledge, and can continuously evolve through reinforcement learning. This enables the entire process from design requirement input to high-performance optical system output to be fully automated and intelligent.
[0080] Specifically:
[0081] This invention aims to endow design agents with "reflection" capabilities: by introducing a specific thought chain mechanism, the model can actively pause based on simulation feedback after performing optical design operations, analyze the causes of aberrations, and generate correction strategies in natural language form, thereby simulating the iterative thinking process of human experts.
[0082] This invention aims to achieve accurate hybrid retrieval of structured and unstructured knowledge: by constructing a heterogeneous knowledge graph and text library specifically for the field of optics, and combining it with adaptive routing technology, the model can intelligently select to retrieve unstructured optical principle texts or structured lens patent data according to the current task requirements, and use the inverse ranking fusion algorithm to integrate multi-source knowledge, thereby solving the problems of "knowledge silos" and structured data retrieval.
[0083] This invention aims to jointly optimize design quality and efficiency: by designing a composite reward function that includes result rewards and efficiency rewards, and combining it with a group relative strategy optimization algorithm, the trained model can minimize the number of inference steps and retrievals while ensuring that the imaging quality of the optical system meets the target, thereby achieving efficient design.
[0084] This invention aims to enhance the ability to find global optimization and escape local minima: by introducing a "restart and exploration" mechanism, the model is allowed to restart from the intermediate state (or even the failure state) of the historical trajectory during training, and the reflection and exploration actions are forced to be executed, thereby greatly improving the robustness and global optimization ability of the model in complex non-convex solution spaces.
[0085] The present invention will now be described in detail with reference to the accompanying drawings.
[0086] The present invention provides an automatic design method for an adaptive reflection-based tool-enhanced imaging optical system, which is an end-to-end automatic design method for imaging optical systems. This method uses a large language model as the core intelligent controller (i.e., the optical design intelligent agent of the present invention). The controller integrates an optical physics simulation environment, a domain knowledge graph, and a multimodal retrieval device. Figure 1 The overall closed-loop structure of the optical design agent of this invention is shown. The left side is the design requirement module, used to input design specifications; the input includes: imaging optical system design specifications, such as: effective focal length (EFL), F-number (F#), field of view (FOV), modulation transfer function (MTF) target, total length constraint, etc.; the middle part is the LLM agent (i.e., containing adaptive routing, inference planning, and action generation modules) Figure 1 The large language model intelligent controller (with adaptive routing responsible for determining the retrieval path (text, graph, or a mixture of both) based on current needs, triggering the retrieval via `<search>`, and returning structured parameters or explanations of principles; the reasoning and planning module is used to generate natural language planning based on thought chains; the action generation module is used to generate specific instruction sequences, including specific meta-actions such as reasoning, retrieval, operation, reflection, and exploration, via `<action>`. - opt> Executes design operations; if trapped in a local optimum, a restart exploration mechanism is triggered. The right side represents the system support environment, i.e., the external environment, including a hybrid knowledge base and an optical simulation engine. The hybrid knowledge base includes a structured optical knowledge graph (storing lens topology, glass material properties, etc.) and an unstructured optical text library (storing optical textbooks, papers, patent specifications, etc.). The optical simulation engine is responsible for executing instructions generated by the agent (such as setting curvature, replacing glass, and performing optimization), completing image quality feedback and reflection-driven processes, such as returning image quality evaluation reports to the agent, including RMS spot radius and distortion parameter data. Figure 1 As shown, the automatic design method for tool-enhanced imaging optical systems based on adaptive reflection of the present invention encompasses four main parts: construction and representation of a hybrid knowledge base in the optical field, definition of action space and reasoning logic based on reflective thought chains, establishment of an adaptive hybrid knowledge routing retrieval mechanism (hybrid retrieval enhancement mechanism), and a two-stage reinforcement learning training process based on group relative strategy optimization and restart exploration mechanism. The automatic design method of the present invention will be described in more detail below.
[0087] The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection of the present invention includes the following steps:
[0088] Step 1: Construction and representation of a hybrid knowledge base in the field of optics;
[0089] To support effective knowledge retrieval by optical design agents (hereinafter referred to as agents), this invention first constructs a hybrid knowledge base for the optical domain, containing both unstructured and structured data. Specifically, it includes the following steps:
[0090] Step 1.1: Construction of an unstructured optical text library;
[0091] This invention collects classic textbooks, high-level academic papers, patent specifications, and technical documents from mainstream optical design software in the field of optical design. These texts are cleaned, denoised, and segmented. A pre-trained scientific text embedding model is then used to semantically vectorize the segmented texts, obtaining corresponding high-dimensional vector representations and establishing vector indexes, thereby constructing an unstructured optical text library. The text embedding model is used to represent the semantic similarity of the texts to support subsequent dense vector retrieval. This unstructured optical text library is primarily used to answer theoretical questions regarding aberration correction principles, the definition of image quality evaluation standards, and design principles for special optical systems.
[0092] Step 1.2: Construction of a structured optical knowledge graph;
[0093] This is one of the core data foundations of this invention. Figure 2 The graphic optical system is shown. (Through...) Figure 2 The encoding method described in this invention addresses the limitation of traditional text retrieval in understanding the "spatial topology" of optical systems. This representation method enables intelligent agents to utilize graph matching algorithms to accurately locate initial design schemes with similar structural features within a massive patent database. For example... Figure 2 As shown, this invention constructs a knowledge graph of a specific ontology based on massive amounts of optical patent data and glass material data, as detailed below:
[0094] Entity definition: The following core entity types are defined:
[0095] Optical System: Represents a complete design instance, with attributes including Effective Focal Length (EFL), F-Number (F#), Field of View (FOV), Total Optical Length (TTL), and Operating Wavelength. Figure 2 (not shown in the image), etc.
[0096] LensElement: Represents a single lens, with attributes including optical power, shape factor, etc.
[0097] Surface: Represents an optical surface, with properties including radius of curvature, center thickness, half-aperture diameter, and higher-order coefficients for aspherical surfaces. Figure 2 In this context, S1 represents the front surface and S2 represents the rear surface.
[0098] Glass (glass material): Represents optical materials, whose properties include refractive index (Nd), Abbe number (Vd), partial dispersion ratio, price, weather resistance rating, etc.
[0099] Aberration: Represents the type of aberration, such as spherical aberration, coma, astigmatism, and chromatic aberration. Figure 2 (not shown in the image), etc.
[0100] Relationship definition: Defines the semantic and topological relationships between entities:
[0101] HAS_COMPONENT (indicating inclusion relationship): The optical system contains lens elements.
[0102] NEXT (representing topological order relationship): Defines the order of light propagation, connects adjacent Surfaces or LensElements to form a chain-like topological structure.
[0103] MADE_OF (indicating material association): The lens element is made of a certain glass material.
[0104] CORRECTS (indicating a correction relationship): A specific combination of lenses corrects a certain aberration.
[0105] SIMILAR_TO (indicates similarity association): connects different optical systems based on topological similarity.
[0106] Graph-based encoding: This invention innovatively encodes the structural features of an optical system as a graph structure. For example, a Cooke three-element lens is represented as three LensElements (i.e.,... Figure 2 The nodes of the lens elements (L1 to L3) are connected by NEXT edges, and each node carries corresponding Glass and Surface attributes. This representation method enables the retrieval of lens designs with similar topological structures using graph neural networks or subgraph isomorphism algorithms, overcoming the limitation of traditional text retrieval in understanding spatial structures.
[0107] Step 2: Define the action space and reasoning logic based on the reflective thinking chain;
[0108] To enable the intelligent agent of this invention to design like an optical expert, this invention uses a large language model as the core reasoning and decision-making unit of the intelligent agent, and defines an extended reasoning format—the action thought chain—to model the optical design process as a sequential decision-making process. Figure 3 It illustrates the state transition logic of the intelligent agent during the design process, including the logical judgment flow from thinking to retrieval, operation, reflection, and exploration. For example... Figure 3 As shown, the agent at each step Based on the current design status (Including current optical parameters and image quality evaluation report) Generation action .
[0109] Action space It includes the following types of meta-actions:
[0110] (1) Reasoning and planning actions: The large language model generates natural language text, analyzes the requirements of the current design task, and plans the design path. For example: "In order to meet the large aperture requirement of F / 1.8, I need to choose a double Gaussian structure as the starting point and use high refractive index glass to reduce spherical aberration."
[0111] (2) Search action: <search> [mode] query< / search> This is triggered when a large language model discovers that it lacks the necessary knowledge or data.
[0112] [mode]: Specifies the search mode, with options for [passage] (search for principles), [graph] (search for structure), or [hybrid] (hybrid).
[0113] [query]: Specific query content, such as "distortion correction method for wide-angle lens with large field of view" or "patent structure with EFL=10mm and FOV=60deg".
[0114] (3) Optical operation actions:<action_opt> command< / action_opt> The large language model generates instruction code that can be executed by the optical simulation environment.
[0115] Parameter adjustment: such as SetSurfaceRadius(surf_id=2, radius=50.0).
[0116] Optimization instructions: such as Optimize(algorithm='DLS', cycles=10).
[0117] Glass replacement: e.g., SwapGlass(surf_id=1, glass='H-K9L').
[0118] Structural changes: such as SplitLens(lens_id=1) (splits one lens into two).
[0119] (4) Reflection action: <reflect> analysis< / reflect> This is the key to the invention. After the simulation environment, i.e., the simulation optics engine, returns the image quality evaluation report, the large language model must generate reflective content. For example: "The current speckle radius is too large, mainly contributed by the spherical aberration of the third surface. This may be because this surface bears too much optical power. The next step should be to try to reduce the curvature of this surface and introduce an aspherical term."
[0120] (5) Exploration actions: <explore> strategy< / explore> When in succession multiple times <reflect>Subsequent optimization attempts failed to improve performance, or were triggered when the large language model got stuck in a local minimum. The large language model then decided to abandon the current local optimization path, revert to a previous state, and try a completely different strategy. For example: "The current double Gaussian structure cannot meet the distortion requirements, so I will try to revert to the initial state and design it using an anti-far-range structure."
[0121] The state transition logic of the intelligent agent in the design process of this invention includes a logical judgment process from thinking to retrieval, operation, reflection, and exploration, as detailed below:
[0122] Step 2.1, Task Resolution State (Start / Reasoning)
[0123] Upon receiving design specifications (effective focal length, F-number, operating band, etc.), the inference planning module of this invention generates an initial natural language plan, tagged as: <thought>;
[0124] Step 2.2, Searching for Decision States
[0125] When the intelligent agent of this invention detects a lack of necessary knowledge or data (i.e., when it determines a lack of knowledge), it adaptively selects a retrieval mode (text, graph, or a combination of both) to acquire domain knowledge, and injects the acquired result into the context, tagged as follows: <search>;
[0126] Step 2.3, Optical Operation (Acting)
[0127] The intelligent agent of this invention generates and executes instructions, interacts with an optical simulation environment, and is tagged with:<atcion_opt> ;
[0128] Step 2.4: Evaluating the Feedback
[0129] Receive image quality evaluation reports returned from the optical simulation environment, tagged as: <evaluate>The intelligent agent of this invention determines whether all design specifications are met based on the evaluation results. <finish>If the conditions are met, the solution is output; otherwise, a reflection is initiated, and the process enters the reflection and correction state for normal iteration, or enters the restart and exploration state when performance stagnates.
[0130] Step 2.5: Reflecting and Correcting
[0131] This reflective and corrective analysis of the feedback data helps determine the causes of aberrations. A further corrective action plan is then developed. (Tag:) <reflect>;Revert / reselect to the task resolution state according to the revised plan.
[0132] Step 2.6: Restart Exploring mode.
[0133] If optimization stalls or gets stuck in a local minimum, trigger a restart exploration mechanism, or trigger state rollback or try a completely new structure and topology. (Tag: [Tag information missing]) <explore>;
[0134] Step 3: Establish an adaptive hybrid knowledge routing retrieval mechanism;
[0135] To efficiently utilize the hybrid knowledge base, this invention introduces an adaptive routing mechanism based on reinforcement learning. When the agent is generated... <search>During the action, the adaptive routing controller determines the retrieval strategy based on the current problem type and context state:
[0136] Text mode: Suitable for theoretical consultation and principle verification. The search engine performs dense vector retrieval in an unstructured optical text database and returns relevant text fragments.
[0137] Graph-based mode: Suitable for finding initial structures and glass material replacement schemes. The retrieval engine parses natural language queries into graph query language, or maps queries to node representations in a graph. By calculating the similarity between nodes or performing subgraph matching, it retrieves OpticalSystem entities and their parameters that meet optical indicators and topological constraints in the structured optical knowledge graph.
[0138] Hybrid mode: Suitable for complex problems requiring both theoretical guidance and reference data. The system performs text retrieval and graph retrieval in parallel, and then uses a reciprocal ranking fusion algorithm to merge and sort the results. The formula for the reciprocal ranking fusion algorithm is as follows:
[0139]
[0140] In the formula, Represents candidate documents or graph entities The comprehensive ranking score obtained after fusing different retrieval modes indicates that the candidate document or graph entity is more relevant to the current query. Candidate documents or graph entities; Is it the candidate document or graph entity? In search mode The ranking below; It is a smoothing constant; This is the search mode, and ,in This indicates a text retrieval mode based on an unstructured optical text database. This represents a graph retrieval mode based on structured optical knowledge graphs.
[0141] The search results are formatted as <information> content< / information> The tags are then inserted into the context of the large language model as a basis for subsequent reasoning.
[0142] Step 4: A two-stage reinforcement learning training process based on group-relative strategy optimization and restart exploration mechanism;
[0143] To endow the agent with the aforementioned capabilities, this invention designs a two-stage training process comprising "format fine-tuning" and "reinforcement learning self-evolution." For example... Figure 4 As shown, Figure 4 This document illustrates the restart sampling process of the restart exploration mechanism, as well as a summary of the process for calculating intra-group trajectory advantage and updating policy network parameters under the group-relative policy optimization logic. Specifically:
[0144] Phase 1: Format fine-tuning based on the synthetic trajectory;
[0145] Due to the lack of large-scale optical design datasets containing detailed reasoning processes, this invention first utilizes a "generator-critic" architecture to generate synthetic data. This includes:
[0146] (1) Trajectory generation: Allow the basic large model (trajectory generator) to attempt to generate design steps for thousands of randomly generated optical design tasks.
[0147] (2) Comments and corrections: Based on the simulation environment, high-precision optical simulation software is used to automatically detect errors in the design (such as ray tracing failure, total internal reflection, and image quality degradation). At the same time, a more capable teacher model (or a rule-based expert system) is used as a "commentator" to generate natural language correction suggestions for errors (such as "the light undergoes total internal reflection on the 4th surface, it is recommended to increase the radius of curvature of that surface").
[0148] (3) Data filtering: Collect the trajectory of successful design after correction. These trajectories contain the correct reflective thinking chain format (thinking-operation-reflection-correction), that is, obtain the supervised fine-tuning dataset.
[0149] (4) Supervised fine-tuning: The basic large model (trajectory generator) is fine-tuned using these collected successful synthetic trajectories, so that it learns the reflective thinking chain reasoning mode and the adaptive routing retrieval calling specification, thus obtaining a supervised fine-tuned model.
[0150] Phase Two: Reinforcement Learning Self-Evolution Based on Group-Relative Policy Optimization and Restart Exploration Mechanism
[0151] Based on the supervised fine-tuning model, reinforcement learning is carried out through large-scale interaction with the optical simulation environment to further improve design capabilities and efficiency. This invention adopts a group relative strategy optimization algorithm and a "restart and exploration" mechanism.
[0152] (1) Group sampling: For each design task ,Strategy Samples are generated in parallel to form a set A different design trajectory , This represents the total number of trajectories. These trajectories may have employed different retrieval strategies or optimization paths.
[0153] (2) Restart Exploration Mechanism: To overcome the problem of easily getting trapped in local minima in optical design, this invention introduces a restart exploration mechanism during the sampling process. The system maintains a "trajectory buffer pool" to store intermediate states in historically generated trajectories (e.g., a lens that ultimately fails but has a reasonable intermediate structure). When generating a new trajectory, a restart exploration mechanism is introduced with a certain probability. Instead of starting from scratch, it randomly selects an intermediate state from the trajectory buffer pool to restart and forces the large language model to reflect / explore and generate new data. <reflect>or <explore>The token forces the large language model to attempt action branches different from the original trajectory in that state. This greatly increases the diversity of exploration and helps the large language model learn how to recover from dead ends.
[0154] (3) Composite reward function design: In order to guide the large language model to balance design quality and efficiency, a total reward function is defined. as follows:
[0155]
[0156] in, The reward is based on the result of the optical evaluation function. This represents a complete design trajectory generated by the agent under the current optical design task, including inference, retrieval, manipulation, reflection, and exploration actions. If the design is successful (rays are traceable and there are no geometric conflicts), image quality metrics are calculated. For example, based on RMS speckle radius. and distortion Result Rewards:
[0157]
[0158] in, This is an indicator function, set to 1 when the first-order parameters (EFL, F#, etc.) are satisfied, and 0 otherwise. All are weighting coefficients.
[0159] The purpose of this efficiency reward is to prevent large language models from abusing retrieval or performing redundant operations, and to penalize redundant actions / excessive steps.
[0160]
[0161] in, This refers to the number of retrievals and inference tokens consumed by the current trajectory. It is the average consumption of all trajectories within the current batch. This is a coefficient for efficiency rewards. This means that, given the same image quality, trajectories requiring fewer steps and with more accurate retrieval will receive a higher reward.
[0162] (4) Strategy update: Instead of relying on an additional value network, calculate the advantage of each trajectory relative to the average reward within the group. :
[0163]
[0164] in, and Within the group The mean and standard deviation of the trajectory rewards. Indicates the first Trajectory The corresponding total reward value, Indicates the first A trajectory, The trajectory number is selected from... Optimize the objective function To maximize:
[0165]
[0166] in, The function is based on probability. This limits the magnitude of policy updates, ensuring training stability. Kullback-Leibler divergence to prevent new strategies It deviates too far from the reference model. This indicates the advantage of the trajectory relative to the average reward within the group. The coefficients are those of the objective function. This represents the mathematical expectation of a sampling task and its corresponding trajectory set. Represents the probability distribution from the optical design task An optical design task obtained from mid-sample; Represents the probability distribution of the optical design task; Represents the old policy model, Indicates a given optical design task The design trajectory random variable generated by the old strategy model under the given conditions; Indicates the first Trajectory New strategy Compared to the old strategy The probability ratio under these conditions.
[0167] In other specific embodiments, the same or similar technical effects as the above embodiments can also be achieved through the following technical solutions:
[0168] 1. Alternatives to the retrieval module: Hybrid retrieval can be replaced by retrieval based on a simple vector database. This involves serializing the lens structure data into a text string (e.g., "Lens1:R1,R2,Mat; Lens2:..."), and then indexing it along with the text database. This approach is simple to implement, but its accuracy drops significantly when retrieving complex topological structures.
[0169] 2. Alternatives to graph construction: If complex attribute graphs are not required, a simplified relational database can be used to store structured data. During retrieval, the model generates SQL queries. This reduces the complexity of system construction but sacrifices the flexibility of graph algorithms in handling multi-hop relationships.
[0170] 3. Alternatives to policy optimization algorithms: Proximal policy optimization can be used as an alternative to group-relative policy optimization. Proximal policy optimization requires training an additional value network to evaluate state values, which increases memory usage and training instability.
[0171] 4. Alternatives to the reflection mechanism: Reflection steps can be hard-coded using a rule-based expert system. For example, a pre-defined rule could be "If the field curvature is greater than X, then attempt to move the last lens toward the image plane." This approach may be effective for specific types of problems, but it lacks generalization ability.
[0172] In summary, the automatic design method of this invention can proactively backtrack and attempt structural changes when optimization stagnation is detected by restarting the exploration mechanism and exploration actions, thereby finding the global optimal solution at the structural level; through graph retrieval, it can directly find the patent structure closest to the design indicators as a starting point, which greatly shortens the search time.
[0173] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.< / explore> < / reflect> < / search> < / explore> < / reflect> < / finish> < / evaluate> < / search> < / thought> < / reflect> < / explore> < / explore> < / reflect>
Claims
1. An automatic design method for tool-enhanced imaging optical systems based on adaptive reflection, characterized in that, Includes the following steps: Step 1: Construction and representation of a hybrid knowledge base in the field of optics; Construct a hybrid knowledge base for the optical domain that includes both unstructured and structured data; Step 2: Define the action space and reasoning logic based on the reflective thinking chain; Define the action thinking chain and model the optical design process as a sequential decision-making process; Step 3: Establish an adaptive hybrid knowledge routing retrieval mechanism; When an agent generates a retrieval action, the adaptive routing controller determines the retrieval strategy based on the current question type and context state; Step 4: A two-stage reinforcement learning training process based on group-relative policy optimization and restart exploration mechanism, including: Phase 1: Format fine-tuning based on synthetic trajectories; Synthetic data is generated using a generator-critic architecture, and the trajectory generator is fine-tuned using this synthetic data to obtain a supervised fine-tuning model. Phase Two: Self-evolution of reinforcement learning based on group-relative policy optimization and restart exploration mechanism; Based on the supervised fine-tuning model, a group relative strategy optimization algorithm and a restart and exploration mechanism are adopted to carry out reinforcement learning through large-scale interaction with the optical simulation environment; Maintain a trajectory buffer pool to store intermediate states from historically generated trajectories; when generating a new trajectory, use a certain probability... Instead of starting from scratch, it randomly selects an intermediate state from the trajectory buffer pool to restart and forces model generation. <reflect>or <explore> The token forces the model to attempt a different action branch from the original trajectory in that state.< / explore> < / reflect> 2. The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection according to claim 1, characterized in that, Step 1 specifically includes: Step 1.1 Construction of the unstructured optical text library; The collected technical document texts are cleaned, denoised, and segmented, and then transformed into high-dimensional vector indices using a pre-trained scientific domain embedding model. Step 1.2 Construction of a structured optical knowledge graph; Construct knowledge graphs for specific ontology based on different types of data.
3. The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection according to claim 2, characterized in that, In step 2, the definition of the action mind chain specifically includes: Reasoning and planning actions: The model generates natural language text, analyzes the requirements of the current design task, and plans the design path; Retrieval action: triggered when the model finds that it lacks the necessary knowledge or data; Optical manipulation actions: The model generates instruction codes that are executed by the optical simulation environment; Reflection Action: After the simulation environment returns the image quality assessment report, the model generates reflection content; Exploratory Action: Triggered when multiple optimization attempts after reflection actions fail to improve performance or the model gets stuck in a local minimum; the model decides to abandon the current local optimization path, revert to a previous state, and try a completely different strategy.
4. The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection according to claim 3, characterized in that, The retrieval strategy in step 3 includes the following patterns: Text mode: The retrieval system performs dense vector retrieval in an unstructured optical text database and returns relevant text fragments; Graph pattern: The retrieval tool parses the natural language query into a graph query language, or maps the query into a node representation in the graph. By calculating the similarity between nodes or performing subgraph matching, it retrieves optical system entities and their parameters that meet the optical indicators and topological constraints in the structured optical knowledge graph. Hybrid mode: The system performs text retrieval and graph retrieval in parallel, and then uses the inverse ranking fusion algorithm to merge and sort the results; The search results are formatted into specific tags and inserted into the model's context as a basis for subsequent reasoning.
5. The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection according to claim 4, characterized in that, The formula for the inverse ranking fusion algorithm in the hybrid mode is as follows: In the formula, Represents candidate documents or graph entities The comprehensive ranking score obtained after fusing different retrieval modes indicates that the candidate document or graph entity is more relevant to the current query. Candidate documents or graph entities; Is it the candidate document or graph entity? In search mode The ranking below; It is a smoothing constant; This is the search mode, and ,in This indicates a text retrieval mode based on an unstructured optical text database. This represents a graph retrieval mode based on structured optical knowledge graphs.
6. The automatic design method for tool-enhanced imaging optical systems based on adaptive reflection according to claim 1, characterized in that, Step 4 specifically includes: Phase 1: Format fine-tuning based on synthetic trajectories; (1) Trajectory generation: The trajectory generator attempts to generate design steps for thousands of randomly generated optical design tasks; (2) Comments and corrections: Detecting errors in the design; using a teacher model as a commentator to generate correction suggestions for errors; (3) Data filtering: Collect the trajectories that have been successfully designed after correction; (4) Supervised fine-tuning: The trajectory generator is fine-tuned using the collected successful synthetic trajectories, so that it learns the reflective thinking chain reasoning mode and the routing retrieval calling norm, and obtains the supervised fine-tuning model; Phase Two: Self-evolution of reinforcement learning based on group-relative policy optimization and restart exploration mechanism; (1) Group sampling: For each design task ,Strategy Samples are generated in parallel to form a set A different design trajectory ; Indicates the total number of trajectories; (2) Restart the exploration mechanism; (3) Design of composite reward function: Define the total reward function as follows: in, It is a result reward based on the optical evaluation function; This represents a complete design trajectory generated by the intelligent agent under the current optical design task, which includes inference, retrieval, manipulation, reflection, and exploration actions. Rewards for efficiency: in, This refers to the number of retrievals and inference tokens consumed by the current trajectory. It is the average consumption of all trajectories within the current batch. A coefficient for efficiency rewards; (4) Strategy update: Calculate the advantage of each trajectory relative to the average reward within the group. : in, and Within the group The mean and standard deviation of the trajectory rewards; Indicates the first Trajectory The corresponding total reward value, Indicates the first A trajectory, The trajectory number is selected from... ; Optimize objective function To maximize: in, The function is based on probability. This limits the scope of policy updates; The Kullback-Leibler divergence; This indicates the advantage of the trajectory relative to the average reward within the group; This represents the mathematical expectation of a sampling task and its corresponding trajectory set. Represents the probability distribution from the optical design task An optical design task obtained from mid-sample; Represents the probability distribution of the optical design task; Indicates a given optical design task The design trajectory random variable generated by the old strategy model under the given conditions; Indicates the first Trajectory New strategy Compared to the old strategy The probability ratio below, The coefficients are those of the objective function.
Citation Information
Patent Citations
Industrial knowledge graph completion and adaptive retrieval method based on large language model
CN119336921A
Multi-modal retrieval enhancement generation method based on gradual group relative strategy optimization
CN120561347A