Habr•September 9, 2026•🇷🇺Translated from Russian

PII-Guard: Open-Source Detector for Personal Data in Russian Text

PII-Guard, an open-source detector for personal data in Russian text, has been released by NLP researcher Andrey Ivanov from the R&D laboratory of red_mad_robot. The system addresses the growing need to protect sensitive information when users and companies send working texts to language models.

Personal data such as names, phone numbers, document numbers and addresses frequently accompany prompts. Companies therefore build masking pipelines that anonymize text before model inference. However, simple masking destroys semantic links, forcing models to answer questions about “**** called ****” without knowing how many people are involved or who called whom.

The new requirement is reversible pseudonymization: real values must be replaced by structured placeholders that models can process naturally, after which the original data is restored in the final answer.

From regex to hybrid detection

The first prototype relied on regular expressions. While telephone numbers, INN, SNILS and card numbers have predictable length and structure, real-world text contains spaces, dashes, typos and extra characters that break rigid patterns. Moreover, a 16-digit sequence could be either a bank card or an order ID, and a 10-digit string could match both INN and passport formats.

Control-sum verification was added next. Bank cards use the Luhn algorithm, INN and SNILS employ weighted sums, and OMS policies again apply Luhn. Additional structural checks cover BIK prefixes and postal-index ranges. These filters reduced false positives, yet arithmetic validation alone cannot distinguish a genuine document from a coincidental numeric string that happens to satisfy the checksum.

Context windows were introduced to look for nearby cue words such as “паспорт”, “ИНН” or “полис”. Positive keywords must lie within type-specific distance limits; negative keywords such as “биржевой” can veto an index match regardless of distance. When multiple candidates compete, the system selects the highest-confidence match after ordering document types from most distinctive (birth certificates, military IDs) to most ambiguous (simple six- or ten-digit sequences).

Adding semantic understanding

Names, addresses and telephone numbers lack rigid formats, so rules cannot locate them reliably. The team therefore annotated their own datasets and fine-tuned a ruBert-base NER model. The model handles semantic entities such as person names and addresses while also capturing documents missed by rules because of typos or irregular spacing.

The final architecture runs two independent streams. The rule-based stream normalizes text, extracts candidates, validates checksums and applies keyword context. The model stream processes the entire text and returns its own spans. An arbitration module merges results: when spans overlap but labels differ, rules win; when only the model finds an entity, its prediction is accepted; non-overlapping spans from both streams are retained.

Pseudonymization and grammatical restoration

Detected entities are replaced by XML-style tags containing type, numeric ID and, for persons, grammatical gender inferred by a Russian morphology library. The tag format was chosen to avoid accidental collisions with ordinary text or other system markup. After the model returns its answer, real values are substituted back, with morphological analysis ensuring correct case for names and addresses.

Evaluation was performed on four public datasets, one of which is the team’s own. On the intersection of entity types supported by all compared systems, PII-Guard achieved the highest micro-F1 scores under both strict span matching and type-overlap criteria. The project, datasets and code are publicly available.

Related articles

Habr•Privacy & Surveillance

Russia Freezes Entire Hosting Networks to Block VPN Traffic, Investigation Finds

An independent test of 435 endpoints across 154 hosting providers revealed that Russian internet providers are throttling connections to entire autonomous systems rather than individual IP addresses. Networks belonging to Hetzner, OVH, DigitalOcean, M247 and HostPapa are frozen after roughly 25 TCP packets, causing downloads to stall at around 16 KB while UDP-based WireGuard tunnels remain unaffected. The blocking is applied uniformly by multiple Russian operators including Beeline, MTS and home broadband providers, indicating a centrally distributed rule from Roskomnadzor via the TSPU filtering system. Smaller providers that rent IP space from the affected autonomous systems are also impacted, regardless of their own brand or location. Cloudflare-hosted resources currently pass the test, but the list of blocked networks has remained stable since mid-2025. The researcher published an open-source script that allows anyone to reproduce the measurements in under a minute.

Habr•Privacy & Surveillance

macOS Builds Undocumented Personal Knowledge Graph Since Version 13, Inferring Family Ties via On-Device ML

Since macOS 13 in 2022, two daemons named knowledgeconstructiond and intelligenceplatformd have been constructing a comprehensive personal knowledge graph on every Mac. The system aggregates data from Contacts, Calendar, Photos, Messages, Mail, Family Sharing, Health emergency contacts, Screen Time, and behavioral signals to map users, their relationships, locations, and activities. Results are stored in ~/Library/IntelligencePlatform as SQLite databases, including graph.db containing 181 entity classes and 278 predicates. Two CoreML models, EntityTagging_Family.mlmodelc and EntityTagging_FamilyAndFriends.mlmodelc, use 144 behavioral and photographic features to classify family and friend relationships with daily updates in entityTagging.db. An embedded LLM and embedding models further label unnamed faces and infer relationships from message text when Apple Intelligence is enabled. The graph remains queryable locally and is designed to feed personalized AI features while operating entirely on-device under Full Disk Access protections.

Habr•Privacy & Surveillance

Breaking the Ice: Claude AI Maps TSPU Deep Packet Inspection and Censorship Bypass Methods in Russia

An analysis conducted by Claude AI examines the current state of Russia's TSPU censorship infrastructure as of November 2026, based on real-world testing from the Rostelecom network. The report details how DPI equipment blocks traffic by IP addresses, SNI inspection, protocol signatures, and active probing, with specific freezes occurring after approximately 16 KB on many foreign hosting providers. Multiple circumvention techniques are evaluated, including VLESS combined with Reality and XTLS Vision, cascaded connections through Russian entry nodes, and local tools such as zapret and GoodbyeDPI. The study highlights that large providers including Hetzner, OVH, Vultr, Scaleway, and AWS are heavily restricted, while alternatives like Leaseweb and certain academic networks remain functional. Recommendations emphasize using self-hosted domains with valid certificates, Reality-based masking, and regular IP testing to maintain connectivity. The article stresses that all information is presented strictly for research purposes.

AntiMalware•Privacy & Surveillance

Apple to Scan iCloud Photos and Files Shared via Public Links Starting with iOS 27.3

Apple announced that it will begin scanning content stored in iCloud when users share files or photos through public links. The feature activates with the release of iOS 27.3, iPadOS 27.3, macOS 27.3, and visionOS 27.3. Any file made accessible to anyone with the link will now be checked by Apple for malicious materials. This change effectively means that sharing via public links grants Apple visibility into the shared content for security purposes. The move aims to detect harmful files before they reach other users through shared links.