model-extraction-relu-logits

Extract weight matrices from black-box ReLU neural networks via input-output queries.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Zurybr/lefarma-skills --skill model-extraction-relu-logits-zurybr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: model-extraction-relu-logits
Source: https://github.com/Zurybr/lefarma-skills/tree/main/letta/benchmarks/trajectory-only/model-extraction-relu-logits
Command: npx skills add https://github.com/Zurybr/lefarma-skills --skill model-extraction-relu-logits-zurybr

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of recovering the internal weight matrices of black-box ReLU neural networks when only input-output query access is available, crucial for understanding model behavior and security.

Core Features & Use Cases

  • Weight Matrix Recovery: Extracts the first layer weight matrix (A1) of a two-layer ReLU network (f(x) = A2 @ ReLU(A1 @ x)).
  • Model Extraction Attacks: Enables reverse-engineering of neural network parameters for security analysis or model understanding.
  • Use Case: A security researcher wants to understand the internal structure of a deployed neural network model without access to its training data or architecture. This skill can help recover the hidden layer's weight matrix by querying the model.

Quick Start

Use the model-extraction-relu-logits skill to extract the weight matrix A1 from the provided black-box ReLU network function.

Frequently Asked Questions about model-extraction-relu-logits

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract weights from a black-box ReLU neural network?

Model extraction attacks recover internal weight matrices from black-box ReLU neural networks using only input-output queries. This technique analyzes network behavior geometrically to detect critical hyperplanes, enabling reverse-engineering of hidden layer parameters for security analysis.

What is a model extraction attack on machine learning systems?

A model extraction attack reverse-engineers neural network parameters by querying a deployed black-box model. It targets ReLU networks specifically, recovering internal weight matrices through geometric analysis of input-output behavior to expose security vulnerabilities.

Can I recover the first layer weight matrix of a two-layer ReLU network?

Yes, you can recover the first layer weight matrix A1 of a two-layer ReLU network defined as f(x) = A2 @ ReLU(A1 @ x). The extraction isolates hidden layer parameters by detecting critical hyperplanes through targeted input-output queries.

Does model extraction require access to the original training data?

No, model extraction does not require access to original training data. It relies strictly on input-output query access to the black-box ReLU neural network, using geometric analysis of network behavior to recover hidden layer weight matrices.

What are the limitations of recovering ReLU network parameters through query access?

A key limitation is that weight matrix recovery specifically targets the first layer of two-layer ReLU networks. The geometric analysis and critical hyperplane detection technique may not fully generalize to deeper architectures or complex non-ReLU activations.