Every Mac comes with an (undocumented) family member classifier
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Every Mac since macOS 13 (2022) ships a pair of daemons whose only purpose in life is to build a graph about who you are, who you know, how those people are related to you and to each other, how you communicate with them, where you go, what you do and when. In this post, we look into how this system works and give you a tool to peek into your own graph.
自 macOS 13 (2022) 起,每台 Mac 都内置了一对守护进程,其存在的唯一目的就是构建一张关于你的关系图谱:包括你是谁、你认识谁、这些人与你及彼此之间的关系、你如何与他们沟通、你的行踪、你的行为以及时间点。在这篇文章中,我们将深入探讨该系统的工作原理,并为你提供一个查看个人图谱的工具。
A family fork: one knight on e2 attacks White’s king, queen, rook and bishop at once. White’s pieces are the household the graph is about; the knight is the store, one move from every one of them. White’s own last move, 18.e3, emptied the square it stands on. White is in check and has one legal reply, Kh1; then the knight takes the queen. The check falls on the one who accepted the terms. What is lost is someone else.
家庭分叉:e2 上的骑士同时攻击白方的国王、皇后、车和象。白方的棋子代表了图谱所描述的家庭成员;骑士则是存储库,距离它们每一个人都只有一步之遥。白方上一步棋 18.e3 腾空了它所处的位置。白方被将军,且只有一种合法应对方式 Kh1;随后骑士吃掉皇后。将军落在了接受条件的人身上,而失去的却是另一个人。
3r1rk1/pp2qppp/8/3p1b2/8/1NQ1P1B1/PP2nPPP/2R2RK1 w - - 1 19
3r1rk1/pp2qppp/8/3p1b2/8/1NQ1P1B1/PP2nPPP/2R2RK1 w - - 1 19
What if I told you that every Mac since 2022 ships a pair of daemons whose only purpose in life is to build a graph about you and the people around you: who you are, who you know, how those people are related to you and to each other, how you communicate with them, where you go, with whom, what you do and when. This graph is built on device by cross-referencing pretty much everything on the machine: Contacts, Calendar, Photos, Messages, Mail, location, Screen Time and a long tail of behavioral signals. And, more importantly, it is held as a queryable store that LLMs retrieve from (allegedly). Would you believe me?
如果我告诉你,自 2022 年以来的每台 Mac 都内置了一对守护进程,其唯一目的就是构建一张关于你和你周围人的图谱:你是谁、你认识谁、这些人与你及彼此的关系、你如何与他们沟通、你去过哪里、和谁在一起、做什么以及何时做。这张图谱是在设备本地构建的,通过交叉引用机器上的几乎所有内容:通讯录、日历、照片、信息、邮件、位置、屏幕使用时间和一系列行为信号。更重要的是,它被保存为一个可查询的存储库,供大语言模型(据称)检索。你会相信我吗?
Well, that’s what is happening, and interestingly enough, there is little documentation of how this whole mechanism works on your Mac. The closest thing to an official description is the man page (man 8 knowledgeconstructiond), and this is all you get:
事实确实如此,有趣的是,关于这一整套机制如何在你的 Mac 上运作,几乎没有任何文档记录。最接近官方描述的内容只有 man 手册页 (man 8 knowledgeconstructiond),而你所能得到的也仅限于此:
Previous work: To be fair, Apple’s own researchers did publish a paper on the techniques behind this graph construction, back in 2023. But there is next to nothing on how it is integrated into macOS: which versions run it, and the exact list of what is collected and inferred. And not a word about the “kinship” inference discussed below. Also, we personally ran into it while doing some security research on the Apple Intelligence bundle in macOS 26 in August 2026; but a few months before, Nic Lydon came across the same database and wrote it up in I Built a Personal Knowledge Graph. Apple Had Already Built One on My Laptop. And even more recently, a forensics tool went looking on the phone: in September 2026, Alexis Brignoni taught iLEAPP to read the same store on iOS, where graph.db and the ontology.db that decodes its predicate codes sit under /private/var/mobile/Library/IntelligencePlatform; he writes it up in Reading the iPhone Knowledge Graph, and Checking Its Work.
前人工作:平心而论,苹果的研究人员确实在 2023 年发表过一篇关于该图谱构建背后技术的论文。但关于它如何集成到 macOS 中——哪些版本运行它,以及收集和推断的具体列表——几乎只字未提。对于下文讨论的“亲属关系”推断更是只字未提。此外,我们在 2026 年 8 月对 macOS 26 中的 Apple Intelligence 组件进行安全研究时偶然发现了它;但在此前几个月,Nic Lydon 就发现了同一个数据库,并撰写了《我构建了一个个人知识图谱,苹果已经在我的笔记本电脑上构建了一个》。最近,一款取证工具也在手机上进行了探索:2026 年 9 月,Alexis Brignoni 教会了 iLEAPP 读取 iOS 上的相同存储库,其中 graph.db 和用于解码谓词代码的 ontology.db 位于 /private/var/mobile/Library/IntelligencePlatform 下;他在《读取 iPhone 知识图谱并检查其工作》一文中对此进行了记录。
But we go a bit deeper.
但我们要挖掘得更深一些。
This blog post is an account of some analysis work we carried out on what the knowledge graph actually does, so that you (the user) can get a better understanding of how this mechanism works, and some clarity on what the graph holds about you and your family and friends. Everything in it was collected on macOS 26 (26.6.2 at the time of writing).
这篇博文记录了我们对知识图谱实际功能所进行的一些分析工作,旨在让你(用户)更好地理解该机制的工作原理,并明确图谱中关于你、你的家人和朋友存储了哪些信息。文中的所有内容均在 macOS 26(撰写时版本为 26.6.2)上收集。
To this end, we open-source a local dashboard (iKnow) you can use to read the content of your personal knowledge graph on your Mac.
为此,我们开源了一个本地仪表盘 (iKnow),你可以用它来读取 Mac 上个人知识图谱的内容。
Finally, we derail a bit and look into what we do best: weaponizing and exploiting. We run a thought experiment (one that applies to any such personalized system) and show what happens if such a knowledge base ends up in the wrong hands, and how a “privacy single point of failure” can be exploited to threaten you in ways you may not have considered before (when combined with an abliterated LLM).
最后,我们稍微偏离主题,探讨一下我们最擅长的事情:武器化和利用。我们进行了一个思想实验(适用于任何此类个性化系统),展示了如果这样的知识库落入坏人之手会发生什么,以及当与被“去抑制”的大语言模型结合时,这种“隐私单点故障”如何被利用来以你从未考虑过的方式威胁你。
The two daemons keep their work in ~/Library/IntelligencePlatform, a directory of SQLite databases (fifty-one databases) stored in plaintext but located in a zone protected by TCC Full Disk Access.
这两个守护进程将其工作成果保存在 ~/Library/IntelligencePlatform 中,这是一个包含 SQLite 数据库(共 51 个)的目录,以明文形式存储,但位于受 TCC 全盘访问权限保护的区域内。
Likely, the most interesting is graph.db. It is a triple store written in a vocabulary of 181 entity classes and 278 predicates: every row is a subject, a predicate and an object. The subject is an entity (a person, an app, an event); the object is either a plain value (a name, a handle, a date) or another entity, which is where the graph gets its edges. The predicate is the interesting part: it says what kind of relationship the system believes holds between the two.
其中最有趣的可能是 graph.db。它是一个三元组存储库,使用 181 个实体类和 278 个谓词的词汇表编写:每一行都是一个主语、一个谓词和一个宾语。主语是一个实体(人、应用、事件);宾语要么是一个普通值(姓名、句柄、日期),要么是另一个实体,这正是图谱获取其边的来源。谓词是其中最有趣的部分:它说明了系统认为两者之间存在何种关系。
One edge of the graph (synthetic data): a person and the organization the store holds as their employer. PS500 is the id predicate.json gives employer, and its range is not an organization but a relationship type — so one edge is two rows sharing a relationshipId, one naming the kind of relationship and one pointing at the other entity. The forty-six relationship type classes in the table below exist to carry exactly that, which is what lets an edge hold a confidence of its own and be retracted later.
图谱的一条边(合成数据):一个人与存储库中记录的其雇主组织。PS500 是 predicate.json 中给出的雇主 ID,其范围不是组织,而是关系类型——因此一条边由两行共享同一个 relationshipId 的数据组成,一行命名关系类型,另一行指向另一个实体。下表中的 46 个关系类型类正是为了实现这一点而存在的,这使得一条边可以拥有自己的置信度,并能在以后被撤回。
Most of what the two daemons do is populate those predicates, and the tables kept beside them, from everything the OS will let them read. Into the graph go Contacts; Photos (faces); Calendar (titles and attendees); Family Sharing (including the age of every member); the Medical ID emergency contact in Health; events and contacts Siri Suggestions finds in Mail and Messages; people donated by apps through App Intents; and installed apps. Beside it, in tables of their own, sit who appears with whom in your photos; the communication log (who, when, which app, which direction; no content), which also pulls from your other devices; location and movement; and a long tail of device signals (screen locked, Wi-Fi, Bluetooth, charging, ambient light, and a stream named ContextualUnderstanding.PhysicalSocial whose record format lists people by name, phone and email, each with a start and an end time; it reads like a log of who was physically around you, though we never saw it filled in).
这两个守护进程的大部分工作是从操作系统允许它们读取的所有内容中填充这些谓词及其旁边的表。进入图谱的数据包括:通讯录;照片(人脸);日历(标题和参与者);家人共享(包括每位成员的年龄);健康应用中的医疗急救联系人;Siri 建议在邮件和信息中发现的事件和联系人;通过 App Intents 由应用捐赠的人员;以及已安装的应用。此外,在它们各自的表中,还记录了谁与谁一起出现在你的照片中;通信日志(谁、何时、哪个应用、哪个方向;不含内容),这些数据也从你的其他设备中提取;位置和移动轨迹;以及一系列长尾设备信号(屏幕锁定、Wi-Fi、蓝牙、充电、环境光,以及一个名为 ContextualUnderstanding.PhysicalSocial 的流,其记录格式按姓名、电话和电子邮件列出人员,并带有开始和结束时间;它看起来像是一份谁曾物理出现在你身边的日志,尽管我们从未见过它被填充)。
The complete list of the 181 entity classes:
181 个实体类的完整列表:
Every class the shipped ontology declares, grouped rather than left in file order: the core types, then people, attributes, places and events, then the activity block, and
内置本体声明的每个类,已进行分组而非按文件顺序排列:核心类型,然后是人员、属性、地点和事件,接着是活动块,以及