Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 20, 2025

@Demirrr requested opening an issue to track performance improvements for TDL's inverse property feature extraction method, which has O(P × I) complexity causing scalability issues on large knowledge graphs.

Context

The _extract_inverse_property_features method (tree_learner.py:374-413) iterates through all object properties and all individuals for each individual being processed:

for obj_prop in self.knowledge_base.get_object_properties():  # P iterations
    for other_ind in self.knowledge_base.individuals():  # I iterations
        # Check if individual is object of property assertion

For a KB with 1,000 individuals and 50 properties: 50,000 iterations per individual processed.

Changes

  • Created comprehensive issue documentation in /tmp/performance-improvement-issue.md
  • Documented optimization strategies:
    • Direct KB queries for assertions by object
    • Class-level caching of property assertions
    • Sparse assertion indexing at initialization
    • Lazy feature evaluation
  • Replied to code review comment explaining access limitations for creating GitHub issues directly

Note

Cannot create GitHub issues programmatically from this environment. Issue template provided for manual creation with all technical details, proposed solutions, and implementation considerations.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Update performance improvements for TLD feature construction Document TDL inverse property feature extraction performance improvements Nov 20, 2025
Copilot AI requested a review from Demirrr November 20, 2025 10:07
Base automatically changed from tdl_refactor to develop November 20, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants