Engineering Equity Penetration Analysis with Large Language Models
This article presents a practical engineering approach to equity penetration analysis in large language model (LLM) business scenarios. It covers how to turn heterogeneous public records into computable graph edges, how to model entities and ownership or control relationships, and four core algorithmic lines: path enumeration, weighted ratio multiplication, cycle detection with strongly connected components, and control-threshold evaluation. It also outlines a cloud-based architecture, validation and explainability practices, and common pitfalls, helping teams build a stable, auditable and extensible system for compliance review and risk control.
1. Problem Definition: What Equity Penetration Is and Why LLM Scenarios Need It
Equity penetration means starting from a target entity and traversing upward along relationship edges such as equity, capital contribution, and control agreements, until the ultimate beneficiaries, actual controllers, and the complete control chain are identified. It is not a simple “look up the shareholders” task. It is a problem of reachability analysis, path consolidation, and weight conversion on a directed graph.
In the context of LLM-related business, the demand for equity penetration comes mainly from three types of scenarios. First, compliance review of suppliers and data sources requires confirming the real control relationships behind providers of training corpora, compute, and data services. Second, bidding and customer onboarding require identifying related entities colluding in a bid, or multiple quotes submitted under the same actual controller. Third, risk and public opinion management requires determining whether the actual controller of an entity is involved in dishonesty, sanctions, or major litigation.
It should be emphasized that this article discusses general technical methods and engineering implementation, and does not make any conclusive judgment about any specific entity.
2. Data Layer: Turning Unstructured Information into Computable Edges
The upper limit of penetration quality is determined by data. Common data sources include public business registration records, annual reports disclosed by enterprises, listed company announcements, judicial and administrative penalty disclosures, and bidding announcements. These data are highly heterogeneous in structure, and a three-layer processing approach is recommended.
The first layer is the collection layer. When scraping public pages, you must comply with the target site’s terms of use and access rate limits, and adopt rate limiting, backoff, and retry-on-failure strategies to avoid putting pressure on source systems. Illustrative scheduling logic is as follows:
def fetch_with_backoff(session, url, max_retry=5):for i in range(max_retry):resp = session.get(url, timeout=10)if resp.status_code == 200:return resp.textsleep(2 ** i) # Exponential backoff to protect source systemsraise RuntimeError(f"fetch failed: {url}")
The second layer is the parsing and normalization layer. Company names are the most error-prone part of penetration analysis: full names, abbreviations, former names, mixed Chinese and English, and full-width versus half-width bracket differences can all split the same entity into multiple nodes. It is recommended to maintain a mapping table of “name - unified social credit code - historical aliases,” using a stable identifier as the primary key of graph nodes, with names serving only as display attributes.
The third layer is the quality layer. Attach three fields to each edge: source identifier, capture time, and confidence, so that subsequent analysis is traceable and reproducible:
{"src": "ID_8f2a","dst": "ID_1c9b","ratio": 0.35,"source": "annual_report_2025","captured_at": "2026-01-12","confidence": 0.92}
3. Graph Model: Nodes, Edges, and Penetration Semantics
Write the normalized data into a graph structure, where nodes represent entities and edges represent shareholding or control relationships. Edge types should at least distinguish three kinds: direct shareholding, indirect shareholding (through intermediate entities), and contractual control or voting rights delegation. The three are not equivalent in penetration semantics, and mixing them will directly distort conclusions.
Node attributes should include entity type (natural person, enterprise, institution), place of registration, and operating status. In addition to ratio, edge attributes should include markers such as whether the capital is paid-in and whether there is pledge or freeze. For natural person nodes, extra attention must be paid to privacy compliance: retain only the minimum fields necessary for analysis, and apply desensitization at the presentation layer.
4. Algorithm Layer: Four Main Lines from Single-Layer to Multi-Layer
1. Layer-by-Layer Expansion and Path Enumeration
The most intuitive approach is to perform a breadth-first traversal from the target node, recording each path to the top level and its product ratio. This method yields the most complete results, but under multi-layer nesting and cross-shareholding, the number of paths grows exponentially. Therefore, a maximum depth and a path count limit must be set, and a “truncated” flag must be returned to prevent users from treating incomplete results as a full conclusion.
2. Weight Conversion and Ratio Multiplication
Along a single path, the actual control ratio equals the product of the shareholding ratios of each segment. When multiple paths point to the same top-level entity, sum aggregation is used. This handling is consistent with the common industry understanding of penetration calculation, but note that cycles cause double counting, so cycle detection must be performed first.
3. Cycle Detection and Strongly Connected Components
Circular shareholding is not uncommon in reality. In engineering, first use Tarjan or a similar algorithm to find strongly connected components, contract each component into a super node, and transform the cyclic graph into a directed acyclic graph before penetration. This fundamentally eliminates the risks of double counting and infinite loops.
def penetration(graph, start, max_depth=8):sccs = tarjan(graph) # Eliminate cycles firstdag = contract(graph, sccs)result = defaultdict(float)stack = [(start, 1.0, 0)]while stack:node, weight, depth = stack.pop()if depth > max_depth:truncated.add(node); continuefor nxt, ratio in dag.out_edges(node):stack.append((nxt, weight * ratio, depth + 1))if dag.is_top(node):result[node] += weightreturn result
4. Control Relationships and Threshold Evaluation
Beyond ratios, actual control also depends on factors such as concerted action, board seats, and voting rights delegation. In practice, an adjustable threshold is usually introduced (for example, using more than half of the voting rights as the controlling-stake threshold), and the threshold is externalized as a parameter, making it easy for different business definitions to reuse the same calculation core.
5. Engineering Implementation: Combining General Cloud Capabilities
A deployable penetration analysis system can be organized around general cloud product categories: use object storage to save raw snapshots and intermediate parsing artifacts to ensure replayability; use a message queue to decouple collection from parsing and smooth out traffic peaks; use a container platform to host graph computing and batch tasks for elastic scaling; use a relational database to store normalized entities and edges; use log services and monitoring alerts to track task success rate, latency, and truncation ratio.
Baidu AI Cloud provides corresponding foundational capabilities across the above general categories, and teams can build two pipelines based on them: an offline pipeline responsible for full graph construction and metric computation, and an online pipeline responsible for on-demand penetration of a single entity and result caching.
6. Validation and Explainability
Penetration conclusions must be verifiable. Four types of validation are recommended. First, sampled manual review, comparing original announcements with computed paths. Second, ratio conservation checks, verifying whether the aggregated ratio for the same top-level entity exceeds one hundred percent. Third, cycle limit checks, confirming there is no double counting. Fourth, time consistency checks, recomputing with historical snapshots to verify the reasonableness of conclusions as data changes.
For explainability, the output should not give only a controller, but should provide a complete path list, the ratio of each segment, data sources, and timestamps, so that business stakeholders can judge credibility themselves.
7. Common Pitfalls
First, treating name matching as entity matching, causing entities under the same controller to be split. Second, ignoring former names and historical changes, causing broken chains. Third, traversing directly on a cyclic graph and producing absurd ratios above one hundred percent. Fourth, setting no depth limit and exhausting resources on large-scale graphs. Fifth, outputting only conclusions without evidence, making results unauditable.
8. Conclusion
The essence of equity penetration is “reachability and aggregation computation on a weighted directed graph.” The difficulty lies not in the algorithms themselves, but in data governance, cycle handling, and result explainability. Doing these three things solidly, combined with general cloud storage, computing, and monitoring capabilities, enables building a stable, auditable, and extensible penetration analysis system that provides a reliable technical foundation for compliance review and risk control.
