Один из самых удобных способов записать данные это использование готовых форматов, такие как JSON или YAML.
Из плюсов такого подхода стоит отметить вот что:
🔸 готовый, повсеместно используемый и поддерживаемый формат
🔸 простой и понятный файл, удобочитаемый для человека
🔸 можно легко редактировать в любом текстовом редакторе без специальных программ и библиотек
Но есть и минусы
🔹 затраты времени при записи файла (кодирование данных в нужный формат строки)
🔹 затраты времени при чтении файла (декодирование данных в Python объекты)
🔹 размер файла увеличивается из-за разметки данных (скобки, запятые, переносы, отступы...)
🔹 перед записью все данные должны быть помещены в память в полном объёме (не всегда)
🔹 при чтении необходимо считать весь файл в память и только потом декодировать данные
Если нужно писать немного данных в несколько файлов, то затраты по времени не ощутимы. Обычно это файлы конфига или какие-либо метаданные. Это отличный вариант под такие задачи.
Есть и другой поход к записи файлов - это бинарные файлы. Используется, когда данных достаточно много и никто их не собирается читать глазками😳.
🔸 очень быстрая запись
🔸 чтение значительно быстрей чем JSON, YAML итд
🔸 размер файла значительно меньше, так как нет разметки
🔸 можно записывать данные по мере поступления не загружая всё в память
🔸 можно извлечь любую часть данных независимо
Из минусов
🔹 нужно определить свой формат записи данных (если не используете готовую спецификацию определённого формата)
🔹 не получится открыть файл и визуально понять что там записано, а для чтения файла потребуется знать его спецификацию.
🔹 не так-то просто создать такой файл без специальной библиотеки
В таком виде удобно записывать большой массив любых однородных данных. Например, мониторинг валютной биржи или кэшированная анимация 3D геометрии.
(Это не означает что нельзя записать данные разного типа, просто это будет не так удобно)
Представьте себе JPG-картинку. По сути это немного мета-информации и большой массив пикселей. Тоже самое со звуком или видео файлом. Поэтому, если вы попробуете открыть картинку в текстовом редакторе вы увидите что-то вроде такого
f15d cd29 a564 4578 ...
09e2 9bc4 a696 1253 ...
84e9 4de1 3b23 c24a ...
2534 5161 28e0 709d ...
...
Это и есть записанные байтики. И для их чтения требуется определённый софт который знает что с ними делать. Под каждый тип файла.
К чему это я? Читайте в следующем посте...
#tricks#basic
NIST's Deepfake Playbook: Strategies for Managing Synthetic Content Risks
The U.S. National Institute of Standards and Technology (NIST) has released its report, "Reducing Risks Posed by Synthetic Content", addressing the challenges posed by AI-powered deepfakes. The document identifies three key approaches:
1️⃣ Tracking content provenance to verify its origins and edits.
2️⃣ Developing tools to label and identify AI-generated material.
3️⃣ Combatting AI-generated CSAM (Child Sexual Abuse Material) and NCII (Non-Consensual Intimate Imagery) involving real individuals.
The report highlights the broad scope of synthetic content risks, from personal harms like NCII to societal disinformation impacts. Cybersecurity and fraud risks are also underscored, as deepfake technologies can exploit biometric authentication or deceive individuals through voice cloning.
NIST emphasizes that the effectiveness of countermeasures depends on their purpose and audience. Techniques like provenance tracking can enhance transparency for general users, while specialized detection tools may better serve analysts and platforms in assessing and mitigating AI-generated content risks.
#Deepfakes#AIEthics#NIST
NIST Releases Tool for Testing AI Model Risks
The National Institute of Standards and Technology (NIST) has re-released Dioptra, a modular, open-source tool designed to assess and mitigate risks associated with AI models. Originally launched in 2022, Dioptra focuses on evaluating how malicious attacks, especially those that "poison" AI training data, can degrade an AI system's performance. This tool is crucial for companies training AI models and provides a common platform for simulating threats and conducting "red-teaming" exercises.
NIST's initiative, supported by President Joe Biden’s executive order on AI, aims to help government agencies, small to medium-sized businesses, and the broader community assess AI developers' claims and enhance AI safety standards. Dioptra's release aligns with global efforts, such as the U.K.'s AI Safety Institute’s Inspect tool, to advance AI model testing and ensure responsible AI development.
While Dioptra offers significant benefits, it currently works only with models that can be downloaded and used locally, excluding those gated behind APIs like OpenAI’s GPT-4. Despite this limitation, Dioptra represents a vital step towards understanding and mitigating AI risks, promoting a safer AI ecosystem.
#AI#AIDevelopment#AISafety#NIST#Cybersecurity
U.S. Congress Introduces Federal AI Risk Management Act 2024
Greetings everybody! U.S. Congress members have unveiled the Federal Artificial Intelligence Risk Management Act of 2024. Building upon the 2023 bill, this legislation mandates Federal Agencies to adopt the Artificial Intelligence Risk Management Framework (AI RMF) developed by the National Institute of Standards and Technology (NIST). Exceptions are made for national security systems.
NIST's AI RMF, shaped through an inclusive and open process with inputs from 240 organizations, becomes a cornerstone for agencies within a year of the bill's passage.
The Act also necessitates agencies to incorporate the framework into their AI risk management strategies within 180 days of NIST's guidelines. Furthermore, it empowers the Director of NIST and Administrator of Federal Procurement Policy to draft contract language mandating AI suppliers to adhere to the framework.
#AIRiskManagement#AIStandards#NIST#AIFramework
13 ноября NIST NVD наконец признали очевидное: им не удалось разобрать бэклог по анализу CVE до конца фискального года (30 сентября). Что, в общем-то, видно в их же статистике. На текущий момент в бэклоге 19860 идентификаторов. За эту неделю новых CVE поступило 1136, а проанализировали они только 510. И это не какая-то аномальная неделя, это сейчас норма. Они не справляются с разбором нового, чего уже говорить о бэклоге. Кризис продолжается.
При этом в сообщении они почему-то пишут, что у них полная команда аналитиков, и они обрабатывают все входящие CVE по мере их загрузки в систему. Но почему тогда их статистика показывает обратное?
Они пишут, что теперь обрабатывают все уязвимости из CISA KEV. И это хорошо. Но в CISA KEV за 2024 год добавили пока только 162 CVE. Круто, что они осилили эти идентификаторы, но достижение, мягко говоря, не впечатляет.
Почему NVD не справляются с бэклогом?
Они пишут, что дело в формате данных от Authorized Data Providers (ADPs), видимо имея в виду под этим CISA Vulnrichment. NVD не могут эффективно импортировать и улучшать данные в этом формате. Чтобы это делать они разрабатывают какие-то "новые системы".
То есть мало того, что они расписались в неспособности анализировать уязвимости самостоятельно и готовы использовать чужие данные as is, они ещё и не могут парсеры-конвертеры писать за адекватное время. 🐾 Просто удивительные. 🤦♂️
И тут ещё прошла новость, что сенатор Рэнд Пол, новый председатель Senate Homeland Security Committee пообещал серьезно сократить полномочия CISA или полностью их ликвидировать. Наш слоняра! 😁🐘 Весь движ там из-за работы CISA "по противодействию дезинформации" перед американскими выборами. Но под это дело могут угробить единственного американского ИБ-регулятора, который делает хоть что-то полезное и в адекватные сроки. Молодцы, так держать. 👍
Ничего кроме дальнейшей деградации ждать не приходится.
@avleonovrus#NIST#NVD#CISA#Vulnrichment#thoseamericans
NIST Launches Consortium to Shape US AI Policies
Hello, everyone! The National Institute of Standards and Technology (NIST) has initiated a consortium to address AI development and deployment challenges. The collaboration seeks to establish policies and measurements that prioritize human-centric AI safety and governance in the United States. The consortium will work on various aspects, including creating measurement and benchmarking tools, policy recommendations, red-teaming efforts, psychoanalysis, and environmental analysis.
This move comes in response to an executive order issued by US President Joseph Biden, which introduced six new standards for AI safety and security. While other regions have been more proactive in regulating AI systems, the US is catching up. The AI consortium represents a significant step in shaping the future of AI policies in the United States through collaboration between government bodies, non-profits, universities, and tech companies.
#NIST#AIConsortium#AIPolicies#USAIRegulation
NIST Issues Urgent Report on Escalating Threat of AI Attacks
Hello, dear subscribers! The National Institute of Standards and Technology (NIST) has released a critical report titled "Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations," sounding the alarm on the intensifying threat landscape targeting artificial intelligence systems. In the face of increasingly powerful yet vulnerable AI systems, the report outlines the technique of adversarial machine learning, wherein attackers manipulate AI systems through subtle tactics with potentially catastrophic consequences.
The document categorizes these attacks based on attackers' goals, capabilities, and knowledge of the target AI system. Concerns include "data poisoning" and "backdoor attacks," exploiting vulnerabilities in AI system development and deployment.
#NIST#AIAttacks#AISecurity#ThreatLandscape#MachineLearning**