Equity Penetration Analysis with LLMs and Graph Databases: Key Practices

    This article explains how to trace ultimate beneficial owners and actual controllers through corporate equity structures using a graph database. It covers modeling shareholding and executive relationships, writing multi-hop path queries that multiply ownership ratios along each path, and using LLMs to extract relationships from documents and convert natural language questions into queries. It also outlines the data pipeline, validation and review steps, and the data security and compliance practices needed for deployment.

    1. What Equity Penetration Solves

    Equity penetration identifies the ultimate beneficial owners (UBOs) and actual controllers of a company. It is commonly used in due diligence, related-party transaction identification, and anti-money laundering (AML) review.

    It has two main challenges. First, business registration records, annual reports, announcements, and IPO prospectuses contain large amounts of unstructured text, and organizing that text manually is costly. Second, cross-shareholdings and multi-layer nesting between companies form a network structure. Multi-hop queries in relational databases require repeated JOIN operations, and performance drops noticeably as the number of levels grows.

    The solution in this article has three parts. A graph database stores and queries equity relationships. A large language model (LLM) extracts relationships from documents and converts them into query statements. A data pipeline handles batch processing, review, and writes.

    2. Storing Equity Relationships in a Graph Database

    1. Data Modeling

    Companies and natural persons are modeled as nodes. Relationships such as equity holdings and executive positions are modeled as edges.

    • Nodes: Company (properties: Unified Social Credit Code, the national business registration identifier in China, and name); Person (properties: name and a hashed, masked ID number)
    • Edges: INVEST (properties: ratio, the shareholding percentage as a decimal between 0 and 1; valid_from and valid_to, the validity period of the equity stake); LEGAL_REP (legal representative); EXECUTIVE (executive position)

    The direction of an INVEST edge always points from the investor to the investee. If the direction is reversed, every penetration result will be wrong.

    2. Penetration Query Example

    The following query starts from a target company, finds all natural-person shareholders upstream, and calculates the product of the shareholding ratios along each path.

    1. MATCH path = (p:Person)-[:INVEST*1..5]->(c:Company {name: $target})
    2. WITH p, length(path) AS depth,
    3. reduce(acc = 1.0, r IN relationships(path) | acc * r.ratio) AS ratio_product
    4. WHERE ratio_product > 0.01
    5. RETURN p.name AS shareholder, depth, ratio_product
    6. ORDER BY ratio_product DESC

    Key points of the query:

    • The path depth is capped at 5 levels. Unbounded variable-length paths cause query time and result volume to grow rapidly.
    • Shareholding ratios are multiplied along the control chain. For example, if A holds 60% of B, and B holds 50% of C, then A indirectly holds 30% of C.
    • The same shareholder may hold equity through multiple paths. Each path is returned separately, and the application layer then sums the results by shareholder.
    • 0.01 is an example threshold and should be a configurable parameter. It is not a legal standard.

    3. Cumulative Control and Decision Boundaries

    Multiplying ratios only covers pure equity chains. Real business cases include several situations that need separate handling:

    • Multi-path accumulation: The same shareholder holds equity through multiple paths. The application layer must add these amounts before checking whether the threshold is met.
    • Contractual control: Acting-in-concert agreements, voting rights delegation, and nominee shareholding agreements do not appear in INVEST ratios. The LLM must extract these relationships from contracts, write them as separate edge types, and store the source evidence.
    • UBOs and actual controllers are different concepts: UBOs are usually determined by shareholding ratio, with a commonly referenced threshold of 25%. The applicable threshold depends on regulatory rules. Actual control also considers board seats, operational decision-making power, and contractual arrangements. Each concept needs its own determination rules, and the two should not share one query.

    4. Performance Considerations

    Query latency depends on data scale, the average out-degree of nodes, index configuration, hardware resources, and query depth. This article does not provide general latency figures. Index Company.name or the Unified Social Credit Code. Before going live, run load tests on your own data. Record average and P95 latency at different depths, and document the data volume and hardware configuration.

    3. Using LLMs to Extract Unstructured Information by Task

    Running a high-performance LLM on every document is expensive. In practice, models are assigned according to task difficulty.

    Dimension Lightweight model High-performance LLM
    Typical input Business registration change records, shareholder tables in annual reports, simple sentences in announcements Long texts such as nominee shareholding agreements, valuation adjustment agreements, and articles of association clauses
    Typical output Entities and simple triples, with confidence scores Implicit control relationships and conditional relationships, with evidence snippets
    Accuracy target Determined after evaluation on manually labeled samples Determined after evaluation on manually labeled samples; usually higher than the lightweight model
    Cost Low, suitable for batch processing High, processes only the samples handed off by the lightweight model
    Manual review triggers Confidence below threshold, or conflict with existing graph data Involves nominee shareholding, valuation adjustment, or contractual control, or the two models disagree

    1. Extraction Fields

    Each relationship must include at least the following fields:

    • Subject: company name, Unified Social Credit Code, or natural person’s name
    • Object: same as above
    • Relationship type: INVEST, LEGAL_REP, EXECUTIVE, or a contractual control type
    • Values: shareholding ratio, subscribed or paid-in capital