peppinob-ol
commited on
Commit
·
cb8a7e5
1
Parent(s):
70f99b6
Initial deployment: Attribution Graph Probing app
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .streamlit/config.toml +24 -0
- Dockerfile +20 -7
- LICENSE +674 -0
- README.md +140 -11
- app_hf.py +26 -0
- eda/README.md +622 -0
- eda/__init__.py +3 -0
- eda/__pycache__/__init__.cpython-313.pyc +0 -0
- eda/app.py +107 -0
- eda/components/__init__.py +2 -0
- eda/components/__pycache__/__init__.cpython-313.pyc +0 -0
- eda/components/__pycache__/feature_panel.cpython-313.pyc +0 -0
- eda/components/__pycache__/pipeline_progress.cpython-313.pyc +0 -0
- eda/components/__pycache__/supernode_panel.cpython-313.pyc +0 -0
- eda/config/__init__.py +2 -0
- eda/config/__pycache__/__init__.cpython-313.pyc +0 -0
- eda/config/__pycache__/defaults.cpython-313.pyc +0 -0
- eda/config/defaults.py +50 -0
- eda/exports/.gitkeep +2 -0
- eda/output/.pipeline_state.json +23 -0
- eda/output/graph_data/st1_graph_test-the-capital_20251030-180336.json +0 -0
- eda/output/graph_data/st1_graph_the-capital-of_20251030-113048.json +0 -0
- eda/output/graph_data/test-4-the-20251030-181150.json +0 -0
- eda/output/graph_data/test2-the-capital-20251030-180548.json +0 -0
- eda/output/graph_data/test3-the-capital-20251030-180625.json +0 -0
- eda/output/graph_data/test5-the-capital-20251030-181433.json +0 -0
- eda/output/graph_data/test6-the-capital-20251030-181857.json +0 -0
- eda/pages/00_Graph_Generation.py +801 -0
- eda/pages/01_Probe_Prompts.py +0 -0
- eda/pages/02_Node_Grouping.py +1320 -0
- eda/pages/README_NODE_GROUPING.md +284 -0
- eda/pages/__init__.py +2 -0
- eda/probe_prompts.log +0 -0
- eda/utils/__init__.py +2 -0
- eda/utils/__pycache__/__init__.cpython-313.pyc +0 -0
- eda/utils/__pycache__/compute.cpython-313.pyc +0 -0
- eda/utils/__pycache__/data_loader.cpython-313.pyc +0 -0
- eda/utils/__pycache__/file_monitor.cpython-313.pyc +0 -0
- eda/utils/__pycache__/graph_visualization.cpython-313.pyc +0 -0
- eda/utils/__pycache__/pipeline_state.cpython-313.pyc +0 -0
- eda/utils/__pycache__/plots.cpython-313.pyc +0 -0
- eda/utils/graph_visualization.py +655 -0
- examples_data/2025-10-21T07-40_export_ENRICHED.csv +196 -0
- examples_data/README.md +45 -0
- examples_data/activations_dump (2).json +0 -0
- examples_data/clt-hp-the-capital-of-201020250035-20251020-003525.json +0 -0
- examples_data/features without errors.json +162 -0
- examples_data/node_grouping_final_20251027_173744.csv +0 -0
- examples_data/node_grouping_step1_20251027_180825.csv +196 -0
- examples_data/node_grouping_step2_20251027_180821.csv +196 -0
.streamlit/config.toml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[theme]
|
| 2 |
+
primaryColor = "#8B5CF6"
|
| 3 |
+
backgroundColor = "#0E1117"
|
| 4 |
+
secondaryBackgroundColor = "#262730"
|
| 5 |
+
textColor = "#FAFAFA"
|
| 6 |
+
font = "sans serif"
|
| 7 |
+
|
| 8 |
+
[server]
|
| 9 |
+
headless = true
|
| 10 |
+
port = 7860
|
| 11 |
+
enableCORS = false
|
| 12 |
+
enableXsrfProtection = true
|
| 13 |
+
|
| 14 |
+
[browser]
|
| 15 |
+
gatherUsageStats = false
|
| 16 |
+
|
| 17 |
+
[runner]
|
| 18 |
+
magicEnabled = true
|
| 19 |
+
fastReruns = true
|
| 20 |
+
|
| 21 |
+
[client]
|
| 22 |
+
showErrorDetails = true
|
| 23 |
+
toolbarMode = "minimal"
|
| 24 |
+
|
Dockerfile
CHANGED
|
@@ -1,20 +1,33 @@
|
|
| 1 |
-
|
| 2 |
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
build-essential \
|
| 7 |
curl \
|
|
|
|
| 8 |
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
|
| 12 |
-
COPY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Dockerfile for Hugging Face Spaces - Streamlit App
|
| 2 |
|
| 3 |
+
FROM python:3.10-slim
|
| 4 |
+
|
| 5 |
+
# Set working directory
|
| 6 |
WORKDIR /app
|
| 7 |
|
| 8 |
+
# Install system dependencies
|
| 9 |
RUN apt-get update && apt-get install -y \
|
| 10 |
build-essential \
|
| 11 |
curl \
|
| 12 |
+
software-properties-common \
|
| 13 |
git \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
+
# Copy requirements first (for better caching)
|
| 17 |
+
COPY requirements_hf.txt requirements.txt
|
| 18 |
+
|
| 19 |
+
# Install Python dependencies
|
| 20 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 21 |
+
|
| 22 |
+
# Copy entire project
|
| 23 |
+
COPY . .
|
| 24 |
|
| 25 |
+
# Expose Streamlit port
|
| 26 |
+
EXPOSE 7860
|
| 27 |
|
| 28 |
+
# Health check
|
| 29 |
+
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
|
| 30 |
|
| 31 |
+
# Run Streamlit app
|
| 32 |
+
ENTRYPOINT ["streamlit", "run", "app_hf.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
| 33 |
|
|
|
LICENSE
ADDED
|
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 3, 29 June 2007
|
| 3 |
+
|
| 4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
| 5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 6 |
+
of this license document, but changing it is not allowed.
|
| 7 |
+
|
| 8 |
+
Preamble
|
| 9 |
+
|
| 10 |
+
The GNU General Public License is a free, copyleft license for
|
| 11 |
+
software and other kinds of works.
|
| 12 |
+
|
| 13 |
+
The licenses for most software and other practical works are designed
|
| 14 |
+
to take away your freedom to share and change the works. By contrast,
|
| 15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 16 |
+
share and change all versions of a program--to make sure it remains free
|
| 17 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 18 |
+
GNU General Public License for most of our software; it applies also to
|
| 19 |
+
any other work released this way by its authors. You can apply it to
|
| 20 |
+
your programs, too.
|
| 21 |
+
|
| 22 |
+
When we speak of free software, we are referring to freedom, not
|
| 23 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 24 |
+
have the freedom to distribute copies of free software (and charge for
|
| 25 |
+
them if you wish), that you receive source code or can get it if you
|
| 26 |
+
want it, that you can change the software or use pieces of it in new
|
| 27 |
+
free programs, and that you know you can do these things.
|
| 28 |
+
|
| 29 |
+
To protect your rights, we need to prevent others from denying you
|
| 30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 31 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 32 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 33 |
+
|
| 34 |
+
For example, if you distribute copies of such a program, whether
|
| 35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 36 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 37 |
+
or can get the source code. And you must show them these terms so they
|
| 38 |
+
know their rights.
|
| 39 |
+
|
| 40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 43 |
+
|
| 44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 45 |
+
that there is no warranty for this free software. For both users' and
|
| 46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 47 |
+
changed, so that their problems will not be attributed erroneously to
|
| 48 |
+
authors of previous versions.
|
| 49 |
+
|
| 50 |
+
Some devices are designed to deny users access to install or run
|
| 51 |
+
modified versions of the software inside them, although the manufacturer
|
| 52 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 53 |
+
protecting users' freedom to change the software. The systematic
|
| 54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 56 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 57 |
+
products. If such problems arise substantially in other domains, we
|
| 58 |
+
stand ready to extend this provision to those domains in future versions
|
| 59 |
+
of the GPL, as needed to protect the freedom of users.
|
| 60 |
+
|
| 61 |
+
Finally, every program is threatened constantly by software patents.
|
| 62 |
+
States should not allow patents to restrict development and use of
|
| 63 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 64 |
+
avoid the special danger that patents applied to a free program could
|
| 65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 66 |
+
patents cannot be used to render the program non-free.
|
| 67 |
+
|
| 68 |
+
The precise terms and conditions for copying, distribution and
|
| 69 |
+
modification follow.
|
| 70 |
+
|
| 71 |
+
TERMS AND CONDITIONS
|
| 72 |
+
|
| 73 |
+
0. Definitions.
|
| 74 |
+
|
| 75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 76 |
+
|
| 77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 78 |
+
works, such as semiconductor masks.
|
| 79 |
+
|
| 80 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 82 |
+
"recipients" may be individuals or organizations.
|
| 83 |
+
|
| 84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 85 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 86 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 87 |
+
earlier work or a work "based on" the earlier work.
|
| 88 |
+
|
| 89 |
+
A "covered work" means either the unmodified Program or a work based
|
| 90 |
+
on the Program.
|
| 91 |
+
|
| 92 |
+
To "propagate" a work means to do anything with it that, without
|
| 93 |
+
permission, would make you directly or secondarily liable for
|
| 94 |
+
infringement under applicable copyright law, except executing it on a
|
| 95 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 96 |
+
distribution (with or without modification), making available to the
|
| 97 |
+
public, and in some countries other activities as well.
|
| 98 |
+
|
| 99 |
+
To "convey" a work means any kind of propagation that enables other
|
| 100 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 102 |
+
|
| 103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 104 |
+
to the extent that it includes a convenient and prominently visible
|
| 105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 106 |
+
tells the user that there is no warranty for the work (except to the
|
| 107 |
+
extent that warranties are provided), that licensees may convey the
|
| 108 |
+
work under this License, and how to view a copy of this License. If
|
| 109 |
+
the interface presents a list of user commands or options, such as a
|
| 110 |
+
menu, a prominent item in the list meets this criterion.
|
| 111 |
+
|
| 112 |
+
1. Source Code.
|
| 113 |
+
|
| 114 |
+
The "source code" for a work means the preferred form of the work
|
| 115 |
+
for making modifications to it. "Object code" means any non-source
|
| 116 |
+
form of a work.
|
| 117 |
+
|
| 118 |
+
A "Standard Interface" means an interface that either is an official
|
| 119 |
+
standard defined by a recognized standards body, or, in the case of
|
| 120 |
+
interfaces specified for a particular programming language, one that
|
| 121 |
+
is widely used among developers working in that language.
|
| 122 |
+
|
| 123 |
+
The "System Libraries" of an executable work include anything, other
|
| 124 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 125 |
+
packaging a Major Component, but which is not part of that Major
|
| 126 |
+
Component, and (b) serves only to enable use of the work with that
|
| 127 |
+
Major Component, or to implement a Standard Interface for which an
|
| 128 |
+
implementation is available to the public in source code form. A
|
| 129 |
+
"Major Component", in this context, means a major essential component
|
| 130 |
+
(kernel, window system, and so on) of the specific operating system
|
| 131 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 132 |
+
produce the work, or an object code interpreter used to run it.
|
| 133 |
+
|
| 134 |
+
The "Corresponding Source" for a work in object code form means all
|
| 135 |
+
the source code needed to generate, install, and (for an executable
|
| 136 |
+
work) run the object code and to modify the work, including scripts to
|
| 137 |
+
control those activities. However, it does not include the work's
|
| 138 |
+
System Libraries, or general-purpose tools or generally available free
|
| 139 |
+
programs which are used unmodified in performing those activities but
|
| 140 |
+
which are not part of the work. For example, Corresponding Source
|
| 141 |
+
includes interface definition files associated with source files for
|
| 142 |
+
the work, and the source code for shared libraries and dynamically
|
| 143 |
+
linked subprograms that the work is specifically designed to require,
|
| 144 |
+
such as by intimate data communication or control flow between those
|
| 145 |
+
subprograms and other parts of the work.
|
| 146 |
+
|
| 147 |
+
The Corresponding Source need not include anything that users
|
| 148 |
+
can regenerate automatically from other parts of the Corresponding
|
| 149 |
+
Source.
|
| 150 |
+
|
| 151 |
+
The Corresponding Source for a work in source code form is that
|
| 152 |
+
same work.
|
| 153 |
+
|
| 154 |
+
2. Basic Permissions.
|
| 155 |
+
|
| 156 |
+
All rights granted under this License are granted for the term of
|
| 157 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 158 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 159 |
+
permission to run the unmodified Program. The output from running a
|
| 160 |
+
covered work is covered by this License only if the output, given its
|
| 161 |
+
content, constitutes a covered work. This License acknowledges your
|
| 162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 163 |
+
|
| 164 |
+
You may make, run and propagate covered works that you do not
|
| 165 |
+
convey, without conditions so long as your license otherwise remains
|
| 166 |
+
in force. You may convey covered works to others for the sole purpose
|
| 167 |
+
of having them make modifications exclusively for you, or provide you
|
| 168 |
+
with facilities for running those works, provided that you comply with
|
| 169 |
+
the terms of this License in conveying all material for which you do
|
| 170 |
+
not control copyright. Those thus making or running the covered works
|
| 171 |
+
for you must do so exclusively on your behalf, under your direction
|
| 172 |
+
and control, on terms that prohibit them from making any copies of
|
| 173 |
+
your copyrighted material outside their relationship with you.
|
| 174 |
+
|
| 175 |
+
Conveying under any other circumstances is permitted solely under
|
| 176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 177 |
+
makes it unnecessary.
|
| 178 |
+
|
| 179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 180 |
+
|
| 181 |
+
No covered work shall be deemed part of an effective technological
|
| 182 |
+
measure under any applicable law fulfilling obligations under article
|
| 183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 184 |
+
similar laws prohibiting or restricting circumvention of such
|
| 185 |
+
measures.
|
| 186 |
+
|
| 187 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 188 |
+
circumvention of technological measures to the extent such circumvention
|
| 189 |
+
is effected by exercising rights under this License with respect to
|
| 190 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 191 |
+
modification of the work as a means of enforcing, against the work's
|
| 192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 193 |
+
technological measures.
|
| 194 |
+
|
| 195 |
+
4. Conveying Verbatim Copies.
|
| 196 |
+
|
| 197 |
+
You may convey verbatim copies of the Program's source code as you
|
| 198 |
+
receive it, in any medium, provided that you conspicuously and
|
| 199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 200 |
+
keep intact all notices stating that this License and any
|
| 201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 202 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 203 |
+
recipients a copy of this License along with the Program.
|
| 204 |
+
|
| 205 |
+
You may charge any price or no price for each copy that you convey,
|
| 206 |
+
and you may offer support or warranty protection for a fee.
|
| 207 |
+
|
| 208 |
+
5. Conveying Modified Source Versions.
|
| 209 |
+
|
| 210 |
+
You may convey a work based on the Program, or the modifications to
|
| 211 |
+
produce it from the Program, in the form of source code under the
|
| 212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 213 |
+
|
| 214 |
+
a) The work must carry prominent notices stating that you modified
|
| 215 |
+
it, and giving a relevant date.
|
| 216 |
+
|
| 217 |
+
b) The work must carry prominent notices stating that it is
|
| 218 |
+
released under this License and any conditions added under section
|
| 219 |
+
7. This requirement modifies the requirement in section 4 to
|
| 220 |
+
"keep intact all notices".
|
| 221 |
+
|
| 222 |
+
c) You must license the entire work, as a whole, under this
|
| 223 |
+
License to anyone who comes into possession of a copy. This
|
| 224 |
+
License will therefore apply, along with any applicable section 7
|
| 225 |
+
additional terms, to the whole of the work, and all its parts,
|
| 226 |
+
regardless of how they are packaged. This License gives no
|
| 227 |
+
permission to license the work in any other way, but it does not
|
| 228 |
+
invalidate such permission if you have separately received it.
|
| 229 |
+
|
| 230 |
+
d) If the work has interactive user interfaces, each must display
|
| 231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 233 |
+
work need not make them do so.
|
| 234 |
+
|
| 235 |
+
A compilation of a covered work with other separate and independent
|
| 236 |
+
works, which are not by their nature extensions of the covered work,
|
| 237 |
+
and which are not combined with it such as to form a larger program,
|
| 238 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 240 |
+
used to limit the access or legal rights of the compilation's users
|
| 241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 242 |
+
in an aggregate does not cause this License to apply to the other
|
| 243 |
+
parts of the aggregate.
|
| 244 |
+
|
| 245 |
+
6. Conveying Non-Source Forms.
|
| 246 |
+
|
| 247 |
+
You may convey a covered work in object code form under the terms
|
| 248 |
+
of sections 4 and 5, provided that you also convey the
|
| 249 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 250 |
+
in one of these ways:
|
| 251 |
+
|
| 252 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 253 |
+
(including a physical distribution medium), accompanied by the
|
| 254 |
+
Corresponding Source fixed on a durable physical medium
|
| 255 |
+
customarily used for software interchange.
|
| 256 |
+
|
| 257 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 258 |
+
(including a physical distribution medium), accompanied by a
|
| 259 |
+
written offer, valid for at least three years and valid for as
|
| 260 |
+
long as you offer spare parts or customer support for that product
|
| 261 |
+
model, to give anyone who possesses the object code either (1) a
|
| 262 |
+
copy of the Corresponding Source for all the software in the
|
| 263 |
+
product that is covered by this License, on a durable physical
|
| 264 |
+
medium customarily used for software interchange, for a price no
|
| 265 |
+
more than your reasonable cost of physically performing this
|
| 266 |
+
conveying of source, or (2) access to copy the
|
| 267 |
+
Corresponding Source from a network server at no charge.
|
| 268 |
+
|
| 269 |
+
c) Convey individual copies of the object code with a copy of the
|
| 270 |
+
written offer to provide the Corresponding Source. This
|
| 271 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 272 |
+
only if you received the object code with such an offer, in accord
|
| 273 |
+
with subsection 6b.
|
| 274 |
+
|
| 275 |
+
d) Convey the object code by offering access from a designated
|
| 276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 277 |
+
Corresponding Source in the same way through the same place at no
|
| 278 |
+
further charge. You need not require recipients to copy the
|
| 279 |
+
Corresponding Source along with the object code. If the place to
|
| 280 |
+
copy the object code is a network server, the Corresponding Source
|
| 281 |
+
may be on a different server (operated by you or a third party)
|
| 282 |
+
that supports equivalent copying facilities, provided you maintain
|
| 283 |
+
clear directions next to the object code saying where to find the
|
| 284 |
+
Corresponding Source. Regardless of what server hosts the
|
| 285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 286 |
+
available for as long as needed to satisfy these requirements.
|
| 287 |
+
|
| 288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 289 |
+
you inform other peers where the object code and Corresponding
|
| 290 |
+
Source of the work are being offered to the general public at no
|
| 291 |
+
charge under subsection 6d.
|
| 292 |
+
|
| 293 |
+
A separable portion of the object code, whose source code is excluded
|
| 294 |
+
from the Corresponding Source as a System Library, need not be
|
| 295 |
+
included in conveying the object code work.
|
| 296 |
+
|
| 297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 298 |
+
tangible personal property which is normally used for personal, family,
|
| 299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 302 |
+
product received by a particular user, "normally used" refers to a
|
| 303 |
+
typical or common use of that class of product, regardless of the status
|
| 304 |
+
of the particular user or of the way in which the particular user
|
| 305 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 306 |
+
is a consumer product regardless of whether the product has substantial
|
| 307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 308 |
+
the only significant mode of use of the product.
|
| 309 |
+
|
| 310 |
+
"Installation Information" for a User Product means any methods,
|
| 311 |
+
procedures, authorization keys, or other information required to install
|
| 312 |
+
and execute modified versions of a covered work in that User Product from
|
| 313 |
+
a modified version of its Corresponding Source. The information must
|
| 314 |
+
suffice to ensure that the continued functioning of the modified object
|
| 315 |
+
code is in no case prevented or interfered with solely because
|
| 316 |
+
modification has been made.
|
| 317 |
+
|
| 318 |
+
If you convey an object code work under this section in, or with, or
|
| 319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 320 |
+
part of a transaction in which the right of possession and use of the
|
| 321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 322 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 323 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 324 |
+
by the Installation Information. But this requirement does not apply
|
| 325 |
+
if neither you nor any third party retains the ability to install
|
| 326 |
+
modified object code on the User Product (for example, the work has
|
| 327 |
+
been installed in ROM).
|
| 328 |
+
|
| 329 |
+
The requirement to provide Installation Information does not include a
|
| 330 |
+
requirement to continue to provide support service, warranty, or updates
|
| 331 |
+
for a work that has been modified or installed by the recipient, or for
|
| 332 |
+
the User Product in which it has been modified or installed. Access to a
|
| 333 |
+
network may be denied when the modification itself materially and
|
| 334 |
+
adversely affects the operation of the network or violates the rules and
|
| 335 |
+
protocols for communication across the network.
|
| 336 |
+
|
| 337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 338 |
+
in accord with this section must be in a format that is publicly
|
| 339 |
+
documented (and with an implementation available to the public in
|
| 340 |
+
source code form), and must require no special password or key for
|
| 341 |
+
unpacking, reading or copying.
|
| 342 |
+
|
| 343 |
+
7. Additional Terms.
|
| 344 |
+
|
| 345 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 346 |
+
License by making exceptions from one or more of its conditions.
|
| 347 |
+
Additional permissions that are applicable to the entire Program shall
|
| 348 |
+
be treated as though they were included in this License, to the extent
|
| 349 |
+
that they are valid under applicable law. If additional permissions
|
| 350 |
+
apply only to part of the Program, that part may be used separately
|
| 351 |
+
under those permissions, but the entire Program remains governed by
|
| 352 |
+
this License without regard to the additional permissions.
|
| 353 |
+
|
| 354 |
+
When you convey a copy of a covered work, you may at your option
|
| 355 |
+
remove any additional permissions from that copy, or from any part of
|
| 356 |
+
it. (Additional permissions may be written to require their own
|
| 357 |
+
removal in certain cases when you modify the work.) You may place
|
| 358 |
+
additional permissions on material, added by you to a covered work,
|
| 359 |
+
for which you have or can give appropriate copyright permission.
|
| 360 |
+
|
| 361 |
+
Notwithstanding any other provision of this License, for material you
|
| 362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 363 |
+
that material) supplement the terms of this License with terms:
|
| 364 |
+
|
| 365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 366 |
+
terms of sections 15 and 16 of this License; or
|
| 367 |
+
|
| 368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 369 |
+
author attributions in that material or in the Appropriate Legal
|
| 370 |
+
Notices displayed by works containing it; or
|
| 371 |
+
|
| 372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 373 |
+
requiring that modified versions of such material be marked in
|
| 374 |
+
reasonable ways as different from the original version; or
|
| 375 |
+
|
| 376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 377 |
+
authors of the material; or
|
| 378 |
+
|
| 379 |
+
e) Declining to grant rights under trademark law for use of some
|
| 380 |
+
trade names, trademarks, or service marks; or
|
| 381 |
+
|
| 382 |
+
f) Requiring indemnification of licensors and authors of that
|
| 383 |
+
material by anyone who conveys the material (or modified versions of
|
| 384 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 385 |
+
any liability that these contractual assumptions directly impose on
|
| 386 |
+
those licensors and authors.
|
| 387 |
+
|
| 388 |
+
All other non-permissive additional terms are considered "further
|
| 389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 390 |
+
received it, or any part of it, contains a notice stating that it is
|
| 391 |
+
governed by this License along with a term that is a further
|
| 392 |
+
restriction, you may remove that term. If a license document contains
|
| 393 |
+
a further restriction but permits relicensing or conveying under this
|
| 394 |
+
License, you may add to a covered work material governed by the terms
|
| 395 |
+
of that license document, provided that the further restriction does
|
| 396 |
+
not survive such relicensing or conveying.
|
| 397 |
+
|
| 398 |
+
If you add terms to a covered work in accord with this section, you
|
| 399 |
+
must place, in the relevant source files, a statement of the
|
| 400 |
+
additional terms that apply to those files, or a notice indicating
|
| 401 |
+
where to find the applicable terms.
|
| 402 |
+
|
| 403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 404 |
+
form of a separately written license, or stated as exceptions;
|
| 405 |
+
the above requirements apply either way.
|
| 406 |
+
|
| 407 |
+
8. Termination.
|
| 408 |
+
|
| 409 |
+
You may not propagate or modify a covered work except as expressly
|
| 410 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 411 |
+
modify it is void, and will automatically terminate your rights under
|
| 412 |
+
this License (including any patent licenses granted under the third
|
| 413 |
+
paragraph of section 11).
|
| 414 |
+
|
| 415 |
+
However, if you cease all violation of this License, then your
|
| 416 |
+
license from a particular copyright holder is reinstated (a)
|
| 417 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 419 |
+
holder fails to notify you of the violation by some reasonable means
|
| 420 |
+
prior to 60 days after the cessation.
|
| 421 |
+
|
| 422 |
+
Moreover, your license from a particular copyright holder is
|
| 423 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 424 |
+
violation by some reasonable means, this is the first time you have
|
| 425 |
+
received notice of violation of this License (for any work) from that
|
| 426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 427 |
+
your receipt of the notice.
|
| 428 |
+
|
| 429 |
+
Termination of your rights under this section does not terminate the
|
| 430 |
+
licenses of parties who have received copies or rights from you under
|
| 431 |
+
this License. If your rights have been terminated and not permanently
|
| 432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 433 |
+
material under section 10.
|
| 434 |
+
|
| 435 |
+
9. Acceptance Not Required for Having Copies.
|
| 436 |
+
|
| 437 |
+
You are not required to accept this License in order to receive or
|
| 438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 440 |
+
to receive a copy likewise does not require acceptance. However,
|
| 441 |
+
nothing other than this License grants you permission to propagate or
|
| 442 |
+
modify any covered work. These actions infringe copyright if you do
|
| 443 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 444 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 445 |
+
|
| 446 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 447 |
+
|
| 448 |
+
Each time you convey a covered work, the recipient automatically
|
| 449 |
+
receives a license from the original licensors, to run, modify and
|
| 450 |
+
propagate that work, subject to this License. You are not responsible
|
| 451 |
+
for enforcing compliance by third parties with this License.
|
| 452 |
+
|
| 453 |
+
An "entity transaction" is a transaction transferring control of an
|
| 454 |
+
organization, or substantially all assets of one, or subdividing an
|
| 455 |
+
organization, or merging organizations. If propagation of a covered
|
| 456 |
+
work results from an entity transaction, each party to that
|
| 457 |
+
transaction who receives a copy of the work also receives whatever
|
| 458 |
+
licenses to the work the party's predecessor in interest had or could
|
| 459 |
+
give under the previous paragraph, plus a right to possession of the
|
| 460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 461 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 462 |
+
|
| 463 |
+
You may not impose any further restrictions on the exercise of the
|
| 464 |
+
rights granted or affirmed under this License. For example, you may
|
| 465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 466 |
+
rights granted under this License, and you may not initiate litigation
|
| 467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 468 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 469 |
+
sale, or importing the Program or any portion of it.
|
| 470 |
+
|
| 471 |
+
11. Patents.
|
| 472 |
+
|
| 473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 474 |
+
License of the Program or a work on which the Program is based. The
|
| 475 |
+
work thus licensed is called the contributor's "contributor version".
|
| 476 |
+
|
| 477 |
+
A contributor's "essential patent claims" are all patent claims
|
| 478 |
+
owned or controlled by the contributor, whether already acquired or
|
| 479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 480 |
+
by this License, of making, using, or selling its contributor version,
|
| 481 |
+
but do not include claims that would be infringed only as a
|
| 482 |
+
consequence of further modification of the contributor version. For
|
| 483 |
+
purposes of this definition, "control" includes the right to grant
|
| 484 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 485 |
+
this License.
|
| 486 |
+
|
| 487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 488 |
+
patent license under the contributor's essential patent claims, to
|
| 489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 490 |
+
propagate the contents of its contributor version.
|
| 491 |
+
|
| 492 |
+
In the following three paragraphs, a "patent license" is any express
|
| 493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 494 |
+
(such as an express permission to practice a patent or covenant not to
|
| 495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 496 |
+
party means to make such an agreement or commitment not to enforce a
|
| 497 |
+
patent against the party.
|
| 498 |
+
|
| 499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 500 |
+
and the Corresponding Source of the work is not available for anyone
|
| 501 |
+
to copy, free of charge and under the terms of this License, through a
|
| 502 |
+
publicly available network server or other readily accessible means,
|
| 503 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 506 |
+
consistent with the requirements of this License, to extend the patent
|
| 507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 508 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 509 |
+
covered work in a country, or your recipient's use of the covered work
|
| 510 |
+
in a country, would infringe one or more identifiable patents in that
|
| 511 |
+
country that you have reason to believe are valid.
|
| 512 |
+
|
| 513 |
+
If, pursuant to or in connection with a single transaction or
|
| 514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 515 |
+
covered work, and grant a patent license to some of the parties
|
| 516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 517 |
+
or convey a specific copy of the covered work, then the patent license
|
| 518 |
+
you grant is automatically extended to all recipients of the covered
|
| 519 |
+
work and works based on it.
|
| 520 |
+
|
| 521 |
+
A patent license is "discriminatory" if it does not include within
|
| 522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 524 |
+
specifically granted under this License. You may not convey a covered
|
| 525 |
+
work if you are a party to an arrangement with a third party that is
|
| 526 |
+
in the business of distributing software, under which you make payment
|
| 527 |
+
to the third party based on the extent of your activity of conveying
|
| 528 |
+
the work, and under which the third party grants, to any of the
|
| 529 |
+
parties who would receive the covered work from you, a discriminatory
|
| 530 |
+
patent license (a) in connection with copies of the covered work
|
| 531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 532 |
+
for and in connection with specific products or compilations that
|
| 533 |
+
contain the covered work, unless you entered into that arrangement,
|
| 534 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 535 |
+
|
| 536 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 537 |
+
any implied license or other defenses to infringement that may
|
| 538 |
+
otherwise be available to you under applicable patent law.
|
| 539 |
+
|
| 540 |
+
12. No Surrender of Others' Freedom.
|
| 541 |
+
|
| 542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 543 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 546 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 548 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 549 |
+
the Program, the only way you could satisfy both those terms and this
|
| 550 |
+
License would be to refrain entirely from conveying the Program.
|
| 551 |
+
|
| 552 |
+
13. Use with the GNU Affero General Public License.
|
| 553 |
+
|
| 554 |
+
Notwithstanding any other provision of this License, you have
|
| 555 |
+
permission to link or combine any covered work with a work licensed
|
| 556 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 557 |
+
combined work, and to convey the resulting work. The terms of this
|
| 558 |
+
License will continue to apply to the part which is the covered work,
|
| 559 |
+
but the special requirements of the GNU Affero General Public License,
|
| 560 |
+
section 13, concerning interaction through a network will apply to the
|
| 561 |
+
combination as such.
|
| 562 |
+
|
| 563 |
+
14. Revised Versions of this License.
|
| 564 |
+
|
| 565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 566 |
+
the GNU General Public License from time to time. Such new versions will
|
| 567 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 568 |
+
address new problems or concerns.
|
| 569 |
+
|
| 570 |
+
Each version is given a distinguishing version number. If the
|
| 571 |
+
Program specifies that a certain numbered version of the GNU General
|
| 572 |
+
Public License "or any later version" applies to it, you have the
|
| 573 |
+
option of following the terms and conditions either of that numbered
|
| 574 |
+
version or of any later version published by the Free Software
|
| 575 |
+
Foundation. If the Program does not specify a version number of the
|
| 576 |
+
GNU General Public License, you may choose any version ever published
|
| 577 |
+
by the Free Software Foundation.
|
| 578 |
+
|
| 579 |
+
If the Program specifies that a proxy can decide which future
|
| 580 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 581 |
+
public statement of acceptance of a version permanently authorizes you
|
| 582 |
+
to choose that version for the Program.
|
| 583 |
+
|
| 584 |
+
Later license versions may give you additional or different
|
| 585 |
+
permissions. However, no additional obligations are imposed on any
|
| 586 |
+
author or copyright holder as a result of your choosing to follow a
|
| 587 |
+
later version.
|
| 588 |
+
|
| 589 |
+
15. Disclaimer of Warranty.
|
| 590 |
+
|
| 591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 599 |
+
|
| 600 |
+
16. Limitation of Liability.
|
| 601 |
+
|
| 602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 610 |
+
SUCH DAMAGES.
|
| 611 |
+
|
| 612 |
+
17. Interpretation of Sections 15 and 16.
|
| 613 |
+
|
| 614 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 615 |
+
above cannot be given local legal effect according to their terms,
|
| 616 |
+
reviewing courts shall apply local law that most closely approximates
|
| 617 |
+
an absolute waiver of all civil liability in connection with the
|
| 618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 619 |
+
copy of the Program in return for a fee.
|
| 620 |
+
|
| 621 |
+
END OF TERMS AND CONDITIONS
|
| 622 |
+
|
| 623 |
+
How to Apply These Terms to Your New Programs
|
| 624 |
+
|
| 625 |
+
If you develop a new program, and you want it to be of the greatest
|
| 626 |
+
possible use to the public, the best way to achieve this is to make it
|
| 627 |
+
free software which everyone can redistribute and change under these terms.
|
| 628 |
+
|
| 629 |
+
To do so, attach the following notices to the program. It is safest
|
| 630 |
+
to attach them to the start of each source file to most effectively
|
| 631 |
+
state the exclusion of warranty; and each file should have at least
|
| 632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 633 |
+
|
| 634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
| 635 |
+
Copyright (C) <year> <name of author>
|
| 636 |
+
|
| 637 |
+
This program is free software: you can redistribute it and/or modify
|
| 638 |
+
it under the terms of the GNU General Public License as published by
|
| 639 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 640 |
+
(at your option) any later version.
|
| 641 |
+
|
| 642 |
+
This program is distributed in the hope that it will be useful,
|
| 643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 645 |
+
GNU General Public License for more details.
|
| 646 |
+
|
| 647 |
+
You should have received a copy of the GNU General Public License
|
| 648 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 649 |
+
|
| 650 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 651 |
+
|
| 652 |
+
If the program does terminal interaction, make it output a short
|
| 653 |
+
notice like this when it starts in an interactive mode:
|
| 654 |
+
|
| 655 |
+
<program> Copyright (C) <year> <name of author>
|
| 656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 657 |
+
This is free software, and you are welcome to redistribute it
|
| 658 |
+
under certain conditions; type `show c' for details.
|
| 659 |
+
|
| 660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 661 |
+
parts of the General Public License. Of course, your program's commands
|
| 662 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 663 |
+
|
| 664 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 667 |
+
<https://www.gnu.org/licenses/>.
|
| 668 |
+
|
| 669 |
+
The GNU General Public License does not permit incorporating your program
|
| 670 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 671 |
+
may consider it more useful to permit linking proprietary applications with
|
| 672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 673 |
+
Public License instead of this License. But first, please read
|
| 674 |
+
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
README.md
CHANGED
|
@@ -1,20 +1,149 @@
|
|
| 1 |
---
|
| 2 |
title: Attribution Graph Probing
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
-
app_port:
|
| 8 |
-
tags:
|
| 9 |
-
- streamlit
|
| 10 |
pinned: false
|
| 11 |
-
short_description: 'Automates attribution-graph analysis via probe prompting: ci'
|
| 12 |
license: gpl-3.0
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 20 |
-
forums](https://discuss.streamlit.io).
|
|
|
|
| 1 |
---
|
| 2 |
title: Attribution Graph Probing
|
| 3 |
+
emoji: 🔬
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
|
|
|
|
|
|
| 8 |
pinned: false
|
|
|
|
| 9 |
license: gpl-3.0
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# 🔬 Attribution Graph Probing
|
| 13 |
|
| 14 |
+
**Automated Attribution Graph Analysis through Probe Prompting**
|
| 15 |
+
|
| 16 |
+
Interactive research tool for automated analysis and interpretation of attribution graphs from Sparse Autoencoders (SAE) and Cross-Layer Transcoders (CLT).
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 🚀 Quick Start
|
| 21 |
+
|
| 22 |
+
This Space implements a **3-stage pipeline** for analyzing neural network features:
|
| 23 |
+
|
| 24 |
+
1. **🌐 Graph Generation**: Generate attribution graphs on Neuronpedia
|
| 25 |
+
2. **🔍 Probe Prompts**: Analyze feature activations on semantic concepts
|
| 26 |
+
3. **🔗 Node Grouping**: Automatically classify and name features
|
| 27 |
+
|
| 28 |
+
### Try the Demo
|
| 29 |
+
|
| 30 |
+
Click through the sidebar pages to explore the Dallas example dataset included in this Space.
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## 🔑 API Keys Required
|
| 35 |
+
|
| 36 |
+
To use this Space with your own data, you need:
|
| 37 |
+
|
| 38 |
+
1. **Neuronpedia API Key** - Get it from [neuronpedia.org](https://www.neuronpedia.org)
|
| 39 |
+
2. **OpenAI API Key** - For concept generation (optional)
|
| 40 |
+
|
| 41 |
+
Add these as **Secrets** in Space Settings:
|
| 42 |
+
- `NEURONPEDIA_API_KEY=your-key-here`
|
| 43 |
+
- `OPENAI_API_KEY=your-key-here`
|
| 44 |
+
|
| 45 |
+
Or enter them directly in the sidebar when using the app.
|
| 46 |
+
|
| 47 |
+
---
|
| 48 |
+
|
| 49 |
+
## 📊 Features
|
| 50 |
+
|
| 51 |
+
### Stage 1: Graph Generation
|
| 52 |
+
- Generate attribution graphs via Neuronpedia API
|
| 53 |
+
- Extract static metrics (node influence, cumulative influence)
|
| 54 |
+
- Interactive visualizations (layer × context position)
|
| 55 |
+
- Select relevant features for analysis
|
| 56 |
+
|
| 57 |
+
### Stage 2: Probe Prompts
|
| 58 |
+
- Auto-generate semantic concepts via OpenAI
|
| 59 |
+
- Measure feature activations across concepts
|
| 60 |
+
- Automatic checkpoints for long analyses
|
| 61 |
+
- Resume from interruptions
|
| 62 |
+
|
| 63 |
+
### Stage 3: Node Grouping
|
| 64 |
+
- Classify features into 4 categories:
|
| 65 |
+
- **Semantic (Dictionary)**: Specific tokens
|
| 66 |
+
- **Semantic (Concept)**: Related concepts
|
| 67 |
+
- **Say "X"**: Output predictions
|
| 68 |
+
- **Relationship**: Entity relationships
|
| 69 |
+
- Automatic naming based on activation patterns
|
| 70 |
+
- Upload to Neuronpedia for visualization
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## 📁 Example Dataset
|
| 75 |
+
|
| 76 |
+
This Space includes the **Dallas example**:
|
| 77 |
+
- **Prompt**: "The capital of state containing Dallas is"
|
| 78 |
+
- **Target**: "Austin"
|
| 79 |
+
- **Features**: 55 features from Gemma-2-2B model
|
| 80 |
+
- **Complete pipeline outputs**: Graph, activations, classifications
|
| 81 |
+
|
| 82 |
+
Navigate to each stage page to explore the example data.
|
| 83 |
+
|
| 84 |
+
---
|
| 85 |
+
|
| 86 |
+
## 📖 Documentation
|
| 87 |
+
|
| 88 |
+
- **Complete Guide**: See `eda/README.md` in the Files tab
|
| 89 |
+
- **Quick Start**: `QUICK_START_STREAMLIT.md`
|
| 90 |
+
- **Main README**: `readme.md`
|
| 91 |
+
|
| 92 |
+
---
|
| 93 |
+
|
| 94 |
+
## 🔬 Research Context
|
| 95 |
+
|
| 96 |
+
This tool is part of research on **automated sparse feature interpretation** using probe prompting techniques.
|
| 97 |
+
|
| 98 |
+
**Related Work:**
|
| 99 |
+
- [Circuit Tracer](https://github.com/safety-research/circuit-tracer) by Anthropic
|
| 100 |
+
- [Attribution Graphs](https://transformer-circuits.pub/2025/attribution-graphs/)
|
| 101 |
+
- [Neuronpedia](https://www.neuronpedia.org)
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
## 🛠️ Technical Details
|
| 106 |
+
|
| 107 |
+
**Models Supported:**
|
| 108 |
+
- Gemma-2-2B, Gemma-2-9B
|
| 109 |
+
- GPT-2 Small
|
| 110 |
+
- Any model with SAE/CLT features on Neuronpedia
|
| 111 |
+
|
| 112 |
+
**Resource Usage:**
|
| 113 |
+
- RAM: ~2-3GB for typical analyses
|
| 114 |
+
- CPU: Efficient for API-based processing
|
| 115 |
+
- Storage: Outputs saved during session
|
| 116 |
+
|
| 117 |
+
---
|
| 118 |
+
|
| 119 |
+
## 📝 How to Use
|
| 120 |
+
|
| 121 |
+
### With Example Data (No API Keys Needed)
|
| 122 |
+
1. Navigate through the 3 stage pages in the sidebar
|
| 123 |
+
2. Load the Dallas example files provided
|
| 124 |
+
3. Explore visualizations and results
|
| 125 |
+
|
| 126 |
+
### With Your Own Data (API Keys Required)
|
| 127 |
+
1. Add your API keys in Settings → Secrets or in the sidebar
|
| 128 |
+
2. **Stage 1**: Generate a new graph with your prompt
|
| 129 |
+
3. **Stage 2**: Generate concepts and analyze activations
|
| 130 |
+
4. **Stage 3**: Classify and name features automatically
|
| 131 |
+
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
## 🤝 Contributing
|
| 135 |
+
|
| 136 |
+
This is a research project for mechanistic interpretability. Feedback and contributions welcome!
|
| 137 |
+
|
| 138 |
+
---
|
| 139 |
+
|
| 140 |
+
## 📄 License
|
| 141 |
+
|
| 142 |
+
GPL-3.0 - See LICENSE file for details
|
| 143 |
+
|
| 144 |
+
---
|
| 145 |
+
|
| 146 |
+
**Version**: 2.0.0-clean
|
| 147 |
+
**Last Updated**: November 2025
|
| 148 |
+
**Deployed on**: Hugging Face Spaces
|
| 149 |
|
|
|
|
|
|
app_hf.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Entry point for Hugging Face Spaces deployment
|
| 3 |
+
Redirects to the main Streamlit app in eda/app.py
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
import sys
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
|
| 9 |
+
# Add project root to path
|
| 10 |
+
project_root = Path(__file__).parent
|
| 11 |
+
if str(project_root) not in sys.path:
|
| 12 |
+
sys.path.insert(0, str(project_root))
|
| 13 |
+
|
| 14 |
+
# Import and run the main app
|
| 15 |
+
# This allows the app to work both locally and on HF Spaces
|
| 16 |
+
# without modifying the original eda/app.py structure
|
| 17 |
+
|
| 18 |
+
# Change to eda directory context
|
| 19 |
+
import os
|
| 20 |
+
os.chdir(project_root)
|
| 21 |
+
|
| 22 |
+
# Import the main app module
|
| 23 |
+
from eda import app
|
| 24 |
+
|
| 25 |
+
# The streamlit app will be executed automatically when this module is loaded
|
| 26 |
+
|
eda/README.md
ADDED
|
@@ -0,0 +1,622 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Attribution Graph Probing - Applicazione Streamlit
|
| 2 |
+
|
| 3 |
+
**Versione:** 2.0.0-clean | Pipeline v2
|
| 4 |
+
**Data:** Ottobre 2025
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## Panoramica
|
| 9 |
+
|
| 10 |
+
Applicazione Streamlit interattiva per l'analisi di attribution graphs e probe prompting su modelli linguistici con Sparse Autoencoders (SAE).
|
| 11 |
+
|
| 12 |
+
### Funzionalita Principali
|
| 13 |
+
|
| 14 |
+
1. **Graph Generation** - Genera attribution graphs su Neuronpedia
|
| 15 |
+
2. **Probe Prompts** - Analizza attivazioni su concepts specifici
|
| 16 |
+
3. **Node Grouping** - Classifica e nomina supernodi per interpretazione
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## Avvio Rapido
|
| 21 |
+
|
| 22 |
+
### Prerequisiti
|
| 23 |
+
|
| 24 |
+
```bash
|
| 25 |
+
pip install streamlit plotly pandas seaborn matplotlib numpy requests openai python-dotenv
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
Oppure:
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
pip install -r requirements.txt
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
### Configurazione API Keys
|
| 35 |
+
|
| 36 |
+
Crea un file `.env` nella root del progetto:
|
| 37 |
+
|
| 38 |
+
```env
|
| 39 |
+
NEURONPEDIA_API_KEY='your-neuronpedia-key-here'
|
| 40 |
+
OPENAI_API_KEY='your-openai-key-here'
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
### Avvio Applicazione
|
| 44 |
+
|
| 45 |
+
Dalla root del progetto:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
streamlit run eda/app.py
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
L'app si aprira automaticamente su `http://localhost:8501`
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## Pagine dell'Applicazione
|
| 56 |
+
|
| 57 |
+
### Pagina Principale
|
| 58 |
+
|
| 59 |
+
Dashboard con:
|
| 60 |
+
- Link rapidi alle pagine
|
| 61 |
+
- Info sulla struttura output folder
|
| 62 |
+
- Statistiche file disponibili (grafi, JSON, CSV)
|
| 63 |
+
|
| 64 |
+
### 00 - Graph Generation
|
| 65 |
+
|
| 66 |
+
**Genera attribution graphs su Neuronpedia**
|
| 67 |
+
|
| 68 |
+
#### Funzionalita
|
| 69 |
+
|
| 70 |
+
- **Generazione Graph**: Crea nuovi attribution graphs tramite API Neuronpedia
|
| 71 |
+
- **Estrazione Metriche**: Genera CSV con node_influence, cumulative_influence, frac_external_raw
|
| 72 |
+
- **Visualizzazione Interattiva**: Scatter plot Layer vs Context Position con filtri
|
| 73 |
+
- **Export Features**: Seleziona e scarica features per analisi successive
|
| 74 |
+
- **Grafici Riassuntivi**: Coverage e Strength analysis
|
| 75 |
+
|
| 76 |
+
#### Parametri Configurabili
|
| 77 |
+
|
| 78 |
+
**Model & Source Set:**
|
| 79 |
+
- Model ID (gemma-2-2b, gpt2-small, gemma-2-9b)
|
| 80 |
+
- Source Set Name (gemmascope-transcoder-16k, etc.)
|
| 81 |
+
- Max Feature Nodes (100-10000)
|
| 82 |
+
|
| 83 |
+
**Thresholds:**
|
| 84 |
+
- Node Threshold (0.0-1.0, default 0.8)
|
| 85 |
+
- Edge Threshold (0.0-1.0, default 0.85)
|
| 86 |
+
- Max N Logits (1-50, default 10)
|
| 87 |
+
- Desired Logit Probability (0.5-0.99, default 0.95)
|
| 88 |
+
|
| 89 |
+
#### Output
|
| 90 |
+
|
| 91 |
+
- Graph JSON salvato in `output/graph_data/`
|
| 92 |
+
- CSV metriche statiche in `output/graph_feature_static_metrics.csv`
|
| 93 |
+
- Features selezionate JSON per Node Grouping
|
| 94 |
+
|
| 95 |
+
#### Workflow
|
| 96 |
+
|
| 97 |
+
1. Configura parametri (model, thresholds)
|
| 98 |
+
2. Inserisci prompt da analizzare
|
| 99 |
+
3. Genera graph (salvato automaticamente)
|
| 100 |
+
4. Genera CSV metriche statiche
|
| 101 |
+
5. Visualizza scatter plot e filtra features per cumulative influence
|
| 102 |
+
6. Esporta features selezionate (formato completo: features + node_ids)
|
| 103 |
+
7. Scarica JSON/CSV per step successivi
|
| 104 |
+
|
| 105 |
+
---
|
| 106 |
+
|
| 107 |
+
### 01 - Probe Prompts
|
| 108 |
+
|
| 109 |
+
**Analizza attivazioni su concepts specifici tramite API**
|
| 110 |
+
|
| 111 |
+
#### Funzionalita
|
| 112 |
+
|
| 113 |
+
- **Caricamento Graph**: Da file locale o API Neuronpedia
|
| 114 |
+
- **Feature Subset**: Carica un subset di features o usa tutte
|
| 115 |
+
- **Generazione Concepts**: Automatica via OpenAI o inserimento manuale
|
| 116 |
+
- **Analisi Attivazioni**: Via API Neuronpedia o caricamento JSON pre-calcolato
|
| 117 |
+
- **Checkpoint & Recovery**: Salvataggio automatico progressi, ripresa da interruzioni
|
| 118 |
+
- **Visualizzazioni**: Main chart (Importance vs Activation), grafici colorati per peak token
|
| 119 |
+
- **Coverage Analysis**: Percentuale features attive e coverage dell'importanza causale
|
| 120 |
+
|
| 121 |
+
#### Parametri Configurabili
|
| 122 |
+
|
| 123 |
+
**API Keys:**
|
| 124 |
+
- Neuronpedia API Key (richiesta)
|
| 125 |
+
- OpenAI API Key (per generazione concepts)
|
| 126 |
+
- Model OpenAI (gpt-4o-mini, gpt-4o, gpt-3.5-turbo)
|
| 127 |
+
|
| 128 |
+
**Analisi:**
|
| 129 |
+
- Activation Threshold Quantile (0.5-0.99, default 0.9)
|
| 130 |
+
- Use Baseline (calcola metriche vs prompt originale)
|
| 131 |
+
- Checkpoint Every N Features (5-100, default 10)
|
| 132 |
+
|
| 133 |
+
#### Output
|
| 134 |
+
|
| 135 |
+
- CSV con attivazioni: `output/acts_compared.csv`
|
| 136 |
+
- Checkpoint JSON (salvati automaticamente in `output/checkpoints/`)
|
| 137 |
+
- Grafici interattivi con filtri
|
| 138 |
+
|
| 139 |
+
#### Workflow
|
| 140 |
+
|
| 141 |
+
1. Carica Graph JSON (file o API)
|
| 142 |
+
2. Carica feature subset (o usa tutte le features del grafo)
|
| 143 |
+
3. Genera/carica concepts (OpenAI, manuale o da file)
|
| 144 |
+
4. Modifica concepts nella tabella editabile
|
| 145 |
+
5. Salva concepts come prompts JSON
|
| 146 |
+
6. **Analisi via API**:
|
| 147 |
+
- Configura parametri (threshold, baseline, checkpoint)
|
| 148 |
+
- Esegui analisi (con progress tracking)
|
| 149 |
+
- Visualizza risultati (tabella + grafici)
|
| 150 |
+
- Scarica CSV filtrati
|
| 151 |
+
7. **Analisi da JSON** (alternativa):
|
| 152 |
+
- Carica JSON pre-calcolato da Colab
|
| 153 |
+
- Visualizza Main Chart (Importance vs Activation)
|
| 154 |
+
- Analizza grafico colorato per peak token
|
| 155 |
+
- Scarica tabella di verifica dati
|
| 156 |
+
|
| 157 |
+
#### Main Chart: Importance vs Activation
|
| 158 |
+
|
| 159 |
+
Grafico a barre stacked che mostra:
|
| 160 |
+
- **X-axis**: Features ordinate per node_influence (decrescente)
|
| 161 |
+
- **Y-axis (left)**: Activation (max_value, escludendo BOS)
|
| 162 |
+
- **Y-axis (right)**: node_influence (linea rossa)
|
| 163 |
+
- **Barre colorate**: Per prompt o per peak token
|
| 164 |
+
|
| 165 |
+
**Filtri:**
|
| 166 |
+
- Top N features (10-100)
|
| 167 |
+
- Escludi features con peak su BOS
|
| 168 |
+
|
| 169 |
+
**Tabella di Verifica**:
|
| 170 |
+
Dati grezzi usati per il grafico con metriche dettagliate:
|
| 171 |
+
- `activation_max`: Picco massimo di attivazione (esclude BOS)
|
| 172 |
+
- `activation_sum`: Somma totale attivazioni (esclude BOS)
|
| 173 |
+
- `activation_mean`: Media attivazioni normalizzata
|
| 174 |
+
- `sparsity_ratio`: Concentrazione attivazione (0=uniforme, 1=molto sparsa)
|
| 175 |
+
- `peak_token_idx`: Posizione del picco (>=1, esclude BOS)
|
| 176 |
+
- `node_influence`: Valore massimo dal CSV
|
| 177 |
+
- `csv_ctx_idx`: Contesto token dove node_influence e massima
|
| 178 |
+
|
| 179 |
+
**Coverage Analysis**:
|
| 180 |
+
- Features Coverage: % features (nel JSON) che si attivano (>0) su almeno un probe prompt
|
| 181 |
+
- Importance Coverage: % importanza causale coperta dalle features attive
|
| 182 |
+
|
| 183 |
+
---
|
| 184 |
+
|
| 185 |
+
### 02 - Node Grouping
|
| 186 |
+
|
| 187 |
+
**Classifica e nomina supernodi per interpretazione del grafo**
|
| 188 |
+
|
| 189 |
+
#### Funzionalita
|
| 190 |
+
|
| 191 |
+
- **Step 1 - Preparazione**: Classifica token (functional vs semantic), trova target tokens
|
| 192 |
+
- **Step 2 - Classificazione**: Assegna classi ai nodi (Semantic, Say X, Relationship)
|
| 193 |
+
- **Step 3 - Naming**: Genera nomi descrittivi per ogni supernodo
|
| 194 |
+
- **Parametri Configurabili**: Modifica soglie in tempo reale
|
| 195 |
+
- **Gestione Soglie**: Salva/carica preset di soglie
|
| 196 |
+
- **Spiegazione Classificazione**: Tool interattivo per capire perche una feature e stata classificata
|
| 197 |
+
- **Upload Neuronpedia**: Carica subgraph con supernodes per visualizzazione interattiva
|
| 198 |
+
|
| 199 |
+
#### Input Richiesti
|
| 200 |
+
|
| 201 |
+
**Obbligatori:**
|
| 202 |
+
- CSV Export da Probe Prompts (es. `*_export_ENRICHED.csv`)
|
| 203 |
+
|
| 204 |
+
**Opzionali:**
|
| 205 |
+
- JSON Attivazioni (migliora naming per Relationship)
|
| 206 |
+
- Graph JSON (per csv_ctx_idx fallback in Semantic naming)
|
| 207 |
+
- Selected Nodes JSON (per upload subgraph accurato)
|
| 208 |
+
|
| 209 |
+
#### Parametri Configurabili
|
| 210 |
+
|
| 211 |
+
**Pipeline:**
|
| 212 |
+
- Finestra ricerca target (3-15, default 7)
|
| 213 |
+
|
| 214 |
+
**Dictionary Semantic:**
|
| 215 |
+
- Peak Consistency min (0.5-1.0, default 0.8)
|
| 216 |
+
- N Distinct Peaks max (1-5, default 1)
|
| 217 |
+
|
| 218 |
+
**Say X:**
|
| 219 |
+
- Func vs Sem % min (0-100%, default 50%)
|
| 220 |
+
- Confidence F min (0.5-1.0, default 0.9)
|
| 221 |
+
- Layer min (0-30, default 7)
|
| 222 |
+
|
| 223 |
+
**Relationship:**
|
| 224 |
+
- Sparsity max (0.0-1.0, default 0.45)
|
| 225 |
+
|
| 226 |
+
**Semantic (Concept):**
|
| 227 |
+
- Layer max (0-10, default 3)
|
| 228 |
+
- Confidence S min (0.0-1.0, default 0.5)
|
| 229 |
+
- Func vs Sem % max (0-100%, default 50%)
|
| 230 |
+
|
| 231 |
+
#### Output
|
| 232 |
+
|
| 233 |
+
- CSV completo con classificazione e naming
|
| 234 |
+
- Summary JSON con statistiche e parametri usati
|
| 235 |
+
- Upload su Neuronpedia (opzionale)
|
| 236 |
+
|
| 237 |
+
#### Workflow
|
| 238 |
+
|
| 239 |
+
**Step 1: Preparazione**
|
| 240 |
+
1. Carica CSV Export (automatico o upload)
|
| 241 |
+
2. (Opzionale) Carica JSON Attivazioni
|
| 242 |
+
3. Esegui Step 1
|
| 243 |
+
4. Verifica statistiche (token funzionali vs semantici)
|
| 244 |
+
5. Esamina campione risultati
|
| 245 |
+
|
| 246 |
+
**Step 2: Classificazione**
|
| 247 |
+
1. (Opzionale) Modifica soglie nella sidebar
|
| 248 |
+
2. Esegui Step 2
|
| 249 |
+
3. Verifica distribuzione classi
|
| 250 |
+
4. Filtra per classe e esamina risultati
|
| 251 |
+
5. Usa "Spiega Classificazione Feature" per capire le decisioni
|
| 252 |
+
6. (Opzionale) Itera modificando soglie
|
| 253 |
+
|
| 254 |
+
**Step 3: Naming**
|
| 255 |
+
1. Esegui Step 3
|
| 256 |
+
2. Verifica esempi naming per classe
|
| 257 |
+
3. Analizza raggruppamento per supernode_name
|
| 258 |
+
4. Download CSV completo e Summary JSON
|
| 259 |
+
|
| 260 |
+
**Upload Neuronpedia:**
|
| 261 |
+
1. Inserisci API Key
|
| 262 |
+
2. Configura Display Name
|
| 263 |
+
3. (Opzionale) Overwrite ID per aggiornare subgraph esistente
|
| 264 |
+
4. Upload e visualizza su Neuronpedia
|
| 265 |
+
|
| 266 |
+
#### Classi di Supernodi
|
| 267 |
+
|
| 268 |
+
**Semantic (Dictionary):**
|
| 269 |
+
- Si attiva sempre sullo stesso token specifico
|
| 270 |
+
- Metriche: peak_consistency alta (>=0.8), n_distinct_peaks = 1
|
| 271 |
+
- Naming: Nome del token (es. "Texas")
|
| 272 |
+
|
| 273 |
+
**Semantic (Concept):**
|
| 274 |
+
- Si attiva su token semanticamente simili
|
| 275 |
+
- Metriche: conf_S alta (>=0.5), layer medio-basso
|
| 276 |
+
- Naming: Token con max activation (es. "city")
|
| 277 |
+
|
| 278 |
+
**Say "X":**
|
| 279 |
+
- Si attiva su token funzionali per predire il prossimo token
|
| 280 |
+
- Metriche: func_vs_sem alta (>=50%), conf_F alta (>=0.9), layer alto (>=7)
|
| 281 |
+
- Naming: "Say (X)" dove X e il target_token (es. "Say (Austin)")
|
| 282 |
+
|
| 283 |
+
**Relationship:**
|
| 284 |
+
- Collega concetti semantici multipli con attivazione diffusa
|
| 285 |
+
- Metriche: sparsity bassa (<0.45), K_sem_distinct alto
|
| 286 |
+
- Naming: "(X) related" dove X e il primo token semantico con max attivazione
|
| 287 |
+
|
| 288 |
+
#### Metriche Chiave
|
| 289 |
+
|
| 290 |
+
- `peak_consistency_main`: Quanto spesso il token principale e peak quando appare
|
| 291 |
+
- `n_distinct_peaks`: Numero di token distinti come peak
|
| 292 |
+
- `func_vs_sem_pct`: Differenza % tra max activation su functional vs semantic
|
| 293 |
+
- `conf_F / conf_S`: Frazione di peak su token funzionali/semantici
|
| 294 |
+
- `sparsity_median`: Mediana sparsity (0=diffusa, 1=concentrata)
|
| 295 |
+
- `K_sem_distinct`: Numero di token semantici distinti
|
| 296 |
+
|
| 297 |
+
---
|
| 298 |
+
|
| 299 |
+
## Struttura Dati
|
| 300 |
+
|
| 301 |
+
### File Input
|
| 302 |
+
|
| 303 |
+
**Graph JSON** (da Graph Generation):
|
| 304 |
+
```json
|
| 305 |
+
{
|
| 306 |
+
"metadata": {
|
| 307 |
+
"scan": "gemma-2-2b",
|
| 308 |
+
"prompt": "The capital of state containing Dallas is",
|
| 309 |
+
"prompt_tokens": [...]
|
| 310 |
+
},
|
| 311 |
+
"nodes": [
|
| 312 |
+
{
|
| 313 |
+
"node_id": "24_79427_7",
|
| 314 |
+
"feature_type": "cross layer transcoder",
|
| 315 |
+
"layer": 24,
|
| 316 |
+
"activation": 0.123,
|
| 317 |
+
"influence": 0.0042,
|
| 318 |
+
"ctx_idx": 7
|
| 319 |
+
}
|
| 320 |
+
],
|
| 321 |
+
"links": [...]
|
| 322 |
+
}
|
| 323 |
+
```
|
| 324 |
+
|
| 325 |
+
**CSV Export ENRICHED** (da Probe Prompts):
|
| 326 |
+
```csv
|
| 327 |
+
feature_key,layer,prompt,peak_token,peak_token_idx,activation_max,sparsity_ratio,node_influence,...
|
| 328 |
+
24_79427,24,"entity: The capital city of Texas is Austin",Austin,7,12.34,0.85,0.0042,...
|
| 329 |
+
```
|
| 330 |
+
|
| 331 |
+
**JSON Attivazioni** (da batch_get_activations.py):
|
| 332 |
+
```json
|
| 333 |
+
{
|
| 334 |
+
"model": "gemma-2-2b",
|
| 335 |
+
"source_set": "clt-hp",
|
| 336 |
+
"results": [
|
| 337 |
+
{
|
| 338 |
+
"probe_id": "p1",
|
| 339 |
+
"prompt": "...",
|
| 340 |
+
"tokens": ["<BOS>", "The", "capital", ...],
|
| 341 |
+
"activations": [
|
| 342 |
+
{
|
| 343 |
+
"source": "24-clt-hp",
|
| 344 |
+
"index": 79427,
|
| 345 |
+
"values": [0.0, 0.5, 12.34, ...],
|
| 346 |
+
"max_value": 12.34,
|
| 347 |
+
"max_value_index": 7
|
| 348 |
+
}
|
| 349 |
+
]
|
| 350 |
+
}
|
| 351 |
+
]
|
| 352 |
+
}
|
| 353 |
+
```
|
| 354 |
+
|
| 355 |
+
### File Output
|
| 356 |
+
|
| 357 |
+
**CSV Metriche Statiche** (Graph Generation):
|
| 358 |
+
```csv
|
| 359 |
+
layer,id,ctx_idx,activation,node_influence,cumulative_influence,frac_external_raw
|
| 360 |
+
24,79427,7,12.34,0.0042,0.0056,0.23
|
| 361 |
+
```
|
| 362 |
+
|
| 363 |
+
**Selected Features JSON** (Graph Generation, formato completo):
|
| 364 |
+
```json
|
| 365 |
+
{
|
| 366 |
+
"features": [
|
| 367 |
+
{"layer": 24, "index": 79427},
|
| 368 |
+
{"layer": 12, "index": 5432}
|
| 369 |
+
],
|
| 370 |
+
"node_ids": [
|
| 371 |
+
"24_79427_7",
|
| 372 |
+
"12_5432_3"
|
| 373 |
+
],
|
| 374 |
+
"metadata": {
|
| 375 |
+
"n_features": 2,
|
| 376 |
+
"n_nodes": 2,
|
| 377 |
+
"cumulative_threshold": 0.95,
|
| 378 |
+
"exported_at": "2025-10-25T12:00:00"
|
| 379 |
+
}
|
| 380 |
+
}
|
| 381 |
+
```
|
| 382 |
+
|
| 383 |
+
**Acts Compared CSV** (Probe Prompts):
|
| 384 |
+
```csv
|
| 385 |
+
feature_key,label,category,layer,activation_max,z_score,picco_su_label,cosine_similarity,...
|
| 386 |
+
24_79427,Austin,entity,24,12.34,2.5,True,0.85,...
|
| 387 |
+
```
|
| 388 |
+
|
| 389 |
+
**Node Grouping CSV** (Node Grouping):
|
| 390 |
+
```csv
|
| 391 |
+
feature_key,layer,prompt,pred_label,subtype,supernode_name,peak_token,activation_max,...
|
| 392 |
+
24_79427,24,"...",Semantic,Dictionary,Austin,Austin,12.34,...
|
| 393 |
+
```
|
| 394 |
+
|
| 395 |
+
**Node Grouping Summary JSON**:
|
| 396 |
+
```json
|
| 397 |
+
{
|
| 398 |
+
"timestamp": "2025-10-25T12:00:00",
|
| 399 |
+
"n_features": 150,
|
| 400 |
+
"n_unique_names": 45,
|
| 401 |
+
"class_distribution": {
|
| 402 |
+
"Semantic": 120,
|
| 403 |
+
"Relationship": 20,
|
| 404 |
+
"Say \"X\"": 10
|
| 405 |
+
},
|
| 406 |
+
"thresholds_used": {...},
|
| 407 |
+
"top_supernodes": [...]
|
| 408 |
+
}
|
| 409 |
+
```
|
| 410 |
+
|
| 411 |
+
---
|
| 412 |
+
|
| 413 |
+
## Workflow Completo
|
| 414 |
+
|
| 415 |
+
### Pipeline Standard
|
| 416 |
+
|
| 417 |
+
```
|
| 418 |
+
1. Graph Generation
|
| 419 |
+
↓
|
| 420 |
+
- Graph JSON
|
| 421 |
+
- CSV metriche statiche
|
| 422 |
+
- Selected Features JSON
|
| 423 |
+
↓
|
| 424 |
+
2. Probe Prompts
|
| 425 |
+
↓
|
| 426 |
+
- Genera/carica concepts
|
| 427 |
+
- Analizza attivazioni (API o JSON)
|
| 428 |
+
- Acts Compared CSV
|
| 429 |
+
↓
|
| 430 |
+
3. Node Grouping
|
| 431 |
+
↓
|
| 432 |
+
- Classifica nodi
|
| 433 |
+
- Nomina supernodi
|
| 434 |
+
- Upload su Neuronpedia (opzionale)
|
| 435 |
+
```
|
| 436 |
+
|
| 437 |
+
### Esempio Pratico
|
| 438 |
+
|
| 439 |
+
**Obiettivo**: Analizzare come il modello predice "Austin" nel prompt "The capital of state containing Dallas is"
|
| 440 |
+
|
| 441 |
+
1. **Graph Generation**:
|
| 442 |
+
- Prompt: "The capital of state containing Dallas is"
|
| 443 |
+
- Genera graph su Neuronpedia
|
| 444 |
+
- Estrai CSV metriche con node_influence
|
| 445 |
+
- Filtra features per cumulative_influence <= 0.95
|
| 446 |
+
- Esporta Selected Features JSON (50 features)
|
| 447 |
+
|
| 448 |
+
2. **Probe Prompts**:
|
| 449 |
+
- Carica Graph JSON + Selected Features JSON
|
| 450 |
+
- Genera concepts con OpenAI (Dallas, Austin, Texas, capital, state)
|
| 451 |
+
- Esegui analisi API (checkpoint ogni 10 features)
|
| 452 |
+
- Visualizza Main Chart: feature ordinate per node_influence
|
| 453 |
+
- Scarica Acts Compared CSV
|
| 454 |
+
|
| 455 |
+
3. **Node Grouping**:
|
| 456 |
+
- Carica Acts Compared CSV + JSON Attivazioni
|
| 457 |
+
- Step 1: Classifica token (functional: "is", "the" / semantic: "Dallas", "Austin")
|
| 458 |
+
- Step 2: Classifica features (90% Semantic, 10% Relationship)
|
| 459 |
+
- Step 3: Nomina supernodi ("Austin", "Dallas", "Texas", "(state) related", etc.)
|
| 460 |
+
- Upload su Neuronpedia per visualizzazione
|
| 461 |
+
|
| 462 |
+
---
|
| 463 |
+
|
| 464 |
+
## Troubleshooting
|
| 465 |
+
|
| 466 |
+
### Problemi Comuni
|
| 467 |
+
|
| 468 |
+
**"API Key non trovata"**
|
| 469 |
+
- Soluzione: Crea file `.env` con le chiavi API
|
| 470 |
+
|
| 471 |
+
**"Dati essenziali mancanti"**
|
| 472 |
+
- Soluzione: Esegui la pipeline completa in ordine (Graph Generation → Probe Prompts → Node Grouping)
|
| 473 |
+
|
| 474 |
+
**"Grafo causale non disponibile"**
|
| 475 |
+
- Soluzione: Genera Graph JSON in Step 00, poi genera CSV metriche statiche
|
| 476 |
+
|
| 477 |
+
**"ModuleNotFoundError: eda"**
|
| 478 |
+
- Soluzione: Avvia da root del progetto: `streamlit run eda/app.py`
|
| 479 |
+
|
| 480 |
+
**"Checkpoint corrotto"**
|
| 481 |
+
- Soluzione: Elimina checkpoint in `output/checkpoints/` e riavvia analisi
|
| 482 |
+
|
| 483 |
+
**"Naming Relationship non accurato"**
|
| 484 |
+
- Soluzione: Fornisci JSON attivazioni completo in Node Grouping
|
| 485 |
+
|
| 486 |
+
**"Classificazione non soddisfacente"**
|
| 487 |
+
- Soluzione: Modifica soglie in Node Grouping sidebar e riesegui Step 2
|
| 488 |
+
|
| 489 |
+
### Cache Streamlit
|
| 490 |
+
|
| 491 |
+
Se i dati sembrano obsoleti:
|
| 492 |
+
- Menu hamburger (top-right) > Clear cache
|
| 493 |
+
- Oppure Settings > Clear cache
|
| 494 |
+
- Riavvia l'app
|
| 495 |
+
|
| 496 |
+
---
|
| 497 |
+
|
| 498 |
+
## Best Practices
|
| 499 |
+
|
| 500 |
+
### Graph Generation
|
| 501 |
+
1. Inizia con thresholds di default, poi affina
|
| 502 |
+
2. Usa filtro cumulative_influence per selezionare features rilevanti
|
| 503 |
+
3. Esporta sempre Selected Features JSON (formato completo con node_ids) per Node Grouping
|
| 504 |
+
|
| 505 |
+
### Probe Prompts
|
| 506 |
+
1. Usa checkpoint per analisi lunghe (>100 features)
|
| 507 |
+
2. Abilita baseline per confronti robusti
|
| 508 |
+
3. Carica JSON pre-calcolato da Colab per analisi veloci
|
| 509 |
+
4. Filtra features con peak su BOS per grafici piu puliti
|
| 510 |
+
5. Usa tabella di verifica per debug e quality check
|
| 511 |
+
|
| 512 |
+
### Node Grouping
|
| 513 |
+
1. Fornisci sempre JSON attivazioni per naming Relationship accurato
|
| 514 |
+
2. Inizia con soglie di default, poi itera su Step 2-3
|
| 515 |
+
3. Usa "Spiega Classificazione Feature" per capire decisioni
|
| 516 |
+
4. Scarica Summary JSON per documentare parametri usati
|
| 517 |
+
5. Carica Selected Nodes JSON per upload Neuronpedia accurato
|
| 518 |
+
|
| 519 |
+
---
|
| 520 |
+
|
| 521 |
+
## Performance
|
| 522 |
+
|
| 523 |
+
**Caricamento:**
|
| 524 |
+
- Prima apertura app: < 10 secondi
|
| 525 |
+
- Cambio pagina: < 2 secondi
|
| 526 |
+
|
| 527 |
+
**Cache:**
|
| 528 |
+
- Dati caricati con `@st.cache_data`
|
| 529 |
+
- Grafici renderizzati on-demand
|
| 530 |
+
|
| 531 |
+
**Limiti:**
|
| 532 |
+
- Graph Generation: max 10000 feature nodes
|
| 533 |
+
- Probe Prompts: rate limit API 5 req/sec
|
| 534 |
+
- Node Grouping: gestisce dataset fino a 1000 features
|
| 535 |
+
|
| 536 |
+
---
|
| 537 |
+
|
| 538 |
+
## Dipendenze
|
| 539 |
+
|
| 540 |
+
**Core:**
|
| 541 |
+
- streamlit >= 1.28
|
| 542 |
+
- plotly >= 5.18
|
| 543 |
+
- pandas >= 2.0
|
| 544 |
+
- numpy >= 1.24
|
| 545 |
+
|
| 546 |
+
**API:**
|
| 547 |
+
- requests >= 2.31
|
| 548 |
+
- openai >= 1.0
|
| 549 |
+
- python-dotenv >= 1.0
|
| 550 |
+
|
| 551 |
+
**Visualization:**
|
| 552 |
+
- seaborn >= 0.12
|
| 553 |
+
- matplotlib >= 3.7
|
| 554 |
+
|
| 555 |
+
**Optional:**
|
| 556 |
+
- scipy (per test statistici in Causal Validation)
|
| 557 |
+
- scikit-learn (per ROC curves)
|
| 558 |
+
|
| 559 |
+
---
|
| 560 |
+
|
| 561 |
+
## Riferimenti
|
| 562 |
+
|
| 563 |
+
### Documentazione Tecnica
|
| 564 |
+
- Graph Generation: `scripts/00_neuronpedia_graph_generation.py`
|
| 565 |
+
- Probe Prompts: `scripts/01_probe_prompts.py`
|
| 566 |
+
- Node Grouping: `scripts/02_node_grouping.py`
|
| 567 |
+
- Causal Utils: `scripts/causal_utils.py`
|
| 568 |
+
|
| 569 |
+
### Guide
|
| 570 |
+
- Quick Start: `QUICK_START_STREAMLIT.md`
|
| 571 |
+
- Neuronpedia Export: `docs/NEURONPEDIA_EXPORT_GUIDE.md`
|
| 572 |
+
- Probe Prompts: `docs/PROBE_PROMPTS_QUICKSTART.md`
|
| 573 |
+
- Node Grouping: `eda/pages/README_NODE_GROUPING.md`
|
| 574 |
+
|
| 575 |
+
### Utilities
|
| 576 |
+
- Graph Visualization: `eda/utils/graph_visualization.py`
|
| 577 |
+
- Data Loader: `eda/utils/data_loader.py`
|
| 578 |
+
- Plots: `eda/utils/plots.py`
|
| 579 |
+
|
| 580 |
+
---
|
| 581 |
+
|
| 582 |
+
## Sviluppo
|
| 583 |
+
|
| 584 |
+
### Struttura Codice
|
| 585 |
+
|
| 586 |
+
```
|
| 587 |
+
eda/
|
| 588 |
+
├── app.py # Entry point
|
| 589 |
+
├── pages/ # Pagine Streamlit
|
| 590 |
+
│ ├── 00_Graph_Generation.py
|
| 591 |
+
│ ├── 01_Probe_Prompts.py
|
| 592 |
+
│ ├── 02_Node_Grouping.py
|
| 593 |
+
│ └── README_NODE_GROUPING.md
|
| 594 |
+
├── utils/ # Utilities
|
| 595 |
+
│ └── graph_visualization.py
|
| 596 |
+
└── README.md # Questa guida
|
| 597 |
+
```
|
| 598 |
+
|
| 599 |
+
### Modifiche
|
| 600 |
+
|
| 601 |
+
Per modificare l'app:
|
| 602 |
+
1. Modifica file in `eda/`
|
| 603 |
+
2. Streamlit rileva automaticamente cambiamenti
|
| 604 |
+
3. Testa con dati reali da `output/`
|
| 605 |
+
|
| 606 |
+
---
|
| 607 |
+
|
| 608 |
+
## Supporto
|
| 609 |
+
|
| 610 |
+
Per domande o problemi:
|
| 611 |
+
1. Consulta questa guida
|
| 612 |
+
2. Leggi la documentazione tecnica in `docs/`
|
| 613 |
+
3. Esamina gli script di backend in `scripts/`
|
| 614 |
+
4. Controlla i test in `tests/`
|
| 615 |
+
|
| 616 |
+
---
|
| 617 |
+
|
| 618 |
+
**Autore**: Sistema automatizzato
|
| 619 |
+
**Licenza**: Vedi LICENSE
|
| 620 |
+
**Repository**: attribution-graph-probing
|
| 621 |
+
|
| 622 |
+
**Buon lavoro con Attribution Graph Probing!** 🔬🌐🔍
|
eda/__init__.py
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""EDA app for supernode labelling pipeline"""
|
| 2 |
+
__version__ = "1.0.0"
|
| 3 |
+
|
eda/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (234 Bytes). View file
|
|
|
eda/app.py
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Main Streamlit App for Circuit Tracer + Probe Rover
|
| 3 |
+
Research Project: Automating attribution graph analysis through probe prompting
|
| 4 |
+
"""
|
| 5 |
+
import sys
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
# Add parent directory to path for imports
|
| 9 |
+
parent_dir = Path(__file__).parent.parent
|
| 10 |
+
if str(parent_dir) not in sys.path:
|
| 11 |
+
sys.path.insert(0, str(parent_dir))
|
| 12 |
+
|
| 13 |
+
import streamlit as st
|
| 14 |
+
|
| 15 |
+
# Main page configuration
|
| 16 |
+
st.set_page_config(
|
| 17 |
+
page_title="Automating Attribution Graph Analysis",
|
| 18 |
+
page_icon="🔬",
|
| 19 |
+
layout="wide",
|
| 20 |
+
initial_sidebar_state="expanded"
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
# Header
|
| 24 |
+
st.title("🔬 Automating Attribution Graph Analysis")
|
| 25 |
+
st.write("**Research Project: Automated interpretation of sparse features through probe prompting**")
|
| 26 |
+
|
| 27 |
+
st.info("""
|
| 28 |
+
🚀 **Demo Mode**: Complete the entire pipeline (Step 1 → 2 → 3) in one session.
|
| 29 |
+
Files are automatically passed between steps. **Don't reload the page** or you'll lose progress!
|
| 30 |
+
""")
|
| 31 |
+
|
| 32 |
+
st.markdown("""
|
| 33 |
+
This application implements a **three-stage pipeline** for automatically analyzing and interpreting
|
| 34 |
+
attribution graphs from sparse feature models (SAE and/or CLT cross-layer transcoders):
|
| 35 |
+
|
| 36 |
+
### 🌐 Stage 1: Graph Generation
|
| 37 |
+
Generate attribution graphs on Neuronpedia to understand how sparse features contribute to model predictions.
|
| 38 |
+
Extract static metrics and select relevant features for downstream analysis.
|
| 39 |
+
|
| 40 |
+
### 🔍 Stage 2: Probe Prompting
|
| 41 |
+
Analyze feature activations on semantically related concepts using automated probe prompts.
|
| 42 |
+
Generate concepts via LLM and measure how features respond across different contexts.
|
| 43 |
+
|
| 44 |
+
### 🔗 Stage 3: Node Grouping
|
| 45 |
+
Automatically classify and name features into interpretable supernodes based on their activation patterns.
|
| 46 |
+
Group features by semantic similarity and functional role (Dictionary, Concept, Say "X", Relationship).
|
| 47 |
+
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
Use the **sidebar** to navigate between pipeline stages.
|
| 51 |
+
""")
|
| 52 |
+
|
| 53 |
+
# Output folder status
|
| 54 |
+
st.header("📁 Output Folder Status")
|
| 55 |
+
|
| 56 |
+
output_dir = parent_dir / "output"
|
| 57 |
+
if output_dir.exists():
|
| 58 |
+
# Count files by type
|
| 59 |
+
json_files = list(output_dir.glob("*.json"))
|
| 60 |
+
pt_files = list(output_dir.glob("*.pt"))
|
| 61 |
+
csv_files = list(output_dir.glob("*.csv"))
|
| 62 |
+
|
| 63 |
+
col1, col2, col3 = st.columns(3)
|
| 64 |
+
|
| 65 |
+
with col1:
|
| 66 |
+
st.metric("Graphs (.pt)", len(pt_files))
|
| 67 |
+
|
| 68 |
+
with col2:
|
| 69 |
+
st.metric("JSON Files", len(json_files))
|
| 70 |
+
|
| 71 |
+
with col3:
|
| 72 |
+
st.metric("CSV Exports", len(csv_files))
|
| 73 |
+
|
| 74 |
+
st.success(f"✅ Output folder found: `{output_dir.relative_to(parent_dir)}`")
|
| 75 |
+
else:
|
| 76 |
+
st.warning("⚠️ Output folder not found. It will be created on first export.")
|
| 77 |
+
|
| 78 |
+
# Quick access to pipeline stages
|
| 79 |
+
st.header("🚀 Pipeline Stages")
|
| 80 |
+
|
| 81 |
+
col1, col2, col3 = st.columns(3)
|
| 82 |
+
|
| 83 |
+
with col1:
|
| 84 |
+
st.page_link("pages/00_Graph_Generation.py", label="Stage 1: Graph Generation", icon="🌐")
|
| 85 |
+
st.caption("Generate attribution graphs and extract features from Neuronpedia")
|
| 86 |
+
|
| 87 |
+
with col2:
|
| 88 |
+
st.page_link("pages/01_Probe_Prompts.py", label="Stage 2: Probe Prompts", icon="🔍")
|
| 89 |
+
st.caption("Analyze feature activations on semantic concepts via API")
|
| 90 |
+
|
| 91 |
+
with col3:
|
| 92 |
+
st.page_link("pages/02_Node_Grouping.py", label="Stage 3: Node Grouping", icon="🔗")
|
| 93 |
+
st.caption("Classify and name supernodes for interpretability")
|
| 94 |
+
|
| 95 |
+
# Project info
|
| 96 |
+
st.sidebar.header("ℹ️ About")
|
| 97 |
+
st.sidebar.write("""
|
| 98 |
+
|
| 99 |
+
**Documentation:**
|
| 100 |
+
- Full guide: `eda/README.md`
|
| 101 |
+
|
| 102 |
+
""")
|
| 103 |
+
|
| 104 |
+
st.sidebar.write("---")
|
| 105 |
+
st.sidebar.caption("Version: 2.0.0-clean | Pipeline v2")
|
| 106 |
+
st.sidebar.caption("🔬 Automated SAE Feature Interpretation")
|
| 107 |
+
|
eda/components/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Reusable components"""
|
| 2 |
+
|
eda/components/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (195 Bytes). View file
|
|
|
eda/components/__pycache__/feature_panel.cpython-313.pyc
ADDED
|
Binary file (8.96 kB). View file
|
|
|
eda/components/__pycache__/pipeline_progress.cpython-313.pyc
ADDED
|
Binary file (10.1 kB). View file
|
|
|
eda/components/__pycache__/supernode_panel.cpython-313.pyc
ADDED
|
Binary file (10.8 kB). View file
|
|
|
eda/config/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Configuration modules"""
|
| 2 |
+
|
eda/config/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (193 Bytes). View file
|
|
|
eda/config/__pycache__/defaults.cpython-313.pyc
ADDED
|
Binary file (1.46 kB). View file
|
|
|
eda/config/defaults.py
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Configurazione default per parametri slider e range"""
|
| 2 |
+
|
| 3 |
+
# Range parametri Fase 2 (crescita supernodi)
|
| 4 |
+
PHASE2_DEFAULTS = {
|
| 5 |
+
'causal_weight': 0.60, # Peso compatibilità causale (0.4-0.8)
|
| 6 |
+
'tau_edge_strong': 0.05, # Soglia edge forti (0.02-0.10)
|
| 7 |
+
'tau_edge_bootstrap': 0.03, # Soglia bootstrap (0.01-0.05)
|
| 8 |
+
'bootstrap_iterations': 3, # Iterazioni bootstrap (0-5)
|
| 9 |
+
'threshold_bootstrap': 0.30, # Soglia accettazione bootstrap (0.1-0.5)
|
| 10 |
+
'threshold_normal': 0.45, # Soglia accettazione normale (0.3-0.7)
|
| 11 |
+
'min_coherence': 0.50, # Coerenza minima (0.3-0.8)
|
| 12 |
+
'max_iterations': 20, # Iterazioni max (5-30)
|
| 13 |
+
'max_seeds': 50, # Numero max seed (5-50)
|
| 14 |
+
'diversify': True, # Diversificazione layer/position
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
# Range parametri Fase 3 (clustering residui)
|
| 18 |
+
PHASE3_DEFAULTS = {
|
| 19 |
+
'min_cluster_size': 3, # Minimo membri cluster (2-10)
|
| 20 |
+
'jaccard_merge_threshold': 0.70, # Soglia merge Jaccard (0.5-0.9)
|
| 21 |
+
'min_frequency_ratio': 0.02, # Ratio token semantici (0.01-0.05)
|
| 22 |
+
'min_frequency_absolute': 3, # Minimo assoluto token
|
| 23 |
+
'layer_group_span': 3, # Span gruppi layer (2-5)
|
| 24 |
+
'node_inf_high': 0.10, # Soglia node_influence HIGH (0.05-0.2)
|
| 25 |
+
'node_inf_med': 0.01, # Soglia node_influence MED (0.005-0.05)
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
# Parametri generali
|
| 29 |
+
GENERAL_DEFAULTS = {
|
| 30 |
+
'use_causal_graph': True, # Usa grafo causale se disponibile
|
| 31 |
+
'archetype_percentile': 75, # Percentile archetipi (75-90)
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
# Paths output
|
| 35 |
+
OUTPUT_PATHS = {
|
| 36 |
+
'personalities': 'output/feature_personalities_corrected.json',
|
| 37 |
+
'archetypes': 'output/narrative_archetypes.json',
|
| 38 |
+
'cicciotti': 'output/cicciotti_supernodes.json',
|
| 39 |
+
'validation': 'output/cicciotti_validation.json',
|
| 40 |
+
'final': 'output/final_anthropological_optimized.json',
|
| 41 |
+
'thresholds': 'output/robust_thresholds.json',
|
| 42 |
+
'static_metrics': 'output/graph_feature_static_metrics (1).csv',
|
| 43 |
+
'acts': 'output/acts_compared.csv',
|
| 44 |
+
'graph': 'output/example_graph.pt',
|
| 45 |
+
'labels': 'output/comprehensive_supernode_labels.json',
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
# Export paths
|
| 49 |
+
EXPORT_DIR = 'eda/exports'
|
| 50 |
+
|
eda/exports/.gitkeep
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Export directory for user-generated files
|
| 2 |
+
|
eda/output/.pipeline_state.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"current_run_id": "run_20251030_113048",
|
| 3 |
+
"last_updated": "2025-10-30T18:03:36.377401",
|
| 4 |
+
"steps": {
|
| 5 |
+
"step1_graph": {
|
| 6 |
+
"completed": true,
|
| 7 |
+
"timestamp": "2025-10-30T18:03:36.376920",
|
| 8 |
+
"files": {
|
| 9 |
+
"graph": "st1_graph_test-the-capital_20251030-180336.json"
|
| 10 |
+
}
|
| 11 |
+
},
|
| 12 |
+
"step2_probe": {
|
| 13 |
+
"completed": false,
|
| 14 |
+
"timestamp": null,
|
| 15 |
+
"files": {}
|
| 16 |
+
},
|
| 17 |
+
"step3_grouping": {
|
| 18 |
+
"completed": false,
|
| 19 |
+
"timestamp": null,
|
| 20 |
+
"files": {}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
}
|
eda/output/graph_data/st1_graph_test-the-capital_20251030-180336.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/st1_graph_the-capital-of_20251030-113048.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/test-4-the-20251030-181150.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/test2-the-capital-20251030-180548.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/test3-the-capital-20251030-180625.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/test5-the-capital-20251030-181433.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/output/graph_data/test6-the-capital-20251030-181857.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/pages/00_Graph_Generation.py
ADDED
|
@@ -0,0 +1,801 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Page 0 - Graph Generation: Generate Attribution Graphs on Neuronpedia"""
|
| 2 |
+
import sys
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
# Add parent directory to path
|
| 6 |
+
parent_dir = Path(__file__).parent.parent.parent
|
| 7 |
+
if str(parent_dir) not in sys.path:
|
| 8 |
+
sys.path.insert(0, str(parent_dir))
|
| 9 |
+
|
| 10 |
+
import streamlit as st
|
| 11 |
+
import json
|
| 12 |
+
import os
|
| 13 |
+
from datetime import datetime
|
| 14 |
+
|
| 15 |
+
# Try to import PipelineState (optional - won't break if missing)
|
| 16 |
+
try:
|
| 17 |
+
from eda.utils.pipeline_state import PipelineState
|
| 18 |
+
PIPELINE_STATE_AVAILABLE = True
|
| 19 |
+
except ImportError:
|
| 20 |
+
PIPELINE_STATE_AVAILABLE = False
|
| 21 |
+
|
| 22 |
+
# Import graph generation functions
|
| 23 |
+
try:
|
| 24 |
+
from scripts.neuronpedia_graph_generation import (
|
| 25 |
+
generate_attribution_graph,
|
| 26 |
+
get_graph_stats,
|
| 27 |
+
load_api_key,
|
| 28 |
+
extract_static_metrics_from_json
|
| 29 |
+
)
|
| 30 |
+
except ImportError:
|
| 31 |
+
# Fallback if module is not directly importable
|
| 32 |
+
import importlib.util
|
| 33 |
+
script_path = parent_dir / "scripts" / "00_neuronpedia_graph_generation.py"
|
| 34 |
+
spec = importlib.util.spec_from_file_location("neuronpedia_graph_generation", script_path)
|
| 35 |
+
graph_gen = importlib.util.module_from_spec(spec)
|
| 36 |
+
spec.loader.exec_module(graph_gen)
|
| 37 |
+
generate_attribution_graph = graph_gen.generate_attribution_graph
|
| 38 |
+
get_graph_stats = graph_gen.get_graph_stats
|
| 39 |
+
load_api_key = graph_gen.load_api_key
|
| 40 |
+
extract_static_metrics_from_json = graph_gen.extract_static_metrics_from_json
|
| 41 |
+
|
| 42 |
+
st.set_page_config(page_title="Graph Generation", page_icon="🌐", layout="wide")
|
| 43 |
+
|
| 44 |
+
st.title("🌐 Attribution Graph Generation")
|
| 45 |
+
|
| 46 |
+
st.info("""
|
| 47 |
+
1. **Generate a new attribution graph on Neuronpedia** to analyze how the model predicts the next token. \n
|
| 48 |
+
2. **Analyze the graph** to understand the contribution of each feature.\n
|
| 49 |
+
3. **Filter Features by Cumulative Influence Coverage** for downstream analysis.
|
| 50 |
+
""")
|
| 51 |
+
|
| 52 |
+
# ===== SIDEBAR: CONFIGURATION =====
|
| 53 |
+
|
| 54 |
+
st.sidebar.header("Configuration")
|
| 55 |
+
|
| 56 |
+
# Load API key
|
| 57 |
+
api_key = load_api_key()
|
| 58 |
+
|
| 59 |
+
if not api_key:
|
| 60 |
+
st.sidebar.error("API Key not found!")
|
| 61 |
+
st.error("""
|
| 62 |
+
**Neuronpedia API Key Required!**
|
| 63 |
+
|
| 64 |
+
1. Obtain an API key from [Neuronpedia](https://www.neuronpedia.org/)
|
| 65 |
+
2. Add to `.env` file in project root:
|
| 66 |
+
```
|
| 67 |
+
NEURONPEDIA_API_KEY='your-key-here'
|
| 68 |
+
```
|
| 69 |
+
3. Or set the environment variable:
|
| 70 |
+
```
|
| 71 |
+
export NEURONPEDIA_API_KEY='your-key-here'
|
| 72 |
+
```
|
| 73 |
+
""")
|
| 74 |
+
st.stop()
|
| 75 |
+
|
| 76 |
+
st.sidebar.success(f"API Key loaded ({len(api_key)} characters)")
|
| 77 |
+
|
| 78 |
+
# ===== SECTION: GENERATE NEW GRAPH =====
|
| 79 |
+
|
| 80 |
+
st.header("🌐 Generate New Attribution Graph")
|
| 81 |
+
|
| 82 |
+
# INPUT PROMPT
|
| 83 |
+
st.subheader("1️⃣ Prompt Configuration")
|
| 84 |
+
|
| 85 |
+
prompt = st.text_area(
|
| 86 |
+
"Prompt to analyze",
|
| 87 |
+
value="The capital of state containing Dallas is",
|
| 88 |
+
height=100,
|
| 89 |
+
help="Enter the prompt to analyze. The model will try to predict the next token."
|
| 90 |
+
)
|
| 91 |
+
|
| 92 |
+
# GRAPH PARAMETERS
|
| 93 |
+
st.subheader("Graph Parameters")
|
| 94 |
+
|
| 95 |
+
with st.expander("Advanced configuration", expanded=False):
|
| 96 |
+
col1, col2 = st.columns(2)
|
| 97 |
+
|
| 98 |
+
with col1:
|
| 99 |
+
st.write("**Model & Source Set**")
|
| 100 |
+
|
| 101 |
+
model_id = st.selectbox(
|
| 102 |
+
"Model ID",
|
| 103 |
+
["gemma-2-2b", "gpt2-small", "gemma-2-9b"],
|
| 104 |
+
help="Model to analyze"
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
source_set_name = st.text_input(
|
| 108 |
+
"Source Set Name",
|
| 109 |
+
value="clt-hp", #"gemmascope-transcoder-16k",
|
| 110 |
+
help="Name of the SAE source set to use"
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
max_feature_nodes = st.number_input(
|
| 114 |
+
"Max Feature Nodes",
|
| 115 |
+
min_value=100,
|
| 116 |
+
max_value=10000,
|
| 117 |
+
value=5000,
|
| 118 |
+
step=100,
|
| 119 |
+
help="Maximum number of feature nodes to include"
|
| 120 |
+
)
|
| 121 |
+
|
| 122 |
+
with col2:
|
| 123 |
+
st.write("**Thresholds**")
|
| 124 |
+
|
| 125 |
+
node_threshold = st.slider(
|
| 126 |
+
"Node Threshold",
|
| 127 |
+
min_value=0.0,
|
| 128 |
+
max_value=1.0,
|
| 129 |
+
value=0.8,
|
| 130 |
+
step=0.05,
|
| 131 |
+
help="Minimum importance threshold to include a node"
|
| 132 |
+
)
|
| 133 |
+
|
| 134 |
+
edge_threshold = st.slider(
|
| 135 |
+
"Edge Threshold",
|
| 136 |
+
min_value=0.0,
|
| 137 |
+
max_value=1.0,
|
| 138 |
+
value=0.85,
|
| 139 |
+
step=0.05,
|
| 140 |
+
help="Minimum importance threshold to include an edge"
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
+
max_n_logits = st.number_input(
|
| 144 |
+
"Max N Logits",
|
| 145 |
+
min_value=1,
|
| 146 |
+
max_value=50,
|
| 147 |
+
value=10,
|
| 148 |
+
step=1,
|
| 149 |
+
help="Maximum number of logits to consider"
|
| 150 |
+
)
|
| 151 |
+
|
| 152 |
+
desired_logit_prob = st.slider(
|
| 153 |
+
"Desired Logit Probability",
|
| 154 |
+
min_value=0.5,
|
| 155 |
+
max_value=0.99,
|
| 156 |
+
value=0.95,
|
| 157 |
+
step=0.01,
|
| 158 |
+
help="Desired cumulative probability for logits"
|
| 159 |
+
)
|
| 160 |
+
|
| 161 |
+
slug = st.text_input(
|
| 162 |
+
"Custom slug (optional)",
|
| 163 |
+
value="",
|
| 164 |
+
help="If empty, will be generated automatically"
|
| 165 |
+
)
|
| 166 |
+
|
| 167 |
+
# GENERATION
|
| 168 |
+
st.subheader("Generation")
|
| 169 |
+
|
| 170 |
+
col1, col2 = st.columns([1, 2])
|
| 171 |
+
|
| 172 |
+
with col1:
|
| 173 |
+
generate_button = st.button("🌐 Generate Graph", type="primary", use_container_width=True)
|
| 174 |
+
with col2:
|
| 175 |
+
save_locally = st.checkbox("Save locally", value=True)
|
| 176 |
+
|
| 177 |
+
# State
|
| 178 |
+
if 'generation_result' not in st.session_state:
|
| 179 |
+
st.session_state.generation_result = None
|
| 180 |
+
if 'static_metrics_df' not in st.session_state:
|
| 181 |
+
st.session_state.static_metrics_df = None
|
| 182 |
+
if 'extracted_graph_data' not in st.session_state:
|
| 183 |
+
st.session_state.extracted_graph_data = None
|
| 184 |
+
if 'extracted_csv_df' not in st.session_state:
|
| 185 |
+
st.session_state.extracted_csv_df = None
|
| 186 |
+
|
| 187 |
+
if generate_button:
|
| 188 |
+
if not prompt.strip():
|
| 189 |
+
st.error("Enter a valid prompt!")
|
| 190 |
+
st.stop()
|
| 191 |
+
|
| 192 |
+
progress_bar = st.progress(0)
|
| 193 |
+
status_text = st.empty()
|
| 194 |
+
|
| 195 |
+
try:
|
| 196 |
+
status_text.text("Preparing...")
|
| 197 |
+
progress_bar.progress(10)
|
| 198 |
+
|
| 199 |
+
status_text.text("Sending request to Neuronpedia...")
|
| 200 |
+
progress_bar.progress(30)
|
| 201 |
+
|
| 202 |
+
result = generate_attribution_graph(
|
| 203 |
+
prompt=prompt,
|
| 204 |
+
api_key=api_key,
|
| 205 |
+
model_id=model_id,
|
| 206 |
+
source_set_name=source_set_name,
|
| 207 |
+
slug=slug if slug.strip() else None,
|
| 208 |
+
max_n_logits=max_n_logits,
|
| 209 |
+
desired_logit_prob=desired_logit_prob,
|
| 210 |
+
node_threshold=node_threshold,
|
| 211 |
+
edge_threshold=edge_threshold,
|
| 212 |
+
max_feature_nodes=max_feature_nodes,
|
| 213 |
+
save_locally=save_locally,
|
| 214 |
+
verbose=False
|
| 215 |
+
)
|
| 216 |
+
|
| 217 |
+
progress_bar.progress(100)
|
| 218 |
+
status_text.empty()
|
| 219 |
+
progress_bar.empty()
|
| 220 |
+
|
| 221 |
+
# Add generation parameters to result for later use
|
| 222 |
+
if result['success']:
|
| 223 |
+
result['source_set_name'] = source_set_name
|
| 224 |
+
result['node_threshold'] = node_threshold
|
| 225 |
+
result['desired_logit_prob'] = desired_logit_prob
|
| 226 |
+
|
| 227 |
+
# Rename file to new format if saved locally (BEFORE saving to session_state)
|
| 228 |
+
if result['success'] and result.get('local_path') and save_locally and PIPELINE_STATE_AVAILABLE:
|
| 229 |
+
old_path = Path(result['local_path'])
|
| 230 |
+
if old_path.exists():
|
| 231 |
+
# Generate new filename with st1_ prefix
|
| 232 |
+
new_filename = PipelineState.generate_filename(
|
| 233 |
+
step=1,
|
| 234 |
+
file_type='graph',
|
| 235 |
+
prompt=prompt
|
| 236 |
+
)
|
| 237 |
+
new_path = old_path.parent / new_filename
|
| 238 |
+
|
| 239 |
+
# Rename file
|
| 240 |
+
old_path.rename(new_path)
|
| 241 |
+
|
| 242 |
+
# Update result with absolute path (AFTER rename)
|
| 243 |
+
result['local_path'] = str(new_path.resolve())
|
| 244 |
+
result['renamed_to_new_format'] = True
|
| 245 |
+
|
| 246 |
+
# Save result to session_state (with updated path)
|
| 247 |
+
st.session_state.generation_result = result
|
| 248 |
+
|
| 249 |
+
# Save Graph JSON to pipeline session_state for auto-loading in next steps
|
| 250 |
+
if result['success'] and result.get('local_path'):
|
| 251 |
+
try:
|
| 252 |
+
with open(result['local_path'], 'r', encoding='utf-8') as f:
|
| 253 |
+
graph_data = json.load(f)
|
| 254 |
+
|
| 255 |
+
st.session_state['pipeline_graph_json'] = {
|
| 256 |
+
'data': graph_data,
|
| 257 |
+
'filename': Path(result['local_path']).name,
|
| 258 |
+
'timestamp': datetime.now().isoformat()
|
| 259 |
+
}
|
| 260 |
+
except Exception as e:
|
| 261 |
+
# Don't break the flow if saving to pipeline state fails
|
| 262 |
+
pass
|
| 263 |
+
|
| 264 |
+
# Build Neuronpedia URL
|
| 265 |
+
if result['success']:
|
| 266 |
+
neuronpedia_url = (
|
| 267 |
+
f"https://www.neuronpedia.org/{result.get('model_id', 'gemma-2-2b')}/graph"
|
| 268 |
+
f"?sourceSet={result.get('source_set_name', 'clt-hp')}"
|
| 269 |
+
f"&slug={result.get('slug', '')}"
|
| 270 |
+
f"&pruningThreshold={result.get('node_threshold', 0.8)}"
|
| 271 |
+
f"&densityThreshold={result.get('desired_logit_prob', 0.95)}"
|
| 272 |
+
)
|
| 273 |
+
|
| 274 |
+
# Get the filename for display
|
| 275 |
+
if result.get('local_path'):
|
| 276 |
+
filename = Path(result['local_path']).name
|
| 277 |
+
st.success(f"✅ Graph generated successfully: `{filename}`\n\n" f"[**Open Graph on Neuronpedia**]({neuronpedia_url})")
|
| 278 |
+
|
| 279 |
+
# Auto-download the generated graph JSON
|
| 280 |
+
try:
|
| 281 |
+
import streamlit.components.v1 as components
|
| 282 |
+
import base64
|
| 283 |
+
|
| 284 |
+
with open(result['local_path'], 'r', encoding='utf-8') as f:
|
| 285 |
+
graph_json_content = f.read()
|
| 286 |
+
|
| 287 |
+
# Encode to base64 for JavaScript
|
| 288 |
+
b64 = base64.b64encode(graph_json_content.encode()).decode()
|
| 289 |
+
|
| 290 |
+
# Auto-download with JavaScript
|
| 291 |
+
html = f"""
|
| 292 |
+
<script>
|
| 293 |
+
function downloadFile() {{
|
| 294 |
+
const link = document.createElement('a');
|
| 295 |
+
link.href = 'data:application/json;base64,{b64}';
|
| 296 |
+
link.download = '{filename}';
|
| 297 |
+
document.body.appendChild(link);
|
| 298 |
+
link.click();
|
| 299 |
+
document.body.removeChild(link);
|
| 300 |
+
}}
|
| 301 |
+
// Trigger download after a short delay
|
| 302 |
+
setTimeout(downloadFile, 100);
|
| 303 |
+
</script>
|
| 304 |
+
"""
|
| 305 |
+
components.html(html, height=50)
|
| 306 |
+
|
| 307 |
+
except Exception as e:
|
| 308 |
+
st.warning(f"⚠️ Could not prepare auto-download: {e}")
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
except Exception as e:
|
| 312 |
+
progress_bar.empty()
|
| 313 |
+
status_text.empty()
|
| 314 |
+
st.error(f"Unexpected error: {str(e)}")
|
| 315 |
+
with st.expander("Details"):
|
| 316 |
+
import traceback
|
| 317 |
+
st.code(traceback.format_exc())
|
| 318 |
+
|
| 319 |
+
st.markdown("---")
|
| 320 |
+
|
| 321 |
+
# ===== SECTION: ANALYZE GRAPH =====
|
| 322 |
+
|
| 323 |
+
st.subheader("2️⃣ Analyze Graph")
|
| 324 |
+
|
| 325 |
+
# Check if we just generated a graph
|
| 326 |
+
just_generated = st.session_state.get('generation_result') and st.session_state.generation_result.get('success')
|
| 327 |
+
generated_path = st.session_state.generation_result.get('local_path') if just_generated else None
|
| 328 |
+
|
| 329 |
+
if just_generated and generated_path:
|
| 330 |
+
# Auto-select the just-generated graph
|
| 331 |
+
from pathlib import Path as PathLib
|
| 332 |
+
|
| 333 |
+
# Convert to Path and handle both absolute and relative paths
|
| 334 |
+
gen_path = PathLib(generated_path)
|
| 335 |
+
if gen_path.is_absolute():
|
| 336 |
+
# Absolute path - make it relative to parent_dir
|
| 337 |
+
selected_json = str(gen_path.relative_to(parent_dir))
|
| 338 |
+
else:
|
| 339 |
+
# Already relative - use as is
|
| 340 |
+
selected_json = str(gen_path).replace('\\', '/')
|
| 341 |
+
|
| 342 |
+
st.info(f"📊 **Ready to analyze**: `{gen_path.name}` (just generated)")
|
| 343 |
+
|
| 344 |
+
# Option to select a different file
|
| 345 |
+
with st.expander("📁 Select a different graph file", expanded=False):
|
| 346 |
+
json_dir = parent_dir / "output" / "graph_data"
|
| 347 |
+
if json_dir.exists():
|
| 348 |
+
json_files = sorted(json_dir.glob("*.json"), key=lambda x: x.stat().st_mtime, reverse=True)
|
| 349 |
+
if json_files:
|
| 350 |
+
json_options = [str(f.relative_to(parent_dir)) for f in json_files]
|
| 351 |
+
# Find index of generated file
|
| 352 |
+
default_idx = 0
|
| 353 |
+
try:
|
| 354 |
+
default_idx = json_options.index(selected_json)
|
| 355 |
+
except ValueError:
|
| 356 |
+
pass
|
| 357 |
+
|
| 358 |
+
selected_json_alt = st.selectbox(
|
| 359 |
+
"Select JSON file",
|
| 360 |
+
options=json_options,
|
| 361 |
+
index=default_idx,
|
| 362 |
+
key="alt_json_select",
|
| 363 |
+
help="JSON files sorted by date (most recent first)"
|
| 364 |
+
)
|
| 365 |
+
if st.button("Use this file instead"):
|
| 366 |
+
selected_json = selected_json_alt
|
| 367 |
+
st.rerun()
|
| 368 |
+
else:
|
| 369 |
+
# Normal file selection (no graph just generated)
|
| 370 |
+
st.write("""
|
| 371 |
+
Extract static metrics (`node_influence`, `cumulative_influence`, `frac_external_raw`) from an existing graph.
|
| 372 |
+
""")
|
| 373 |
+
|
| 374 |
+
json_dir = parent_dir / "output" / "graph_data"
|
| 375 |
+
if json_dir.exists():
|
| 376 |
+
json_files = sorted(json_dir.glob("*.json"), key=lambda x: x.stat().st_mtime, reverse=True)
|
| 377 |
+
|
| 378 |
+
if json_files:
|
| 379 |
+
# Use relative paths for display
|
| 380 |
+
json_options = [str(f.relative_to(parent_dir)) for f in json_files]
|
| 381 |
+
selected_json = st.selectbox(
|
| 382 |
+
"Select JSON file",
|
| 383 |
+
options=json_options,
|
| 384 |
+
help="JSON files sorted by date (most recent first)"
|
| 385 |
+
)
|
| 386 |
+
else:
|
| 387 |
+
st.warning("No JSON files found in `output/graph_data/`")
|
| 388 |
+
selected_json = None
|
| 389 |
+
else:
|
| 390 |
+
st.warning("Directory `output/graph_data/` not found")
|
| 391 |
+
selected_json = None
|
| 392 |
+
|
| 393 |
+
# Show file info and analysis button if we have a selected file
|
| 394 |
+
if selected_json:
|
| 395 |
+
file_path = parent_dir / selected_json
|
| 396 |
+
|
| 397 |
+
# Check if file exists before accessing stats
|
| 398 |
+
if not file_path.exists():
|
| 399 |
+
st.error(f"❌ File not found: `{file_path.name}`")
|
| 400 |
+
st.warning("The file may have been moved or renamed. Please refresh the page or select another file.")
|
| 401 |
+
st.stop()
|
| 402 |
+
|
| 403 |
+
file_size = file_path.stat().st_size / 1024 / 1024
|
| 404 |
+
file_time = datetime.fromtimestamp(file_path.stat().st_mtime)
|
| 405 |
+
|
| 406 |
+
col1, col2, col3 = st.columns(3)
|
| 407 |
+
with col1:
|
| 408 |
+
st.metric("Size", f"{file_size:.2f} MB")
|
| 409 |
+
with col2:
|
| 410 |
+
st.metric("Date", file_time.strftime("%Y-%m-%d %H:%M"))
|
| 411 |
+
with col3:
|
| 412 |
+
st.metric("Name", file_path.name[:20] + "...")
|
| 413 |
+
|
| 414 |
+
# Extract button
|
| 415 |
+
button_label = "📊 Analyze This Graph" if just_generated else "📊 Analyze Graph"
|
| 416 |
+
if st.button(button_label, key="extract_existing", type="primary"):
|
| 417 |
+
try:
|
| 418 |
+
with st.spinner("Extracting metrics..."):
|
| 419 |
+
json_full_path = str(parent_dir / selected_json)
|
| 420 |
+
with open(json_full_path, 'r', encoding='utf-8') as f:
|
| 421 |
+
graph_data = json.load(f)
|
| 422 |
+
|
| 423 |
+
csv_output_path = str(parent_dir / "output" / "graph_feature_static_metrics.csv")
|
| 424 |
+
df = extract_static_metrics_from_json(
|
| 425 |
+
graph_data,
|
| 426 |
+
output_path=csv_output_path,
|
| 427 |
+
verbose=False
|
| 428 |
+
)
|
| 429 |
+
|
| 430 |
+
# Save in session_state to persist across reruns
|
| 431 |
+
st.session_state.extracted_graph_data = graph_data
|
| 432 |
+
st.session_state.extracted_csv_df = df
|
| 433 |
+
st.session_state.analysis_performed = True
|
| 434 |
+
|
| 435 |
+
st.success(f"✅ CSV generated: `{csv_output_path}`")
|
| 436 |
+
st.info("📊 Scroll down to see interactive visualizations")
|
| 437 |
+
|
| 438 |
+
except Exception as e:
|
| 439 |
+
st.error(f"❌ Error: {str(e)}")
|
| 440 |
+
|
| 441 |
+
st.markdown("---")
|
| 442 |
+
|
| 443 |
+
# ===== EXTRACTED DATA VISUALIZATION (persists across reruns) =====
|
| 444 |
+
|
| 445 |
+
if st.session_state.extracted_graph_data is not None and st.session_state.extracted_csv_df is not None:
|
| 446 |
+
graph_data = st.session_state.extracted_graph_data
|
| 447 |
+
df = st.session_state.extracted_csv_df
|
| 448 |
+
|
| 449 |
+
# Only show if analysis was performed
|
| 450 |
+
if st.session_state.get('analysis_performed', False):
|
| 451 |
+
st.header("Extracted Data Analysis")
|
| 452 |
+
|
| 453 |
+
# CSV Metrics
|
| 454 |
+
col1, col2, col3, col4, col5 = st.columns(5)
|
| 455 |
+
with col1:
|
| 456 |
+
st.metric("Features", len(df))
|
| 457 |
+
with col2:
|
| 458 |
+
st.metric("Unique Tokens", df['ctx_idx'].nunique())
|
| 459 |
+
with col3:
|
| 460 |
+
st.metric("Mean Activation", f"{df['activation'].mean():.3f}")
|
| 461 |
+
with col4:
|
| 462 |
+
# Use node_influence (marginal influence) for total sum
|
| 463 |
+
st.metric("Sum Node Infl", f"{df['node_influence'].sum():.2f}")
|
| 464 |
+
with col5:
|
| 465 |
+
st.metric("Mean Frac Ext", f"{df['frac_external_raw'].mean():.3f}")
|
| 466 |
+
|
| 467 |
+
with st.expander("View Complete Dataframe", expanded=False):
|
| 468 |
+
st.dataframe(df, use_container_width=True, height=600)
|
| 469 |
+
|
| 470 |
+
# Scatter plot: Layer vs Context Position with Influence
|
| 471 |
+
|
| 472 |
+
# Prepare data from JSON for scatter plot
|
| 473 |
+
if 'nodes' in graph_data:
|
| 474 |
+
import pandas as pd
|
| 475 |
+
import plotly.express as px
|
| 476 |
+
|
| 477 |
+
# Extract prompt_tokens from metadata to map ctx_idx -> token
|
| 478 |
+
prompt_tokens = graph_data.get('metadata', {}).get('prompt_tokens', [])
|
| 479 |
+
|
| 480 |
+
# Scatter plot visualization with filter
|
| 481 |
+
from eda.utils.graph_visualization import create_scatter_plot_with_filter
|
| 482 |
+
filtered_features = create_scatter_plot_with_filter(graph_data)
|
| 483 |
+
|
| 484 |
+
# Save filtered_features for export section
|
| 485 |
+
if filtered_features is not None and len(filtered_features) > 0:
|
| 486 |
+
st.session_state.filtered_features_export = filtered_features
|
| 487 |
+
|
| 488 |
+
# ===== RESULTS VISUALIZATION =====
|
| 489 |
+
|
| 490 |
+
if st.session_state.generation_result is not None:
|
| 491 |
+
result = st.session_state.generation_result
|
| 492 |
+
|
| 493 |
+
if result['success']:
|
| 494 |
+
st.header("Results")
|
| 495 |
+
|
| 496 |
+
# Metrics
|
| 497 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 498 |
+
with col1:
|
| 499 |
+
st.metric("Nodes", result['num_nodes'])
|
| 500 |
+
with col2:
|
| 501 |
+
st.metric("Links", result['num_links'])
|
| 502 |
+
with col3:
|
| 503 |
+
st.metric("Model", result['model_id'])
|
| 504 |
+
with col4:
|
| 505 |
+
slug_short = result['slug'][:15] + "..." if len(result['slug']) > 15 else result['slug']
|
| 506 |
+
st.metric("Slug", slug_short)
|
| 507 |
+
|
| 508 |
+
# Show CSV if available
|
| 509 |
+
if st.session_state.static_metrics_df is not None:
|
| 510 |
+
df = st.session_state.static_metrics_df
|
| 511 |
+
|
| 512 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 513 |
+
with col1:
|
| 514 |
+
st.metric("Features", len(df))
|
| 515 |
+
with col2:
|
| 516 |
+
st.metric("Sum Node Infl", f"{df['node_influence'].sum():.2f}")
|
| 517 |
+
with col3:
|
| 518 |
+
st.metric("Max Cumul", f"{df['cumulative_influence'].max():.4f}")
|
| 519 |
+
with col4:
|
| 520 |
+
st.metric("Mean Frac Ext", f"{df['frac_external_raw'].mean():.3f}")
|
| 521 |
+
|
| 522 |
+
with st.expander("Preview CSV"):
|
| 523 |
+
st.dataframe(df.head(20), use_container_width=True)
|
| 524 |
+
|
| 525 |
+
with st.expander("Distribution"):
|
| 526 |
+
try:
|
| 527 |
+
import plotly.express as px
|
| 528 |
+
|
| 529 |
+
col1, col2 = st.columns(2)
|
| 530 |
+
with col1:
|
| 531 |
+
fig = px.histogram(df, x='node_influence', nbins=50,
|
| 532 |
+
title='node_influence (marginal)')
|
| 533 |
+
st.plotly_chart(fig, use_container_width=True)
|
| 534 |
+
with col2:
|
| 535 |
+
fig = px.histogram(df, x='cumulative_influence', nbins=50,
|
| 536 |
+
title='cumulative_influence')
|
| 537 |
+
st.plotly_chart(fig, use_container_width=True)
|
| 538 |
+
except:
|
| 539 |
+
pass
|
| 540 |
+
|
| 541 |
+
csv_str = df.to_csv(index=False)
|
| 542 |
+
st.download_button(
|
| 543 |
+
"Download CSV",
|
| 544 |
+
csv_str,
|
| 545 |
+
"graph_feature_static_metrics.csv",
|
| 546 |
+
"text/csv"
|
| 547 |
+
)
|
| 548 |
+
|
| 549 |
+
|
| 550 |
+
|
| 551 |
+
# ===== SUMMARY CHARTS: COVERAGE AND STRENGTH =====
|
| 552 |
+
# Only show if analysis was performed
|
| 553 |
+
if st.session_state.get('analysis_performed', False):
|
| 554 |
+
# Data source: prefer extracted data, otherwise last generated graph
|
| 555 |
+
graph_data_for_plots = None
|
| 556 |
+
if st.session_state.get('extracted_graph_data') is not None:
|
| 557 |
+
graph_data_for_plots = st.session_state.extracted_graph_data
|
| 558 |
+
elif st.session_state.get('generation_result') is not None and st.session_state.generation_result.get('success'):
|
| 559 |
+
graph_data_for_plots = st.session_state.generation_result.get('graph_data')
|
| 560 |
+
|
| 561 |
+
if graph_data_for_plots is not None and 'nodes' in graph_data_for_plots:
|
| 562 |
+
with st.expander("Summary Charts: Coverage and Strength", expanded=False):
|
| 563 |
+
import pandas as pd
|
| 564 |
+
import plotly.express as px
|
| 565 |
+
import numpy as np
|
| 566 |
+
|
| 567 |
+
nodes_df = pd.DataFrame(graph_data_for_plots['nodes'])
|
| 568 |
+
is_feature = nodes_df['node_id'].astype(str).str[0].str.isdigit() & nodes_df['node_id'].astype(str).str.contains('_')
|
| 569 |
+
feat_nodes = nodes_df.loc[is_feature].copy()
|
| 570 |
+
|
| 571 |
+
if len(feat_nodes) == 0:
|
| 572 |
+
st.warning("No features found in current data.")
|
| 573 |
+
else:
|
| 574 |
+
# Add slider to filter (reuse same logic as create_scatter_plot_with_filter)
|
| 575 |
+
max_influence = feat_nodes['influence'].max()
|
| 576 |
+
|
| 577 |
+
st.markdown("### Filter Features by Cumulative Influence")
|
| 578 |
+
st.info(f"""
|
| 579 |
+
**Use the slider to filter the charts below** based on cumulative influence coverage (0-{max_influence:.2f}).
|
| 580 |
+
Summary charts will show only features with `influence <= threshold`.
|
| 581 |
+
""")
|
| 582 |
+
|
| 583 |
+
# Check if main slider already exists (from create_scatter_plot_with_filter)
|
| 584 |
+
# If it exists, use it, otherwise create a new one
|
| 585 |
+
slider_key = "cumulative_slider_summary"
|
| 586 |
+
if "cumulative_slider_main" in st.session_state:
|
| 587 |
+
# Reuse main slider value
|
| 588 |
+
cumulative_threshold_summary = st.session_state.cumulative_slider_main
|
| 589 |
+
st.info(f"Synchronized with main slider: threshold = {cumulative_threshold_summary:.4f}")
|
| 590 |
+
else:
|
| 591 |
+
# Create separate slider
|
| 592 |
+
cumulative_threshold_summary = st.slider(
|
| 593 |
+
"Cumulative Influence Threshold (summary charts)",
|
| 594 |
+
min_value=0.0,
|
| 595 |
+
max_value=float(max_influence),
|
| 596 |
+
value=float(max_influence),
|
| 597 |
+
step=0.01,
|
| 598 |
+
key=slider_key,
|
| 599 |
+
help=f"Keep only features with influence <= threshold. Range: 0.0 - {max_influence:.2f}"
|
| 600 |
+
)
|
| 601 |
+
|
| 602 |
+
# Apply filter
|
| 603 |
+
feat_nodes_filtered = feat_nodes[feat_nodes['influence'] <= cumulative_threshold_summary].copy()
|
| 604 |
+
|
| 605 |
+
if len(feat_nodes_filtered) == 0:
|
| 606 |
+
st.warning("No features match the current filter. Increase the threshold.")
|
| 607 |
+
else:
|
| 608 |
+
# Show filter statistics
|
| 609 |
+
col1, col2, col3 = st.columns(3)
|
| 610 |
+
with col1:
|
| 611 |
+
st.metric("Total Features", len(feat_nodes))
|
| 612 |
+
with col2:
|
| 613 |
+
st.metric("Filtered Features", len(feat_nodes_filtered))
|
| 614 |
+
with col3:
|
| 615 |
+
pct = (len(feat_nodes_filtered) / len(feat_nodes) * 100) if len(feat_nodes) > 0 else 0
|
| 616 |
+
st.metric("% Kept", f"{pct:.1f}%")
|
| 617 |
+
|
| 618 |
+
st.markdown("---")
|
| 619 |
+
|
| 620 |
+
# Calculate n_ctx and statistics per feature
|
| 621 |
+
feat_nodes_filtered['feature_key'] = feat_nodes_filtered['node_id'].str.rsplit('_', n=1).str[0]
|
| 622 |
+
cov = (
|
| 623 |
+
feat_nodes_filtered.groupby('feature_key')['ctx_idx'].nunique()
|
| 624 |
+
.rename('n_ctx').reset_index()
|
| 625 |
+
)
|
| 626 |
+
per_feat = (
|
| 627 |
+
feat_nodes_filtered.groupby('feature_key')
|
| 628 |
+
.agg(mean_influence=('influence','mean'),
|
| 629 |
+
mean_activation=('activation','mean'))
|
| 630 |
+
.reset_index()
|
| 631 |
+
)
|
| 632 |
+
per_feat_cov = per_feat.merge(cov, on='feature_key', how='left')
|
| 633 |
+
nodes_with_cov = feat_nodes_filtered.merge(cov, on='feature_key', how='left')
|
| 634 |
+
|
| 635 |
+
# Chart 1: Coverage (Histogram + ECDF)
|
| 636 |
+
st.subheader("Feature Coverage (n_ctx)")
|
| 637 |
+
c1, c2 = st.columns(2)
|
| 638 |
+
with c1:
|
| 639 |
+
fig_hist = px.histogram(cov, x='n_ctx', color_discrete_sequence=['#4C78A8'])
|
| 640 |
+
fig_hist.update_layout(title='n_ctx distribution per feature',
|
| 641 |
+
xaxis_title='Number of unique ctx_idx',
|
| 642 |
+
yaxis_title='Number of features')
|
| 643 |
+
st.plotly_chart(fig_hist, use_container_width=True)
|
| 644 |
+
with c2:
|
| 645 |
+
fig_ecdf = px.ecdf(cov, x='n_ctx', color_discrete_sequence=['#F58518'])
|
| 646 |
+
fig_ecdf.update_layout(title='n_ctx ECDF',
|
| 647 |
+
xaxis_title='Number of unique ctx_idx',
|
| 648 |
+
yaxis_title='Cumulative fraction')
|
| 649 |
+
st.plotly_chart(fig_ecdf, use_container_width=True)
|
| 650 |
+
|
| 651 |
+
# Chart 2: Strength vs Coverage (Activation vs n_ctx and Scatter mean)
|
| 652 |
+
st.subheader("Strength vs Coverage")
|
| 653 |
+
c3, c4 = st.columns(2)
|
| 654 |
+
with c3:
|
| 655 |
+
fig_violin = px.violin(nodes_with_cov, x='n_ctx', y='activation', box=True, points=False)
|
| 656 |
+
fig_violin.update_layout(title='Activation per n_ctx',
|
| 657 |
+
xaxis_title='n_ctx (feature)',
|
| 658 |
+
yaxis_title='Activation (node)')
|
| 659 |
+
st.plotly_chart(fig_violin, use_container_width=True)
|
| 660 |
+
with c4:
|
| 661 |
+
fig_scatter = px.scatter(per_feat_cov, x='mean_activation', y='mean_influence',
|
| 662 |
+
color='n_ctx', size='n_ctx', hover_data=['feature_key'],
|
| 663 |
+
color_continuous_scale='Viridis')
|
| 664 |
+
# Correlations for subtitle
|
| 665 |
+
if len(per_feat_cov) >= 2:
|
| 666 |
+
pearson = float(per_feat_cov['mean_activation'].corr(per_feat_cov['mean_influence'], method='pearson'))
|
| 667 |
+
spearman = float(per_feat_cov['mean_activation'].corr(per_feat_cov['mean_influence'], method='spearman'))
|
| 668 |
+
fig_scatter.update_layout(title=f'Mean activation vs mean influence<br>(r={pearson:.2f}, rho={spearman:.2f})')
|
| 669 |
+
else:
|
| 670 |
+
fig_scatter.update_layout(title='Mean activation vs mean influence')
|
| 671 |
+
fig_scatter.update_layout(xaxis_title='Mean activation (per feature)',
|
| 672 |
+
yaxis_title='Mean influence (per feature)')
|
| 673 |
+
st.plotly_chart(fig_scatter, use_container_width=True)
|
| 674 |
+
|
| 675 |
+
# Quick insights
|
| 676 |
+
with st.expander("Insights from charts", expanded=False):
|
| 677 |
+
# Calculate key statistics
|
| 678 |
+
top_n_ctx = cov['n_ctx'].max()
|
| 679 |
+
n_top = len(cov[cov['n_ctx'] == top_n_ctx])
|
| 680 |
+
top_features = cov[cov['n_ctx'] == top_n_ctx]['feature_key'].tolist()
|
| 681 |
+
|
| 682 |
+
st.markdown(f"""
|
| 683 |
+
**Coverage (n_ctx)**:
|
| 684 |
+
- {len(cov)} unique features in filtered dataset
|
| 685 |
+
- {n_top} features present in all {top_n_ctx} contexts
|
| 686 |
+
- Multi-context features ({top_n_ctx}): {', '.join([f'`{f}`' for f in top_features[:5]])}
|
| 687 |
+
|
| 688 |
+
**Strength vs Coverage**:
|
| 689 |
+
- Activation-influence correlation: **r={pearson:.2f}** (Pearson), **rho={spearman:.2f}** (Spearman)
|
| 690 |
+
- {"Negative correlation: features with high activation tend to have low influence" if pearson < -0.2 else "Weak or positive correlation between activation and influence"}
|
| 691 |
+
""")
|
| 692 |
+
|
| 693 |
+
# Group statistics
|
| 694 |
+
if len(nodes_with_cov) > 0:
|
| 695 |
+
g1 = nodes_with_cov[nodes_with_cov['n_ctx'] == 1]
|
| 696 |
+
g_multi = nodes_with_cov[nodes_with_cov['n_ctx'] >= 5]
|
| 697 |
+
|
| 698 |
+
if len(g1) > 0 and len(g_multi) > 0:
|
| 699 |
+
st.markdown(f"""
|
| 700 |
+
**Group comparison**:
|
| 701 |
+
- n_ctx=1: {len(g1)} nodes, mean_activation={g1['activation'].mean():.2f}, mean_influence={g1['influence'].mean():.3f}
|
| 702 |
+
- n_ctx>=5: {len(g_multi)} nodes, mean_activation={g_multi['activation'].mean():.2f}, mean_influence={g_multi['influence'].mean():.3f}
|
| 703 |
+
""")
|
| 704 |
+
|
| 705 |
+
# ===== EXPORT SELECTED FEATURES =====
|
| 706 |
+
|
| 707 |
+
if st.session_state.get('analysis_performed', False) and st.session_state.get('filtered_features_export') is not None:
|
| 708 |
+
filtered_features = st.session_state.filtered_features_export
|
| 709 |
+
|
| 710 |
+
if len(filtered_features) > 0:
|
| 711 |
+
st.markdown("---")
|
| 712 |
+
st.subheader("Export Selected Features")
|
| 713 |
+
|
| 714 |
+
# Convert dataframe to format [{"layer": X, "index": Y}, ...]
|
| 715 |
+
# Remove duplicates using set of tuples (layer, feature)
|
| 716 |
+
unique_features = {
|
| 717 |
+
(int(row['layer']), int(row['feature']))
|
| 718 |
+
for _, row in filtered_features.iterrows()
|
| 719 |
+
}
|
| 720 |
+
|
| 721 |
+
# Convert to sorted list of dicts
|
| 722 |
+
features_export = [
|
| 723 |
+
{"layer": layer, "index": feature}
|
| 724 |
+
for layer, feature in sorted(unique_features)
|
| 725 |
+
]
|
| 726 |
+
|
| 727 |
+
# Also extract selected node_ids (for subgraph upload)
|
| 728 |
+
node_ids_export = sorted(filtered_features['id'].unique().tolist())
|
| 729 |
+
|
| 730 |
+
# Create complete export with features AND node_ids
|
| 731 |
+
export_data = {
|
| 732 |
+
"features": features_export,
|
| 733 |
+
"node_ids": node_ids_export,
|
| 734 |
+
"metadata": {
|
| 735 |
+
"n_features": len(features_export),
|
| 736 |
+
"n_nodes": len(node_ids_export),
|
| 737 |
+
"cumulative_threshold": st.session_state.get('cumulative_slider_main', None),
|
| 738 |
+
"exported_at": datetime.now().isoformat()
|
| 739 |
+
}
|
| 740 |
+
}
|
| 741 |
+
|
| 742 |
+
# Statistics
|
| 743 |
+
col1, col2, col3 = st.columns(3)
|
| 744 |
+
with col1:
|
| 745 |
+
st.metric("Unique Features", len(features_export))
|
| 746 |
+
with col2:
|
| 747 |
+
st.metric("Selected Nodes", len(node_ids_export))
|
| 748 |
+
with col3:
|
| 749 |
+
st.metric("Unique Layers", len({f['layer'] for f in features_export}))
|
| 750 |
+
|
| 751 |
+
# Save to pipeline session_state for auto-loading in next steps
|
| 752 |
+
st.session_state['pipeline_selected_nodes'] = {
|
| 753 |
+
'data': export_data,
|
| 754 |
+
'filename': f"st1_feat_node_subset_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json",
|
| 755 |
+
'timestamp': datetime.now().isoformat()
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
# Download JSON (complete format)
|
| 759 |
+
st.download_button(
|
| 760 |
+
label="📥 Download Features+Nodes Subset",
|
| 761 |
+
data=json.dumps(export_data, indent=2, ensure_ascii=False),
|
| 762 |
+
file_name="selected_features_with_nodes.json",
|
| 763 |
+
mime="application/json",
|
| 764 |
+
help="Complete format with features and node_ids (for Node Grouping + Probe Prompts + batch_get_activations.py)",
|
| 765 |
+
use_container_width=True,
|
| 766 |
+
type="primary"
|
| 767 |
+
)
|
| 768 |
+
|
| 769 |
+
# LEGACY BUTTON (hidden - all tools now support complete format)
|
| 770 |
+
# with col_legacy:
|
| 771 |
+
# st.download_button(
|
| 772 |
+
# label="Download Features JSON (legacy)",
|
| 773 |
+
# data=json.dumps(features_export, indent=2, ensure_ascii=False),
|
| 774 |
+
# file_name="selected_features.json",
|
| 775 |
+
# mime="application/json",
|
| 776 |
+
# help="Legacy format (features only, compatible with batch_get_activations.py)"
|
| 777 |
+
# )
|
| 778 |
+
|
| 779 |
+
# Preview
|
| 780 |
+
with st.expander("Preview Complete Export", expanded=False):
|
| 781 |
+
st.json({
|
| 782 |
+
"features": features_export[:5],
|
| 783 |
+
"node_ids": node_ids_export[:10],
|
| 784 |
+
"metadata": export_data["metadata"]
|
| 785 |
+
})
|
| 786 |
+
|
| 787 |
+
# ===== FOOTER =====
|
| 788 |
+
|
| 789 |
+
st.sidebar.markdown("---")
|
| 790 |
+
st.sidebar.subheader("Info")
|
| 791 |
+
st.sidebar.markdown("""
|
| 792 |
+
**Attribution Graph**: visualizes how SAE features contribute to predictions.
|
| 793 |
+
|
| 794 |
+
**Elements**:
|
| 795 |
+
- Embedding nodes: input tokens
|
| 796 |
+
- Feature nodes: SAE latents
|
| 797 |
+
- Logit nodes: predicted tokens
|
| 798 |
+
""")
|
| 799 |
+
|
| 800 |
+
st.sidebar.caption("Powered by Neuronpedia API")
|
| 801 |
+
|
eda/pages/01_Probe_Prompts.py
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eda/pages/02_Node_Grouping.py
ADDED
|
@@ -0,0 +1,1320 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Page 2 - Node Grouping: Classify and name supernodes for interpretation"""
|
| 2 |
+
import sys
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
|
| 5 |
+
# Add parent directory to path
|
| 6 |
+
parent_dir = Path(__file__).parent.parent.parent
|
| 7 |
+
if str(parent_dir) not in sys.path:
|
| 8 |
+
sys.path.insert(0, str(parent_dir))
|
| 9 |
+
|
| 10 |
+
import streamlit as st
|
| 11 |
+
import pandas as pd
|
| 12 |
+
import json
|
| 13 |
+
import io
|
| 14 |
+
import os
|
| 15 |
+
from datetime import datetime
|
| 16 |
+
from dotenv import load_dotenv
|
| 17 |
+
|
| 18 |
+
# Load environment variables
|
| 19 |
+
load_dotenv()
|
| 20 |
+
|
| 21 |
+
# Import node grouping functions
|
| 22 |
+
import importlib.util
|
| 23 |
+
script_path = parent_dir / "scripts" / "02_node_grouping.py"
|
| 24 |
+
spec = importlib.util.spec_from_file_location("node_grouping", script_path)
|
| 25 |
+
node_grouping = importlib.util.module_from_spec(spec)
|
| 26 |
+
spec.loader.exec_module(node_grouping)
|
| 27 |
+
prepare_dataset = node_grouping.prepare_dataset
|
| 28 |
+
classify_nodes = node_grouping.classify_nodes
|
| 29 |
+
name_nodes = node_grouping.name_nodes
|
| 30 |
+
DEFAULT_THRESHOLDS = node_grouping.DEFAULT_THRESHOLDS
|
| 31 |
+
|
| 32 |
+
st.set_page_config(page_title="Node Grouping", page_icon="🔗", layout="wide")
|
| 33 |
+
|
| 34 |
+
st.title("🔗 Node Grouping & Classification")
|
| 35 |
+
|
| 36 |
+
st.info("""
|
| 37 |
+
**Automatically classify and name supernodes** to facilitate attribution graph interpretation.
|
| 38 |
+
|
| 39 |
+
This pipeline transforms SAE features into interpretable supernodes through 3 steps:
|
| 40 |
+
1. **Preparation**: Identify functional vs semantic tokens and find target tokens
|
| 41 |
+
2. **Classification**: Assign each feature to a class (Semantic, Say X, Relationship)
|
| 42 |
+
3. **Naming**: Generate descriptive names for each supernode
|
| 43 |
+
""")
|
| 44 |
+
|
| 45 |
+
# ===== SIDEBAR: CONFIGURATION =====
|
| 46 |
+
|
| 47 |
+
st.sidebar.header("⚙️ Configuration")
|
| 48 |
+
|
| 49 |
+
# File upload
|
| 50 |
+
st.sidebar.subheader("📁 Input Files")
|
| 51 |
+
|
| 52 |
+
uploaded_graph = st.sidebar.file_uploader(
|
| 53 |
+
"Graph JSON (required)",
|
| 54 |
+
type=["json"],
|
| 55 |
+
help="Generated in Step 1 (Graph Generation). The main graph JSON file (e.g., st1_graph_*.json)"
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
# Auto-load from pipeline if not manually uploaded
|
| 59 |
+
if uploaded_graph is None and 'pipeline_graph_json' in st.session_state:
|
| 60 |
+
st.sidebar.success(f"✅ Auto-loaded from Step 1: `{st.session_state['pipeline_graph_json']['filename']}`")
|
| 61 |
+
|
| 62 |
+
uploaded_nodes_json = st.sidebar.file_uploader(
|
| 63 |
+
"Selected Nodes JSON (required)",
|
| 64 |
+
type=["json"],
|
| 65 |
+
help="Generated in Step 1 (Graph Generation). Contains selected node_ids for subgraph upload (e.g., st1_feat_node_subset_*.json)"
|
| 66 |
+
)
|
| 67 |
+
|
| 68 |
+
# Auto-load from pipeline if not manually uploaded
|
| 69 |
+
if uploaded_nodes_json is None and 'pipeline_selected_nodes' in st.session_state:
|
| 70 |
+
st.sidebar.success(f"✅ Auto-loaded from Step 1: `{st.session_state['pipeline_selected_nodes']['filename']}`")
|
| 71 |
+
|
| 72 |
+
uploaded_json = st.sidebar.file_uploader(
|
| 73 |
+
"Activations JSON (required)",
|
| 74 |
+
type=["json"],
|
| 75 |
+
help="Generated in Step 2 (Probe Prompts). Token-by-token activation data (e.g., st2_activations_*.json or activations_dump*.json)"
|
| 76 |
+
)
|
| 77 |
+
|
| 78 |
+
# Auto-load from pipeline if not manually uploaded
|
| 79 |
+
if uploaded_json is None and 'pipeline_activations_json' in st.session_state:
|
| 80 |
+
st.sidebar.success(f"✅ Auto-loaded from Step 2: `{st.session_state['pipeline_activations_json']['filename']}`")
|
| 81 |
+
|
| 82 |
+
uploaded_csv = st.sidebar.file_uploader(
|
| 83 |
+
"Activation Analysis CSV (required)",
|
| 84 |
+
type=["csv"],
|
| 85 |
+
help="Generated in Step 2 (Probe Prompts). Enriched CSV with probe analysis results (e.g., st2_probe_metrics_*.csv or *_export_ENRICHED.csv)"
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
# Auto-load from pipeline if not manually uploaded
|
| 89 |
+
if uploaded_csv is None and 'pipeline_analysis_csv' in st.session_state:
|
| 90 |
+
st.sidebar.success(f"✅ Auto-loaded from Step 2: `{st.session_state['pipeline_analysis_csv']['filename']}`")
|
| 91 |
+
|
| 92 |
+
# Pipeline parameters
|
| 93 |
+
st.sidebar.subheader("🎛️ Pipeline Parameters")
|
| 94 |
+
|
| 95 |
+
window_size = st.sidebar.slider(
|
| 96 |
+
"Target search window",
|
| 97 |
+
min_value=3,
|
| 98 |
+
max_value=15,
|
| 99 |
+
value=7,
|
| 100 |
+
help="Maximum number of tokens to explore to find semantic targets"
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
# Token blacklist
|
| 104 |
+
st.sidebar.markdown("**🚫 Token Blacklist**")
|
| 105 |
+
blacklist_input = st.sidebar.text_area(
|
| 106 |
+
"Tokens to exclude (one per line)",
|
| 107 |
+
value=st.session_state.get('blacklist_input', ''),
|
| 108 |
+
height=100,
|
| 109 |
+
help="Tokens that should not be used as labels. If the first token with max activation is in blacklist, the system falls back to the next one. Enter one token per line (case-insensitive).",
|
| 110 |
+
key='blacklist_input'
|
| 111 |
+
)
|
| 112 |
+
|
| 113 |
+
# Parse blacklist (split by newline, strip, lowercase)
|
| 114 |
+
blacklist_tokens = set()
|
| 115 |
+
if blacklist_input.strip():
|
| 116 |
+
for line in blacklist_input.strip().split('\n'):
|
| 117 |
+
token = line.strip().lower()
|
| 118 |
+
if token:
|
| 119 |
+
blacklist_tokens.add(token)
|
| 120 |
+
|
| 121 |
+
if blacklist_tokens:
|
| 122 |
+
st.sidebar.info(f"🚫 {len(blacklist_tokens)} tokens in blacklist")
|
| 123 |
+
else:
|
| 124 |
+
st.sidebar.caption("No tokens in blacklist")
|
| 125 |
+
|
| 126 |
+
# Classification thresholds
|
| 127 |
+
st.sidebar.subheader("📊 Classification Thresholds")
|
| 128 |
+
|
| 129 |
+
# Threshold management (save/load)
|
| 130 |
+
st.sidebar.markdown("**💾 Threshold Management**")
|
| 131 |
+
|
| 132 |
+
col_save, col_load = st.sidebar.columns(2)
|
| 133 |
+
|
| 134 |
+
with col_save:
|
| 135 |
+
# Prepare current thresholds for export
|
| 136 |
+
current_thresholds = {
|
| 137 |
+
'dict_peak_consistency_min': st.session_state.get('dict_consistency', DEFAULT_THRESHOLDS['dict_peak_consistency_min']),
|
| 138 |
+
'dict_n_distinct_peaks_max': st.session_state.get('dict_n_peaks', DEFAULT_THRESHOLDS['dict_n_distinct_peaks_max']),
|
| 139 |
+
'sayx_func_vs_sem_min': st.session_state.get('sayx_func_min', DEFAULT_THRESHOLDS['sayx_func_vs_sem_min']),
|
| 140 |
+
'sayx_conf_f_min': st.session_state.get('sayx_conf_f', DEFAULT_THRESHOLDS['sayx_conf_f_min']),
|
| 141 |
+
'sayx_layer_min': st.session_state.get('sayx_layer', DEFAULT_THRESHOLDS['sayx_layer_min']),
|
| 142 |
+
'rel_sparsity_max': st.session_state.get('rel_sparsity', DEFAULT_THRESHOLDS['rel_sparsity_max']),
|
| 143 |
+
'sem_layer_max': st.session_state.get('sem_layer', DEFAULT_THRESHOLDS['sem_layer_max']),
|
| 144 |
+
'sem_conf_s_min': st.session_state.get('sem_conf_s', DEFAULT_THRESHOLDS['sem_conf_s_min']),
|
| 145 |
+
'sem_func_vs_sem_max': st.session_state.get('sem_func_vs_sem', DEFAULT_THRESHOLDS['sem_func_vs_sem_max']),
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
thresholds_json = json.dumps(current_thresholds, indent=2)
|
| 149 |
+
st.download_button(
|
| 150 |
+
label="💾 Save",
|
| 151 |
+
data=thresholds_json,
|
| 152 |
+
file_name=f"thresholds_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json",
|
| 153 |
+
mime="application/json",
|
| 154 |
+
help="Download current thresholds as JSON",
|
| 155 |
+
use_container_width=True
|
| 156 |
+
)
|
| 157 |
+
|
| 158 |
+
with col_load:
|
| 159 |
+
uploaded_thresholds = st.file_uploader(
|
| 160 |
+
"Load Thresholds",
|
| 161 |
+
type=['json'],
|
| 162 |
+
help="Load thresholds from JSON file",
|
| 163 |
+
label_visibility="collapsed",
|
| 164 |
+
key="upload_thresholds"
|
| 165 |
+
)
|
| 166 |
+
|
| 167 |
+
# Load thresholds from file if provided
|
| 168 |
+
if uploaded_thresholds is not None:
|
| 169 |
+
try:
|
| 170 |
+
uploaded_thresholds.seek(0) # Reset file pointer to beginning
|
| 171 |
+
loaded_thresholds = json.load(uploaded_thresholds)
|
| 172 |
+
|
| 173 |
+
# Validate that it contains all required keys
|
| 174 |
+
required_keys = set(DEFAULT_THRESHOLDS.keys())
|
| 175 |
+
loaded_keys = set(loaded_thresholds.keys())
|
| 176 |
+
|
| 177 |
+
if required_keys == loaded_keys:
|
| 178 |
+
# Update session state
|
| 179 |
+
st.session_state['dict_consistency'] = loaded_thresholds['dict_peak_consistency_min']
|
| 180 |
+
st.session_state['dict_n_peaks'] = loaded_thresholds['dict_n_distinct_peaks_max']
|
| 181 |
+
st.session_state['sayx_func_min'] = loaded_thresholds['sayx_func_vs_sem_min']
|
| 182 |
+
st.session_state['sayx_conf_f'] = loaded_thresholds['sayx_conf_f_min']
|
| 183 |
+
st.session_state['sayx_layer'] = loaded_thresholds['sayx_layer_min']
|
| 184 |
+
st.session_state['rel_sparsity'] = loaded_thresholds['rel_sparsity_max']
|
| 185 |
+
st.session_state['sem_layer'] = loaded_thresholds['sem_layer_max']
|
| 186 |
+
st.session_state['sem_conf_s'] = loaded_thresholds['sem_conf_s_min']
|
| 187 |
+
st.session_state['sem_func_vs_sem'] = loaded_thresholds['sem_func_vs_sem_max']
|
| 188 |
+
|
| 189 |
+
st.sidebar.success("✅ Thresholds loaded!")
|
| 190 |
+
# Remove file uploader to avoid continuous reloads
|
| 191 |
+
st.session_state['upload_thresholds'] = None
|
| 192 |
+
st.rerun()
|
| 193 |
+
else:
|
| 194 |
+
missing = required_keys - loaded_keys
|
| 195 |
+
extra = loaded_keys - required_keys
|
| 196 |
+
error_msg = []
|
| 197 |
+
if missing:
|
| 198 |
+
error_msg.append(f"Missing keys: {', '.join(missing)}")
|
| 199 |
+
if extra:
|
| 200 |
+
error_msg.append(f"Extra keys: {', '.join(extra)}")
|
| 201 |
+
st.sidebar.error(f"❌ Invalid JSON file:\n" + "\n".join(error_msg))
|
| 202 |
+
except json.JSONDecodeError as e:
|
| 203 |
+
st.sidebar.error(f"❌ JSON parsing error: {e}")
|
| 204 |
+
except Exception as e:
|
| 205 |
+
st.sidebar.error(f"❌ Error loading thresholds: {e}")
|
| 206 |
+
|
| 207 |
+
# Reset thresholds
|
| 208 |
+
if st.sidebar.button("🔄 Reset Default", help="Restore default thresholds", use_container_width=True):
|
| 209 |
+
for key in ['dict_consistency', 'dict_n_peaks', 'sayx_func_min', 'sayx_conf_f',
|
| 210 |
+
'sayx_layer', 'rel_sparsity', 'sem_layer', 'sem_conf_s', 'sem_func_vs_sem']:
|
| 211 |
+
if key in st.session_state:
|
| 212 |
+
del st.session_state[key]
|
| 213 |
+
st.sidebar.success("✅ Thresholds restored!")
|
| 214 |
+
st.rerun()
|
| 215 |
+
|
| 216 |
+
st.sidebar.markdown("---")
|
| 217 |
+
|
| 218 |
+
with st.sidebar.expander("Dictionary Semantic", expanded=False):
|
| 219 |
+
dict_consistency = st.slider(
|
| 220 |
+
"Peak Consistency (min)",
|
| 221 |
+
min_value=0.5,
|
| 222 |
+
max_value=1.0,
|
| 223 |
+
value=st.session_state.get('dict_consistency', DEFAULT_THRESHOLDS['dict_peak_consistency_min']),
|
| 224 |
+
step=0.05,
|
| 225 |
+
help="How often the token should be peak when it appears in the prompt",
|
| 226 |
+
key='dict_consistency'
|
| 227 |
+
)
|
| 228 |
+
dict_n_peaks = st.number_input(
|
| 229 |
+
"N Distinct Peaks (max)",
|
| 230 |
+
min_value=1,
|
| 231 |
+
max_value=5,
|
| 232 |
+
value=st.session_state.get('dict_n_peaks', DEFAULT_THRESHOLDS['dict_n_distinct_peaks_max']),
|
| 233 |
+
help="Maximum number of distinct tokens as peak",
|
| 234 |
+
key='dict_n_peaks'
|
| 235 |
+
)
|
| 236 |
+
|
| 237 |
+
with st.sidebar.expander("Say X", expanded=False):
|
| 238 |
+
sayx_func_min = st.slider(
|
| 239 |
+
"Func vs Sem % (min)",
|
| 240 |
+
min_value=0.0,
|
| 241 |
+
max_value=100.0,
|
| 242 |
+
value=st.session_state.get('sayx_func_min', DEFAULT_THRESHOLDS['sayx_func_vs_sem_min']),
|
| 243 |
+
step=5.0,
|
| 244 |
+
help="% difference between max activation on functional vs semantic",
|
| 245 |
+
key='sayx_func_min'
|
| 246 |
+
)
|
| 247 |
+
sayx_conf_f = st.slider(
|
| 248 |
+
"Confidence F (min)",
|
| 249 |
+
min_value=0.5,
|
| 250 |
+
max_value=1.0,
|
| 251 |
+
value=st.session_state.get('sayx_conf_f', DEFAULT_THRESHOLDS['sayx_conf_f_min']),
|
| 252 |
+
step=0.05,
|
| 253 |
+
help="Fraction of peaks on functional tokens",
|
| 254 |
+
key='sayx_conf_f'
|
| 255 |
+
)
|
| 256 |
+
sayx_layer = st.number_input(
|
| 257 |
+
"Layer (min)",
|
| 258 |
+
min_value=0,
|
| 259 |
+
max_value=30,
|
| 260 |
+
value=st.session_state.get('sayx_layer', DEFAULT_THRESHOLDS['sayx_layer_min']),
|
| 261 |
+
help="Minimum layer for Say X (typically high layers)",
|
| 262 |
+
key='sayx_layer'
|
| 263 |
+
)
|
| 264 |
+
|
| 265 |
+
with st.sidebar.expander("Relationship", expanded=False):
|
| 266 |
+
rel_sparsity = st.slider(
|
| 267 |
+
"Sparsity (max)",
|
| 268 |
+
min_value=0.0,
|
| 269 |
+
max_value=1.0,
|
| 270 |
+
value=st.session_state.get('rel_sparsity', DEFAULT_THRESHOLDS['rel_sparsity_max']),
|
| 271 |
+
step=0.05,
|
| 272 |
+
help="Maximum sparsity (low = diffuse activation)",
|
| 273 |
+
key='rel_sparsity'
|
| 274 |
+
)
|
| 275 |
+
|
| 276 |
+
with st.sidebar.expander("Semantic (Concept)", expanded=False):
|
| 277 |
+
sem_layer = st.number_input(
|
| 278 |
+
"Layer (max)",
|
| 279 |
+
min_value=0,
|
| 280 |
+
max_value=10,
|
| 281 |
+
value=st.session_state.get('sem_layer', DEFAULT_THRESHOLDS['sem_layer_max']),
|
| 282 |
+
help="Maximum layer for Dictionary fallback",
|
| 283 |
+
key='sem_layer'
|
| 284 |
+
)
|
| 285 |
+
sem_conf_s = st.slider(
|
| 286 |
+
"Confidence S (min)",
|
| 287 |
+
min_value=0.0,
|
| 288 |
+
max_value=1.0,
|
| 289 |
+
value=st.session_state.get('sem_conf_s', DEFAULT_THRESHOLDS['sem_conf_s_min']),
|
| 290 |
+
step=0.05,
|
| 291 |
+
help="Fraction of peaks on semantic tokens",
|
| 292 |
+
key='sem_conf_s'
|
| 293 |
+
)
|
| 294 |
+
sem_func_vs_sem = st.slider(
|
| 295 |
+
"Func vs Sem % (max)",
|
| 296 |
+
min_value=0.0,
|
| 297 |
+
max_value=100.0,
|
| 298 |
+
value=st.session_state.get('sem_func_vs_sem', DEFAULT_THRESHOLDS['sem_func_vs_sem_max']),
|
| 299 |
+
step=5.0,
|
| 300 |
+
help="Maximum % difference to consider Semantic",
|
| 301 |
+
key='sem_func_vs_sem'
|
| 302 |
+
)
|
| 303 |
+
|
| 304 |
+
# ===== MAIN: PIPELINE EXECUTION =====
|
| 305 |
+
|
| 306 |
+
# Use uploaded files with fallback to pipeline session_state
|
| 307 |
+
# Priority: Manual upload > Auto-load from session_state > None
|
| 308 |
+
|
| 309 |
+
# CSV
|
| 310 |
+
if uploaded_csv is not None:
|
| 311 |
+
csv_to_use = uploaded_csv
|
| 312 |
+
elif 'pipeline_analysis_csv' in st.session_state:
|
| 313 |
+
# Create a file-like object from DataFrame
|
| 314 |
+
csv_data = st.session_state['pipeline_analysis_csv']['data']
|
| 315 |
+
csv_to_use = io.BytesIO(csv_data.to_csv(index=False).encode('utf-8'))
|
| 316 |
+
csv_to_use.name = st.session_state['pipeline_analysis_csv']['filename']
|
| 317 |
+
else:
|
| 318 |
+
csv_to_use = None
|
| 319 |
+
|
| 320 |
+
# Activations JSON
|
| 321 |
+
if uploaded_json is not None:
|
| 322 |
+
json_to_use = uploaded_json
|
| 323 |
+
elif 'pipeline_activations_json' in st.session_state:
|
| 324 |
+
# Create a file-like object from dict
|
| 325 |
+
json_str = json.dumps(st.session_state['pipeline_activations_json']['data'])
|
| 326 |
+
json_to_use = io.BytesIO(json_str.encode('utf-8'))
|
| 327 |
+
json_to_use.name = st.session_state['pipeline_activations_json']['filename']
|
| 328 |
+
else:
|
| 329 |
+
json_to_use = None
|
| 330 |
+
|
| 331 |
+
# Graph JSON
|
| 332 |
+
if uploaded_graph is not None:
|
| 333 |
+
graph_to_use = uploaded_graph
|
| 334 |
+
elif 'pipeline_graph_json' in st.session_state:
|
| 335 |
+
# Create a file-like object from dict
|
| 336 |
+
graph_str = json.dumps(st.session_state['pipeline_graph_json']['data'])
|
| 337 |
+
graph_to_use = io.BytesIO(graph_str.encode('utf-8'))
|
| 338 |
+
graph_to_use.name = st.session_state['pipeline_graph_json']['filename']
|
| 339 |
+
else:
|
| 340 |
+
graph_to_use = None
|
| 341 |
+
|
| 342 |
+
# Selected Nodes JSON
|
| 343 |
+
if uploaded_nodes_json is not None:
|
| 344 |
+
nodes_json_to_use = uploaded_nodes_json
|
| 345 |
+
elif 'pipeline_selected_nodes' in st.session_state:
|
| 346 |
+
# Create a file-like object from dict
|
| 347 |
+
nodes_str = json.dumps(st.session_state['pipeline_selected_nodes']['data'])
|
| 348 |
+
nodes_json_to_use = io.BytesIO(nodes_str.encode('utf-8'))
|
| 349 |
+
nodes_json_to_use.name = st.session_state['pipeline_selected_nodes']['filename']
|
| 350 |
+
else:
|
| 351 |
+
nodes_json_to_use = None
|
| 352 |
+
|
| 353 |
+
if csv_to_use is None:
|
| 354 |
+
st.warning("⬆️ Load a CSV file to begin")
|
| 355 |
+
st.markdown("""
|
| 356 |
+
### 📖 How It Works
|
| 357 |
+
|
| 358 |
+
#### Step 1: Dataset Preparation
|
| 359 |
+
- **Classify tokens**: Identify functional tokens (e.g. "is", "the", ",") vs semantic tokens (e.g. "Texas", "capital")
|
| 360 |
+
- **Target tokens**: For functional tokens, find the first semantic token in the specified direction
|
| 361 |
+
- **Source**: Use tokens from JSON if available, otherwise fallback tokenization
|
| 362 |
+
|
| 363 |
+
#### Step 2: Node Classification
|
| 364 |
+
|
| 365 |
+
Each feature is classified based on aggregate metrics:
|
| 366 |
+
|
| 367 |
+
- **Semantic (Dictionary)**: Always activates on the same specific token
|
| 368 |
+
- E.g.: Feature that only activates on "Texas"
|
| 369 |
+
- Characteristics: high peak_consistency, n_distinct_peaks = 1
|
| 370 |
+
|
| 371 |
+
- **Semantic (Concept)**: Activates on semantically similar tokens
|
| 372 |
+
- E.g.: Feature that activates on "city", "capital", "state"
|
| 373 |
+
- Characteristics: high conf_S, medium-low layer
|
| 374 |
+
|
| 375 |
+
- **Say X**: Activates on functional tokens to predict the next token
|
| 376 |
+
- E.g.: Feature that activates on "is" before "Austin"
|
| 377 |
+
- Characteristics: high func_vs_sem, high conf_F, high layer
|
| 378 |
+
|
| 379 |
+
- **Relationship**: Connects multiple semantic concepts
|
| 380 |
+
- E.g.: Feature that activates on "city", "capital", "state" together
|
| 381 |
+
- Characteristics: low sparsity (diffuse activation), high K
|
| 382 |
+
|
| 383 |
+
#### Step 3: Supernode Naming
|
| 384 |
+
|
| 385 |
+
Generate descriptive names for each supernode:
|
| 386 |
+
|
| 387 |
+
- **Relationship**: `"(X) related"` where X is the first semantic token with max activation
|
| 388 |
+
- **Semantic**: Name of token with max activation (e.g. "Texas", "city")
|
| 389 |
+
- **Say X**: `"Say (X)"` where X is the target_token (e.g. "Say (Austin)")
|
| 390 |
+
|
| 391 |
+
### 🎯 Key Parameters
|
| 392 |
+
|
| 393 |
+
- **Peak Consistency**: How often a token is peak when it appears in the prompt
|
| 394 |
+
- **Func vs Sem %**: % difference between max activation on functional vs semantic
|
| 395 |
+
- **Confidence F/S**: Fraction of peaks on functional/semantic tokens
|
| 396 |
+
- **Sparsity**: How concentrated (high) vs diffuse (low) the activation is
|
| 397 |
+
- **Layer**: Model layer where the feature resides
|
| 398 |
+
""")
|
| 399 |
+
st.stop()
|
| 400 |
+
|
| 401 |
+
# Load CSV
|
| 402 |
+
try:
|
| 403 |
+
if isinstance(csv_to_use, Path):
|
| 404 |
+
# Default file (path)
|
| 405 |
+
df = pd.read_csv(csv_to_use)
|
| 406 |
+
csv_name = csv_to_use.name
|
| 407 |
+
else:
|
| 408 |
+
# Uploaded file
|
| 409 |
+
df = pd.read_csv(csv_to_use)
|
| 410 |
+
csv_name = csv_to_use.name if hasattr(csv_to_use, 'name') else 'uploaded file'
|
| 411 |
+
except Exception as e:
|
| 412 |
+
st.error(f"❌ CSV loading error: {e}")
|
| 413 |
+
st.stop()
|
| 414 |
+
|
| 415 |
+
# Load Graph JSON (for graph_name)
|
| 416 |
+
graph_name = None
|
| 417 |
+
if graph_to_use:
|
| 418 |
+
if isinstance(graph_to_use, Path):
|
| 419 |
+
graph_name = graph_to_use.name
|
| 420 |
+
else:
|
| 421 |
+
graph_name = graph_to_use.name if hasattr(graph_to_use, 'name') else 'uploaded file'
|
| 422 |
+
|
| 423 |
+
# Load JSON (optional)
|
| 424 |
+
tokens_json = None
|
| 425 |
+
json_name = None
|
| 426 |
+
n_prompts = 0
|
| 427 |
+
if json_to_use:
|
| 428 |
+
try:
|
| 429 |
+
if isinstance(json_to_use, Path):
|
| 430 |
+
# Default file (path)
|
| 431 |
+
with open(json_to_use, 'r', encoding='utf-8') as f:
|
| 432 |
+
tokens_json = json.load(f)
|
| 433 |
+
json_name = json_to_use.name
|
| 434 |
+
else:
|
| 435 |
+
# Uploaded file
|
| 436 |
+
json_to_use.seek(0) # Reset file pointer to beginning
|
| 437 |
+
tokens_json = json.load(json_to_use)
|
| 438 |
+
json_name = json_to_use.name if hasattr(json_to_use, 'name') else 'uploaded file'
|
| 439 |
+
|
| 440 |
+
n_prompts = len(tokens_json.get('results', []))
|
| 441 |
+
except Exception as e:
|
| 442 |
+
st.warning(f"⚠️ JSON loading error: {e}")
|
| 443 |
+
|
| 444 |
+
# Load Selected Nodes JSON (optional, for subgraph upload)
|
| 445 |
+
selected_nodes_data = None
|
| 446 |
+
nodes_name = None
|
| 447 |
+
n_nodes = 0
|
| 448 |
+
n_features = 0
|
| 449 |
+
if nodes_json_to_use:
|
| 450 |
+
try:
|
| 451 |
+
nodes_json_to_use.seek(0) # Reset file pointer to beginning
|
| 452 |
+
selected_nodes_data = json.load(nodes_json_to_use)
|
| 453 |
+
# Save in session state for upload
|
| 454 |
+
st.session_state['selected_nodes_data'] = selected_nodes_data
|
| 455 |
+
|
| 456 |
+
# Get filename
|
| 457 |
+
if isinstance(nodes_json_to_use, Path):
|
| 458 |
+
nodes_name = nodes_json_to_use.name
|
| 459 |
+
else:
|
| 460 |
+
nodes_name = nodes_json_to_use.name if hasattr(nodes_json_to_use, 'name') else 'uploaded file'
|
| 461 |
+
|
| 462 |
+
# Show info
|
| 463 |
+
metadata = selected_nodes_data.get('metadata', {})
|
| 464 |
+
n_nodes = metadata.get('n_nodes', len(selected_nodes_data.get('node_ids', [])))
|
| 465 |
+
n_features = metadata.get('n_features', len(selected_nodes_data.get('features', [])))
|
| 466 |
+
except Exception as e:
|
| 467 |
+
st.warning(f"⚠️ Selected Nodes JSON loading error: {e}")
|
| 468 |
+
|
| 469 |
+
# ===== UNIFIED STATUS MESSAGE =====
|
| 470 |
+
st.success(f"✅ **Pipeline ready**: {len(df)} records, {df['feature_key'].nunique()} unique features, {n_prompts} prompts")
|
| 471 |
+
|
| 472 |
+
with st.expander("📋 Loaded files details", expanded=False):
|
| 473 |
+
if graph_name:
|
| 474 |
+
st.write(f"- **Graph JSON**: `{graph_name}`")
|
| 475 |
+
if nodes_name:
|
| 476 |
+
st.write(f"- **Selected Nodes**: `{nodes_name}` ({n_features} features, {n_nodes} nodes)")
|
| 477 |
+
if json_name:
|
| 478 |
+
st.write(f"- **Activations JSON**: `{json_name}` ({n_prompts} prompts)")
|
| 479 |
+
st.write(f"- **Analysis CSV**: `{csv_name}` ({len(df)} rows, {df['feature_key'].nunique()} features)")
|
| 480 |
+
|
| 481 |
+
# ===== STEP 1: PREPARATION =====
|
| 482 |
+
|
| 483 |
+
st.header("📋 Step 1: Dataset Preparation")
|
| 484 |
+
|
| 485 |
+
with st.expander("ℹ️ What does this step do?", expanded=False):
|
| 486 |
+
st.markdown("""
|
| 487 |
+
**Classify each token** as:
|
| 488 |
+
- **Functional**: Token with low semantic specificity (e.g. "is", "the", ",")
|
| 489 |
+
- **Semantic**: Token with specific meaning (e.g. "Texas", "capital")
|
| 490 |
+
|
| 491 |
+
**Find target tokens** for functional tokens:
|
| 492 |
+
- Functional tokens "point" to nearby semantic tokens
|
| 493 |
+
- E.g.: "is" → "Austin" (forward), "," → "Texas" (backward) + "USA" (forward)
|
| 494 |
+
|
| 495 |
+
**Token source**:
|
| 496 |
+
- Prefers tokens from JSON activations (more accurate)
|
| 497 |
+
- Falls back to tokenization of prompt text
|
| 498 |
+
""")
|
| 499 |
+
|
| 500 |
+
if st.button("▶️ Run Step 1", key="run_step1"):
|
| 501 |
+
with st.spinner("Preparing dataset..."):
|
| 502 |
+
try:
|
| 503 |
+
df_prepared = prepare_dataset(
|
| 504 |
+
df,
|
| 505 |
+
tokens_json=tokens_json,
|
| 506 |
+
window=window_size,
|
| 507 |
+
verbose=False
|
| 508 |
+
)
|
| 509 |
+
|
| 510 |
+
# Save in session state
|
| 511 |
+
st.session_state['df_prepared'] = df_prepared
|
| 512 |
+
|
| 513 |
+
# Statistics
|
| 514 |
+
n_functional = (df_prepared['peak_token_type'] == 'functional').sum()
|
| 515 |
+
n_semantic = (df_prepared['peak_token_type'] == 'semantic').sum()
|
| 516 |
+
n_json = (df_prepared['tokens_source'] == 'json').sum()
|
| 517 |
+
n_fallback = (df_prepared['tokens_source'] == 'fallback').sum()
|
| 518 |
+
|
| 519 |
+
col1, col2, col3 = st.columns(3)
|
| 520 |
+
with col1:
|
| 521 |
+
st.metric("Functional Tokens", f"{n_functional} ({n_functional/len(df_prepared)*100:.1f}%)")
|
| 522 |
+
with col2:
|
| 523 |
+
st.metric("Semantic Tokens", f"{n_semantic} ({n_semantic/len(df_prepared)*100:.1f}%)")
|
| 524 |
+
with col3:
|
| 525 |
+
st.metric("Tokens from JSON", f"{n_json}/{len(df_prepared)}")
|
| 526 |
+
|
| 527 |
+
st.success("✅ Step 1 completed!")
|
| 528 |
+
|
| 529 |
+
except Exception as e:
|
| 530 |
+
st.error(f"❌ Step 1 error: {e}")
|
| 531 |
+
import traceback
|
| 532 |
+
st.code(traceback.format_exc())
|
| 533 |
+
|
| 534 |
+
# Show Step 1 results
|
| 535 |
+
if 'df_prepared' in st.session_state:
|
| 536 |
+
df_prepared = st.session_state['df_prepared']
|
| 537 |
+
|
| 538 |
+
st.subheader("📊 Step 1 Results")
|
| 539 |
+
|
| 540 |
+
# Complete table
|
| 541 |
+
st.write(f"**Complete results** ({len(df_prepared)} rows):")
|
| 542 |
+
display_cols = ['feature_key', 'prompt', 'peak_token', 'peak_token_type', 'target_tokens', 'tokens_source']
|
| 543 |
+
st.dataframe(df_prepared[display_cols], use_container_width=True, height=400)
|
| 544 |
+
|
| 545 |
+
# Download
|
| 546 |
+
csv_step1 = df_prepared.to_csv(index=False).encode('utf-8')
|
| 547 |
+
st.download_button(
|
| 548 |
+
label="💾 Download CSV Step 1",
|
| 549 |
+
data=csv_step1,
|
| 550 |
+
file_name=f"node_grouping_step1_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv",
|
| 551 |
+
mime="text/csv"
|
| 552 |
+
)
|
| 553 |
+
|
| 554 |
+
# ===== STEP 2: CLASSIFICATION =====
|
| 555 |
+
|
| 556 |
+
st.header("🏷️ Step 2: Node Classification")
|
| 557 |
+
|
| 558 |
+
with st.expander("ℹ️ What does this step do?", expanded=False):
|
| 559 |
+
st.markdown("""
|
| 560 |
+
**Classify each feature** based on aggregate metrics:
|
| 561 |
+
|
| 562 |
+
**Decision Tree**:
|
| 563 |
+
1. **Dictionary Semantic**: peak_consistency ≥ 0.8 AND n_distinct_peaks ≤ 1
|
| 564 |
+
2. **Say X**: func_vs_sem ≥ 50% AND conf_F ≥ 0.90 AND layer ≥ 7
|
| 565 |
+
3. **Relationship**: sparsity < 0.45
|
| 566 |
+
4. **Semantic (Concept)**: layer ≤ 3 OR conf_S ≥ 0.50 OR func_vs_sem < 50%
|
| 567 |
+
5. **Review**: Ambiguous cases requiring manual review
|
| 568 |
+
|
| 569 |
+
**Computed Metrics**:
|
| 570 |
+
- `peak_consistency_main`: How often the main token is peak when it appears
|
| 571 |
+
- `n_distinct_peaks`: Number of distinct tokens as peak
|
| 572 |
+
- `func_vs_sem_pct`: % difference between max activation on functional vs semantic
|
| 573 |
+
- `conf_F / conf_S`: Fraction of peaks on functional/semantic tokens
|
| 574 |
+
- `sparsity_median`: Median sparsity (active prompts only)
|
| 575 |
+
- `K_sem_distinct`: Number of distinct semantic tokens
|
| 576 |
+
""")
|
| 577 |
+
|
| 578 |
+
if 'df_prepared' not in st.session_state:
|
| 579 |
+
st.warning("⚠️ Run Step 1 first")
|
| 580 |
+
else:
|
| 581 |
+
# Prepare custom thresholds
|
| 582 |
+
custom_thresholds = {
|
| 583 |
+
'dict_peak_consistency_min': dict_consistency,
|
| 584 |
+
'dict_n_distinct_peaks_max': dict_n_peaks,
|
| 585 |
+
'sayx_func_vs_sem_min': sayx_func_min,
|
| 586 |
+
'sayx_conf_f_min': sayx_conf_f,
|
| 587 |
+
'sayx_layer_min': sayx_layer,
|
| 588 |
+
'rel_sparsity_max': rel_sparsity,
|
| 589 |
+
'sem_layer_max': sem_layer,
|
| 590 |
+
'sem_conf_s_min': sem_conf_s,
|
| 591 |
+
'sem_func_vs_sem_max': sem_func_vs_sem,
|
| 592 |
+
}
|
| 593 |
+
|
| 594 |
+
if st.button("▶️ Run Step 2", key="run_step2"):
|
| 595 |
+
with st.spinner("Classifying nodes..."):
|
| 596 |
+
try:
|
| 597 |
+
df_classified = classify_nodes(
|
| 598 |
+
st.session_state['df_prepared'],
|
| 599 |
+
thresholds=custom_thresholds,
|
| 600 |
+
verbose=False
|
| 601 |
+
)
|
| 602 |
+
|
| 603 |
+
# Save in session state
|
| 604 |
+
st.session_state['df_classified'] = df_classified
|
| 605 |
+
|
| 606 |
+
# Statistics
|
| 607 |
+
classifications = df_classified.groupby('feature_key')['pred_label'].first()
|
| 608 |
+
label_counts = classifications.value_counts()
|
| 609 |
+
|
| 610 |
+
st.success("✅ Step 2 completed!")
|
| 611 |
+
|
| 612 |
+
# Display distribution
|
| 613 |
+
st.subheader("📊 Class Distribution")
|
| 614 |
+
|
| 615 |
+
cols = st.columns(len(label_counts))
|
| 616 |
+
for i, (label, count) in enumerate(label_counts.items()):
|
| 617 |
+
with cols[i]:
|
| 618 |
+
pct = 100 * count / len(classifications)
|
| 619 |
+
st.metric(label, f"{count} ({pct:.1f}%)")
|
| 620 |
+
|
| 621 |
+
# Review warnings
|
| 622 |
+
n_review = df_classified['review'].sum()
|
| 623 |
+
if n_review > 0:
|
| 624 |
+
st.warning(f"⚠️ {n_review} rows require manual review")
|
| 625 |
+
review_features = df_classified[df_classified['review']]['feature_key'].unique()
|
| 626 |
+
st.write(f"Feature keys: {', '.join(review_features[:5])}")
|
| 627 |
+
|
| 628 |
+
except Exception as e:
|
| 629 |
+
st.error(f"❌ Step 2 error: {e}")
|
| 630 |
+
import traceback
|
| 631 |
+
st.code(traceback.format_exc())
|
| 632 |
+
|
| 633 |
+
# Show Step 2 results
|
| 634 |
+
if 'df_classified' in st.session_state:
|
| 635 |
+
df_classified = st.session_state['df_classified']
|
| 636 |
+
|
| 637 |
+
st.subheader("📊 Step 2 Results")
|
| 638 |
+
|
| 639 |
+
# Filter by class
|
| 640 |
+
selected_classes = st.multiselect(
|
| 641 |
+
"Filter by class",
|
| 642 |
+
options=df_classified['pred_label'].unique(),
|
| 643 |
+
default=df_classified['pred_label'].unique()
|
| 644 |
+
)
|
| 645 |
+
|
| 646 |
+
df_filtered = df_classified[df_classified['pred_label'].isin(selected_classes)]
|
| 647 |
+
|
| 648 |
+
# Reorder columns
|
| 649 |
+
priority_cols = [
|
| 650 |
+
'feature_key', 'layer', 'prompt', 'supernode_class', 'pred_label',
|
| 651 |
+
'subtype', 'confidence', 'review', 'why_review', 'peak_token'
|
| 652 |
+
]
|
| 653 |
+
|
| 654 |
+
# Remaining columns (exclude those already in priority)
|
| 655 |
+
other_cols = [col for col in df_filtered.columns if col not in priority_cols]
|
| 656 |
+
|
| 657 |
+
# Final order: priority + others
|
| 658 |
+
ordered_cols = [col for col in priority_cols if col in df_filtered.columns] + other_cols
|
| 659 |
+
df_display = df_filtered[ordered_cols]
|
| 660 |
+
|
| 661 |
+
# Complete table with all columns
|
| 662 |
+
st.write(f"**Complete results** ({len(df_filtered)} rows, {len(df_filtered.columns)} columns):")
|
| 663 |
+
st.dataframe(
|
| 664 |
+
df_display,
|
| 665 |
+
use_container_width=True,
|
| 666 |
+
height=400,
|
| 667 |
+
column_config={
|
| 668 |
+
"prompt": st.column_config.TextColumn(
|
| 669 |
+
"prompt",
|
| 670 |
+
width="medium",
|
| 671 |
+
help="Prompt text"
|
| 672 |
+
)
|
| 673 |
+
}
|
| 674 |
+
)
|
| 675 |
+
|
| 676 |
+
# Feature search and explanation
|
| 677 |
+
st.subheader("🔍 Explain Feature Classification")
|
| 678 |
+
|
| 679 |
+
col_search, col_filter = st.columns([3, 1])
|
| 680 |
+
|
| 681 |
+
with col_search:
|
| 682 |
+
feature_to_explain = st.text_input(
|
| 683 |
+
"Search feature_key",
|
| 684 |
+
placeholder="e.g. 22_11998",
|
| 685 |
+
help="Enter the feature_key to see the classification explanation"
|
| 686 |
+
)
|
| 687 |
+
|
| 688 |
+
with col_filter:
|
| 689 |
+
st.write("") # Spacer for alignment
|
| 690 |
+
filter_table = st.checkbox(
|
| 691 |
+
"Filter table",
|
| 692 |
+
value=True,
|
| 693 |
+
help="Show only rows for the searched feature in the table above"
|
| 694 |
+
)
|
| 695 |
+
|
| 696 |
+
# Update table if feature searched and filter active
|
| 697 |
+
if feature_to_explain and filter_table:
|
| 698 |
+
df_filtered_search = df_display[df_display['feature_key'] == feature_to_explain]
|
| 699 |
+
|
| 700 |
+
if len(df_filtered_search) > 0:
|
| 701 |
+
st.info(f"📌 Table filtered for feature: **{feature_to_explain}** ({len(df_filtered_search)} rows)")
|
| 702 |
+
st.dataframe(
|
| 703 |
+
df_filtered_search,
|
| 704 |
+
use_container_width=True,
|
| 705 |
+
height=min(200, len(df_filtered_search) * 35 + 38), # Dynamic height
|
| 706 |
+
column_config={
|
| 707 |
+
"prompt": st.column_config.TextColumn(
|
| 708 |
+
"prompt",
|
| 709 |
+
width="medium",
|
| 710 |
+
help="Prompt text"
|
| 711 |
+
)
|
| 712 |
+
}
|
| 713 |
+
)
|
| 714 |
+
else:
|
| 715 |
+
st.warning(f"⚠️ No rows found for feature '{feature_to_explain}' in filtered results")
|
| 716 |
+
|
| 717 |
+
if feature_to_explain:
|
| 718 |
+
# Find the feature
|
| 719 |
+
feature_data = df_classified[df_classified['feature_key'] == feature_to_explain]
|
| 720 |
+
|
| 721 |
+
if len(feature_data) == 0:
|
| 722 |
+
st.warning(f"⚠️ Feature '{feature_to_explain}' not found in dataset")
|
| 723 |
+
else:
|
| 724 |
+
# Take the first record (all have same classification for feature_key)
|
| 725 |
+
record = feature_data.iloc[0]
|
| 726 |
+
|
| 727 |
+
# Extract aggregate metrics (recalculate if necessary)
|
| 728 |
+
feature_group = df_classified[df_classified['feature_key'] == feature_to_explain]
|
| 729 |
+
feature_metrics_df = node_grouping.aggregate_feature_metrics(feature_group)
|
| 730 |
+
|
| 731 |
+
if len(feature_metrics_df) > 0:
|
| 732 |
+
metrics = feature_metrics_df.iloc[0]
|
| 733 |
+
|
| 734 |
+
# Box with general info
|
| 735 |
+
st.info(f"""
|
| 736 |
+
**Feature**: `{feature_to_explain}`
|
| 737 |
+
**Classification**: **{record['pred_label']}**
|
| 738 |
+
**Subtype**: {record['subtype'] if pd.notna(record['subtype']) else 'N/A'}
|
| 739 |
+
**Confidence**: {record['confidence']:.2f}
|
| 740 |
+
**Review**: {'⚠️ Yes' if record['review'] else '✅ No'}
|
| 741 |
+
""")
|
| 742 |
+
|
| 743 |
+
# Key metrics
|
| 744 |
+
st.write("**📊 Aggregate Metrics**:")
|
| 745 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 746 |
+
with col1:
|
| 747 |
+
st.metric("Layer", int(metrics['layer']))
|
| 748 |
+
with col2:
|
| 749 |
+
st.metric("Peak Consistency", f"{metrics['peak_consistency_main']:.2f}")
|
| 750 |
+
with col3:
|
| 751 |
+
st.metric("N Distinct Peaks", int(metrics['n_distinct_peaks']))
|
| 752 |
+
with col4:
|
| 753 |
+
st.metric("Func vs Sem %", f"{metrics['func_vs_sem_pct']:.1f}%")
|
| 754 |
+
|
| 755 |
+
col5, col6, col7, col8 = st.columns(4)
|
| 756 |
+
with col5:
|
| 757 |
+
st.metric("Conf F", f"{metrics['conf_F']:.2f}")
|
| 758 |
+
with col6:
|
| 759 |
+
st.metric("Conf S", f"{metrics['conf_S']:.2f}")
|
| 760 |
+
with col7:
|
| 761 |
+
st.metric("Sparsity", f"{metrics['sparsity_median']:.2f}")
|
| 762 |
+
with col8:
|
| 763 |
+
st.metric("K Semantic", int(metrics['K_sem_distinct']))
|
| 764 |
+
|
| 765 |
+
# Generate explanation
|
| 766 |
+
st.write("**💡 Classification Explanation**:")
|
| 767 |
+
|
| 768 |
+
pred_label = record['pred_label']
|
| 769 |
+
layer = int(metrics['layer'])
|
| 770 |
+
peak_cons = metrics['peak_consistency_main']
|
| 771 |
+
n_peaks = int(metrics['n_distinct_peaks'])
|
| 772 |
+
func_vs_sem = metrics['func_vs_sem_pct']
|
| 773 |
+
conf_F = metrics['conf_F']
|
| 774 |
+
conf_S = metrics['conf_S']
|
| 775 |
+
sparsity = metrics['sparsity_median']
|
| 776 |
+
|
| 777 |
+
# Generate explanation based on class
|
| 778 |
+
if pred_label == "Semantic":
|
| 779 |
+
# Determine which rule was triggered
|
| 780 |
+
if peak_cons >= custom_thresholds['dict_peak_consistency_min'] and n_peaks <= custom_thresholds['dict_n_distinct_peaks_max']:
|
| 781 |
+
explanation = f"""
|
| 782 |
+
The feature **{feature_to_explain}** was classified as **Semantic (Dictionary)** because:
|
| 783 |
+
|
| 784 |
+
1. **Peak Consistency** = {peak_cons:.2f} (≥ {custom_thresholds['dict_peak_consistency_min']:.2f} ✅)
|
| 785 |
+
- The main token is peak in **{peak_cons*100:.0f}%** of cases when it appears in the prompt
|
| 786 |
+
- Indicates a highly selective feature on a specific token
|
| 787 |
+
|
| 788 |
+
2. **N Distinct Peaks** = {n_peaks} (≤ {custom_thresholds['dict_n_distinct_peaks_max']} ✅)
|
| 789 |
+
- The feature always activates on the same token
|
| 790 |
+
- Typical behavior of "dictionary" features (e.g. always on "Texas")
|
| 791 |
+
|
| 792 |
+
**Rule applied**: Dictionary Semantic (highest priority)
|
| 793 |
+
"""
|
| 794 |
+
elif layer <= custom_thresholds['sem_layer_max']:
|
| 795 |
+
explanation = f"""
|
| 796 |
+
The feature **{feature_to_explain}** was classified as **Semantic (Dictionary fallback)** because:
|
| 797 |
+
|
| 798 |
+
1. **Layer** = {layer} (≤ {custom_thresholds['sem_layer_max']} ✅)
|
| 799 |
+
- Low layer typical of basic semantic features
|
| 800 |
+
- Conservative fallback for low layers
|
| 801 |
+
|
| 802 |
+
2. **Confidence S** = {conf_S:.2f}
|
| 803 |
+
- Fraction of peaks on semantic tokens: {conf_S*100:.0f}%
|
| 804 |
+
|
| 805 |
+
**Rule applied**: Semantic Concept (low layer fallback)
|
| 806 |
+
"""
|
| 807 |
+
elif func_vs_sem < custom_thresholds['sem_func_vs_sem_max']:
|
| 808 |
+
explanation = f"""
|
| 809 |
+
The feature **{feature_to_explain}** was classified as **Semantic (Concept)** because:
|
| 810 |
+
|
| 811 |
+
1. **Func vs Sem %** = {func_vs_sem:.1f}% (< {custom_thresholds['sem_func_vs_sem_max']:.1f}% ✅)
|
| 812 |
+
- The difference between max activation on functional vs semantic is small
|
| 813 |
+
- Indicates the feature activates mainly on semantic tokens
|
| 814 |
+
|
| 815 |
+
2. **Confidence S** = {conf_S:.2f}
|
| 816 |
+
- Fraction of peaks on semantic tokens: {conf_S*100:.0f}%
|
| 817 |
+
|
| 818 |
+
3. **Layer** = {layer}
|
| 819 |
+
- Medium layer, typical of conceptual features
|
| 820 |
+
|
| 821 |
+
**Rule applied**: Semantic Concept
|
| 822 |
+
"""
|
| 823 |
+
else:
|
| 824 |
+
explanation = f"""
|
| 825 |
+
The feature **{feature_to_explain}** was classified as **Semantic (Concept)** because:
|
| 826 |
+
|
| 827 |
+
1. **Confidence S** = {conf_S:.2f} (≥ {custom_thresholds['sem_conf_s_min']:.2f} ✅)
|
| 828 |
+
- Fraction of peaks on semantic tokens: {conf_S*100:.0f}%
|
| 829 |
+
- Dominance of semantic tokens
|
| 830 |
+
|
| 831 |
+
2. **Layer** = {layer}
|
| 832 |
+
|
| 833 |
+
**Rule applied**: Semantic Concept
|
| 834 |
+
"""
|
| 835 |
+
|
| 836 |
+
elif pred_label == 'Say "X"':
|
| 837 |
+
explanation = f"""
|
| 838 |
+
The feature **{feature_to_explain}** was classified as **Say "X"** because:
|
| 839 |
+
|
| 840 |
+
1. **Func vs Sem %** = {func_vs_sem:.1f}% (≥ {custom_thresholds['sayx_func_vs_sem_min']:.1f}% ✅)
|
| 841 |
+
- Max activation on functional tokens is **{func_vs_sem:.1f}%** higher than on semantic
|
| 842 |
+
- Indicates strong preference for functional tokens (e.g. "is", ",")
|
| 843 |
+
|
| 844 |
+
2. **Confidence F** = {conf_F:.2f} (≥ {custom_thresholds['sayx_conf_f_min']:.2f} ✅)
|
| 845 |
+
- Fraction of peaks on functional tokens: {conf_F*100:.0f}%
|
| 846 |
+
- Almost all peaks are on functional tokens
|
| 847 |
+
|
| 848 |
+
3. **Layer** = {layer} (≥ {custom_thresholds['sayx_layer_min']} ✅)
|
| 849 |
+
- High layer typical of predictive features
|
| 850 |
+
- Say X features are typically in final layers
|
| 851 |
+
|
| 852 |
+
**Rule applied**: Say "X" (predicts next token)
|
| 853 |
+
"""
|
| 854 |
+
|
| 855 |
+
elif pred_label == "Relationship":
|
| 856 |
+
explanation = f"""
|
| 857 |
+
The feature **{feature_to_explain}** was classified as **Relationship** because:
|
| 858 |
+
|
| 859 |
+
1. **Sparsity** = {sparsity:.2f} (< {custom_thresholds['rel_sparsity_max']:.2f} ✅)
|
| 860 |
+
- Low sparsity indicates **diffuse** activation in the prompt
|
| 861 |
+
- The feature activates on multiple tokens, not concentrated on one
|
| 862 |
+
|
| 863 |
+
2. **K Semantic** = {int(metrics['K_sem_distinct'])}
|
| 864 |
+
- Number of distinct semantic tokens it activates on
|
| 865 |
+
- Indicates connection between multiple concepts
|
| 866 |
+
|
| 867 |
+
3. **Layer** = {layer}
|
| 868 |
+
- Medium-low layer typical of relational features
|
| 869 |
+
|
| 870 |
+
**Rule applied**: Relationship (connects multiple concepts)
|
| 871 |
+
"""
|
| 872 |
+
|
| 873 |
+
else:
|
| 874 |
+
explanation = f"""
|
| 875 |
+
The feature **{feature_to_explain}** requires **manual review**.
|
| 876 |
+
|
| 877 |
+
**Reason**: {record['why_review']}
|
| 878 |
+
|
| 879 |
+
**Metrics**:
|
| 880 |
+
- Layer: {layer}
|
| 881 |
+
- Peak Consistency: {peak_cons:.2f}
|
| 882 |
+
- Func vs Sem %: {func_vs_sem:.1f}%
|
| 883 |
+
- Confidence F/S: {conf_F:.2f} / {conf_S:.2f}
|
| 884 |
+
- Sparsity: {sparsity:.2f}
|
| 885 |
+
"""
|
| 886 |
+
|
| 887 |
+
st.markdown(explanation)
|
| 888 |
+
|
| 889 |
+
# Show applied decision tree
|
| 890 |
+
with st.expander("🌳 Complete Decision Tree", expanded=False):
|
| 891 |
+
st.markdown(f"""
|
| 892 |
+
**Evaluation order**:
|
| 893 |
+
|
| 894 |
+
1. ✅ **Dictionary Semantic**: peak_consistency ≥ {custom_thresholds['dict_peak_consistency_min']:.2f} AND n_distinct_peaks ≤ {custom_thresholds['dict_n_distinct_peaks_max']}
|
| 895 |
+
- Result: {'✅ MATCH' if pred_label == 'Semantic' and peak_cons >= custom_thresholds['dict_peak_consistency_min'] and n_peaks <= custom_thresholds['dict_n_distinct_peaks_max'] else '❌ No match'}
|
| 896 |
+
|
| 897 |
+
2. ✅ **Say "X"**: func_vs_sem ≥ {custom_thresholds['sayx_func_vs_sem_min']:.1f}% AND conf_F ≥ {custom_thresholds['sayx_conf_f_min']:.2f} AND layer ≥ {custom_thresholds['sayx_layer_min']}
|
| 898 |
+
- Result: {'✅ MATCH' if pred_label == 'Say "X"' else '❌ No match'}
|
| 899 |
+
|
| 900 |
+
3. ✅ **Relationship**: sparsity < {custom_thresholds['rel_sparsity_max']:.2f}
|
| 901 |
+
- Result: {'✅ MATCH' if pred_label == 'Relationship' else '❌ No match'}
|
| 902 |
+
|
| 903 |
+
4. ✅ **Semantic (Concept)**: layer ≤ {custom_thresholds['sem_layer_max']} OR conf_S ≥ {custom_thresholds['sem_conf_s_min']:.2f} OR func_vs_sem < {custom_thresholds['sem_func_vs_sem_max']:.1f}%
|
| 904 |
+
- Result: {'✅ MATCH' if pred_label == 'Semantic' else '❌ No match'}
|
| 905 |
+
|
| 906 |
+
5. ⚠️ **Review**: Ambiguous cases
|
| 907 |
+
|
| 908 |
+
**Final classification**: **{pred_label}**
|
| 909 |
+
""")
|
| 910 |
+
else:
|
| 911 |
+
st.error("❌ Unable to calculate aggregate metrics for this feature")
|
| 912 |
+
|
| 913 |
+
# Download
|
| 914 |
+
csv_step2 = df_classified.to_csv(index=False).encode('utf-8')
|
| 915 |
+
st.download_button(
|
| 916 |
+
label="💾 Download CSV Step 2",
|
| 917 |
+
data=csv_step2,
|
| 918 |
+
file_name=f"node_grouping_step2_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv",
|
| 919 |
+
mime="text/csv"
|
| 920 |
+
)
|
| 921 |
+
|
| 922 |
+
# ===== STEP 3: NAMING =====
|
| 923 |
+
|
| 924 |
+
st.header("🏷️ Step 3: Supernode Naming")
|
| 925 |
+
|
| 926 |
+
with st.expander("ℹ️ What does this step do?", expanded=False):
|
| 927 |
+
st.markdown("""
|
| 928 |
+
**Generate descriptive names** for each supernode:
|
| 929 |
+
|
| 930 |
+
**Naming Rules**:
|
| 931 |
+
- **Relationship**: `"(X) related"` where X is the first semantic token with max activation from the original prompt
|
| 932 |
+
- Requires JSON activations for accuracy
|
| 933 |
+
- Fallback: uses peak_token from record with max activation
|
| 934 |
+
|
| 935 |
+
- **Semantic**: Name of the token with max activation
|
| 936 |
+
- E.g.: "Texas", "city", "capital"
|
| 937 |
+
- Preserves capitalization if present in at least one occurrence
|
| 938 |
+
- Edge cases: "punctuation", "Semantic (unknown)"
|
| 939 |
+
|
| 940 |
+
- **Say X**: `"Say (X)"` where X is the target_token from record with max activation
|
| 941 |
+
- E.g.: "Say (Austin)", "Say (capital)"
|
| 942 |
+
- Tie-break: shorter distance, then backward > forward
|
| 943 |
+
- Fallback: "Say (?)" if no target found
|
| 944 |
+
|
| 945 |
+
**Token Blacklist** (NEW):
|
| 946 |
+
- If a token is in the blacklist, it is automatically skipped
|
| 947 |
+
- The system falls back to the token with the second (or next) highest activation
|
| 948 |
+
- Useful for excluding generic or uninformative tokens (e.g. "the", "a", "is")
|
| 949 |
+
- Configurable in the "Token Blacklist" sidebar
|
| 950 |
+
|
| 951 |
+
**Normalization**:
|
| 952 |
+
- Strip whitespace
|
| 953 |
+
- Remove trailing punctuation (e.g. "entity:" → "entity")
|
| 954 |
+
- Preserve capitalization if present (e.g. "Texas" not "texas")
|
| 955 |
+
""")
|
| 956 |
+
|
| 957 |
+
if 'df_classified' not in st.session_state:
|
| 958 |
+
st.warning("⚠️ Run Step 2 first")
|
| 959 |
+
else:
|
| 960 |
+
if st.button("▶️ Run Step 3", key="run_step3"):
|
| 961 |
+
with st.spinner("Naming supernodes..."):
|
| 962 |
+
try:
|
| 963 |
+
# Save temporary JSON if available
|
| 964 |
+
json_path = None
|
| 965 |
+
if tokens_json:
|
| 966 |
+
json_path = Path("temp_activations.json")
|
| 967 |
+
with open(json_path, 'w', encoding='utf-8') as f:
|
| 968 |
+
json.dump(tokens_json, f)
|
| 969 |
+
|
| 970 |
+
# Determine path to Graph JSON
|
| 971 |
+
graph_path = None
|
| 972 |
+
if graph_to_use:
|
| 973 |
+
if isinstance(graph_to_use, Path):
|
| 974 |
+
graph_path = str(graph_to_use)
|
| 975 |
+
else:
|
| 976 |
+
# If uploaded file, save temporarily
|
| 977 |
+
graph_path = Path("temp_graph.json")
|
| 978 |
+
graph_to_use.seek(0) # Reset file pointer to beginning
|
| 979 |
+
graph_json_content = json.loads(graph_to_use.read().decode('utf-8'))
|
| 980 |
+
with open(graph_path, 'w', encoding='utf-8') as f:
|
| 981 |
+
json.dump(graph_json_content, f)
|
| 982 |
+
|
| 983 |
+
# Save graph_to_use in session state for Neuronpedia upload
|
| 984 |
+
st.session_state['graph_json_uploaded'] = graph_to_use
|
| 985 |
+
|
| 986 |
+
df_named = name_nodes(
|
| 987 |
+
st.session_state['df_classified'],
|
| 988 |
+
activations_json_path=str(json_path) if json_path else None,
|
| 989 |
+
graph_json_path=graph_path,
|
| 990 |
+
blacklist_tokens=blacklist_tokens if blacklist_tokens else None,
|
| 991 |
+
verbose=False
|
| 992 |
+
)
|
| 993 |
+
|
| 994 |
+
# Remove temporary files
|
| 995 |
+
if json_path and json_path.exists():
|
| 996 |
+
json_path.unlink()
|
| 997 |
+
if graph_path and Path(graph_path).name == "temp_graph.json" and Path(graph_path).exists():
|
| 998 |
+
Path(graph_path).unlink()
|
| 999 |
+
|
| 1000 |
+
# Save in session state
|
| 1001 |
+
st.session_state['df_named'] = df_named
|
| 1002 |
+
|
| 1003 |
+
# Statistics
|
| 1004 |
+
n_features = df_named['feature_key'].nunique()
|
| 1005 |
+
n_unique_names = df_named.groupby('feature_key')['supernode_name'].first().nunique()
|
| 1006 |
+
|
| 1007 |
+
st.success("✅ Step 3 completed!")
|
| 1008 |
+
|
| 1009 |
+
col1, col2 = st.columns(2)
|
| 1010 |
+
with col1:
|
| 1011 |
+
st.metric("Total Features", n_features)
|
| 1012 |
+
with col2:
|
| 1013 |
+
st.metric("Unique Names", n_unique_names)
|
| 1014 |
+
|
| 1015 |
+
# Examples per class (compact, no duplicates)
|
| 1016 |
+
st.subheader("📝 Naming Examples by Class")
|
| 1017 |
+
|
| 1018 |
+
for label in ['Relationship', 'Semantic', 'Say "X"']:
|
| 1019 |
+
# Get unique names (no duplicates)
|
| 1020 |
+
examples = df_named[df_named['pred_label'] == label].groupby('feature_key')['supernode_name'].first().unique()
|
| 1021 |
+
if len(examples) > 0:
|
| 1022 |
+
# Limit to max 5 examples
|
| 1023 |
+
examples_str = ', '.join([f'"{ex}"' for ex in examples[:5]])
|
| 1024 |
+
st.write(f"**{label}**: {examples_str}")
|
| 1025 |
+
|
| 1026 |
+
except Exception as e:
|
| 1027 |
+
st.error(f"❌ Step 3 error: {e}")
|
| 1028 |
+
import traceback
|
| 1029 |
+
st.code(traceback.format_exc())
|
| 1030 |
+
|
| 1031 |
+
# Show Step 3 results
|
| 1032 |
+
if 'df_named' in st.session_state:
|
| 1033 |
+
df_named = st.session_state['df_named']
|
| 1034 |
+
|
| 1035 |
+
st.subheader("📊 Step 3 Results (Final)")
|
| 1036 |
+
|
| 1037 |
+
# Filter by class
|
| 1038 |
+
selected_classes_final = st.multiselect(
|
| 1039 |
+
"Filter by class (final)",
|
| 1040 |
+
options=df_named['pred_label'].unique(),
|
| 1041 |
+
default=df_named['pred_label'].unique(),
|
| 1042 |
+
key="filter_final"
|
| 1043 |
+
)
|
| 1044 |
+
|
| 1045 |
+
df_filtered_final = df_named[df_named['pred_label'].isin(selected_classes_final)]
|
| 1046 |
+
|
| 1047 |
+
# Reorder columns
|
| 1048 |
+
priority_cols = [
|
| 1049 |
+
'feature_key', 'layer', 'prompt', 'supernode_label', 'supernode_name', 'pred_label',
|
| 1050 |
+
'subtype', 'peak_token','activation_max', 'target_tokens'
|
| 1051 |
+
]
|
| 1052 |
+
|
| 1053 |
+
# Remaining columns (exclude those already in priority)
|
| 1054 |
+
other_cols = [col for col in df_filtered_final.columns if col not in priority_cols]
|
| 1055 |
+
|
| 1056 |
+
# Final order: priority + others
|
| 1057 |
+
ordered_cols = [col for col in priority_cols if col in df_filtered_final.columns] + other_cols
|
| 1058 |
+
df_display_final = df_filtered_final[ordered_cols]
|
| 1059 |
+
|
| 1060 |
+
# Complete table with all columns
|
| 1061 |
+
st.write(f"**Complete results** ({len(df_filtered_final)} rows, {len(df_filtered_final.columns)} columns):")
|
| 1062 |
+
st.dataframe(
|
| 1063 |
+
df_display_final,
|
| 1064 |
+
use_container_width=True,
|
| 1065 |
+
height=400,
|
| 1066 |
+
column_config={
|
| 1067 |
+
"prompt": st.column_config.TextColumn(
|
| 1068 |
+
"prompt",
|
| 1069 |
+
width="medium",
|
| 1070 |
+
help="Prompt text"
|
| 1071 |
+
)
|
| 1072 |
+
}
|
| 1073 |
+
)
|
| 1074 |
+
|
| 1075 |
+
# Group by supernode_name
|
| 1076 |
+
st.subheader("🔍 Analysis by Supernode Name")
|
| 1077 |
+
|
| 1078 |
+
# Calculate node_influence per feature (take 1 value per feature, not all rows)
|
| 1079 |
+
if 'node_influence' in df_named.columns:
|
| 1080 |
+
# Take node_influence for each feature_key (use first value, all equal for same feature)
|
| 1081 |
+
feature_influence = df_named.groupby('feature_key')['node_influence'].first().reset_index()
|
| 1082 |
+
|
| 1083 |
+
# Add supernode_name for each feature
|
| 1084 |
+
feature_to_name = df_named.groupby('feature_key')['supernode_name'].first().reset_index()
|
| 1085 |
+
feature_influence = feature_influence.merge(feature_to_name, on='feature_key')
|
| 1086 |
+
|
| 1087 |
+
# Sum node_influence per supernode_name
|
| 1088 |
+
name_influence = feature_influence.groupby('supernode_name')['node_influence'].sum().reset_index()
|
| 1089 |
+
name_influence.columns = ['supernode_name', 'total_influence']
|
| 1090 |
+
else:
|
| 1091 |
+
name_influence = None
|
| 1092 |
+
|
| 1093 |
+
# Base aggregations
|
| 1094 |
+
name_groups = df_named.groupby('supernode_name').agg({
|
| 1095 |
+
'feature_key': 'nunique',
|
| 1096 |
+
'pred_label': lambda x: x.mode()[0] if len(x) > 0 else '',
|
| 1097 |
+
'layer': lambda x: f"{x.min()}-{x.max()}" if x.min() != x.max() else str(x.min())
|
| 1098 |
+
}).reset_index()
|
| 1099 |
+
name_groups.columns = ['Supernode Name', 'N Features', 'Class', 'Layer Range']
|
| 1100 |
+
|
| 1101 |
+
# Add total_influence if available
|
| 1102 |
+
if name_influence is not None:
|
| 1103 |
+
name_groups = name_groups.merge(
|
| 1104 |
+
name_influence.rename(columns={'supernode_name': 'Supernode Name', 'total_influence': 'Total Influence'}),
|
| 1105 |
+
on='Supernode Name',
|
| 1106 |
+
how='left'
|
| 1107 |
+
)
|
| 1108 |
+
# Sort by Total Influence (descending)
|
| 1109 |
+
name_groups = name_groups.sort_values('Total Influence', ascending=False)
|
| 1110 |
+
else:
|
| 1111 |
+
name_groups = name_groups.sort_values('N Features', ascending=False)
|
| 1112 |
+
|
| 1113 |
+
st.dataframe(name_groups, use_container_width=True)
|
| 1114 |
+
|
| 1115 |
+
# Final download
|
| 1116 |
+
st.subheader("💾 Download Results")
|
| 1117 |
+
|
| 1118 |
+
col1, col2 = st.columns(2)
|
| 1119 |
+
|
| 1120 |
+
with col1:
|
| 1121 |
+
csv_final = df_named.to_csv(index=False).encode('utf-8')
|
| 1122 |
+
st.download_button(
|
| 1123 |
+
label="📥 Download Complete CSV",
|
| 1124 |
+
data=csv_final,
|
| 1125 |
+
file_name=f"node_grouping_final_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv",
|
| 1126 |
+
mime="text/csv"
|
| 1127 |
+
)
|
| 1128 |
+
|
| 1129 |
+
with col2:
|
| 1130 |
+
# Export summary JSON
|
| 1131 |
+
summary = {
|
| 1132 |
+
'timestamp': datetime.now().isoformat(),
|
| 1133 |
+
'n_features': int(df_named['feature_key'].nunique()),
|
| 1134 |
+
'n_unique_names': int(df_named.groupby('feature_key')['supernode_name'].first().nunique()),
|
| 1135 |
+
'class_distribution': df_named.groupby('feature_key')['pred_label'].first().value_counts().to_dict(),
|
| 1136 |
+
'thresholds_used': custom_thresholds,
|
| 1137 |
+
'top_supernodes': name_groups.head(10).to_dict('records')
|
| 1138 |
+
}
|
| 1139 |
+
|
| 1140 |
+
json_summary = json.dumps(summary, indent=2).encode('utf-8')
|
| 1141 |
+
st.download_button(
|
| 1142 |
+
label="📥 Download Summary JSON",
|
| 1143 |
+
data=json_summary,
|
| 1144 |
+
file_name=f"node_grouping_summary_{datetime.now().strftime('%Y%m%d_%H%M%S')}.json",
|
| 1145 |
+
mime="application/json"
|
| 1146 |
+
)
|
| 1147 |
+
|
| 1148 |
+
# Upload to Neuronpedia
|
| 1149 |
+
st.divider()
|
| 1150 |
+
st.subheader("🌐 Upload to Neuronpedia")
|
| 1151 |
+
|
| 1152 |
+
st.info("Upload the subgraph with supernodes to Neuronpedia for interactive visualization.")
|
| 1153 |
+
|
| 1154 |
+
# API Key input (load from .env if available)
|
| 1155 |
+
default_api_key = os.getenv("NEURONPEDIA_API_KEY", "")
|
| 1156 |
+
api_key = st.text_input(
|
| 1157 |
+
"Neuronpedia API Key",
|
| 1158 |
+
value=default_api_key,
|
| 1159 |
+
type="password",
|
| 1160 |
+
help="Enter your Neuronpedia API key (required for upload). Can be auto-loaded from .env"
|
| 1161 |
+
)
|
| 1162 |
+
|
| 1163 |
+
# Display name
|
| 1164 |
+
display_name = st.text_input(
|
| 1165 |
+
"Display Name",
|
| 1166 |
+
value=f"Node Grouping - {datetime.now().strftime('%Y-%m-%d %H:%M')}",
|
| 1167 |
+
help="Display name for the subgraph on Neuronpedia"
|
| 1168 |
+
)
|
| 1169 |
+
|
| 1170 |
+
# Overwrite ID (optional)
|
| 1171 |
+
overwrite_id = st.text_input(
|
| 1172 |
+
"Overwrite ID (optional)",
|
| 1173 |
+
value="",
|
| 1174 |
+
help="If provided, overwrites an existing subgraph instead of creating a new one"
|
| 1175 |
+
)
|
| 1176 |
+
|
| 1177 |
+
# Verify we have Graph JSON
|
| 1178 |
+
graph_json_available = st.session_state.get('graph_json_uploaded') is not None
|
| 1179 |
+
|
| 1180 |
+
if not graph_json_available:
|
| 1181 |
+
st.warning("⚠️ Graph JSON not loaded. Load the Graph JSON in Step 3 to enable upload.")
|
| 1182 |
+
|
| 1183 |
+
# Custom CSS for red button
|
| 1184 |
+
st.markdown("""
|
| 1185 |
+
<style>
|
| 1186 |
+
div.stButton > button[kind="secondary"] {
|
| 1187 |
+
background-color: #dc3545;
|
| 1188 |
+
color: white;
|
| 1189 |
+
border: none;
|
| 1190 |
+
}
|
| 1191 |
+
div.stButton > button[kind="secondary"]:hover {
|
| 1192 |
+
background-color: #c82333;
|
| 1193 |
+
color: white;
|
| 1194 |
+
}
|
| 1195 |
+
div.stButton > button[kind="secondary"]:disabled {
|
| 1196 |
+
background-color: #6c757d;
|
| 1197 |
+
color: #adb5bd;
|
| 1198 |
+
}
|
| 1199 |
+
</style>
|
| 1200 |
+
""", unsafe_allow_html=True)
|
| 1201 |
+
|
| 1202 |
+
# Upload button
|
| 1203 |
+
if st.button("🚀 Upload to Neuronpedia", disabled=not (api_key and graph_json_available), key="upload_neuronpedia_red"):
|
| 1204 |
+
if not api_key:
|
| 1205 |
+
st.error("❌ Enter your API Key!")
|
| 1206 |
+
elif not graph_json_available:
|
| 1207 |
+
st.error("❌ Load the Graph JSON before proceeding!")
|
| 1208 |
+
else:
|
| 1209 |
+
try:
|
| 1210 |
+
# Save Graph JSON temporarily
|
| 1211 |
+
graph_to_use = st.session_state.get('graph_json_uploaded')
|
| 1212 |
+
|
| 1213 |
+
if isinstance(graph_to_use, Path):
|
| 1214 |
+
graph_path = str(graph_to_use)
|
| 1215 |
+
else:
|
| 1216 |
+
# If uploaded file, save temporarily
|
| 1217 |
+
graph_path = "temp_graph_upload.json"
|
| 1218 |
+
graph_to_use.seek(0) # Reset file pointer to beginning
|
| 1219 |
+
graph_json_content = json.loads(graph_to_use.read().decode('utf-8'))
|
| 1220 |
+
with open(graph_path, 'w', encoding='utf-8') as f:
|
| 1221 |
+
json.dump(graph_json_content, f)
|
| 1222 |
+
|
| 1223 |
+
# Import upload function
|
| 1224 |
+
import sys
|
| 1225 |
+
import importlib.util
|
| 1226 |
+
spec = importlib.util.spec_from_file_location("node_grouping", "scripts/02_node_grouping.py")
|
| 1227 |
+
node_grouping = importlib.util.module_from_spec(spec)
|
| 1228 |
+
sys.modules["node_grouping"] = node_grouping
|
| 1229 |
+
spec.loader.exec_module(node_grouping)
|
| 1230 |
+
upload_subgraph_to_neuronpedia = node_grouping.upload_subgraph_to_neuronpedia
|
| 1231 |
+
|
| 1232 |
+
# Load graph_json to extract metadata for URL
|
| 1233 |
+
with open(graph_path, 'r', encoding='utf-8') as f:
|
| 1234 |
+
graph_json_content = json.load(f)
|
| 1235 |
+
|
| 1236 |
+
# Upload
|
| 1237 |
+
with st.spinner("Uploading to Neuronpedia..."):
|
| 1238 |
+
# Retrieve selected_nodes_data from session state if available
|
| 1239 |
+
selected_nodes_data = st.session_state.get('selected_nodes_data')
|
| 1240 |
+
|
| 1241 |
+
result = upload_subgraph_to_neuronpedia(
|
| 1242 |
+
df_grouped=df_named,
|
| 1243 |
+
graph_json_path=graph_path,
|
| 1244 |
+
api_key=api_key,
|
| 1245 |
+
display_name=display_name if display_name else None,
|
| 1246 |
+
overwrite_id=overwrite_id if overwrite_id else None,
|
| 1247 |
+
selected_nodes_data=selected_nodes_data,
|
| 1248 |
+
verbose=False
|
| 1249 |
+
)
|
| 1250 |
+
|
| 1251 |
+
# Remove temporary file
|
| 1252 |
+
if Path(graph_path).name == "temp_graph_upload.json" and Path(graph_path).exists():
|
| 1253 |
+
Path(graph_path).unlink()
|
| 1254 |
+
|
| 1255 |
+
st.success("✅ Subgraph uploaded successfully!")
|
| 1256 |
+
|
| 1257 |
+
# Extract metadata for URL construction
|
| 1258 |
+
metadata = graph_json_content.get('metadata', {})
|
| 1259 |
+
model_id = metadata.get('model_id', 'gemma-2-2b')
|
| 1260 |
+
source_set_name = metadata.get('source_set_name', 'clt-hp')
|
| 1261 |
+
slug = metadata.get('slug', '')
|
| 1262 |
+
node_threshold = metadata.get('node_threshold', 0.8)
|
| 1263 |
+
desired_logit_prob = metadata.get('desired_logit_prob', 0.95)
|
| 1264 |
+
|
| 1265 |
+
# Build Neuronpedia URL
|
| 1266 |
+
neuronpedia_url = (
|
| 1267 |
+
f"https://www.neuronpedia.org/{model_id}/graph"
|
| 1268 |
+
f"?sourceSet={source_set_name}"
|
| 1269 |
+
f"&slug={slug}"
|
| 1270 |
+
f"&pruningThreshold={node_threshold}"
|
| 1271 |
+
f"&densityThreshold={desired_logit_prob}"
|
| 1272 |
+
)
|
| 1273 |
+
|
| 1274 |
+
# Display URL with instructions
|
| 1275 |
+
st.markdown(f"[**Open Graph on Neuronpedia**]({neuronpedia_url})")
|
| 1276 |
+
st.info("""
|
| 1277 |
+
**To view the subgraph:**
|
| 1278 |
+
1. Click on the link above to open the graph on Neuronpedia
|
| 1279 |
+
2. Use the **"Load Subgraph"** button in the bottom-left subgraph pane
|
| 1280 |
+
3. Select your uploaded subgraph from the list
|
| 1281 |
+
""")
|
| 1282 |
+
|
| 1283 |
+
# Show result details
|
| 1284 |
+
with st.expander("Upload details", expanded=False):
|
| 1285 |
+
st.json(result)
|
| 1286 |
+
|
| 1287 |
+
except Exception as e:
|
| 1288 |
+
st.error(f"❌ Upload error: {e}")
|
| 1289 |
+
import traceback
|
| 1290 |
+
st.code(traceback.format_exc())
|
| 1291 |
+
|
| 1292 |
+
# Display debug payload if it exists
|
| 1293 |
+
debug_payload_path = Path("output") / "debug_neuronpedia_payload.json"
|
| 1294 |
+
if debug_payload_path.exists():
|
| 1295 |
+
st.info("Debug: payload saved to output/debug_neuronpedia_payload.json")
|
| 1296 |
+
with open(debug_payload_path, 'r', encoding='utf-8') as f:
|
| 1297 |
+
payload_data = json.load(f)
|
| 1298 |
+
|
| 1299 |
+
with st.expander("View sent payload"):
|
| 1300 |
+
st.json(payload_data)
|
| 1301 |
+
|
| 1302 |
+
# ===== FOOTER =====
|
| 1303 |
+
|
| 1304 |
+
st.divider()
|
| 1305 |
+
|
| 1306 |
+
st.markdown("""
|
| 1307 |
+
### 📚 References
|
| 1308 |
+
|
| 1309 |
+
- **Script**: `scripts/02_node_grouping.py`
|
| 1310 |
+
- **Documentation**: `output/STEP3_READY_FOR_REVIEW.md`
|
| 1311 |
+
- **Tests**: `tests/test_node_naming.py`
|
| 1312 |
+
|
| 1313 |
+
### 💡 Tips
|
| 1314 |
+
|
| 1315 |
+
- **Relationship**: Always provide the JSON activations for accurate naming
|
| 1316 |
+
- **Thresholds**: Start with default values, then refine based on results
|
| 1317 |
+
- **Review**: Manually check features with `review=True`
|
| 1318 |
+
- **Iteration**: You can re-run Steps 2 and 3 with different thresholds without redoing Step 1
|
| 1319 |
+
""")
|
| 1320 |
+
|
eda/pages/README_NODE_GROUPING.md
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pagina Node Grouping - Guida Utente
|
| 2 |
+
|
| 3 |
+
**File**: `eda/pages/02_Node_Grouping.py`
|
| 4 |
+
**Data**: 2025-10-25
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## Panoramica
|
| 9 |
+
|
| 10 |
+
La pagina **Node Grouping** è un'interfaccia Streamlit interattiva per classificare e nominare automaticamente i supernodi nel grafo di attribuzione.
|
| 11 |
+
|
| 12 |
+
### Funzionalità Principali
|
| 13 |
+
|
| 14 |
+
1. **Upload Files**: Carica CSV export e JSON attivazioni
|
| 15 |
+
2. **Step 1 - Preparazione**: Classifica token e trova target tokens
|
| 16 |
+
3. **Step 2 - Classificazione**: Assegna classi ai nodi (Semantic, Say X, Relationship)
|
| 17 |
+
4. **Step 3 - Naming**: Genera nomi descrittivi per ogni supernodo
|
| 18 |
+
5. **Parametri Configurabili**: Modifica soglie e parametri in tempo reale
|
| 19 |
+
6. **Download Risultati**: Esporta CSV e JSON summary
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Come Usare
|
| 24 |
+
|
| 25 |
+
### 1. Avvio Applicazione
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
cd eda
|
| 29 |
+
streamlit run app.py
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
Oppure direttamente:
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
streamlit run eda/pages/02_Node_Grouping.py
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
### 2. Upload Files
|
| 39 |
+
|
| 40 |
+
**Sidebar → Input Files**
|
| 41 |
+
|
| 42 |
+
- **CSV Export (richiesto)**: File generato da Probe Prompts
|
| 43 |
+
- Es: `output/2025-10-21T07-40_export_ENRICHED.csv`
|
| 44 |
+
- Deve contenere colonne: `feature_key`, `layer`, `prompt`, `peak_token`, `peak_token_idx`, `activation_max`, `sparsity_ratio`
|
| 45 |
+
|
| 46 |
+
- **JSON Attivazioni (opzionale)**: File con attivazioni token-by-token
|
| 47 |
+
- Es: `output/activations_dump (2).json`
|
| 48 |
+
- Migliora l'accuratezza del naming per Relationship
|
| 49 |
+
- Struttura: `{"results": [{"prompt": "...", "tokens": [...], "counts": [...]}]}`
|
| 50 |
+
|
| 51 |
+
### 3. Configurazione Parametri
|
| 52 |
+
|
| 53 |
+
**Sidebar → Parametri Pipeline**
|
| 54 |
+
|
| 55 |
+
- **Finestra ricerca target** (default: 7): Numero massimo di token da esplorare per trovare target semantici
|
| 56 |
+
|
| 57 |
+
**Sidebar → Soglie Classificazione**
|
| 58 |
+
|
| 59 |
+
Espandi le sezioni per modificare le soglie:
|
| 60 |
+
|
| 61 |
+
#### Dictionary Semantic
|
| 62 |
+
- **Peak Consistency (min)**: 0.8 (default)
|
| 63 |
+
- Quanto spesso il token deve essere peak quando appare nel prompt
|
| 64 |
+
- **N Distinct Peaks (max)**: 1 (default)
|
| 65 |
+
- Numero massimo di token distinti come peak
|
| 66 |
+
|
| 67 |
+
#### Say X
|
| 68 |
+
- **Func vs Sem % (min)**: 50.0 (default)
|
| 69 |
+
- Differenza % tra max activation su functional vs semantic
|
| 70 |
+
- **Confidence F (min)**: 0.90 (default)
|
| 71 |
+
- Frazione di peak su token funzionali
|
| 72 |
+
- **Layer (min)**: 7 (default)
|
| 73 |
+
- Layer minimo per Say X (tipicamente layer alti)
|
| 74 |
+
|
| 75 |
+
#### Relationship
|
| 76 |
+
- **Sparsity (max)**: 0.45 (default)
|
| 77 |
+
- Sparsity massima (bassa = attivazione diffusa)
|
| 78 |
+
|
| 79 |
+
#### Semantic (Concept)
|
| 80 |
+
- **Layer (max)**: 3 (default)
|
| 81 |
+
- Layer massimo per fallback Dictionary
|
| 82 |
+
- **Confidence S (min)**: 0.50 (default)
|
| 83 |
+
- Frazione di peak su token semantici
|
| 84 |
+
- **Func vs Sem % (max)**: 50.0 (default)
|
| 85 |
+
- Differenza % massima per considerare Semantic
|
| 86 |
+
|
| 87 |
+
### 4. Esecuzione Pipeline
|
| 88 |
+
|
| 89 |
+
#### Step 1: Preparazione Dataset
|
| 90 |
+
|
| 91 |
+
1. Clicca **"▶️ Esegui Step 1"**
|
| 92 |
+
2. Attendi elaborazione
|
| 93 |
+
3. Verifica statistiche:
|
| 94 |
+
- Token Funzionali vs Semantici
|
| 95 |
+
- Tokens da JSON vs Fallback
|
| 96 |
+
4. Esamina campione risultati
|
| 97 |
+
5. (Opzionale) Download CSV Step 1
|
| 98 |
+
|
| 99 |
+
**Cosa fa**:
|
| 100 |
+
- Classifica ogni `peak_token` come functional o semantic
|
| 101 |
+
- Per token funzionali, trova il primo token semantico nella direzione specificata
|
| 102 |
+
- Aggiunge colonne: `peak_token_type`, `target_tokens`, `tokens_source`
|
| 103 |
+
|
| 104 |
+
#### Step 2: Classificazione Nodi
|
| 105 |
+
|
| 106 |
+
1. (Opzionale) Modifica soglie nella sidebar
|
| 107 |
+
2. Clicca **"▶️ Esegui Step 2"**
|
| 108 |
+
3. Attendi elaborazione
|
| 109 |
+
4. Verifica distribuzione classi:
|
| 110 |
+
- Semantic: ~90%
|
| 111 |
+
- Relationship: ~10%
|
| 112 |
+
- Say X: variabile
|
| 113 |
+
5. Controlla warning per feature in review
|
| 114 |
+
6. Filtra per classe e esamina risultati
|
| 115 |
+
7. (Opzionale) Download CSV Step 2
|
| 116 |
+
|
| 117 |
+
**Cosa fa**:
|
| 118 |
+
- Aggrega metriche per ogni `feature_key`
|
| 119 |
+
- Applica albero decisionale per classificare
|
| 120 |
+
- Aggiunge colonne: `pred_label`, `subtype`, `confidence`, `review`, `why_review`
|
| 121 |
+
|
| 122 |
+
**Iterazione**:
|
| 123 |
+
- Puoi modificare le soglie e rieseguire Step 2 senza rifare Step 1
|
| 124 |
+
- Utile per affinare la classificazione
|
| 125 |
+
|
| 126 |
+
#### Step 3: Naming Supernodi
|
| 127 |
+
|
| 128 |
+
1. Clicca **"▶️ Esegui Step 3"**
|
| 129 |
+
2. Attendi elaborazione
|
| 130 |
+
3. Verifica:
|
| 131 |
+
- Feature Totali vs Nomi Unici
|
| 132 |
+
- Esempi naming per classe
|
| 133 |
+
4. Esamina risultati finali
|
| 134 |
+
5. Analizza raggruppamento per `supernode_name`
|
| 135 |
+
6. Download CSV Completo e Summary JSON
|
| 136 |
+
|
| 137 |
+
**Cosa fa**:
|
| 138 |
+
- Per Relationship: `"(X) related"` (X = primo token semantico con max attivazione)
|
| 139 |
+
- Per Semantic: Nome del token con max activation (es. "Texas", "city")
|
| 140 |
+
- Per Say X: `"Say (X)"` (X = target_token, es. "Say (Austin)")
|
| 141 |
+
- Aggiunge colonna: `supernode_name`
|
| 142 |
+
|
| 143 |
+
### 5. Download Risultati
|
| 144 |
+
|
| 145 |
+
**Dopo Step 3**:
|
| 146 |
+
|
| 147 |
+
- **📥 Download CSV Completo**: File con tutte le colonne aggiunte
|
| 148 |
+
- Formato: `node_grouping_final_YYYYMMDD_HHMMSS.csv`
|
| 149 |
+
- Contiene: tutte le colonne originali + `peak_token_type`, `target_tokens`, `pred_label`, `subtype`, `supernode_name`, etc.
|
| 150 |
+
|
| 151 |
+
- **📥 Download Summary JSON**: Riepilogo statistiche
|
| 152 |
+
- Formato: `node_grouping_summary_YYYYMMDD_HHMMSS.json`
|
| 153 |
+
- Contiene: timestamp, n_features, distribuzione classi, soglie usate, top supernodes
|
| 154 |
+
|
| 155 |
+
---
|
| 156 |
+
|
| 157 |
+
## Interpretazione Risultati
|
| 158 |
+
|
| 159 |
+
### Classi di Supernodi
|
| 160 |
+
|
| 161 |
+
#### Semantic (Dictionary)
|
| 162 |
+
- **Caratteristiche**: Si attiva sempre sullo stesso token specifico
|
| 163 |
+
- **Esempio**: Feature che si attiva solo su "Texas"
|
| 164 |
+
- **Metriche**: `peak_consistency` alta (≥0.8), `n_distinct_peaks` = 1
|
| 165 |
+
- **Naming**: Nome del token (es. "Texas")
|
| 166 |
+
|
| 167 |
+
#### Semantic (Concept)
|
| 168 |
+
- **Caratteristiche**: Si attiva su token semanticamente simili
|
| 169 |
+
- **Esempio**: Feature che si attiva su "city", "capital", "state"
|
| 170 |
+
- **Metriche**: `conf_S` alta (≥0.50), layer medio-basso
|
| 171 |
+
- **Naming**: Token con max activation (es. "city")
|
| 172 |
+
|
| 173 |
+
#### Say X
|
| 174 |
+
- **Caratteristiche**: Si attiva su token funzionali per predire il prossimo token
|
| 175 |
+
- **Esempio**: Feature che si attiva su "is" prima di "Austin"
|
| 176 |
+
- **Metriche**: `func_vs_sem` alta (≥50%), `conf_F` alta (≥0.90), layer alto (≥7)
|
| 177 |
+
- **Naming**: `"Say (X)"` dove X è il target_token (es. "Say (Austin)")
|
| 178 |
+
|
| 179 |
+
#### Relationship
|
| 180 |
+
- **Caratteristiche**: Collega concetti semantici multipli con attivazione diffusa
|
| 181 |
+
- **Esempio**: Feature che si attiva su "city", "capital", "state" insieme
|
| 182 |
+
- **Metriche**: `sparsity` bassa (<0.45), `K_sem_distinct` alto
|
| 183 |
+
- **Naming**: `"(X) related"` dove X è il primo token semantico con max attivazione
|
| 184 |
+
|
| 185 |
+
### Metriche Chiave
|
| 186 |
+
|
| 187 |
+
- **peak_consistency_main**: Quanto spesso il token principale è peak quando appare nel prompt
|
| 188 |
+
- Range: 0.0 - 1.0
|
| 189 |
+
- Interpretazione: 1.0 = sempre peak, 0.5 = 50% delle volte
|
| 190 |
+
|
| 191 |
+
- **n_distinct_peaks**: Numero di token distinti come peak
|
| 192 |
+
- Range: 1 - N
|
| 193 |
+
- Interpretazione: 1 = sempre lo stesso token, >1 = vari token
|
| 194 |
+
|
| 195 |
+
- **func_vs_sem_pct**: Differenza % tra max activation su functional vs semantic
|
| 196 |
+
- Range: -100% a +100%
|
| 197 |
+
- Interpretazione: +100% = solo functional, -100% = solo semantic, 0% = uguale
|
| 198 |
+
|
| 199 |
+
- **conf_F / conf_S**: Frazione di peak su token funzionali/semantici
|
| 200 |
+
- Range: 0.0 - 1.0
|
| 201 |
+
- Interpretazione: `conf_F` + `conf_S` = 1.0
|
| 202 |
+
|
| 203 |
+
- **sparsity_median**: Mediana sparsity (solo prompt attivi)
|
| 204 |
+
- Range: 0.0 - 1.0
|
| 205 |
+
- Interpretazione: 0.0 = attivazione diffusa, 1.0 = attivazione concentrata
|
| 206 |
+
|
| 207 |
+
- **K_sem_distinct**: Numero di token semantici distinti
|
| 208 |
+
- Range: 0 - N
|
| 209 |
+
- Interpretazione: Alto = molti token diversi (Relationship/Concept)
|
| 210 |
+
|
| 211 |
+
---
|
| 212 |
+
|
| 213 |
+
## Troubleshooting
|
| 214 |
+
|
| 215 |
+
### Errore: "API Key non trovata"
|
| 216 |
+
- **Soluzione**: Non applicabile per Node Grouping (non richiede API key)
|
| 217 |
+
|
| 218 |
+
### Errore: "Impossibile caricare CSV"
|
| 219 |
+
- **Causa**: File CSV corrotto o formato errato
|
| 220 |
+
- **Soluzione**: Verifica che il CSV contenga le colonne richieste
|
| 221 |
+
|
| 222 |
+
### Errore: "Impossibile caricare JSON"
|
| 223 |
+
- **Causa**: File JSON corrotto o formato errato
|
| 224 |
+
- **Soluzione**: Verifica che il JSON abbia la struttura corretta (`results` array)
|
| 225 |
+
|
| 226 |
+
### Warning: "N feature richiedono review"
|
| 227 |
+
- **Causa**: Casi ambigui che non rientrano chiaramente in una classe
|
| 228 |
+
- **Soluzione**: Esamina manualmente le feature con `review=True` e considera di modificare le soglie
|
| 229 |
+
|
| 230 |
+
### Naming Relationship non accurato
|
| 231 |
+
- **Causa**: JSON attivazioni non fornito o non completo
|
| 232 |
+
- **Soluzione**: Carica il JSON attivazioni completo con tutti i prompt del CSV
|
| 233 |
+
|
| 234 |
+
### Classificazione non soddisfacente
|
| 235 |
+
- **Causa**: Soglie di default non adatte al dataset
|
| 236 |
+
- **Soluzione**: Modifica le soglie nella sidebar e riesegui Step 2
|
| 237 |
+
|
| 238 |
+
---
|
| 239 |
+
|
| 240 |
+
## Best Practices
|
| 241 |
+
|
| 242 |
+
1. **Fornisci sempre il JSON attivazioni** per Relationship naming accurato
|
| 243 |
+
2. **Inizia con soglie di default**, poi affina in base ai risultati
|
| 244 |
+
3. **Controlla le feature in review** per identificare casi edge
|
| 245 |
+
4. **Itera su Step 2 e 3** con soglie diverse senza rifare Step 1
|
| 246 |
+
5. **Esamina la distribuzione classi** per verificare che sia ragionevole
|
| 247 |
+
6. **Analizza i nomi generati** per verificare che siano interpretabili
|
| 248 |
+
7. **Scarica il Summary JSON** per documentare le soglie usate
|
| 249 |
+
|
| 250 |
+
---
|
| 251 |
+
|
| 252 |
+
## Integrazione con Altri Step
|
| 253 |
+
|
| 254 |
+
### Input
|
| 255 |
+
- **Da Step 01 (Probe Prompts)**: CSV export con attivazioni
|
| 256 |
+
- **Da Step 00 (Graph Generation)**: JSON attivazioni (opzionale)
|
| 257 |
+
|
| 258 |
+
### Output
|
| 259 |
+
- **Per Visualizzazione**: CSV con `supernode_name` per etichette grafo
|
| 260 |
+
- **Per Analisi**: CSV completo con tutte le metriche e classificazioni
|
| 261 |
+
- **Per Documentazione**: Summary JSON con statistiche e parametri
|
| 262 |
+
|
| 263 |
+
---
|
| 264 |
+
|
| 265 |
+
## Riferimenti
|
| 266 |
+
|
| 267 |
+
- **Script Backend**: `scripts/02_node_grouping.py`
|
| 268 |
+
- **Documentazione Tecnica**: `output/STEP3_IMPLEMENTATION_SUMMARY.md`
|
| 269 |
+
- **Guida Rapida**: `output/STEP3_READY_FOR_REVIEW.md`
|
| 270 |
+
- **Test**: `tests/test_node_naming.py`
|
| 271 |
+
- **Piano Originale**: `node.plan.md`
|
| 272 |
+
|
| 273 |
+
---
|
| 274 |
+
|
| 275 |
+
## Supporto
|
| 276 |
+
|
| 277 |
+
Per domande o problemi:
|
| 278 |
+
1. Consulta questa guida
|
| 279 |
+
2. Leggi la documentazione tecnica in `output/`
|
| 280 |
+
3. Esamina gli esempi nel CSV ENRICHED
|
| 281 |
+
4. Contatta il team di sviluppo
|
| 282 |
+
|
| 283 |
+
**Buon lavoro con Node Grouping!** 🔗
|
| 284 |
+
|
eda/pages/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Streamlit pages"""
|
| 2 |
+
|
eda/probe_prompts.log
ADDED
|
File without changes
|
eda/utils/__init__.py
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Utility modules"""
|
| 2 |
+
|
eda/utils/__pycache__/__init__.cpython-313.pyc
ADDED
|
Binary file (186 Bytes). View file
|
|
|
eda/utils/__pycache__/compute.cpython-313.pyc
ADDED
|
Binary file (11.9 kB). View file
|
|
|
eda/utils/__pycache__/data_loader.cpython-313.pyc
ADDED
|
Binary file (8.45 kB). View file
|
|
|
eda/utils/__pycache__/file_monitor.cpython-313.pyc
ADDED
|
Binary file (11.6 kB). View file
|
|
|
eda/utils/__pycache__/graph_visualization.cpython-313.pyc
ADDED
|
Binary file (26.6 kB). View file
|
|
|
eda/utils/__pycache__/pipeline_state.cpython-313.pyc
ADDED
|
Binary file (12.8 kB). View file
|
|
|
eda/utils/__pycache__/plots.cpython-313.pyc
ADDED
|
Binary file (10.3 kB). View file
|
|
|
eda/utils/graph_visualization.py
ADDED
|
@@ -0,0 +1,655 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Utilities for interactive visualization of extracted graphs"""
|
| 2 |
+
import pandas as pd
|
| 3 |
+
import plotly.express as px
|
| 4 |
+
import streamlit as st
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
def create_scatter_plot_with_filter(graph_data):
|
| 8 |
+
"""
|
| 9 |
+
Crea uno scatter plot interattivo con filtro per cumulative influence
|
| 10 |
+
|
| 11 |
+
Args:
|
| 12 |
+
graph_data: Dizionario contenente i dati del grafo (nodes, metadata, etc)
|
| 13 |
+
"""
|
| 14 |
+
if 'nodes' not in graph_data:
|
| 15 |
+
st.warning("⚠️ No nodes found in graph data")
|
| 16 |
+
return
|
| 17 |
+
|
| 18 |
+
# Estrai prompt_tokens dalla metadata per mappare ctx_idx -> token
|
| 19 |
+
prompt_tokens = graph_data.get('metadata', {}).get('prompt_tokens', [])
|
| 20 |
+
|
| 21 |
+
# Crea mapping ctx_idx -> token
|
| 22 |
+
token_map = {i: token for i, token in enumerate(prompt_tokens)}
|
| 23 |
+
|
| 24 |
+
# Estrai i nodi con ctx_idx, layer e influence
|
| 25 |
+
# Mappa layer 'E' (embeddings) a -1, numeri restano numeri
|
| 26 |
+
scatter_data = []
|
| 27 |
+
skipped_nodes = [] # Per logging nodi problematici
|
| 28 |
+
|
| 29 |
+
for node in graph_data['nodes']:
|
| 30 |
+
layer_val = node.get('layer', '')
|
| 31 |
+
|
| 32 |
+
try:
|
| 33 |
+
# Mappa embedding layer a -1
|
| 34 |
+
if str(layer_val).upper() == 'E':
|
| 35 |
+
layer_numeric = -1
|
| 36 |
+
else:
|
| 37 |
+
# Prova a convertire a int
|
| 38 |
+
layer_numeric = int(layer_val)
|
| 39 |
+
|
| 40 |
+
# Gestisci influence: usa valore minimo se mancante o zero
|
| 41 |
+
influence_val = node.get('influence', 0)
|
| 42 |
+
if influence_val is None or influence_val == 0:
|
| 43 |
+
influence_val = 0.001 # Valore minimo per visibilità
|
| 44 |
+
|
| 45 |
+
# Ottieni ctx_idx e mappa al token
|
| 46 |
+
ctx_idx_val = node.get('ctx_idx', 0)
|
| 47 |
+
token_str = token_map.get(ctx_idx_val, f"ctx_{ctx_idx_val}")
|
| 48 |
+
|
| 49 |
+
# Estrai feature_index dal node_id SOLO per nodi SAE
|
| 50 |
+
# Formato SAE: "layer_featureIndex_sequence" → es. "24_79427_7"
|
| 51 |
+
# Altri tipi (MLP error, embeddings, logits) usano formati diversi
|
| 52 |
+
node_id = node.get('node_id', '')
|
| 53 |
+
node_type = node.get('feature_type', '')
|
| 54 |
+
feature_idx = None
|
| 55 |
+
|
| 56 |
+
if node_type == 'cross layer transcoder':
|
| 57 |
+
# Solo per nodi SAE: estrai feature_idx da node_id
|
| 58 |
+
if node_id and '_' in node_id:
|
| 59 |
+
parts = node_id.split('_')
|
| 60 |
+
if len(parts) >= 2:
|
| 61 |
+
try:
|
| 62 |
+
# Il secondo elemento è il feature_index
|
| 63 |
+
feature_idx = int(parts[1])
|
| 64 |
+
except (ValueError, IndexError):
|
| 65 |
+
pass
|
| 66 |
+
|
| 67 |
+
# Se il parsing fallisce per un nodo SAE, skippa!
|
| 68 |
+
if feature_idx is None:
|
| 69 |
+
skipped_nodes.append(f"layer={layer_val}, node_id={node_id}, type=SAE")
|
| 70 |
+
continue # Salta nodi SAE malformati
|
| 71 |
+
else:
|
| 72 |
+
# Per nodi non-SAE (embeddings, logits, MLP error, ecc.):
|
| 73 |
+
# usa -1 come placeholder - NON estrarre da node_id!
|
| 74 |
+
feature_idx = -1
|
| 75 |
+
|
| 76 |
+
scatter_data.append({
|
| 77 |
+
'layer': layer_numeric,
|
| 78 |
+
'ctx_idx': ctx_idx_val,
|
| 79 |
+
'token': token_str,
|
| 80 |
+
'id': node_id,
|
| 81 |
+
'influence': influence_val,
|
| 82 |
+
'feature': feature_idx # Ora contiene l'indice corretto o -1 per non-features!
|
| 83 |
+
})
|
| 84 |
+
except (ValueError, TypeError):
|
| 85 |
+
# Salta nodi con layer non valido
|
| 86 |
+
continue
|
| 87 |
+
|
| 88 |
+
# Log nodi skippati se ce ne sono
|
| 89 |
+
if skipped_nodes:
|
| 90 |
+
st.warning(f"⚠️ {len(skipped_nodes)} feature nodes with malformed node_id were skipped")
|
| 91 |
+
with st.expander("Skipped nodes details"):
|
| 92 |
+
for node_info in skipped_nodes[:10]: # Mostra solo i primi 10
|
| 93 |
+
st.text(node_info)
|
| 94 |
+
if len(skipped_nodes) > 10:
|
| 95 |
+
st.text(f"... and {len(skipped_nodes) - 10} more nodes")
|
| 96 |
+
|
| 97 |
+
if not scatter_data:
|
| 98 |
+
st.warning("⚠️ No valid nodes found for plotting")
|
| 99 |
+
return
|
| 100 |
+
|
| 101 |
+
scatter_df = pd.DataFrame(scatter_data)
|
| 102 |
+
|
| 103 |
+
# Pulisci NaN e valori invalidi
|
| 104 |
+
scatter_df['influence'] = scatter_df['influence'].fillna(0.001)
|
| 105 |
+
scatter_df['influence'] = scatter_df['influence'].replace(0, 0.001)
|
| 106 |
+
|
| 107 |
+
# === BINNING PER EVITARE SOVRAPPOSIZIONI (stile Neuronpedia) ===
|
| 108 |
+
# Per ogni combinazione (ctx_idx, layer), distribuiamo i nodi su sub-colonne
|
| 109 |
+
import numpy as np
|
| 110 |
+
|
| 111 |
+
bin_width = 0.3 # Larghezza della sub-colonna
|
| 112 |
+
scatter_df['sub_column'] = 0
|
| 113 |
+
|
| 114 |
+
for (ctx, layer), group in scatter_df.groupby(['ctx_idx', 'layer']):
|
| 115 |
+
n_nodes = len(group)
|
| 116 |
+
if n_nodes > 1:
|
| 117 |
+
# Calcola quante sub-colonne servono (max 5 per evitare troppa dispersione)
|
| 118 |
+
n_bins = min(5, int(np.ceil(np.sqrt(n_nodes))))
|
| 119 |
+
# Assegna ogni nodo a una sub-colonna
|
| 120 |
+
for i, idx in enumerate(group.index):
|
| 121 |
+
sub_col = (i % n_bins) - (n_bins - 1) / 2 # Centra attorno a 0
|
| 122 |
+
scatter_df.at[idx, 'sub_column'] = sub_col * bin_width
|
| 123 |
+
|
| 124 |
+
# Applica offset per creare sub-colonne
|
| 125 |
+
scatter_df['ctx_idx_display'] = scatter_df['ctx_idx'] + scatter_df['sub_column']
|
| 126 |
+
|
| 127 |
+
# === FILTRO PER CUMULATIVE INFLUENCE ===
|
| 128 |
+
st.markdown("### 3️⃣ Filter Features by Cumulative Influence Coverage")
|
| 129 |
+
|
| 130 |
+
# Calcola il massimo valore di influence presente nei dati
|
| 131 |
+
max_influence = scatter_df['influence'].max()
|
| 132 |
+
|
| 133 |
+
# Mostra il node_threshold usato durante la generazione (se disponibile)
|
| 134 |
+
node_threshold_used = graph_data.get('metadata', {}).get('node_threshold', None)
|
| 135 |
+
|
| 136 |
+
if node_threshold_used is not None:
|
| 137 |
+
st.info(f"""
|
| 138 |
+
**The `influence` field is the cumulative coverage (0-{max_influence:.2f})** calculated by circuit tracer pruning. When nodes are sorted by descending influence, a node with `influence=0.65` means that
|
| 139 |
+
**up to that node** covers 65% of the total influence.
|
| 140 |
+
""")
|
| 141 |
+
else:
|
| 142 |
+
st.info(f"""
|
| 143 |
+
**The `influence` field is the cumulative coverage (0-{max_influence:.2f})** calculated by circuit tracer pruning.
|
| 144 |
+
|
| 145 |
+
When nodes are sorted by descending influence, a node with `influence=0.65` means that
|
| 146 |
+
**up to that node** covers 65% of the total influence.
|
| 147 |
+
""")
|
| 148 |
+
|
| 149 |
+
cumulative_threshold = st.slider(
|
| 150 |
+
"Cumulative Influence Threshold",
|
| 151 |
+
min_value=0.0,
|
| 152 |
+
max_value=float(max_influence),
|
| 153 |
+
value=float(max_influence),
|
| 154 |
+
step=0.01,
|
| 155 |
+
key="cumulative_slider_main",
|
| 156 |
+
help=f"Keep only nodes with influence ≤ threshold. Range: 0.0 - {max_influence:.2f} (max in data)"
|
| 157 |
+
)
|
| 158 |
+
|
| 159 |
+
# Checkbox per filtrare reconstruction error nodes
|
| 160 |
+
filter_error_nodes = st.checkbox(
|
| 161 |
+
"Exclude Reconstruction Error Nodes (feature = -1)",
|
| 162 |
+
value=False,
|
| 163 |
+
key="filter_error_checkbox",
|
| 164 |
+
help="Reconstruction error nodes represent the part of the model not explained by SAE features"
|
| 165 |
+
)
|
| 166 |
+
|
| 167 |
+
# Filtra usando direttamente il campo influence dal JSON
|
| 168 |
+
num_total = len(scatter_df)
|
| 169 |
+
|
| 170 |
+
# Identifica reconstruction error nodes (feature = -1) - KPI verrà calcolato dopo
|
| 171 |
+
is_error_node = scatter_df['feature'] == -1
|
| 172 |
+
n_error_total = is_error_node.sum()
|
| 173 |
+
pct_error_nodes = (n_error_total / num_total * 100) if num_total > 0 else 0
|
| 174 |
+
|
| 175 |
+
# Identifica embeddings e logits da mantenere sempre
|
| 176 |
+
is_embedding = scatter_df['layer'] == -1 # Layer 'E' mappato a -1
|
| 177 |
+
# Logits hanno layer massimo (es. layer 27 per gemma-2-2b con 26 layer + 1)
|
| 178 |
+
max_layer = scatter_df['layer'].max()
|
| 179 |
+
is_logit = scatter_df['layer'] == max_layer
|
| 180 |
+
|
| 181 |
+
# Applica filtri combinati: influence threshold + error nodes (se checkbox attivo)
|
| 182 |
+
if cumulative_threshold < 1.0:
|
| 183 |
+
mask_influence = scatter_df['influence'] <= cumulative_threshold
|
| 184 |
+
mask_keep = mask_influence | is_embedding | is_logit
|
| 185 |
+
else:
|
| 186 |
+
mask_keep = pd.Series([True] * len(scatter_df), index=scatter_df.index)
|
| 187 |
+
|
| 188 |
+
# Applica filtro error nodes se checkbox attivo
|
| 189 |
+
if filter_error_nodes:
|
| 190 |
+
# Escludi error nodes (feature = -1), ma mantieni embeddings/logits
|
| 191 |
+
mask_not_error = (scatter_df['feature'] != -1) | is_embedding | is_logit
|
| 192 |
+
mask_keep = mask_keep & mask_not_error
|
| 193 |
+
|
| 194 |
+
scatter_filtered = scatter_df[mask_keep].copy()
|
| 195 |
+
|
| 196 |
+
# Soglia di influence effettiva (max influence tra i nodi filtrati, escludendo embeddings/logits)
|
| 197 |
+
feature_nodes_filtered = scatter_filtered[~((scatter_filtered['layer'] == -1) | (scatter_filtered['layer'] == max_layer))]
|
| 198 |
+
if len(feature_nodes_filtered) > 0:
|
| 199 |
+
threshold_influence = feature_nodes_filtered['influence'].max()
|
| 200 |
+
else:
|
| 201 |
+
threshold_influence = 0.0
|
| 202 |
+
|
| 203 |
+
num_selected = len(scatter_filtered)
|
| 204 |
+
|
| 205 |
+
# Conta embeddings, features e error nodes nel dataset filtrato (prima di rimuovere logit)
|
| 206 |
+
is_embedding_filtered = scatter_filtered['layer'] == -1
|
| 207 |
+
max_layer_filtered = scatter_filtered['layer'].max()
|
| 208 |
+
is_logit_filtered = scatter_filtered['layer'] == max_layer_filtered
|
| 209 |
+
is_error_filtered = scatter_filtered['feature'] == -1
|
| 210 |
+
|
| 211 |
+
n_embeddings = len(scatter_filtered[is_embedding_filtered])
|
| 212 |
+
n_error_nodes = len(scatter_filtered[is_error_filtered & ~is_embedding_filtered & ~is_logit_filtered])
|
| 213 |
+
n_features = len(scatter_filtered[~(is_embedding_filtered | is_logit_filtered | is_error_filtered)])
|
| 214 |
+
n_logits_excluded = len(scatter_filtered[is_logit_filtered])
|
| 215 |
+
n_error_excluded = n_error_total - n_error_nodes if filter_error_nodes else 0
|
| 216 |
+
|
| 217 |
+
# Mostra statistiche filtro
|
| 218 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 219 |
+
|
| 220 |
+
with col1:
|
| 221 |
+
st.metric("Total Nodes", num_total)
|
| 222 |
+
|
| 223 |
+
with col2:
|
| 224 |
+
st.metric("Selected Nodes", num_selected)
|
| 225 |
+
|
| 226 |
+
with col3:
|
| 227 |
+
pct = (num_selected / num_total * 100) if num_total > 0 else 0
|
| 228 |
+
st.metric("% Nodes", f"{pct:.1f}%")
|
| 229 |
+
|
| 230 |
+
with col4:
|
| 231 |
+
st.metric("Influence Threshold", f"{threshold_influence:.6f}")
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
# Usa il dataframe filtrato per il plot
|
| 235 |
+
scatter_df = scatter_filtered
|
| 236 |
+
|
| 237 |
+
# Ricalcola le sub-colonne per il dataset filtrato
|
| 238 |
+
scatter_df = scatter_df.copy()
|
| 239 |
+
scatter_df['sub_column'] = 0
|
| 240 |
+
|
| 241 |
+
for (ctx, layer), group in scatter_df.groupby(['ctx_idx', 'layer']):
|
| 242 |
+
n_nodes = len(group)
|
| 243 |
+
if n_nodes > 1:
|
| 244 |
+
n_bins = min(5, int(np.ceil(np.sqrt(n_nodes))))
|
| 245 |
+
for i, idx in enumerate(group.index):
|
| 246 |
+
sub_col = (i % n_bins) - (n_bins - 1) / 2
|
| 247 |
+
scatter_df.at[idx, 'sub_column'] = sub_col * bin_width
|
| 248 |
+
|
| 249 |
+
scatter_df['ctx_idx_display'] = scatter_df['ctx_idx'] + scatter_df['sub_column']
|
| 250 |
+
|
| 251 |
+
# Calcola node_influence (marginal influence) per il raggio dei cerchi/quadrati
|
| 252 |
+
# Se non presente nel JSON (vecchi grafi), calcoliamo al volo
|
| 253 |
+
if 'node_influence' not in scatter_df.columns:
|
| 254 |
+
# Calcola marginal influence come differenza tra cumulative consecutive
|
| 255 |
+
df_sorted_by_cumul = scatter_df.sort_values('influence').reset_index(drop=True)
|
| 256 |
+
df_sorted_by_cumul['node_influence'] = df_sorted_by_cumul['influence'].diff()
|
| 257 |
+
df_sorted_by_cumul.loc[0, 'node_influence'] = df_sorted_by_cumul.loc[0, 'influence']
|
| 258 |
+
|
| 259 |
+
# Remap al dataframe originale
|
| 260 |
+
node_id_to_marginal = dict(zip(df_sorted_by_cumul['id'], df_sorted_by_cumul['node_influence']))
|
| 261 |
+
scatter_df['node_influence'] = scatter_df['id'].map(node_id_to_marginal).fillna(scatter_df['influence'])
|
| 262 |
+
|
| 263 |
+
# CALCOLA KPI ERROR NODES (ora che node_influence è disponibile)
|
| 264 |
+
# Usa scatter_df (dataset completo prima della rimozione logit) per i KPI globali
|
| 265 |
+
is_error_in_complete = scatter_df['feature'] == -1
|
| 266 |
+
total_node_influence = scatter_df['node_influence'].sum()
|
| 267 |
+
error_node_influence = scatter_df[is_error_in_complete]['node_influence'].sum()
|
| 268 |
+
pct_error_influence = (error_node_influence / total_node_influence * 100) if total_node_influence > 0 else 0
|
| 269 |
+
|
| 270 |
+
# Mostra KPI reconstruction error nodes (prima del plot)
|
| 271 |
+
col1, col2 = st.columns(2)
|
| 272 |
+
with col1:
|
| 273 |
+
st.metric(
|
| 274 |
+
"% Error Nodes",
|
| 275 |
+
f"{pct_error_nodes:.1f}%",
|
| 276 |
+
help=f"{n_error_total} out of {num_total} total nodes are reconstruction error (feature=-1)"
|
| 277 |
+
)
|
| 278 |
+
with col2:
|
| 279 |
+
st.metric(
|
| 280 |
+
"% Node Influence (Error)",
|
| 281 |
+
f"{pct_error_influence:.1f}%",
|
| 282 |
+
help=f"Reconstruction error nodes contribute {pct_error_influence:.1f}% of total node_influence"
|
| 283 |
+
)
|
| 284 |
+
|
| 285 |
+
# Messaggio info con breakdown
|
| 286 |
+
info_parts = [f"{n_embeddings} embeddings", f"{n_features} features"]
|
| 287 |
+
if n_error_nodes > 0:
|
| 288 |
+
info_parts.append(f"{n_error_nodes} error nodes")
|
| 289 |
+
|
| 290 |
+
excluded_parts = [f"{n_logits_excluded} logits"]
|
| 291 |
+
if n_error_excluded > 0:
|
| 292 |
+
excluded_parts.append(f"{n_error_excluded} error nodes")
|
| 293 |
+
|
| 294 |
+
st.info(f"📊 Displaying {n_embeddings + n_features + n_error_nodes} nodes: {', '.join(info_parts)} ({', '.join(excluded_parts)} excluded)")
|
| 295 |
+
|
| 296 |
+
|
| 297 |
+
# Identifica i 2 gruppi: embeddings e features (escludi logits)
|
| 298 |
+
is_embedding_group = scatter_df['layer'] == -1
|
| 299 |
+
max_layer = scatter_df['layer'].max()
|
| 300 |
+
is_logit_group = scatter_df['layer'] == max_layer
|
| 301 |
+
is_feature_group = ~(is_embedding_group | is_logit_group)
|
| 302 |
+
|
| 303 |
+
# RIMUOVI I LOGIT dal dataset
|
| 304 |
+
scatter_df = scatter_df[~is_logit_group].copy()
|
| 305 |
+
|
| 306 |
+
# Ricalcola le maschere dopo il filtro
|
| 307 |
+
is_embedding_group = scatter_df['layer'] == -1
|
| 308 |
+
is_feature_group = scatter_df['layer'] != -1
|
| 309 |
+
|
| 310 |
+
# Aggiungi colonna per il tipo di nodo (solo 2 tipi ora)
|
| 311 |
+
scatter_df['node_type'] = 'feature'
|
| 312 |
+
scatter_df.loc[is_embedding_group, 'node_type'] = 'embedding'
|
| 313 |
+
|
| 314 |
+
# Calcola influence_log normalizzato per gruppo con formula più aggressiva
|
| 315 |
+
# Ogni gruppo ha la sua scala basata sul max del gruppo
|
| 316 |
+
scatter_df['influence_log'] = 0.0
|
| 317 |
+
|
| 318 |
+
for group_name, group_mask in [('embedding', is_embedding_group),
|
| 319 |
+
('feature', is_feature_group)]:
|
| 320 |
+
if group_mask.sum() > 0:
|
| 321 |
+
group_data = scatter_df[group_mask]['node_influence'].abs()
|
| 322 |
+
# Normalizza rispetto al max del gruppo
|
| 323 |
+
max_in_group = group_data.max()
|
| 324 |
+
if max_in_group > 0:
|
| 325 |
+
normalized = group_data / max_in_group
|
| 326 |
+
# Formula più aggressiva: usa power 3 per estremizzare le differenze
|
| 327 |
+
# normalized^3 rende i valori bassi molto più piccoli e i valori alti più grandi
|
| 328 |
+
# Moltiplica per 1000 per avere un buon range di grandezza
|
| 329 |
+
scatter_df.loc[group_mask, 'influence_log'] = (normalized ** 3) * 1000 + 10
|
| 330 |
+
else:
|
| 331 |
+
scatter_df.loc[group_mask, 'influence_log'] = 10 # Valore minimo default
|
| 332 |
+
|
| 333 |
+
# Crea scatter plot con simboli diversi per gruppo (solo embeddings e features)
|
| 334 |
+
symbol_map = {
|
| 335 |
+
'embedding': 'square',
|
| 336 |
+
'feature': 'circle'
|
| 337 |
+
}
|
| 338 |
+
|
| 339 |
+
fig = px.scatter(
|
| 340 |
+
scatter_df,
|
| 341 |
+
x='ctx_idx_display', # Usa posizione con offset
|
| 342 |
+
y='layer',
|
| 343 |
+
size='influence_log', # Usa scala aggressiva (power 3) normalizzata per gruppo
|
| 344 |
+
symbol='node_type', # Simbolo diverso per tipo
|
| 345 |
+
symbol_map=symbol_map,
|
| 346 |
+
color='node_type', # Colore diverso per tipo
|
| 347 |
+
color_discrete_map={
|
| 348 |
+
'embedding': '#4CAF50', # Verde per embeddings
|
| 349 |
+
'feature': '#808080' # Grigio per features
|
| 350 |
+
},
|
| 351 |
+
labels={
|
| 352 |
+
'id': 'Node ID',
|
| 353 |
+
'ctx_idx_display': 'Context Position',
|
| 354 |
+
'ctx_idx': 'ctx_idx',
|
| 355 |
+
'layer': 'Layer',
|
| 356 |
+
'influence': 'Cumulative Influence',
|
| 357 |
+
'node_influence': 'Node Influence',
|
| 358 |
+
'node_type': 'Node Type',
|
| 359 |
+
'token': 'Token',
|
| 360 |
+
'feature': 'Feature'
|
| 361 |
+
},
|
| 362 |
+
title='Features by Layer and Position (size: node_influence^3 normalized per group)',
|
| 363 |
+
hover_data={
|
| 364 |
+
'ctx_idx': True,
|
| 365 |
+
'token': True,
|
| 366 |
+
'layer': True,
|
| 367 |
+
'node_type': True,
|
| 368 |
+
'id': True,
|
| 369 |
+
'feature': True,
|
| 370 |
+
'node_influence': ':.6f', # Influenza marginale (grandezza simbolo)
|
| 371 |
+
'influence': ':.4f', # Cumulative influence (filtro slider)
|
| 372 |
+
'ctx_idx_display': False, # Nascondi la posizione modificata
|
| 373 |
+
'influence_log': False # Nascondi il valore logaritmico
|
| 374 |
+
}
|
| 375 |
+
)
|
| 376 |
+
|
| 377 |
+
# Personalizza il layout con alta trasparenza e outline marcato
|
| 378 |
+
# Applica a tutte le tracce (embeddings, features, logits)
|
| 379 |
+
max_influence_log = scatter_df['influence_log'].max()
|
| 380 |
+
|
| 381 |
+
fig.update_traces(
|
| 382 |
+
marker=dict(
|
| 383 |
+
sizemode='area',
|
| 384 |
+
sizeref=2.*max_influence_log/(50.**2) if max_influence_log > 0 else 1,
|
| 385 |
+
sizemin=2, # Dimensione minima
|
| 386 |
+
opacity=0.3, # Trasparenza medio-alta
|
| 387 |
+
line=dict(width=1.5, color='white') # Contorno bianco per distinguere
|
| 388 |
+
)
|
| 389 |
+
)
|
| 390 |
+
|
| 391 |
+
# Crea tick labels personalizzate per l'asse x (ctx_idx: token)
|
| 392 |
+
unique_ctx = sorted(scatter_df['ctx_idx'].unique())
|
| 393 |
+
tick_labels = [f"{ctx}: {token_map.get(ctx, '')}" for ctx in unique_ctx]
|
| 394 |
+
|
| 395 |
+
fig.update_layout(
|
| 396 |
+
template='plotly_white',
|
| 397 |
+
height=600,
|
| 398 |
+
showlegend=True, # Mostra legenda per i 3 gruppi
|
| 399 |
+
legend=dict(
|
| 400 |
+
title="Node Type",
|
| 401 |
+
orientation="v",
|
| 402 |
+
yanchor="top",
|
| 403 |
+
y=0.99,
|
| 404 |
+
xanchor="left",
|
| 405 |
+
x=0.99,
|
| 406 |
+
bgcolor="rgba(255,255,255,0.8)"
|
| 407 |
+
),
|
| 408 |
+
xaxis=dict(
|
| 409 |
+
gridcolor='lightgray',
|
| 410 |
+
tickmode='array',
|
| 411 |
+
tickvals=unique_ctx,
|
| 412 |
+
ticktext=tick_labels,
|
| 413 |
+
tickangle=-45
|
| 414 |
+
),
|
| 415 |
+
yaxis=dict(gridcolor='lightgray')
|
| 416 |
+
)
|
| 417 |
+
|
| 418 |
+
st.plotly_chart(fig, use_container_width=True)
|
| 419 |
+
|
| 420 |
+
# Mostra statistiche per gruppo
|
| 421 |
+
with st.expander("📊 Statistics by Group (Size Normalization)", expanded=False):
|
| 422 |
+
col1, col2 = st.columns(2)
|
| 423 |
+
|
| 424 |
+
with col1:
|
| 425 |
+
st.markdown("**🟩 Embeddings (green squares)**")
|
| 426 |
+
emb_data = scatter_df[scatter_df['node_type'] == 'embedding']
|
| 427 |
+
if len(emb_data) > 0:
|
| 428 |
+
st.metric("Nodes", len(emb_data))
|
| 429 |
+
st.metric("Max node_influence", f"{emb_data['node_influence'].max():.6f}")
|
| 430 |
+
st.metric("Mean node_influence", f"{emb_data['node_influence'].mean():.6f}")
|
| 431 |
+
st.metric("Min node_influence", f"{emb_data['node_influence'].min():.6f}")
|
| 432 |
+
else:
|
| 433 |
+
st.info("No embeddings in filtered dataset")
|
| 434 |
+
|
| 435 |
+
with col2:
|
| 436 |
+
st.markdown("**⚪ Features (gray circles)**")
|
| 437 |
+
feat_data = scatter_df[scatter_df['node_type'] == 'feature']
|
| 438 |
+
if len(feat_data) > 0:
|
| 439 |
+
st.metric("Nodes", len(feat_data))
|
| 440 |
+
st.metric("Max node_influence", f"{feat_data['node_influence'].max():.6f}")
|
| 441 |
+
st.metric("Mean node_influence", f"{feat_data['node_influence'].mean():.6f}")
|
| 442 |
+
st.metric("Min node_influence", f"{feat_data['node_influence'].min():.6f}")
|
| 443 |
+
else:
|
| 444 |
+
st.info("No features in filtered dataset")
|
| 445 |
+
|
| 446 |
+
st.info("""
|
| 447 |
+
💡 **Size formula**: `size = (normalized_node_influence)³ × 1000 + 10`
|
| 448 |
+
|
| 449 |
+
Size is normalized **per group** and uses **power 3** to emphasize differences:
|
| 450 |
+
- A node with 50% of max → size = 0.5³ = 12.5% (much smaller)
|
| 451 |
+
- A node with 80% of max → size = 0.8³ = 51.2%
|
| 452 |
+
- A node with 100% of max → size = 1.0³ = 100%
|
| 453 |
+
|
| 454 |
+
The 2 groups (embeddings and features) have independent scales.
|
| 455 |
+
Note: in the JSON the "influence" field is the pre-pruning cumulative, so estimating node_influence as the difference between consecutive cumulatives is only a normalized proxy (to be renormalized on the current set), because the graph may already be topologically pruned and the selection does not coincide with a contiguous prefix of sorted nodes.
|
| 456 |
+
""")
|
| 457 |
+
|
| 458 |
+
# === GRAFICO PARETO: NODE INFLUENCE (solo features, no embeddings/logits) ===
|
| 459 |
+
with st.expander("📈 Pareto Analysis Node Influence (Features only)", expanded=False):
|
| 460 |
+
try:
|
| 461 |
+
# Filtra solo features (scatter_df ha già rimosso i logit e ha node_type)
|
| 462 |
+
features_only = scatter_df[scatter_df['node_type'] == 'feature'].copy()
|
| 463 |
+
|
| 464 |
+
if len(features_only) == 0:
|
| 465 |
+
st.warning("⚠️ No features found in filtered dataset")
|
| 466 |
+
return
|
| 467 |
+
|
| 468 |
+
# Ordina per node_influence decrescente
|
| 469 |
+
sorted_df = features_only.sort_values('node_influence', ascending=False).reset_index(drop=True)
|
| 470 |
+
|
| 471 |
+
# Calcola rank e percentile
|
| 472 |
+
sorted_df['rank'] = range(1, len(sorted_df) + 1)
|
| 473 |
+
sorted_df['rank_pct'] = sorted_df['rank'] / len(sorted_df) * 100
|
| 474 |
+
|
| 475 |
+
# Calcola node_influence cumulativa (somma progressiva)
|
| 476 |
+
total_node_inf = sorted_df['node_influence'].sum()
|
| 477 |
+
|
| 478 |
+
if total_node_inf == 0:
|
| 479 |
+
st.warning("⚠️ Total Node influence is 0")
|
| 480 |
+
return
|
| 481 |
+
|
| 482 |
+
sorted_df['cumulative_node_influence'] = sorted_df['node_influence'].cumsum()
|
| 483 |
+
sorted_df['cumulative_node_influence_pct'] = sorted_df['cumulative_node_influence'] / total_node_inf * 100
|
| 484 |
+
|
| 485 |
+
# Crea grafico Pareto con doppio asse Y
|
| 486 |
+
import plotly.graph_objects as go
|
| 487 |
+
from plotly.subplots import make_subplots
|
| 488 |
+
|
| 489 |
+
# Crea subplot con asse Y secondario
|
| 490 |
+
fig_pareto = make_subplots(specs=[[{"secondary_y": True}]])
|
| 491 |
+
|
| 492 |
+
# Barra: node_influence individuale (limita a primi 100 nodi per leggibilità)
|
| 493 |
+
display_limit = min(100, len(sorted_df))
|
| 494 |
+
|
| 495 |
+
fig_pareto.add_trace(
|
| 496 |
+
go.Bar(
|
| 497 |
+
x=sorted_df['rank'][:display_limit],
|
| 498 |
+
y=sorted_df['node_influence'][:display_limit],
|
| 499 |
+
name='Node Influence',
|
| 500 |
+
marker=dict(color='#2196F3', opacity=0.6),
|
| 501 |
+
hovertemplate='<b>Rank: %{x}</b><br>Node Influence: %{y:.6f}<extra></extra>'
|
| 502 |
+
),
|
| 503 |
+
secondary_y=False
|
| 504 |
+
)
|
| 505 |
+
|
| 506 |
+
# Linea: cumulativa % (usa tutti i nodi)
|
| 507 |
+
fig_pareto.add_trace(
|
| 508 |
+
go.Scatter(
|
| 509 |
+
x=sorted_df['rank_pct'],
|
| 510 |
+
y=sorted_df['cumulative_node_influence_pct'],
|
| 511 |
+
mode='lines+markers',
|
| 512 |
+
name='Cumulative %',
|
| 513 |
+
line=dict(color='#FF5722', width=3),
|
| 514 |
+
marker=dict(size=4),
|
| 515 |
+
hovertemplate='<b>Top %{x:.1f}% features</b><br>Cumulative: %{y:.1f}%<extra></extra>'
|
| 516 |
+
),
|
| 517 |
+
secondary_y=True
|
| 518 |
+
)
|
| 519 |
+
|
| 520 |
+
# Linee di riferimento Pareto (80%, 90%, 95%)
|
| 521 |
+
for pct, label in [(80, '80%'), (90, '90%'), (95, '95%')]:
|
| 522 |
+
fig_pareto.add_hline(
|
| 523 |
+
y=pct,
|
| 524 |
+
line_dash="dash",
|
| 525 |
+
line_color="gray",
|
| 526 |
+
opacity=0.5,
|
| 527 |
+
secondary_y=True
|
| 528 |
+
)
|
| 529 |
+
fig_pareto.add_annotation(
|
| 530 |
+
x=100,
|
| 531 |
+
y=pct,
|
| 532 |
+
text=label,
|
| 533 |
+
showarrow=False,
|
| 534 |
+
xanchor='left',
|
| 535 |
+
yref='y2'
|
| 536 |
+
)
|
| 537 |
+
|
| 538 |
+
# Trova il "knee" (punto dove la cumulativa raggiunge 80%)
|
| 539 |
+
knee_idx = (sorted_df['cumulative_node_influence_pct'] >= 80).idxmax()
|
| 540 |
+
knee_rank_pct = sorted_df.loc[knee_idx, 'rank_pct']
|
| 541 |
+
knee_cumul = sorted_df.loc[knee_idx, 'cumulative_node_influence_pct']
|
| 542 |
+
|
| 543 |
+
fig_pareto.add_trace(
|
| 544 |
+
go.Scatter(
|
| 545 |
+
x=[knee_rank_pct],
|
| 546 |
+
y=[knee_cumul],
|
| 547 |
+
mode='markers',
|
| 548 |
+
name='Knee (80%)',
|
| 549 |
+
marker=dict(size=15, color='#4CAF50', symbol='diamond', line=dict(width=2, color='white')),
|
| 550 |
+
hovertemplate=f'<b>Knee Point</b><br>Top {knee_rank_pct:.1f}% features<br>Cumulativa: {knee_cumul:.1f}%<extra></extra>',
|
| 551 |
+
showlegend=True
|
| 552 |
+
),
|
| 553 |
+
secondary_y=True
|
| 554 |
+
)
|
| 555 |
+
|
| 556 |
+
# Layout
|
| 557 |
+
fig_pareto.update_xaxes(title_text="Rank % Features (by descending node_influence)")
|
| 558 |
+
fig_pareto.update_yaxes(title_text="Node Influence (individual)", secondary_y=False)
|
| 559 |
+
fig_pareto.update_yaxes(title_text="Cumulative % Node Influence", secondary_y=True, range=[0, 105])
|
| 560 |
+
|
| 561 |
+
fig_pareto.update_layout(
|
| 562 |
+
height=500,
|
| 563 |
+
showlegend=True,
|
| 564 |
+
template='plotly_white',
|
| 565 |
+
legend=dict(x=0.02, y=0.98, xanchor='left', yanchor='top'),
|
| 566 |
+
title="Pareto Chart: Node Influence of Features"
|
| 567 |
+
)
|
| 568 |
+
|
| 569 |
+
st.plotly_chart(fig_pareto, use_container_width=True)
|
| 570 |
+
|
| 571 |
+
# Statistiche chiave Pareto
|
| 572 |
+
st.markdown("#### 📊 Pareto Statistics (Node Influence)")
|
| 573 |
+
|
| 574 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 575 |
+
|
| 576 |
+
# Trova percentili chiave
|
| 577 |
+
top_10_idx = max(0, int(len(sorted_df) * 0.1))
|
| 578 |
+
top_20_idx = max(0, int(len(sorted_df) * 0.2))
|
| 579 |
+
top_50_idx = max(0, int(len(sorted_df) * 0.5))
|
| 580 |
+
|
| 581 |
+
top_10_pct = sorted_df['cumulative_node_influence_pct'].iloc[top_10_idx] if top_10_idx < len(sorted_df) else 0
|
| 582 |
+
top_20_pct = sorted_df['cumulative_node_influence_pct'].iloc[top_20_idx] if top_20_idx < len(sorted_df) else 0
|
| 583 |
+
top_50_pct = sorted_df['cumulative_node_influence_pct'].iloc[top_50_idx] if top_50_idx < len(sorted_df) else 0
|
| 584 |
+
|
| 585 |
+
with col1:
|
| 586 |
+
st.metric("Top 10% features", f"{top_10_pct:.1f}% node_influence",
|
| 587 |
+
help=f"The top {int(len(sorted_df)*0.1)} most influential features cover {top_10_pct:.1f}% of total influence")
|
| 588 |
+
with col2:
|
| 589 |
+
st.metric("Top 20% features", f"{top_20_pct:.1f}% node_influence",
|
| 590 |
+
help=f"The top {int(len(sorted_df)*0.2)} most influential features cover {top_20_pct:.1f}% of total influence")
|
| 591 |
+
with col3:
|
| 592 |
+
st.metric("Top 50% features", f"{top_50_pct:.1f}% node_influence",
|
| 593 |
+
help=f"The top {int(len(sorted_df)*0.5)} most influential features cover {top_50_pct:.1f}% of total influence")
|
| 594 |
+
with col4:
|
| 595 |
+
# Gini coefficient
|
| 596 |
+
gini = 1 - 2 * np.trapz(sorted_df['cumulative_node_influence_pct'] / 100, sorted_df['rank_pct'] / 100)
|
| 597 |
+
st.metric("Gini Coefficient", f"{gini:.3f}", help="0 = equal distribution, 1 = highly concentrated")
|
| 598 |
+
|
| 599 |
+
# Info sul knee point e suggerimento threshold
|
| 600 |
+
# sorted_df[knee_idx] ci dà la riga del knee point
|
| 601 |
+
knee_cumul_threshold = sorted_df.loc[knee_idx, 'influence'] if 'influence' in sorted_df.columns else scatter_df['influence'].max()
|
| 602 |
+
|
| 603 |
+
st.success(f"""
|
| 604 |
+
🎯 **Knee Point (80%)**: The first **{knee_rank_pct:.1f}%** of features ({int(len(sorted_df) * knee_rank_pct / 100)} nodes)
|
| 605 |
+
cover **80%** of total node_influence.
|
| 606 |
+
|
| 607 |
+
💡 **Threshold Suggestion**: To focus on features up to the knee point (80%),
|
| 608 |
+
use `cumulative_threshold ≈ {knee_cumul_threshold:.4f}` in the slider above.
|
| 609 |
+
""")
|
| 610 |
+
|
| 611 |
+
# Histogram distribuzione node_influence (opzionale, in expander)
|
| 612 |
+
with st.expander("📊 Node Influence Distribution Histogram", expanded=False):
|
| 613 |
+
fig_hist = px.histogram(
|
| 614 |
+
sorted_df,
|
| 615 |
+
x='node_influence',
|
| 616 |
+
nbins=50,
|
| 617 |
+
title='Node Influence Distribution (Features)',
|
| 618 |
+
labels={'node_influence': 'Node Influence', 'count': 'Frequency'},
|
| 619 |
+
color_discrete_sequence=['#2196F3']
|
| 620 |
+
)
|
| 621 |
+
|
| 622 |
+
fig_hist.update_layout(
|
| 623 |
+
height=350,
|
| 624 |
+
template='plotly_white',
|
| 625 |
+
showlegend=False
|
| 626 |
+
)
|
| 627 |
+
|
| 628 |
+
fig_hist.update_traces(marker=dict(opacity=0.7))
|
| 629 |
+
|
| 630 |
+
st.plotly_chart(fig_hist, use_container_width=True)
|
| 631 |
+
|
| 632 |
+
# Statistiche distribuzione
|
| 633 |
+
col1, col2, col3, col4 = st.columns(4)
|
| 634 |
+
with col1:
|
| 635 |
+
st.metric("Mean", f"{sorted_df['node_influence'].mean():.6f}")
|
| 636 |
+
with col2:
|
| 637 |
+
st.metric("Median", f"{sorted_df['node_influence'].median():.6f}")
|
| 638 |
+
with col3:
|
| 639 |
+
st.metric("Std Dev", f"{sorted_df['node_influence'].std():.6f}")
|
| 640 |
+
with col4:
|
| 641 |
+
st.metric("Max", f"{sorted_df['node_influence'].max():.6f}")
|
| 642 |
+
|
| 643 |
+
except Exception as e:
|
| 644 |
+
st.error(f"❌ Error creating distribution chart: {str(e)}")
|
| 645 |
+
import traceback
|
| 646 |
+
st.code(traceback.format_exc())
|
| 647 |
+
|
| 648 |
+
# Ritorna le feature filtrate (solo SAE features, no embeddings/logits/errors)
|
| 649 |
+
# Utile per export
|
| 650 |
+
sae_features_only = scatter_filtered[
|
| 651 |
+
~(is_embedding_filtered | is_logit_filtered | is_error_filtered)
|
| 652 |
+
].copy()
|
| 653 |
+
|
| 654 |
+
return sae_features_only
|
| 655 |
+
|
examples_data/2025-10-21T07-40_export_ENRICHED.csv
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
feature_key,layer,index,source,prompt,activation_max,activation_sum,activation_mean,sparsity_ratio,peak_token,peak_token_idx,node_influence,csv_ctx_idx,Unnamed: 0,supernode_label,supernode_class,motivation
|
| 2 |
+
1_12928,1,12928,1-clt-hp,"entity: A city in Texas, USA is Dallas",105.41461181640624,810.1840858459473,81.01840858459472,0.2314309450221265,entity,1,0.0096316039562225,7,14,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 3 |
+
1_12928,1,12928,1-clt-hp,entity: The capital city of Texas is Austin,105.41461181640624,737.9229583740234,81.99143981933594,0.2222004292712752,entity,1,0.0096316039562225,7,67,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 4 |
+
1_12928,1,12928,1-clt-hp,entity: A state in the United States is Texas,105.41461181640624,848.5865478515625,84.85865478515625,0.1950010219366075,entity,1,0.0096316039562225,7,120,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 5 |
+
1_12928,1,12928,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,117.0110092163086,1233.4596061706543,68.52553367614746,0.4143667836462297,attribute,1,0.0096316039562225,7,173,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 6 |
+
1_12928,1,12928,1-clt-hp,relationship: the state in which a city is located is the state containing,115.16062927246094,1163.957431793213,83.13981655665806,0.2780534712088466,relationship,1,0.0096316039562225,7,226,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 7 |
+
1_72774,1,72774,1-clt-hp,"entity: A city in Texas, USA is Dallas",80.11094665527344,626.0174751281738,62.60174751281738,0.2185618804106777, city,4,0.0095889568328857,7,17,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 8 |
+
1_72774,1,72774,1-clt-hp,entity: The capital city of Texas is Austin,84.13487243652344,613.3576698303223,68.15085220336914,0.1899809171899991, city,5,0.0095889568328857,7,70,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 9 |
+
1_72774,1,72774,1-clt-hp,entity: A state in the United States is Texas,91.9457550048828,689.5408782958984,68.95408782958984,0.2500568642246941, state,4,0.0095889568328857,7,123,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 10 |
+
1_72774,1,72774,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,122.51927185058594,1543.6992301940918,85.76106834411621,0.3000197679210573, primary,4,0.0095889568328857,7,175,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 11 |
+
1_72774,1,72774,1-clt-hp,relationship: the state in which a city is located is the state containing,97.75382995605467,931.018913269043,66.50135094778878,0.3197059288860138, containing,14,0.0095889568328857,7,229,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 12 |
+
20_44686,20,44686,20-clt-hp,"entity: A city in Texas, USA is Dallas",21.17974853515625,35.3902645111084,3.53902645111084,0.8329051714076581, Dallas,10,0.008446842432022,7,40,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte"
|
| 13 |
+
20_44686,20,44686,20-clt-hp,entity: The capital city of Texas is Austin,57.44028472900391,111.7382698059082,12.415363311767578,0.7838561669681529, is,8,0.008446842432022,7,93,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte"
|
| 14 |
+
20_44686,20,44686,20-clt-hp,entity: A state in the United States is Texas,31.102846145629883,31.102846145629883,3.110284614562988,0.9, Texas,10,0.008446842432022,7,146,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte"
|
| 15 |
+
20_44686,20,44686,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.008446842432022,7,200,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte"
|
| 16 |
+
20_44686,20,44686,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.008446842432022,7,252,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte"
|
| 17 |
+
1_57794,1,57794,1-clt-hp,"entity: A city in Texas, USA is Dallas",113.94397735595705,869.7109718322754,86.97109718322754,0.2367205428371799,entity,1,0.0081024467945098,7,15,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 18 |
+
1_57794,1,57794,1-clt-hp,entity: The capital city of Texas is Austin,113.94397735595705,785.0075225830078,87.22305806477864,0.2345092729886299,entity,1,0.0081024467945098,7,68,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 19 |
+
1_57794,1,57794,1-clt-hp,entity: A state in the United States is Texas,113.94397735595705,817.1403198242188,81.71403198242187,0.2828578229532038,entity,1,0.0081024467945098,7,121,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 20 |
+
1_57794,1,57794,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,125.45741271972656,1323.623565673828,73.53464253743489,0.4138676946757048,attribute,1,0.0081024467945098,7,174,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 21 |
+
1_57794,1,57794,1-clt-hp,relationship: the state in which a city is located is the state containing,121.10602569580078,1136.5441207885742,81.18172291346959,0.3296640489434831,relationship,1,0.0081024467945098,7,227,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt"
|
| 22 |
+
0_40780,0,40780,0-clt-hp,"entity: A city in Texas, USA is Dallas",50.744911193847656,183.38724303245544,18.338724303245545,0.6386095891824334, is,9,0.0069027841091156,7,3,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is"
|
| 23 |
+
0_40780,0,40780,0-clt-hp,entity: The capital city of Texas is Austin,48.96206283569336,128.85796904563904,14.317552116182116,0.7075786581086487, is,8,0.0069027841091156,7,58,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is"
|
| 24 |
+
0_40780,0,40780,0-clt-hp,entity: A state in the United States is Texas,53.07304382324219,192.2147843837738,19.221478438377385,0.6378297332560423, the,6,0.0069027841091156,7,107,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is"
|
| 25 |
+
0_40780,0,40780,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,50.93766784667969,365.7576293945313,20.319868299696186,0.6010836546176759, is,15,0.0069027841091156,7,163,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is"
|
| 26 |
+
0_40780,0,40780,0-clt-hp,relationship: the state in which a city is located is the state containing,59.61247253417969,401.4472732543945,28.67480523245675,0.5189797702818713, which,6,0.0069027841091156,7,213,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is"
|
| 27 |
+
1_52044,1,52044,1-clt-hp,"entity: A city in Texas, USA is Dallas",101.82122802734376,719.1115570068359,71.9111557006836,0.2937508504476877, USA,8,0.0067475140094757,7,16,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 28 |
+
1_52044,1,52044,1-clt-hp,entity: The capital city of Texas is Austin,111.89495849609376,656.9445991516113,72.99384435017903,0.347657433978786, capital,4,0.0067475140094757,7,69,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 29 |
+
1_52044,1,52044,1-clt-hp,entity: A state in the United States is Texas,95.29304504394533,751.4510955810547,75.14510955810547,0.2114313324393026, state,4,0.0067475140094757,7,122,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 30 |
+
1_52044,1,52044,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,118.34194946289062,1567.5587120056152,87.08659511142307,0.2641105245715809, capital,17,0.0067475140094757,7,176,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 31 |
+
1_52044,1,52044,1-clt-hp,relationship: the state in which a city is located is the state containing,125.9399642944336,1198.040008544922,85.57428632463727,0.3205152407017193, containing,14,0.0067475140094757,7,228,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation"
|
| 32 |
+
16_89970,16,89970,16-clt-hp,"entity: A city in Texas, USA is Dallas",18.21431350708008,18.21431350708008,1.821431350708008,0.9, Texas,6,0.0067293047904968,6,28,"""Texas""",Semantic, si attiva solo su Texas
|
| 33 |
+
16_89970,16,89970,16-clt-hp,entity: The capital city of Texas is Austin,18.45095634460449,24.438182830810547,2.7153536478678384,0.8528339888104568, Texas,7,0.0067293047904968,6,82,"""Texas""",Semantic, si attiva solo su Texas
|
| 34 |
+
16_89970,16,89970,16-clt-hp,entity: A state in the United States is Texas,7.996506690979004,7.996506690979004,0.7996506690979004,0.9, Texas,10,0.0067293047904968,6,134,"""Texas""",Semantic, si attiva solo su Texas
|
| 35 |
+
16_89970,16,89970,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0067293047904968,6,189,"""Texas""",Semantic, si attiva solo su Texas
|
| 36 |
+
16_89970,16,89970,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0067293047904968,6,241,"""Texas""",Semantic, si attiva solo su Texas
|
| 37 |
+
22_11998,22,11998,22-clt-hp,"entity: A city in Texas, USA is Dallas",21.473478317260746,21.473478317260746,2.147347831726074,0.9, Dallas,10,0.005888283252716,7,46,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')"
|
| 38 |
+
22_11998,22,11998,22-clt-hp,entity: The capital city of Texas is Austin,20.13431739807129,20.13431739807129,2.237146377563477,0.8888888888888888, is,8,0.005888283252716,7,101,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')"
|
| 39 |
+
22_11998,22,11998,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.005888283252716,7,152,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')"
|
| 40 |
+
22_11998,22,11998,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.005888283252716,7,205,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')"
|
| 41 |
+
22_11998,22,11998,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.005888283252716,7,258,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')"
|
| 42 |
+
0_91045,0,91045,0-clt-hp,"entity: A city in Texas, USA is Dallas",46.246559143066406,46.246559143066406,4.624655914306641,0.8999999999999999, is,9,0.0052919089794158,7,5,"""is""",Semantic,attivazione aselettiva su is
|
| 43 |
+
0_91045,0,91045,0-clt-hp,entity: The capital city of Texas is Austin,41.82666778564453,41.82666778564453,4.647407531738281,0.8888888888888888, is,8,0.0052919089794158,7,63,"""is""",Semantic,attivazione aselettiva su is
|
| 44 |
+
0_91045,0,91045,0-clt-hp,entity: A state in the United States is Texas,45.03489685058594,45.03489685058594,4.503489685058594,0.8999999999999999, is,9,0.0052919089794158,7,112,"""is""",Semantic,attivazione aselettiva su is
|
| 45 |
+
0_91045,0,91045,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,53.5222053527832,53.5222053527832,2.9734558529324,0.9444444444444444, is,15,0.0052919089794158,7,161,"""is""",Semantic,attivazione aselettiva su is
|
| 46 |
+
0_91045,0,91045,0-clt-hp,relationship: the state in which a city is located is the state containing,62.28597259521485,113.89995193481444,8.135710852486747,0.8693813307635213, is,11,0.0052919089794158,7,212,"""is""",Semantic,attivazione aselettiva su is
|
| 47 |
+
0_5200,0,5200,0-clt-hp,"entity: A city in Texas, USA is Dallas",47.27579116821289,47.27579116821289,4.727579116821289,0.9, is,9,0.0052788853645324,7,4,"""is""",Semantic,attivazione aselettiva su is
|
| 48 |
+
0_5200,0,5200,0-clt-hp,entity: The capital city of Texas is Austin,43.82829284667969,43.82829284667969,4.869810316297743,0.8888888888888888, is,8,0.0052788853645324,7,62,"""is""",Semantic,attivazione aselettiva su is
|
| 49 |
+
0_5200,0,5200,0-clt-hp,entity: A state in the United States is Texas,36.06181335449219,36.06181335449219,3.606181335449219,0.8999999999999999, is,9,0.0052788853645324,7,114,"""is""",Semantic,attivazione aselettiva su is
|
| 50 |
+
0_5200,0,5200,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,37.01258087158203,37.01258087158203,2.0562544928656683,0.9444444444444444, is,15,0.0052788853645324,7,167,"""is""",Semantic,attivazione aselettiva su is
|
| 51 |
+
0_5200,0,5200,0-clt-hp,relationship: the state in which a city is located is the state containing,31.49920654296875,59.72468566894531,4.266048976353237,0.8645664623160007, is,9,0.0052788853645324,7,219,"""is""",Semantic,attivazione aselettiva su is
|
| 52 |
+
21_84338,21,84338,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,45,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 53 |
+
21_84338,21,84338,21-clt-hp,entity: The capital city of Texas is Austin,38.49139404296875,57.22371768951416,6.358190854390462,0.8348152616324397, is,8,0.0047608315944671,7,95,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 54 |
+
21_84338,21,84338,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,151,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 55 |
+
21_84338,21,84338,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.62592601776123,8.62592601776123,0.4792181120978461,0.9444444444444444, is,15,0.0047608315944671,7,203,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 56 |
+
21_84338,21,84338,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0047608315944671,7,257,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 57 |
+
0_230,0,230,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.41893768310547,42.41893768310547,4.241893768310547,0.9, is,9,0.0046725273132324,7,8,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 58 |
+
0_230,0,230,0-clt-hp,entity: The capital city of Texas is Austin,46.301795959472656,46.301795959472656,5.144643995496962,0.8888888888888888, is,8,0.0046725273132324,7,59,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 59 |
+
0_230,0,230,0-clt-hp,entity: A state in the United States is Texas,47.897682189941406,47.897682189941406,4.789768218994141,0.9, is,9,0.0046725273132324,7,110,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 60 |
+
0_230,0,230,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,41.60439300537109,41.60439300537109,2.3113551669650607,0.9444444444444444, is,15,0.0046725273132324,7,166,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 61 |
+
0_230,0,230,0-clt-hp,relationship: the state in which a city is located is the state containing,43.75920486450195,71.13797760009766,5.08128411429269,0.8838807942231441, is,9,0.0046725273132324,7,216,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 62 |
+
0_1861,0,1861,0-clt-hp,"entity: A city in Texas, USA is Dallas",54.92845916748047,72.53322219848633,7.253322219848632,0.8679496506950471, Texas,6,0.0041899383068084,6,1,"""Texas""",Semantic,attivazioni solo su texas embedding
|
| 63 |
+
0_1861,0,1861,0-clt-hp,entity: The capital city of Texas is Austin,55.11215591430664,80.40324020385742,8.933693355984158,0.8378997662534727, Texas,7,0.0041899383068084,6,54,"""Texas""",Semantic,attivazioni solo su texas embedding
|
| 64 |
+
0_1861,0,1861,0-clt-hp,entity: A state in the United States is Texas,55.28260040283203,55.28260040283203,5.528260040283203,0.9, Texas,10,0.0041899383068084,6,106,"""Texas""",Semantic,attivazioni solo su texas embedding
|
| 65 |
+
0_1861,0,1861,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0041899383068084,6,170,"""Texas""",Semantic,attivazioni solo su texas embedding
|
| 66 |
+
0_1861,0,1861,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0041899383068084,6,222,"""Texas""",Semantic,attivazioni solo su texas embedding
|
| 67 |
+
7_24743,7,24743,7-clt-hp,"entity: A city in Texas, USA is Dallas",13.26353645324707,20.89326572418213,2.089326572418213,0.8424759052924591, Texas,6,0.00392746925354,6,19,"""Texas""",Semantic,Attivazione solo su Texas
|
| 68 |
+
7_24743,7,24743,7-clt-hp,entity: The capital city of Texas is Austin,13.514944076538086,26.310606002807617,2.9234006669786243,0.7836912494478138, Texas,7,0.00392746925354,6,73,"""Texas""",Semantic,Attivazione solo su Texas
|
| 69 |
+
7_24743,7,24743,7-clt-hp,entity: A state in the United States is Texas,8.938840866088867,8.938840866088867,0.8938840866088867,0.8999999999999999, Texas,10,0.00392746925354,6,125,"""Texas""",Semantic,Attivazione solo su Texas
|
| 70 |
+
7_24743,7,24743,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.00392746925354,6,179,"""Texas""",Semantic,Attivazione solo su Texas
|
| 71 |
+
7_24743,7,24743,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.00392746925354,6,232,"""Texas""",Semantic,Attivazione solo su Texas
|
| 72 |
+
16_98048,16,98048,16-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,30,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 73 |
+
16_98048,16,98048,16-clt-hp,entity: The capital city of Texas is Austin,25.97924995422364,30.72956657409668,3.414396286010742,0.8685721761780255, is,8,0.0038511157035827,7,81,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 74 |
+
16_98048,16,98048,16-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,136,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 75 |
+
16_98048,16,98048,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,6.895334243774414,12.294490814208984,0.6830272674560547,0.9009435593245188, is,15,0.0038511157035827,7,187,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 76 |
+
16_98048,16,98048,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038511157035827,7,242,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 77 |
+
20_74108,20,74108,20-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,41,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 78 |
+
20_74108,20,74108,20-clt-hp,entity: The capital city of Texas is Austin,26.576478958129883,31.370362758636475,3.48559586207072,0.8688465892128853, is,8,0.0038157403469085,7,94,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 79 |
+
20_74108,20,74108,20-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,147,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 80 |
+
20_74108,20,74108,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,63.30609893798828,130.92694854736328,7.273719363742405,0.8851023916215813, the,16,0.0038157403469085,7,199,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 81 |
+
20_74108,20,74108,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038157403469085,7,253,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 82 |
+
18_3623,18,3623,18-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,37,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 83 |
+
18_3623,18,3623,18-clt-hp,entity: The capital city of Texas is Austin,14.909049987792969,14.909049987792969,1.6565611097547743,0.888888888888889, is,8,0.0038073360919952,7,88,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 84 |
+
18_3623,18,3623,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,142,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 85 |
+
18_3623,18,3623,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0038073360919952,7,195,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 86 |
+
18_3623,18,3623,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038073360919952,7,248,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 87 |
+
0_95057,0,95057,0-clt-hp,"entity: A city in Texas, USA is Dallas",44.93249130249024,167.4211540222168,16.74211540222168,0.6273940100602924,:,2,0.0037478804588317,7,6,"""punctuation""",Semantic,attuazione solo su ':'
|
| 88 |
+
0_95057,0,95057,0-clt-hp,entity: The capital city of Texas is Austin,44.93249130249024,108.54875183105467,12.060972425672745,0.7315757022134157,:,2,0.0037478804588317,7,61,"""punctuation""",Semantic,attuazione solo su ':'
|
| 89 |
+
0_95057,0,95057,0-clt-hp,entity: A state in the United States is Texas,44.93249130249024,150.82857513427734,15.082857513427737,0.6643218064209181,:,2,0.0037478804588317,7,113,"""punctuation""",Semantic,attuazione solo su ':'
|
| 90 |
+
0_95057,0,95057,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,45.49790191650391,195.7961578369141,10.877564324273004,0.7609216278975872,:,2,0.0037478804588317,7,165,"""punctuation""",Semantic,attuazione solo su ':'
|
| 91 |
+
0_95057,0,95057,0-clt-hp,relationship: the state in which a city is located is the state containing,39.0150146484375,185.28181552886963,13.234415394919258,0.660786609612377,:,2,0.0037478804588317,7,218,"""punctuation""",Semantic,attuazione solo su ':'
|
| 92 |
+
0_32742,0,32742,0-clt-hp,"entity: A city in Texas, USA is Dallas",52.04083251953125,88.8308334350586,8.88308334350586,0.8293055104341003, Texas,6,0.0035841464996337,6,2,"""Texas""",Semantic,attivazione solo su texas
|
| 93 |
+
0_32742,0,32742,0-clt-hp,entity: The capital city of Texas is Austin,52.179874420166016,70.19295501708984,7.799217224121094,0.8505320813668551, Texas,7,0.0035841464996337,6,56,"""Texas""",Semantic,attivazione solo su texas
|
| 94 |
+
0_32742,0,32742,0-clt-hp,entity: A state in the United States is Texas,49.56887435913086,49.56887435913086,4.956887435913086,0.8999999999999999, Texas,10,0.0035841464996337,6,109,"""Texas""",Semantic,attivazione solo su texas
|
| 95 |
+
0_32742,0,32742,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0035841464996337,6,171,"""Texas""",Semantic,attivazione solo su texas
|
| 96 |
+
0_32742,0,32742,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0035841464996337,6,223,"""Texas""",Semantic,attivazione solo su texas
|
| 97 |
+
1_89326,1,89326,1-clt-hp,"entity: A city in Texas, USA is Dallas",69.7168960571289,69.7168960571289,6.971689605712891,0.9, Dallas,10,0.0034727156162261,6,18,"""Dallas""",Semantic,Unica attivazione solo su Dallas
|
| 98 |
+
1_89326,1,89326,1-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,71,"""Dallas""",Semantic,Unica attivazione solo su Dallas
|
| 99 |
+
1_89326,1,89326,1-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,124,"""Dallas""",Semantic,Unica attivazione solo su Dallas
|
| 100 |
+
1_89326,1,89326,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0034727156162261,6,177,"""Dallas""",Semantic,Unica attivazione solo su Dallas
|
| 101 |
+
1_89326,1,89326,1-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0034727156162261,6,230,"""Dallas""",Semantic,Unica attivazione solo su Dallas
|
| 102 |
+
22_32893,22,32893,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,48,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 103 |
+
22_32893,22,32893,22-clt-hp,entity: The capital city of Texas is Austin,46.686065673828125,46.686065673828125,5.187340630425347,0.888888888888889, is,8,0.003369390964508,7,99,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 104 |
+
22_32893,22,32893,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,153,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 105 |
+
22_32893,22,32893,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003369390964508,7,206,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 106 |
+
22_32893,22,32893,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003369390964508,7,259,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 107 |
+
21_61721,21,61721,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,44,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 108 |
+
21_61721,21,61721,21-clt-hp,entity: The capital city of Texas is Austin,18.76114654541016,18.76114654541016,2.0845718383789062,0.8888888888888888, is,8,0.0032654702663421,7,98,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 109 |
+
21_61721,21,61721,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,150,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 110 |
+
21_61721,21,61721,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0032654702663421,7,204,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 111 |
+
21_61721,21,61721,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0032654702663421,7,256,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 112 |
+
0_49560,0,49560,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.66587448120117,42.66587448120117,4.266587448120117,0.8999999999999999, is,9,0.0031878352165222,7,7,"""is""",Semantic,attivazione aselettiva su is
|
| 113 |
+
0_49560,0,49560,0-clt-hp,entity: The capital city of Texas is Austin,45.84932327270508,45.84932327270508,5.094369252522786,0.8888888888888888, is,8,0.0031878352165222,7,60,"""is""",Semantic,attivazione aselettiva su is
|
| 114 |
+
0_49560,0,49560,0-clt-hp,entity: A state in the United States is Texas,47.70016479492188,47.70016479492188,4.770016479492187,0.9, is,9,0.0031878352165222,7,111,"""is""",Semantic,attivazione aselettiva su is
|
| 115 |
+
0_49560,0,49560,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,49.51710510253906,49.51710510253906,2.7509502834743924,0.9444444444444444, is,15,0.0031878352165222,7,164,"""is""",Semantic,attivazione aselettiva su is
|
| 116 |
+
0_49560,0,49560,0-clt-hp,relationship: the state in which a city is located is the state containing,54.55234146118164,104.65689086914062,7.475492204938616,0.8629666114284383, is,11,0.0031878352165222,7,215,"""is""",Semantic,attivazione aselettiva su is
|
| 117 |
+
7_89264,7,89264,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.8238649368286133,0.8238649368286133,0.0823864936828613,0.9,",",7,0.003050148487091,7,20,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole"
|
| 118 |
+
7_89264,7,89264,7-clt-hp,entity: The capital city of Texas is Austin,8.95943546295166,8.95943546295166,0.9954928292168512,0.8888888888888888, is,8,0.003050148487091,7,74,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole"
|
| 119 |
+
7_89264,7,89264,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003050148487091,7,127,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole"
|
| 120 |
+
7_89264,7,89264,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003050148487091,7,180,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole"
|
| 121 |
+
7_89264,7,89264,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003050148487091,7,233,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole"
|
| 122 |
+
19_54790,19,54790,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,39,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 123 |
+
19_54790,19,54790,19-clt-hp,entity: The capital city of Texas is Austin,44.76298522949219,44.76298522949219,4.973665025499132,0.888888888888889, is,8,0.0028801560401916,7,92,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 124 |
+
19_54790,19,54790,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,145,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 125 |
+
19_54790,19,54790,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,5.89443302154541,5.89443302154541,0.3274685011969672,0.9444444444444444, is,15,0.0028801560401916,7,198,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 126 |
+
19_54790,19,54790,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0028801560401916,7,251,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'"
|
| 127 |
+
0_39374,0,39374,0-clt-hp,"entity: A city in Texas, USA is Dallas",21.213979721069336,21.213979721069336,2.1213979721069336,0.9, is,9,0.0028547048568725,7,9,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 128 |
+
0_39374,0,39374,0-clt-hp,entity: The capital city of Texas is Austin,19.35468482971192,19.35468482971192,2.150520536634657,0.8888888888888888, is,8,0.0028547048568725,7,64,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 129 |
+
0_39374,0,39374,0-clt-hp,entity: A state in the United States is Texas,19.664194107055664,19.664194107055664,1.9664194107055664,0.9, is,9,0.0028547048568725,7,115,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 130 |
+
0_39374,0,39374,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.938578605651855,8.938578605651855,0.4965877003139919,0.9444444444444444, is,15,0.0028547048568725,7,168,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 131 |
+
0_39374,0,39374,0-clt-hp,relationship: the state in which a city is located is the state containing,13.01608657836914,23.16886329650879,1.654918806893485,0.8728558851441782, is,9,0.0028547048568725,7,220,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,"
|
| 132 |
+
17_1822,17,1822,17-clt-hp,"entity: A city in Texas, USA is Dallas",2.5688390731811523,2.5688390731811523,0.2568839073181152,0.9,",",7,0.0027894973754882,7,31,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin"
|
| 133 |
+
17_1822,17,1822,17-clt-hp,entity: The capital city of Texas is Austin,15.288778305053713,15.288778305053713,1.698753145005968,0.8888888888888888, is,8,0.0027894973754882,7,85,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin"
|
| 134 |
+
17_1822,17,1822,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027894973754882,7,138,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin"
|
| 135 |
+
17_1822,17,1822,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0027894973754882,7,192,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin"
|
| 136 |
+
17_1822,17,1822,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027894973754882,7,244,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin"
|
| 137 |
+
0_55815,0,55815,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,13,"""capital""",Semantic,unica attivazione solo su capital
|
| 138 |
+
0_55815,0,55815,0-clt-hp,entity: The capital city of Texas is Austin,53.67196273803711,53.67196273803711,5.963551415337457,0.888888888888889, capital,4,0.0027363300323486,2,55,"""capital""",Semantic,unica attivazione solo su capital
|
| 139 |
+
0_55815,0,55815,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,119,"""capital""",Semantic,unica attivazione solo su capital
|
| 140 |
+
0_55815,0,55815,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,57.75386428833008,57.75386428833008,3.2085480160183377,0.9444444444444444, capital,17,0.0027363300323486,2,160,"""capital""",Semantic,unica attivazione solo su capital
|
| 141 |
+
0_55815,0,55815,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027363300323486,2,225,"""capital""",Semantic,unica attivazione solo su capital
|
| 142 |
+
22_81571,22,81571,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,49,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 143 |
+
22_81571,22,81571,22-clt-hp,entity: The capital city of Texas is Austin,27.45061683654785,27.45061683654785,3.0500685373942056,0.8888888888888888, is,8,0.002730906009674,7,100,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 144 |
+
22_81571,22,81571,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,155,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 145 |
+
22_81571,22,81571,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.002730906009674,7,208,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 146 |
+
22_81571,22,81571,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002730906009674,7,261,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 147 |
+
0_40936,0,40936,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,12,"""of""",Semantic,attivazioni significative solo su of
|
| 148 |
+
0_40936,0,40936,0-clt-hp,entity: The capital city of Texas is Austin,76.25304412841797,76.25304412841797,8.472560458713108,0.888888888888889, of,6,0.0027021169662475,3,53,"""of""",Semantic,attivazioni significative solo su of
|
| 149 |
+
0_40936,0,40936,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,118,"""of""",Semantic,attivazioni significative solo su of
|
| 150 |
+
0_40936,0,40936,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,80.70610809326172,80.70610809326172,4.483672671847874,0.9444444444444444, of,10,0.0027021169662475,3,159,"""of""",Semantic,attivazioni significative solo su of
|
| 151 |
+
0_40936,0,40936,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027021169662475,3,224,"""of""",Semantic,attivazioni significative solo su of
|
| 152 |
+
18_61980,18,61980,18-clt-hp,"entity: A city in Texas, USA is Dallas",14.10042667388916,14.10042667388916,1.410042667388916,0.9,",",7,0.0026986598968505,7,34,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 153 |
+
18_61980,18,61980,18-clt-hp,entity: The capital city of Texas is Austin,32.00542449951172,32.00542449951172,3.556158277723524,0.8888888888888888, is,8,0.0026986598968505,7,87,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 154 |
+
18_61980,18,61980,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0026986598968505,7,140,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 155 |
+
18_61980,18,61980,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0026986598968505,7,193,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 156 |
+
18_61980,18,61980,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0026986598968505,7,246,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 157 |
+
17_98126,17,98126,17-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,33,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 158 |
+
17_98126,17,98126,17-clt-hp,entity: The capital city of Texas is Austin,20.15220642089844,25.09380292892456,2.7882003254360623,0.861642925484099, is,8,0.0024870038032531,7,84,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 159 |
+
17_98126,17,98126,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,139,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 160 |
+
17_98126,17,98126,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,20.67333602905273,54.458144187927246,3.025452454884847,0.8536543666376291, the,16,0.0024870038032531,7,190,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 161 |
+
17_98126,17,98126,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0024870038032531,7,245,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 162 |
+
12_87969,12,87969,12-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,24,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 163 |
+
12_87969,12,87969,12-clt-hp,entity: The capital city of Texas is Austin,15.27625846862793,15.27625846862793,1.69736205206977,0.8888888888888888, is,8,0.0023558735847473,7,76,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 164 |
+
12_87969,12,87969,12-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,130,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 165 |
+
12_87969,12,87969,12-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,30.10682678222656,84.44636726379395,4.691464847988552,0.8441727226212316, the,16,0.0023558735847473,7,182,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 166 |
+
12_87969,12,87969,12-clt-hp,relationship: the state in which a city is located is the state containing,7.160322189331055,7.160322189331055,0.5114515849522182,0.9285714285714286, the,12,0.0023558735847473,7,235,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 167 |
+
22_74186,22,74186,22-clt-hp,"entity: A city in Texas, USA is Dallas",8.636338233947754,8.636338233947754,0.8636338233947753,0.9,",",7,0.0023505687713623,7,47,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 168 |
+
22_74186,22,74186,22-clt-hp,entity: The capital city of Texas is Austin,0.5329599380493164,0.5329599380493164,0.0592177708943684,0.888888888888889, is,8,0.0023505687713623,7,102,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 169 |
+
22_74186,22,74186,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023505687713623,7,154,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 170 |
+
22_74186,22,74186,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023505687713623,7,207,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 171 |
+
22_74186,22,74186,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023505687713623,7,260,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva"
|
| 172 |
+
18_56027,18,56027,18-clt-hp,"entity: A city in Texas, USA is Dallas",34.67882537841797,34.67882537841797,3.467882537841797,0.9, Dallas,10,0.0023038387298583,7,35,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza"
|
| 173 |
+
18_56027,18,56027,18-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,90,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza"
|
| 174 |
+
18_56027,18,56027,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,143,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza"
|
| 175 |
+
18_56027,18,56027,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023038387298583,7,196,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza"
|
| 176 |
+
18_56027,18,56027,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023038387298583,7,249,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza"
|
| 177 |
+
21_16875,21,16875,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,42,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 178 |
+
21_16875,21,16875,21-clt-hp,entity: The capital city of Texas is Austin,17.112422943115234,17.112422943115234,1.901380327012804,0.8888888888888888, is,8,0.0021759271621704,7,96,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 179 |
+
21_16875,21,16875,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,148,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 180 |
+
21_16875,21,16875,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0021759271621704,7,201,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 181 |
+
21_16875,21,16875,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0021759271621704,7,254,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin'
|
| 182 |
+
0_37567,0,37567,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,11,"""containing""",Semantic,unica attivazione solo su containing
|
| 183 |
+
0_37567,0,37567,0-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,66,"""containing""",Semantic,unica attivazione solo su containing
|
| 184 |
+
0_37567,0,37567,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,117,"""containing""",Semantic,unica attivazione solo su containing
|
| 185 |
+
0_37567,0,37567,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0020866394042968,5,172,"""containing""",Semantic,unica attivazione solo su containing
|
| 186 |
+
0_37567,0,37567,0-clt-hp,relationship: the state in which a city is located is the state containing,41.10612106323242,41.10612106323242,2.9361515045166016,0.9285714285714286, containing,14,0.0020866394042968,5,217,"""containing""",Semantic,unica attivazione solo su containing
|
| 187 |
+
7_3144,7,3144,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,21,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat"
|
| 188 |
+
7_3144,7,3144,7-clt-hp,entity: The capital city of Texas is Austin,14.262575149536133,18.0198335647583,2.002203729417589,0.8596183572443643, is,8,0.002021312713623,7,72,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat"
|
| 189 |
+
7_3144,7,3144,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,126,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat"
|
| 190 |
+
7_3144,7,3144,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,19.09012985229492,91.89447498321532,5.10524861017863,0.73257129995033, seat,9,0.002021312713623,7,178,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat"
|
| 191 |
+
7_3144,7,3144,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002021312713623,7,231,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat"
|
| 192 |
+
19_13946,19,13946,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,38,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 193 |
+
19_13946,19,13946,19-clt-hp,entity: The capital city of Texas is Austin,45.02559280395508,45.02559280395508,5.002843644883898,0.888888888888889, is,8,0.001940906047821,7,91,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 194 |
+
19_13946,19,13946,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,144,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 195 |
+
19_13946,19,13946,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,66.8328628540039,118.54381847381592,6.585767692989773,0.901459141330271, the,16,0.001940906047821,7,197,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
| 196 |
+
19_13946,19,13946,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.001940906047821,7,250,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'"
|
examples_data/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Example Data - Dallas
|
| 2 |
+
|
| 3 |
+
This directory contains a complete example analysis for demonstration purposes.
|
| 4 |
+
|
| 5 |
+
## Dataset: Dallas - Austin Prediction
|
| 6 |
+
|
| 7 |
+
**Prompt**: "The capital of state containing Dallas is"
|
| 8 |
+
**Target**: " Austin"
|
| 9 |
+
**Model**: Gemma-2-2B with Cross-Layer Transcoders (CLT)
|
| 10 |
+
**Features**: 55 features analyzed
|
| 11 |
+
|
| 12 |
+
## Files Included
|
| 13 |
+
|
| 14 |
+
### Stage 1: Graph Generation
|
| 15 |
+
- `clt-hp-the-capital-of-201020250035-20251020-003525.json` - Complete attribution graph
|
| 16 |
+
- `selected_features_with_nodes.json` - Selected features for analysis
|
| 17 |
+
|
| 18 |
+
### Stage 2: Probe Prompts
|
| 19 |
+
- `prompts.json` - Semantic concepts used for probing
|
| 20 |
+
- `2025-10-21T07-40_export_ENRICHED.csv` - Activation analysis results
|
| 21 |
+
- `activations_dump (2).json` - Raw activation data
|
| 22 |
+
|
| 23 |
+
### Stage 3: Node Grouping
|
| 24 |
+
- `node_grouping_final_20251027_173744.csv` - Final classification and naming
|
| 25 |
+
- `node_grouping_summary_20251027_173749.json` - Summary statistics
|
| 26 |
+
- `node_grouping_step1_20251027_180825.csv` - Token classification
|
| 27 |
+
- `node_grouping_step2_20251027_180821.csv` - Feature classification
|
| 28 |
+
|
| 29 |
+
## How to Use
|
| 30 |
+
|
| 31 |
+
1. Navigate to each stage page in the Streamlit app
|
| 32 |
+
2. Use the "Load Example" or file upload options
|
| 33 |
+
3. Load the corresponding files from this directory
|
| 34 |
+
4. Explore the visualizations and results
|
| 35 |
+
|
| 36 |
+
## Results Summary
|
| 37 |
+
|
| 38 |
+
The analysis identified:
|
| 39 |
+
- **Semantic (Dictionary)** features: Tokens like "Dallas", "Texas", "Austin"
|
| 40 |
+
- **Semantic (Concept)** features: Related concepts about cities and states
|
| 41 |
+
- **Say "X"** features: Output prediction mechanisms
|
| 42 |
+
- **Relationship** features: Connections between geographical entities
|
| 43 |
+
|
| 44 |
+
This demonstrates the complete pipeline for automated sparse feature interpretation.
|
| 45 |
+
|
examples_data/activations_dump (2).json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
examples_data/clt-hp-the-capital-of-201020250035-20251020-003525.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
examples_data/features without errors.json
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"layer": 0,
|
| 4 |
+
"index": 230
|
| 5 |
+
},
|
| 6 |
+
{
|
| 7 |
+
"layer": 0,
|
| 8 |
+
"index": 1861
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"layer": 0,
|
| 12 |
+
"index": 5200
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"layer": 0,
|
| 16 |
+
"index": 18753
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"layer": 0,
|
| 20 |
+
"index": 32742
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"layer": 0,
|
| 24 |
+
"index": 37567
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"layer": 0,
|
| 28 |
+
"index": 39374
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"layer": 0,
|
| 32 |
+
"index": 40780
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"layer": 0,
|
| 36 |
+
"index": 40936
|
| 37 |
+
},
|
| 38 |
+
{
|
| 39 |
+
"layer": 0,
|
| 40 |
+
"index": 49560
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"layer": 0,
|
| 44 |
+
"index": 55815
|
| 45 |
+
},
|
| 46 |
+
{
|
| 47 |
+
"layer": 0,
|
| 48 |
+
"index": 91045
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"layer": 0,
|
| 52 |
+
"index": 95057
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"layer": 1,
|
| 56 |
+
"index": 12928
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"layer": 1,
|
| 60 |
+
"index": 52044
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"layer": 1,
|
| 64 |
+
"index": 57794
|
| 65 |
+
},
|
| 66 |
+
{
|
| 67 |
+
"layer": 1,
|
| 68 |
+
"index": 72774
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"layer": 1,
|
| 72 |
+
"index": 89326
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"layer": 7,
|
| 76 |
+
"index": 3144
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"layer": 7,
|
| 80 |
+
"index": 24743
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"layer": 7,
|
| 84 |
+
"index": 89264
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"layer": 12,
|
| 88 |
+
"index": 87969
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"layer": 16,
|
| 92 |
+
"index": 89970
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"layer": 16,
|
| 96 |
+
"index": 98048
|
| 97 |
+
},
|
| 98 |
+
{
|
| 99 |
+
"layer": 17,
|
| 100 |
+
"index": 1822
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"layer": 17,
|
| 104 |
+
"index": 98126
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"layer": 18,
|
| 108 |
+
"index": 3623
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"layer": 18,
|
| 112 |
+
"index": 56027
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"layer": 18,
|
| 116 |
+
"index": 61980
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"layer": 19,
|
| 120 |
+
"index": 13946
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"layer": 19,
|
| 124 |
+
"index": 54790
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"layer": 20,
|
| 128 |
+
"index": 44686
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"layer": 20,
|
| 132 |
+
"index": 74108
|
| 133 |
+
},
|
| 134 |
+
{
|
| 135 |
+
"layer": 21,
|
| 136 |
+
"index": 16875
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"layer": 21,
|
| 140 |
+
"index": 61721
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"layer": 21,
|
| 144 |
+
"index": 84338
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"layer": 22,
|
| 148 |
+
"index": 11998
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"layer": 22,
|
| 152 |
+
"index": 32893
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"layer": 22,
|
| 156 |
+
"index": 74186
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"layer": 22,
|
| 160 |
+
"index": 81571
|
| 161 |
+
}
|
| 162 |
+
]
|
examples_data/node_grouping_final_20251027_173744.csv
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
examples_data/node_grouping_step1_20251027_180825.csv
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
feature_key,layer,index,source,prompt,activation_max,activation_sum,activation_mean,sparsity_ratio,peak_token,peak_token_idx,node_influence,csv_ctx_idx,Unnamed: 0,supernode_label,supernode_class,motivation,peak_token_type,target_tokens,tokens_source
|
| 2 |
+
1_12928,1,12928,1-clt-hp,"entity: A city in Texas, USA is Dallas",105.41461181640624,810.1840858459473,81.01840858459472,0.2314309450221265,entity,1,0.0096316039562225,7,14,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 3 |
+
1_12928,1,12928,1-clt-hp,entity: The capital city of Texas is Austin,105.41461181640624,737.9229583740234,81.99143981933594,0.2222004292712752,entity,1,0.0096316039562225,7,67,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 4 |
+
1_12928,1,12928,1-clt-hp,entity: A state in the United States is Texas,105.41461181640624,848.5865478515625,84.85865478515625,0.1950010219366075,entity,1,0.0096316039562225,7,120,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 5 |
+
1_12928,1,12928,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,117.0110092163086,1233.4596061706543,68.52553367614746,0.4143667836462297,attribute,1,0.0096316039562225,7,173,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 6 |
+
1_12928,1,12928,1-clt-hp,relationship: the state in which a city is located is the state containing,115.16062927246094,1163.957431793213,83.13981655665806,0.2780534712088466,relationship,1,0.0096316039562225,7,226,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 7 |
+
1_72774,1,72774,1-clt-hp,"entity: A city in Texas, USA is Dallas",80.11094665527344,626.0174751281738,62.60174751281738,0.2185618804106777, city,4,0.0095889568328857,7,17,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" city"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 8 |
+
1_72774,1,72774,1-clt-hp,entity: The capital city of Texas is Austin,84.13487243652344,613.3576698303223,68.15085220336914,0.1899809171899991, city,5,0.0095889568328857,7,70,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" city"", ""index"": 5, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 9 |
+
1_72774,1,72774,1-clt-hp,entity: A state in the United States is Texas,91.9457550048828,689.5408782958984,68.95408782958984,0.2500568642246941, state,4,0.0095889568328857,7,123,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" state"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 10 |
+
1_72774,1,72774,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,122.51927185058594,1543.6992301940918,85.76106834411621,0.3000197679210573, primary,4,0.0095889568328857,7,175,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" primary"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 11 |
+
1_72774,1,72774,1-clt-hp,relationship: the state in which a city is located is the state containing,97.75382995605467,931.018913269043,66.50135094778878,0.3197059288860138, containing,14,0.0095889568328857,7,229,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 12 |
+
20_44686,20,44686,20-clt-hp,"entity: A city in Texas, USA is Dallas",21.17974853515625,35.3902645111084,3.53902645111084,0.8329051714076581, Dallas,10,0.008446842432022,7,40,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 13 |
+
20_44686,20,44686,20-clt-hp,entity: The capital city of Texas is Austin,57.44028472900391,111.7382698059082,12.415363311767578,0.7838561669681529, is,8,0.008446842432022,7,93,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 14 |
+
20_44686,20,44686,20-clt-hp,entity: A state in the United States is Texas,31.102846145629883,31.102846145629883,3.110284614562988,0.9, Texas,10,0.008446842432022,7,146,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 15 |
+
20_44686,20,44686,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.008446842432022,7,200,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 16 |
+
20_44686,20,44686,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.008446842432022,7,252,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 17 |
+
1_57794,1,57794,1-clt-hp,"entity: A city in Texas, USA is Dallas",113.94397735595705,869.7109718322754,86.97109718322754,0.2367205428371799,entity,1,0.0081024467945098,7,15,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 18 |
+
1_57794,1,57794,1-clt-hp,entity: The capital city of Texas is Austin,113.94397735595705,785.0075225830078,87.22305806477864,0.2345092729886299,entity,1,0.0081024467945098,7,68,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 19 |
+
1_57794,1,57794,1-clt-hp,entity: A state in the United States is Texas,113.94397735595705,817.1403198242188,81.71403198242187,0.2828578229532038,entity,1,0.0081024467945098,7,121,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 20 |
+
1_57794,1,57794,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,125.45741271972656,1323.623565673828,73.53464253743489,0.4138676946757048,attribute,1,0.0081024467945098,7,174,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 21 |
+
1_57794,1,57794,1-clt-hp,relationship: the state in which a city is located is the state containing,121.10602569580078,1136.5441207885742,81.18172291346959,0.3296640489434831,relationship,1,0.0081024467945098,7,227,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 22 |
+
0_40780,0,40780,0-clt-hp,"entity: A city in Texas, USA is Dallas",50.744911193847656,183.38724303245544,18.338724303245545,0.6386095891824334, is,9,0.0069027841091156,7,3,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 23 |
+
0_40780,0,40780,0-clt-hp,entity: The capital city of Texas is Austin,48.96206283569336,128.85796904563904,14.317552116182116,0.7075786581086487, is,8,0.0069027841091156,7,58,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 24 |
+
0_40780,0,40780,0-clt-hp,entity: A state in the United States is Texas,53.07304382324219,192.2147843837738,19.221478438377385,0.6378297332560423, the,6,0.0069027841091156,7,107,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" United"", ""index"": 7, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 25 |
+
0_40780,0,40780,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,50.93766784667969,365.7576293945313,20.319868299696186,0.6010836546176759, is,15,0.0069027841091156,7,163,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 26 |
+
0_40780,0,40780,0-clt-hp,relationship: the state in which a city is located is the state containing,59.61247253417969,401.4472732543945,28.67480523245675,0.5189797702818713, which,6,0.0069027841091156,7,213,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" city"", ""index"": 8, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 27 |
+
1_52044,1,52044,1-clt-hp,"entity: A city in Texas, USA is Dallas",101.82122802734376,719.1115570068359,71.9111557006836,0.2937508504476877, USA,8,0.0067475140094757,7,16,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" USA"", ""index"": 8, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 28 |
+
1_52044,1,52044,1-clt-hp,entity: The capital city of Texas is Austin,111.89495849609376,656.9445991516113,72.99384435017903,0.347657433978786, capital,4,0.0067475140094757,7,69,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" capital"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 29 |
+
1_52044,1,52044,1-clt-hp,entity: A state in the United States is Texas,95.29304504394533,751.4510955810547,75.14510955810547,0.2114313324393026, state,4,0.0067475140094757,7,122,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" state"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 30 |
+
1_52044,1,52044,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,118.34194946289062,1567.5587120056152,87.08659511142307,0.2641105245715809, capital,17,0.0067475140094757,7,176,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" capital"", ""index"": 17, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 31 |
+
1_52044,1,52044,1-clt-hp,relationship: the state in which a city is located is the state containing,125.9399642944336,1198.040008544922,85.57428632463727,0.3205152407017193, containing,14,0.0067475140094757,7,228,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 32 |
+
16_89970,16,89970,16-clt-hp,"entity: A city in Texas, USA is Dallas",18.21431350708008,18.21431350708008,1.821431350708008,0.9, Texas,6,0.0067293047904968,6,28,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 33 |
+
16_89970,16,89970,16-clt-hp,entity: The capital city of Texas is Austin,18.45095634460449,24.438182830810547,2.7153536478678384,0.8528339888104568, Texas,7,0.0067293047904968,6,82,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 34 |
+
16_89970,16,89970,16-clt-hp,entity: A state in the United States is Texas,7.996506690979004,7.996506690979004,0.7996506690979004,0.9, Texas,10,0.0067293047904968,6,134,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 35 |
+
16_89970,16,89970,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0067293047904968,6,189,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 36 |
+
16_89970,16,89970,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0067293047904968,6,241,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 37 |
+
22_11998,22,11998,22-clt-hp,"entity: A city in Texas, USA is Dallas",21.473478317260746,21.473478317260746,2.147347831726074,0.9, Dallas,10,0.005888283252716,7,46,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 38 |
+
22_11998,22,11998,22-clt-hp,entity: The capital city of Texas is Austin,20.13431739807129,20.13431739807129,2.237146377563477,0.8888888888888888, is,8,0.005888283252716,7,101,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 39 |
+
22_11998,22,11998,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.005888283252716,7,152,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 40 |
+
22_11998,22,11998,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.005888283252716,7,205,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 41 |
+
22_11998,22,11998,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.005888283252716,7,258,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 42 |
+
0_91045,0,91045,0-clt-hp,"entity: A city in Texas, USA is Dallas",46.246559143066406,46.246559143066406,4.624655914306641,0.8999999999999999, is,9,0.0052919089794158,7,5,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 43 |
+
0_91045,0,91045,0-clt-hp,entity: The capital city of Texas is Austin,41.82666778564453,41.82666778564453,4.647407531738281,0.8888888888888888, is,8,0.0052919089794158,7,63,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 44 |
+
0_91045,0,91045,0-clt-hp,entity: A state in the United States is Texas,45.03489685058594,45.03489685058594,4.503489685058594,0.8999999999999999, is,9,0.0052919089794158,7,112,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 45 |
+
0_91045,0,91045,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,53.5222053527832,53.5222053527832,2.9734558529324,0.9444444444444444, is,15,0.0052919089794158,7,161,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 46 |
+
0_91045,0,91045,0-clt-hp,relationship: the state in which a city is located is the state containing,62.28597259521485,113.89995193481444,8.135710852486747,0.8693813307635213, is,11,0.0052919089794158,7,212,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 47 |
+
0_5200,0,5200,0-clt-hp,"entity: A city in Texas, USA is Dallas",47.27579116821289,47.27579116821289,4.727579116821289,0.9, is,9,0.0052788853645324,7,4,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 48 |
+
0_5200,0,5200,0-clt-hp,entity: The capital city of Texas is Austin,43.82829284667969,43.82829284667969,4.869810316297743,0.8888888888888888, is,8,0.0052788853645324,7,62,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 49 |
+
0_5200,0,5200,0-clt-hp,entity: A state in the United States is Texas,36.06181335449219,36.06181335449219,3.606181335449219,0.8999999999999999, is,9,0.0052788853645324,7,114,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 50 |
+
0_5200,0,5200,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,37.01258087158203,37.01258087158203,2.0562544928656683,0.9444444444444444, is,15,0.0052788853645324,7,167,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 51 |
+
0_5200,0,5200,0-clt-hp,relationship: the state in which a city is located is the state containing,31.49920654296875,59.72468566894531,4.266048976353237,0.8645664623160007, is,9,0.0052788853645324,7,219,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 52 |
+
21_84338,21,84338,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,45,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 53 |
+
21_84338,21,84338,21-clt-hp,entity: The capital city of Texas is Austin,38.49139404296875,57.22371768951416,6.358190854390462,0.8348152616324397, is,8,0.0047608315944671,7,95,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 54 |
+
21_84338,21,84338,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,151,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 55 |
+
21_84338,21,84338,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.62592601776123,8.62592601776123,0.4792181120978461,0.9444444444444444, is,15,0.0047608315944671,7,203,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 56 |
+
21_84338,21,84338,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0047608315944671,7,257,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 57 |
+
0_230,0,230,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.41893768310547,42.41893768310547,4.241893768310547,0.9, is,9,0.0046725273132324,7,8,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 58 |
+
0_230,0,230,0-clt-hp,entity: The capital city of Texas is Austin,46.301795959472656,46.301795959472656,5.144643995496962,0.8888888888888888, is,8,0.0046725273132324,7,59,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 59 |
+
0_230,0,230,0-clt-hp,entity: A state in the United States is Texas,47.897682189941406,47.897682189941406,4.789768218994141,0.9, is,9,0.0046725273132324,7,110,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 60 |
+
0_230,0,230,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,41.60439300537109,41.60439300537109,2.3113551669650607,0.9444444444444444, is,15,0.0046725273132324,7,166,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 61 |
+
0_230,0,230,0-clt-hp,relationship: the state in which a city is located is the state containing,43.75920486450195,71.13797760009766,5.08128411429269,0.8838807942231441, is,9,0.0046725273132324,7,216,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 62 |
+
0_1861,0,1861,0-clt-hp,"entity: A city in Texas, USA is Dallas",54.92845916748047,72.53322219848633,7.253322219848632,0.8679496506950471, Texas,6,0.0041899383068084,6,1,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 63 |
+
0_1861,0,1861,0-clt-hp,entity: The capital city of Texas is Austin,55.11215591430664,80.40324020385742,8.933693355984158,0.8378997662534727, Texas,7,0.0041899383068084,6,54,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 64 |
+
0_1861,0,1861,0-clt-hp,entity: A state in the United States is Texas,55.28260040283203,55.28260040283203,5.528260040283203,0.9, Texas,10,0.0041899383068084,6,106,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 65 |
+
0_1861,0,1861,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0041899383068084,6,170,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 66 |
+
0_1861,0,1861,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0041899383068084,6,222,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 67 |
+
7_24743,7,24743,7-clt-hp,"entity: A city in Texas, USA is Dallas",13.26353645324707,20.89326572418213,2.089326572418213,0.8424759052924591, Texas,6,0.00392746925354,6,19,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 68 |
+
7_24743,7,24743,7-clt-hp,entity: The capital city of Texas is Austin,13.514944076538086,26.310606002807617,2.9234006669786243,0.7836912494478138, Texas,7,0.00392746925354,6,73,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 69 |
+
7_24743,7,24743,7-clt-hp,entity: A state in the United States is Texas,8.938840866088867,8.938840866088867,0.8938840866088867,0.8999999999999999, Texas,10,0.00392746925354,6,125,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 70 |
+
7_24743,7,24743,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.00392746925354,6,179,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 71 |
+
7_24743,7,24743,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.00392746925354,6,232,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 72 |
+
16_98048,16,98048,16-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,30,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 73 |
+
16_98048,16,98048,16-clt-hp,entity: The capital city of Texas is Austin,25.97924995422364,30.72956657409668,3.414396286010742,0.8685721761780255, is,8,0.0038511157035827,7,81,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 74 |
+
16_98048,16,98048,16-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,136,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 75 |
+
16_98048,16,98048,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,6.895334243774414,12.294490814208984,0.6830272674560547,0.9009435593245188, is,15,0.0038511157035827,7,187,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 76 |
+
16_98048,16,98048,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038511157035827,7,242,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 77 |
+
20_74108,20,74108,20-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,41,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 78 |
+
20_74108,20,74108,20-clt-hp,entity: The capital city of Texas is Austin,26.576478958129883,31.370362758636475,3.48559586207072,0.8688465892128853, is,8,0.0038157403469085,7,94,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 79 |
+
20_74108,20,74108,20-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,147,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 80 |
+
20_74108,20,74108,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,63.30609893798828,130.92694854736328,7.273719363742405,0.8851023916215813, the,16,0.0038157403469085,7,199,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 81 |
+
20_74108,20,74108,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038157403469085,7,253,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 82 |
+
18_3623,18,3623,18-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,37,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 83 |
+
18_3623,18,3623,18-clt-hp,entity: The capital city of Texas is Austin,14.909049987792969,14.909049987792969,1.6565611097547743,0.888888888888889, is,8,0.0038073360919952,7,88,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 84 |
+
18_3623,18,3623,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,142,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 85 |
+
18_3623,18,3623,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0038073360919952,7,195,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 86 |
+
18_3623,18,3623,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038073360919952,7,248,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 87 |
+
0_95057,0,95057,0-clt-hp,"entity: A city in Texas, USA is Dallas",44.93249130249024,167.4211540222168,16.74211540222168,0.6273940100602924,:,2,0.0037478804588317,7,6,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" city"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 88 |
+
0_95057,0,95057,0-clt-hp,entity: The capital city of Texas is Austin,44.93249130249024,108.54875183105467,12.060972425672745,0.7315757022134157,:,2,0.0037478804588317,7,61,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" capital"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 89 |
+
0_95057,0,95057,0-clt-hp,entity: A state in the United States is Texas,44.93249130249024,150.82857513427734,15.082857513427737,0.6643218064209181,:,2,0.0037478804588317,7,113,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" state"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 90 |
+
0_95057,0,95057,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,45.49790191650391,195.7961578369141,10.877564324273004,0.7609216278975872,:,2,0.0037478804588317,7,165,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" primary"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""attribute"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 91 |
+
0_95057,0,95057,0-clt-hp,relationship: the state in which a city is located is the state containing,39.0150146484375,185.28181552886963,13.234415394919258,0.660786609612377,:,2,0.0037478804588317,7,218,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" state"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""relationship"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 92 |
+
0_32742,0,32742,0-clt-hp,"entity: A city in Texas, USA is Dallas",52.04083251953125,88.8308334350586,8.88308334350586,0.8293055104341003, Texas,6,0.0035841464996337,6,2,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 93 |
+
0_32742,0,32742,0-clt-hp,entity: The capital city of Texas is Austin,52.179874420166016,70.19295501708984,7.799217224121094,0.8505320813668551, Texas,7,0.0035841464996337,6,56,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 94 |
+
0_32742,0,32742,0-clt-hp,entity: A state in the United States is Texas,49.56887435913086,49.56887435913086,4.956887435913086,0.8999999999999999, Texas,10,0.0035841464996337,6,109,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 95 |
+
0_32742,0,32742,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0035841464996337,6,171,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 96 |
+
0_32742,0,32742,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0035841464996337,6,223,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 97 |
+
1_89326,1,89326,1-clt-hp,"entity: A city in Texas, USA is Dallas",69.7168960571289,69.7168960571289,6.971689605712891,0.9, Dallas,10,0.0034727156162261,6,18,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 98 |
+
1_89326,1,89326,1-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,71,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 99 |
+
1_89326,1,89326,1-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,124,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 100 |
+
1_89326,1,89326,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0034727156162261,6,177,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 101 |
+
1_89326,1,89326,1-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0034727156162261,6,230,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 102 |
+
22_32893,22,32893,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,48,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 103 |
+
22_32893,22,32893,22-clt-hp,entity: The capital city of Texas is Austin,46.686065673828125,46.686065673828125,5.187340630425347,0.888888888888889, is,8,0.003369390964508,7,99,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 104 |
+
22_32893,22,32893,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,153,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 105 |
+
22_32893,22,32893,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003369390964508,7,206,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 106 |
+
22_32893,22,32893,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003369390964508,7,259,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 107 |
+
21_61721,21,61721,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,44,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 108 |
+
21_61721,21,61721,21-clt-hp,entity: The capital city of Texas is Austin,18.76114654541016,18.76114654541016,2.0845718383789062,0.8888888888888888, is,8,0.0032654702663421,7,98,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 109 |
+
21_61721,21,61721,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,150,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 110 |
+
21_61721,21,61721,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0032654702663421,7,204,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 111 |
+
21_61721,21,61721,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0032654702663421,7,256,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 112 |
+
0_49560,0,49560,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.66587448120117,42.66587448120117,4.266587448120117,0.8999999999999999, is,9,0.0031878352165222,7,7,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 113 |
+
0_49560,0,49560,0-clt-hp,entity: The capital city of Texas is Austin,45.84932327270508,45.84932327270508,5.094369252522786,0.8888888888888888, is,8,0.0031878352165222,7,60,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 114 |
+
0_49560,0,49560,0-clt-hp,entity: A state in the United States is Texas,47.70016479492188,47.70016479492188,4.770016479492187,0.9, is,9,0.0031878352165222,7,111,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 115 |
+
0_49560,0,49560,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,49.51710510253906,49.51710510253906,2.7509502834743924,0.9444444444444444, is,15,0.0031878352165222,7,164,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 116 |
+
0_49560,0,49560,0-clt-hp,relationship: the state in which a city is located is the state containing,54.55234146118164,104.65689086914062,7.475492204938616,0.8629666114284383, is,11,0.0031878352165222,7,215,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 117 |
+
7_89264,7,89264,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.8238649368286133,0.8238649368286133,0.0823864936828613,0.9,",",7,0.003050148487091,7,20,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 118 |
+
7_89264,7,89264,7-clt-hp,entity: The capital city of Texas is Austin,8.95943546295166,8.95943546295166,0.9954928292168512,0.8888888888888888, is,8,0.003050148487091,7,74,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 119 |
+
7_89264,7,89264,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003050148487091,7,127,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 120 |
+
7_89264,7,89264,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003050148487091,7,180,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 121 |
+
7_89264,7,89264,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003050148487091,7,233,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 122 |
+
19_54790,19,54790,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,39,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 123 |
+
19_54790,19,54790,19-clt-hp,entity: The capital city of Texas is Austin,44.76298522949219,44.76298522949219,4.973665025499132,0.888888888888889, is,8,0.0028801560401916,7,92,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 124 |
+
19_54790,19,54790,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,145,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 125 |
+
19_54790,19,54790,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,5.89443302154541,5.89443302154541,0.3274685011969672,0.9444444444444444, is,15,0.0028801560401916,7,198,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 126 |
+
19_54790,19,54790,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0028801560401916,7,251,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 127 |
+
0_39374,0,39374,0-clt-hp,"entity: A city in Texas, USA is Dallas",21.213979721069336,21.213979721069336,2.1213979721069336,0.9, is,9,0.0028547048568725,7,9,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 128 |
+
0_39374,0,39374,0-clt-hp,entity: The capital city of Texas is Austin,19.35468482971192,19.35468482971192,2.150520536634657,0.8888888888888888, is,8,0.0028547048568725,7,64,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 129 |
+
0_39374,0,39374,0-clt-hp,entity: A state in the United States is Texas,19.664194107055664,19.664194107055664,1.9664194107055664,0.9, is,9,0.0028547048568725,7,115,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 130 |
+
0_39374,0,39374,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.938578605651855,8.938578605651855,0.4965877003139919,0.9444444444444444, is,15,0.0028547048568725,7,168,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json
|
| 131 |
+
0_39374,0,39374,0-clt-hp,relationship: the state in which a city is located is the state containing,13.01608657836914,23.16886329650879,1.654918806893485,0.8728558851441782, is,9,0.0028547048568725,7,220,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 132 |
+
17_1822,17,1822,17-clt-hp,"entity: A city in Texas, USA is Dallas",2.5688390731811523,2.5688390731811523,0.2568839073181152,0.9,",",7,0.0027894973754882,7,31,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 133 |
+
17_1822,17,1822,17-clt-hp,entity: The capital city of Texas is Austin,15.288778305053713,15.288778305053713,1.698753145005968,0.8888888888888888, is,8,0.0027894973754882,7,85,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 134 |
+
17_1822,17,1822,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027894973754882,7,138,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 135 |
+
17_1822,17,1822,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0027894973754882,7,192,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 136 |
+
17_1822,17,1822,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027894973754882,7,244,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 137 |
+
0_55815,0,55815,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,13,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 138 |
+
0_55815,0,55815,0-clt-hp,entity: The capital city of Texas is Austin,53.67196273803711,53.67196273803711,5.963551415337457,0.888888888888889, capital,4,0.0027363300323486,2,55,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": "" capital"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 139 |
+
0_55815,0,55815,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,119,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 140 |
+
0_55815,0,55815,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,57.75386428833008,57.75386428833008,3.2085480160183377,0.9444444444444444, capital,17,0.0027363300323486,2,160,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": "" capital"", ""index"": 17, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 141 |
+
0_55815,0,55815,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027363300323486,2,225,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 142 |
+
22_81571,22,81571,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,49,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 143 |
+
22_81571,22,81571,22-clt-hp,entity: The capital city of Texas is Austin,27.45061683654785,27.45061683654785,3.0500685373942056,0.8888888888888888, is,8,0.002730906009674,7,100,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 144 |
+
22_81571,22,81571,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,155,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 145 |
+
22_81571,22,81571,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.002730906009674,7,208,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 146 |
+
22_81571,22,81571,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002730906009674,7,261,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 147 |
+
0_40936,0,40936,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,12,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 148 |
+
0_40936,0,40936,0-clt-hp,entity: The capital city of Texas is Austin,76.25304412841797,76.25304412841797,8.472560458713108,0.888888888888889, of,6,0.0027021169662475,3,53,"""of""",Semantic,attivazioni significative solo su of,functional,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 149 |
+
0_40936,0,40936,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,118,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 150 |
+
0_40936,0,40936,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,80.70610809326172,80.70610809326172,4.483672671847874,0.9444444444444444, of,10,0.0027021169662475,3,159,"""of""",Semantic,attivazioni significative solo su of,functional,"[{""token"": "" government"", ""index"": 11, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 151 |
+
0_40936,0,40936,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027021169662475,3,224,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 152 |
+
18_61980,18,61980,18-clt-hp,"entity: A city in Texas, USA is Dallas",14.10042667388916,14.10042667388916,1.410042667388916,0.9,",",7,0.0026986598968505,7,34,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 153 |
+
18_61980,18,61980,18-clt-hp,entity: The capital city of Texas is Austin,32.00542449951172,32.00542449951172,3.556158277723524,0.8888888888888888, is,8,0.0026986598968505,7,87,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 154 |
+
18_61980,18,61980,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0026986598968505,7,140,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 155 |
+
18_61980,18,61980,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0026986598968505,7,193,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 156 |
+
18_61980,18,61980,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0026986598968505,7,246,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 157 |
+
17_98126,17,98126,17-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,33,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 158 |
+
17_98126,17,98126,17-clt-hp,entity: The capital city of Texas is Austin,20.15220642089844,25.09380292892456,2.7882003254360623,0.861642925484099, is,8,0.0024870038032531,7,84,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 159 |
+
17_98126,17,98126,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,139,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 160 |
+
17_98126,17,98126,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,20.67333602905273,54.458144187927246,3.025452454884847,0.8536543666376291, the,16,0.0024870038032531,7,190,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 161 |
+
17_98126,17,98126,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0024870038032531,7,245,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 162 |
+
12_87969,12,87969,12-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,24,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 163 |
+
12_87969,12,87969,12-clt-hp,entity: The capital city of Texas is Austin,15.27625846862793,15.27625846862793,1.69736205206977,0.8888888888888888, is,8,0.0023558735847473,7,76,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 164 |
+
12_87969,12,87969,12-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,130,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 165 |
+
12_87969,12,87969,12-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,30.10682678222656,84.44636726379395,4.691464847988552,0.8441727226212316, the,16,0.0023558735847473,7,182,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 166 |
+
12_87969,12,87969,12-clt-hp,relationship: the state in which a city is located is the state containing,7.160322189331055,7.160322189331055,0.5114515849522182,0.9285714285714286, the,12,0.0023558735847473,7,235,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 167 |
+
22_74186,22,74186,22-clt-hp,"entity: A city in Texas, USA is Dallas",8.636338233947754,8.636338233947754,0.8636338233947753,0.9,",",7,0.0023505687713623,7,47,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json
|
| 168 |
+
22_74186,22,74186,22-clt-hp,entity: The capital city of Texas is Austin,0.5329599380493164,0.5329599380493164,0.0592177708943684,0.888888888888889, is,8,0.0023505687713623,7,102,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 169 |
+
22_74186,22,74186,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023505687713623,7,154,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 170 |
+
22_74186,22,74186,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023505687713623,7,207,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 171 |
+
22_74186,22,74186,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023505687713623,7,260,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 172 |
+
18_56027,18,56027,18-clt-hp,"entity: A city in Texas, USA is Dallas",34.67882537841797,34.67882537841797,3.467882537841797,0.9, Dallas,10,0.0023038387298583,7,35,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 173 |
+
18_56027,18,56027,18-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,90,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 174 |
+
18_56027,18,56027,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,143,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 175 |
+
18_56027,18,56027,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023038387298583,7,196,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 176 |
+
18_56027,18,56027,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023038387298583,7,249,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 177 |
+
21_16875,21,16875,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,42,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 178 |
+
21_16875,21,16875,21-clt-hp,entity: The capital city of Texas is Austin,17.112422943115234,17.112422943115234,1.901380327012804,0.8888888888888888, is,8,0.0021759271621704,7,96,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 179 |
+
21_16875,21,16875,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,148,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 180 |
+
21_16875,21,16875,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0021759271621704,7,201,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 181 |
+
21_16875,21,16875,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0021759271621704,7,254,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 182 |
+
0_37567,0,37567,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,11,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 183 |
+
0_37567,0,37567,0-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,66,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 184 |
+
0_37567,0,37567,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,117,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 185 |
+
0_37567,0,37567,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0020866394042968,5,172,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 186 |
+
0_37567,0,37567,0-clt-hp,relationship: the state in which a city is located is the state containing,41.10612106323242,41.10612106323242,2.9361515045166016,0.9285714285714286, containing,14,0.0020866394042968,5,217,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 187 |
+
7_3144,7,3144,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,21,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 188 |
+
7_3144,7,3144,7-clt-hp,entity: The capital city of Texas is Austin,14.262575149536133,18.0198335647583,2.002203729417589,0.8596183572443643, is,8,0.002021312713623,7,72,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 189 |
+
7_3144,7,3144,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,126,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 190 |
+
7_3144,7,3144,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,19.09012985229492,91.89447498321532,5.10524861017863,0.73257129995033, seat,9,0.002021312713623,7,178,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": "" seat"", ""index"": 9, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 191 |
+
7_3144,7,3144,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002021312713623,7,231,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 192 |
+
19_13946,19,13946,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,38,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 193 |
+
19_13946,19,13946,19-clt-hp,entity: The capital city of Texas is Austin,45.02559280395508,45.02559280395508,5.002843644883898,0.888888888888889, is,8,0.001940906047821,7,91,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 194 |
+
19_13946,19,13946,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,144,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
| 195 |
+
19_13946,19,13946,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,66.8328628540039,118.54381847381592,6.585767692989773,0.901459141330271, the,16,0.001940906047821,7,197,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json
|
| 196 |
+
19_13946,19,13946,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.001940906047821,7,250,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a
|
examples_data/node_grouping_step2_20251027_180821.csv
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
feature_key,layer,index,source,prompt,activation_max,activation_sum,activation_mean,sparsity_ratio,peak_token,peak_token_idx,node_influence,csv_ctx_idx,Unnamed: 0,supernode_label,supernode_class,motivation,peak_token_type,target_tokens,tokens_source,pred_label,subtype,confidence,review,why_review
|
| 2 |
+
1_12928,1,12928,1-clt-hp,"entity: A city in Texas, USA is Dallas",105.41461181640624,810.1840858459473,81.01840858459472,0.2314309450221265,entity,1,0.0096316039562225,7,14,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 3 |
+
1_12928,1,12928,1-clt-hp,entity: The capital city of Texas is Austin,105.41461181640624,737.9229583740234,81.99143981933594,0.2222004292712752,entity,1,0.0096316039562225,7,67,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 4 |
+
1_12928,1,12928,1-clt-hp,entity: A state in the United States is Texas,105.41461181640624,848.5865478515625,84.85865478515625,0.1950010219366075,entity,1,0.0096316039562225,7,120,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 5 |
+
1_12928,1,12928,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,117.0110092163086,1233.4596061706543,68.52553367614746,0.4143667836462297,attribute,1,0.0096316039562225,7,173,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 6 |
+
1_12928,1,12928,1-clt-hp,relationship: the state in which a city is located is the state containing,115.16062927246094,1163.957431793213,83.13981655665806,0.2780534712088466,relationship,1,0.0096316039562225,7,226,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 7 |
+
1_72774,1,72774,1-clt-hp,"entity: A city in Texas, USA is Dallas",80.11094665527344,626.0174751281738,62.60174751281738,0.2185618804106777, city,4,0.0095889568328857,7,17,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" city"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 8 |
+
1_72774,1,72774,1-clt-hp,entity: The capital city of Texas is Austin,84.13487243652344,613.3576698303223,68.15085220336914,0.1899809171899991, city,5,0.0095889568328857,7,70,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" city"", ""index"": 5, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 9 |
+
1_72774,1,72774,1-clt-hp,entity: A state in the United States is Texas,91.9457550048828,689.5408782958984,68.95408782958984,0.2500568642246941, state,4,0.0095889568328857,7,123,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" state"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 10 |
+
1_72774,1,72774,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,122.51927185058594,1543.6992301940918,85.76106834411621,0.3000197679210573, primary,4,0.0095889568328857,7,175,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" primary"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 11 |
+
1_72774,1,72774,1-clt-hp,relationship: the state in which a city is located is the state containing,97.75382995605467,931.018913269043,66.50135094778878,0.3197059288860138, containing,14,0.0095889568328857,7,229,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 12 |
+
20_44686,20,44686,20-clt-hp,"entity: A city in Texas, USA is Dallas",21.17974853515625,35.3902645111084,3.53902645111084,0.8329051714076581, Dallas,10,0.008446842432022,7,40,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7,False,
|
| 13 |
+
20_44686,20,44686,20-clt-hp,entity: The capital city of Texas is Austin,57.44028472900391,111.7382698059082,12.415363311767578,0.7838561669681529, is,8,0.008446842432022,7,93,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Concept,0.7,False,
|
| 14 |
+
20_44686,20,44686,20-clt-hp,entity: A state in the United States is Texas,31.102846145629883,31.102846145629883,3.110284614562988,0.9, Texas,10,0.008446842432022,7,146,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7,False,
|
| 15 |
+
20_44686,20,44686,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.008446842432022,7,200,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7,False,
|
| 16 |
+
20_44686,20,44686,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.008446842432022,7,252,"""Texas""",Semantic,"attivazione non nettamente più forte su token funzionale 'is' prima di 'Austin, presenza di attivazioni forti token semantici Texas e Dallas, scelgo Texas perché più forte",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7,False,
|
| 17 |
+
1_57794,1,57794,1-clt-hp,"entity: A city in Texas, USA is Dallas",113.94397735595705,869.7109718322754,86.97109718322754,0.2367205428371799,entity,1,0.0081024467945098,7,15,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 18 |
+
1_57794,1,57794,1-clt-hp,entity: The capital city of Texas is Austin,113.94397735595705,785.0075225830078,87.22305806477864,0.2345092729886299,entity,1,0.0081024467945098,7,68,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 19 |
+
1_57794,1,57794,1-clt-hp,entity: A state in the United States is Texas,113.94397735595705,817.1403198242188,81.71403198242187,0.2828578229532038,entity,1,0.0081024467945098,7,121,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 20 |
+
1_57794,1,57794,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,125.45741271972656,1323.623565673828,73.53464253743489,0.4138676946757048,attribute,1,0.0081024467945098,7,174,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 21 |
+
1_57794,1,57794,1-clt-hp,relationship: the state in which a city is located is the state containing,121.10602569580078,1136.5441207885742,81.18172291346959,0.3296640489434831,relationship,1,0.0081024467945098,7,227,Relationship,Relationship,"layer ≤ 3, altissima attivazione, varianza bassa, attivazioni uniformi e molto alte su ruoli semantici generali; funzione di scaffolding concettuale del prompt",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 22 |
+
0_40780,0,40780,0-clt-hp,"entity: A city in Texas, USA is Dallas",50.744911193847656,183.38724303245544,18.338724303245545,0.6386095891824334, is,9,0.0069027841091156,7,3,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 23 |
+
0_40780,0,40780,0-clt-hp,entity: The capital city of Texas is Austin,48.96206283569336,128.85796904563904,14.317552116182116,0.7075786581086487, is,8,0.0069027841091156,7,58,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 24 |
+
0_40780,0,40780,0-clt-hp,entity: A state in the United States is Texas,53.07304382324219,192.2147843837738,19.221478438377385,0.6378297332560423, the,6,0.0069027841091156,7,107,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" United"", ""index"": 7, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 25 |
+
0_40780,0,40780,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,50.93766784667969,365.7576293945313,20.319868299696186,0.6010836546176759, is,15,0.0069027841091156,7,163,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 26 |
+
0_40780,0,40780,0-clt-hp,relationship: the state in which a city is located is the state containing,59.61247253417969,401.4472732543945,28.67480523245675,0.5189797702818713, which,6,0.0069027841091156,7,213,"""is""",Semantic,"diverse functional token (nessuna semantica), ma influenza massima su is",functional,"[{""token"": "" city"", ""index"": 8, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 27 |
+
1_52044,1,52044,1-clt-hp,"entity: A city in Texas, USA is Dallas",101.82122802734376,719.1115570068359,71.9111557006836,0.2937508504476877, USA,8,0.0067475140094757,7,16,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" USA"", ""index"": 8, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 28 |
+
1_52044,1,52044,1-clt-hp,entity: The capital city of Texas is Austin,111.89495849609376,656.9445991516113,72.99384435017903,0.347657433978786, capital,4,0.0067475140094757,7,69,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" capital"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 29 |
+
1_52044,1,52044,1-clt-hp,entity: A state in the United States is Texas,95.29304504394533,751.4510955810547,75.14510955810547,0.2114313324393026, state,4,0.0067475140094757,7,122,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" state"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 30 |
+
1_52044,1,52044,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,118.34194946289062,1567.5587120056152,87.08659511142307,0.2641105245715809, capital,17,0.0067475140094757,7,176,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" capital"", ""index"": 17, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 31 |
+
1_52044,1,52044,1-clt-hp,relationship: the state in which a city is located is the state containing,125.9399642944336,1198.040008544922,85.57428632463727,0.3205152407017193, containing,14,0.0067475140094757,7,228,Relationship,Relationship,"layer medio-basso, più picchi distinti, max activation diversa da media activation",semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a,Relationship,,1.0,False,
|
| 32 |
+
16_89970,16,89970,16-clt-hp,"entity: A city in Texas, USA is Dallas",18.21431350708008,18.21431350708008,1.821431350708008,0.9, Texas,6,0.0067293047904968,6,28,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 33 |
+
16_89970,16,89970,16-clt-hp,entity: The capital city of Texas is Austin,18.45095634460449,24.438182830810547,2.7153536478678384,0.8528339888104568, Texas,7,0.0067293047904968,6,82,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 34 |
+
16_89970,16,89970,16-clt-hp,entity: A state in the United States is Texas,7.996506690979004,7.996506690979004,0.7996506690979004,0.9, Texas,10,0.0067293047904968,6,134,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 35 |
+
16_89970,16,89970,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0067293047904968,6,189,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 36 |
+
16_89970,16,89970,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0067293047904968,6,241,"""Texas""",Semantic, si attiva solo su Texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 37 |
+
22_11998,22,11998,22-clt-hp,"entity: A city in Texas, USA is Dallas",21.473478317260746,21.473478317260746,2.147347831726074,0.9, Dallas,10,0.005888283252716,7,46,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.9376365161058693,False,
|
| 38 |
+
22_11998,22,11998,22-clt-hp,entity: The capital city of Texas is Austin,20.13431739807129,20.13431739807129,2.237146377563477,0.8888888888888888, is,8,0.005888283252716,7,101,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Concept,0.9376365161058693,False,
|
| 39 |
+
22_11998,22,11998,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.005888283252716,7,152,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.9376365161058693,False,
|
| 40 |
+
22_11998,22,11998,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.005888283252716,7,205,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.9376365161058693,False,
|
| 41 |
+
22_11998,22,11998,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.005888283252716,7,258,"""Dallas""",Semantic,"attivazione forte su Dallas, attivazione su is(Austin) debole, le feature Say(qualcosa) sono molto selettive e si attivano sullo stesso token funzionale (es. 'is')",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.9376365161058693,False,
|
| 42 |
+
0_91045,0,91045,0-clt-hp,"entity: A city in Texas, USA is Dallas",46.246559143066406,46.246559143066406,4.624655914306641,0.8999999999999999, is,9,0.0052919089794158,7,5,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 43 |
+
0_91045,0,91045,0-clt-hp,entity: The capital city of Texas is Austin,41.82666778564453,41.82666778564453,4.647407531738281,0.8888888888888888, is,8,0.0052919089794158,7,63,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 44 |
+
0_91045,0,91045,0-clt-hp,entity: A state in the United States is Texas,45.03489685058594,45.03489685058594,4.503489685058594,0.8999999999999999, is,9,0.0052919089794158,7,112,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 45 |
+
0_91045,0,91045,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,53.5222053527832,53.5222053527832,2.9734558529324,0.9444444444444444, is,15,0.0052919089794158,7,161,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 46 |
+
0_91045,0,91045,0-clt-hp,relationship: the state in which a city is located is the state containing,62.28597259521485,113.89995193481444,8.135710852486747,0.8693813307635213, is,11,0.0052919089794158,7,212,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 47 |
+
0_5200,0,5200,0-clt-hp,"entity: A city in Texas, USA is Dallas",47.27579116821289,47.27579116821289,4.727579116821289,0.9, is,9,0.0052788853645324,7,4,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 48 |
+
0_5200,0,5200,0-clt-hp,entity: The capital city of Texas is Austin,43.82829284667969,43.82829284667969,4.869810316297743,0.8888888888888888, is,8,0.0052788853645324,7,62,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 49 |
+
0_5200,0,5200,0-clt-hp,entity: A state in the United States is Texas,36.06181335449219,36.06181335449219,3.606181335449219,0.8999999999999999, is,9,0.0052788853645324,7,114,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 50 |
+
0_5200,0,5200,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,37.01258087158203,37.01258087158203,2.0562544928656683,0.9444444444444444, is,15,0.0052788853645324,7,167,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 51 |
+
0_5200,0,5200,0-clt-hp,relationship: the state in which a city is located is the state containing,31.49920654296875,59.72468566894531,4.266048976353237,0.8645664623160007, is,9,0.0052788853645324,7,219,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 52 |
+
21_84338,21,84338,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,45,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 53 |
+
21_84338,21,84338,21-clt-hp,entity: The capital city of Texas is Austin,38.49139404296875,57.22371768951416,6.358190854390462,0.8348152616324397, is,8,0.0047608315944671,7,95,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 54 |
+
21_84338,21,84338,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0047608315944671,7,151,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 55 |
+
21_84338,21,84338,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.62592601776123,8.62592601776123,0.4792181120978461,0.9444444444444444, is,15,0.0047608315944671,7,203,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 56 |
+
21_84338,21,84338,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0047608315944671,7,257,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 57 |
+
0_230,0,230,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.41893768310547,42.41893768310547,4.241893768310547,0.9, is,9,0.0046725273132324,7,8,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 58 |
+
0_230,0,230,0-clt-hp,entity: The capital city of Texas is Austin,46.301795959472656,46.301795959472656,5.144643995496962,0.8888888888888888, is,8,0.0046725273132324,7,59,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 59 |
+
0_230,0,230,0-clt-hp,entity: A state in the United States is Texas,47.897682189941406,47.897682189941406,4.789768218994141,0.9, is,9,0.0046725273132324,7,110,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 60 |
+
0_230,0,230,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,41.60439300537109,41.60439300537109,2.3113551669650607,0.9444444444444444, is,15,0.0046725273132324,7,166,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 61 |
+
0_230,0,230,0-clt-hp,relationship: the state in which a city is located is the state containing,43.75920486450195,71.13797760009766,5.08128411429269,0.8838807942231441, is,9,0.0046725273132324,7,216,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 62 |
+
0_1861,0,1861,0-clt-hp,"entity: A city in Texas, USA is Dallas",54.92845916748047,72.53322219848633,7.253322219848632,0.8679496506950471, Texas,6,0.0041899383068084,6,1,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 63 |
+
0_1861,0,1861,0-clt-hp,entity: The capital city of Texas is Austin,55.11215591430664,80.40324020385742,8.933693355984158,0.8378997662534727, Texas,7,0.0041899383068084,6,54,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 64 |
+
0_1861,0,1861,0-clt-hp,entity: A state in the United States is Texas,55.28260040283203,55.28260040283203,5.528260040283203,0.9, Texas,10,0.0041899383068084,6,106,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 65 |
+
0_1861,0,1861,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0041899383068084,6,170,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 66 |
+
0_1861,0,1861,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0041899383068084,6,222,"""Texas""",Semantic,attivazioni solo su texas embedding,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 67 |
+
7_24743,7,24743,7-clt-hp,"entity: A city in Texas, USA is Dallas",13.26353645324707,20.89326572418213,2.089326572418213,0.8424759052924591, Texas,6,0.00392746925354,6,19,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 68 |
+
7_24743,7,24743,7-clt-hp,entity: The capital city of Texas is Austin,13.514944076538086,26.310606002807617,2.9234006669786243,0.7836912494478138, Texas,7,0.00392746925354,6,73,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 69 |
+
7_24743,7,24743,7-clt-hp,entity: A state in the United States is Texas,8.938840866088867,8.938840866088867,0.8938840866088867,0.8999999999999999, Texas,10,0.00392746925354,6,125,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 70 |
+
7_24743,7,24743,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.00392746925354,6,179,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 71 |
+
7_24743,7,24743,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.00392746925354,6,232,"""Texas""",Semantic,Attivazione solo su Texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 72 |
+
16_98048,16,98048,16-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,30,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 73 |
+
16_98048,16,98048,16-clt-hp,entity: The capital city of Texas is Austin,25.97924995422364,30.72956657409668,3.414396286010742,0.8685721761780255, is,8,0.0038511157035827,7,81,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 74 |
+
16_98048,16,98048,16-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038511157035827,7,136,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 75 |
+
16_98048,16,98048,16-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,6.895334243774414,12.294490814208984,0.6830272674560547,0.9009435593245188, is,15,0.0038511157035827,7,187,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 76 |
+
16_98048,16,98048,16-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038511157035827,7,242,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 77 |
+
20_74108,20,74108,20-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,41,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 78 |
+
20_74108,20,74108,20-clt-hp,entity: The capital city of Texas is Austin,26.576478958129883,31.370362758636475,3.48559586207072,0.8688465892128853, is,8,0.0038157403469085,7,94,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 79 |
+
20_74108,20,74108,20-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038157403469085,7,147,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 80 |
+
20_74108,20,74108,20-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,63.30609893798828,130.92694854736328,7.273719363742405,0.8851023916215813, the,16,0.0038157403469085,7,199,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 81 |
+
20_74108,20,74108,20-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038157403469085,7,253,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 82 |
+
18_3623,18,3623,18-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,37,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 83 |
+
18_3623,18,3623,18-clt-hp,entity: The capital city of Texas is Austin,14.909049987792969,14.909049987792969,1.6565611097547743,0.888888888888889, is,8,0.0038073360919952,7,88,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 84 |
+
18_3623,18,3623,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0038073360919952,7,142,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 85 |
+
18_3623,18,3623,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0038073360919952,7,195,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 86 |
+
18_3623,18,3623,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0038073360919952,7,248,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 87 |
+
0_95057,0,95057,0-clt-hp,"entity: A city in Texas, USA is Dallas",44.93249130249024,167.4211540222168,16.74211540222168,0.6273940100602924,:,2,0.0037478804588317,7,6,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" city"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 88 |
+
0_95057,0,95057,0-clt-hp,entity: The capital city of Texas is Austin,44.93249130249024,108.54875183105467,12.060972425672745,0.7315757022134157,:,2,0.0037478804588317,7,61,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" capital"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 89 |
+
0_95057,0,95057,0-clt-hp,entity: A state in the United States is Texas,44.93249130249024,150.82857513427734,15.082857513427737,0.6643218064209181,:,2,0.0037478804588317,7,113,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" state"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""entity"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 90 |
+
0_95057,0,95057,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,45.49790191650391,195.7961578369141,10.877564324273004,0.7609216278975872,:,2,0.0037478804588317,7,165,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" primary"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""attribute"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 91 |
+
0_95057,0,95057,0-clt-hp,relationship: the state in which a city is located is the state containing,39.0150146484375,185.28181552886963,13.234415394919258,0.660786609612377,:,2,0.0037478804588317,7,218,"""punctuation""",Semantic,attuazione solo su ':',functional,"[{""token"": "" state"", ""index"": 4, ""distance"": 2, ""direction"": ""forward""}, {""token"": ""relationship"", ""index"": 1, ""distance"": 1, ""direction"": ""backward""}]",json,Semantic,Dictionary (fallback),0.9,False,
|
| 92 |
+
0_32742,0,32742,0-clt-hp,"entity: A city in Texas, USA is Dallas",52.04083251953125,88.8308334350586,8.88308334350586,0.8293055104341003, Texas,6,0.0035841464996337,6,2,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 6, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 93 |
+
0_32742,0,32742,0-clt-hp,entity: The capital city of Texas is Austin,52.179874420166016,70.19295501708984,7.799217224121094,0.8505320813668551, Texas,7,0.0035841464996337,6,56,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 94 |
+
0_32742,0,32742,0-clt-hp,entity: A state in the United States is Texas,49.56887435913086,49.56887435913086,4.956887435913086,0.8999999999999999, Texas,10,0.0035841464996337,6,109,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 95 |
+
0_32742,0,32742,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0035841464996337,6,171,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 96 |
+
0_32742,0,32742,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0035841464996337,6,223,"""Texas""",Semantic,attivazione solo su texas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 97 |
+
1_89326,1,89326,1-clt-hp,"entity: A city in Texas, USA is Dallas",69.7168960571289,69.7168960571289,6.971689605712891,0.9, Dallas,10,0.0034727156162261,6,18,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 98 |
+
1_89326,1,89326,1-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,71,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 99 |
+
1_89326,1,89326,1-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0034727156162261,6,124,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 100 |
+
1_89326,1,89326,1-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0034727156162261,6,177,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 101 |
+
1_89326,1,89326,1-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0034727156162261,6,230,"""Dallas""",Semantic,Unica attivazione solo su Dallas,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 102 |
+
22_32893,22,32893,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,48,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 103 |
+
22_32893,22,32893,22-clt-hp,entity: The capital city of Texas is Austin,46.686065673828125,46.686065673828125,5.187340630425347,0.888888888888889, is,8,0.003369390964508,7,99,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 104 |
+
22_32893,22,32893,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003369390964508,7,153,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 105 |
+
22_32893,22,32893,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003369390964508,7,206,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 106 |
+
22_32893,22,32893,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003369390964508,7,259,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 107 |
+
21_61721,21,61721,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,44,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 108 |
+
21_61721,21,61721,21-clt-hp,entity: The capital city of Texas is Austin,18.76114654541016,18.76114654541016,2.0845718383789062,0.8888888888888888, is,8,0.0032654702663421,7,98,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 109 |
+
21_61721,21,61721,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0032654702663421,7,150,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 110 |
+
21_61721,21,61721,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0032654702663421,7,204,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 111 |
+
21_61721,21,61721,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0032654702663421,7,256,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 112 |
+
0_49560,0,49560,0-clt-hp,"entity: A city in Texas, USA is Dallas",42.66587448120117,42.66587448120117,4.266587448120117,0.8999999999999999, is,9,0.0031878352165222,7,7,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 113 |
+
0_49560,0,49560,0-clt-hp,entity: The capital city of Texas is Austin,45.84932327270508,45.84932327270508,5.094369252522786,0.8888888888888888, is,8,0.0031878352165222,7,60,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 114 |
+
0_49560,0,49560,0-clt-hp,entity: A state in the United States is Texas,47.70016479492188,47.70016479492188,4.770016479492187,0.9, is,9,0.0031878352165222,7,111,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 115 |
+
0_49560,0,49560,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,49.51710510253906,49.51710510253906,2.7509502834743924,0.9444444444444444, is,15,0.0031878352165222,7,164,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 116 |
+
0_49560,0,49560,0-clt-hp,relationship: the state in which a city is located is the state containing,54.55234146118164,104.65689086914062,7.475492204938616,0.8629666114284383, is,11,0.0031878352165222,7,215,"""is""",Semantic,attivazione aselettiva su is,functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 117 |
+
7_89264,7,89264,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.8238649368286133,0.8238649368286133,0.0823864936828613,0.9,",",7,0.003050148487091,7,20,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json,"Say ""X""",,1.0,False,
|
| 118 |
+
7_89264,7,89264,7-clt-hp,entity: The capital city of Texas is Austin,8.95943546295166,8.95943546295166,0.9954928292168512,0.8888888888888888, is,8,0.003050148487091,7,74,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 119 |
+
7_89264,7,89264,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.003050148487091,7,127,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 120 |
+
7_89264,7,89264,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.003050148487091,7,180,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 121 |
+
7_89264,7,89264,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.003050148487091,7,233,"Say ""Austin""","Say ""X""","Attivazione nettamente più forte su token funzionale 'is' prima di Austin, su 'is' dallas molto più debole",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 122 |
+
19_54790,19,54790,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,39,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 123 |
+
19_54790,19,54790,19-clt-hp,entity: The capital city of Texas is Austin,44.76298522949219,44.76298522949219,4.973665025499132,0.888888888888889, is,8,0.0028801560401916,7,92,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 124 |
+
19_54790,19,54790,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0028801560401916,7,145,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 125 |
+
19_54790,19,54790,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,5.89443302154541,5.89443302154541,0.3274685011969672,0.9444444444444444, is,15,0.0028801560401916,7,198,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 126 |
+
19_54790,19,54790,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0028801560401916,7,251,"Say ""Austin""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di 'Austin, altra attivazione molto più lieve su token funzionale 'is' prima di 'Capital' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 127 |
+
0_39374,0,39374,0-clt-hp,"entity: A city in Texas, USA is Dallas",21.213979721069336,21.213979721069336,2.1213979721069336,0.9, is,9,0.0028547048568725,7,9,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 128 |
+
0_39374,0,39374,0-clt-hp,entity: The capital city of Texas is Austin,19.35468482971192,19.35468482971192,2.150520536634657,0.8888888888888888, is,8,0.0028547048568725,7,64,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 129 |
+
0_39374,0,39374,0-clt-hp,entity: A state in the United States is Texas,19.664194107055664,19.664194107055664,1.9664194107055664,0.9, is,9,0.0028547048568725,7,115,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" Texas"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 130 |
+
0_39374,0,39374,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,8.938578605651855,8.938578605651855,0.4965877003139919,0.9444444444444444, is,15,0.0028547048568725,7,168,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 2, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 131 |
+
0_39374,0,39374,0-clt-hp,relationship: the state in which a city is located is the state containing,13.01608657836914,23.16886329650879,1.654918806893485,0.8728558851441782, is,9,0.0028547048568725,7,220,"""is""",Semantic,"attivazione su token funzionale 'is' ma aselettiva,",functional,"[{""token"": "" located"", ""index"": 10, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,0.8333333333333334,False,
|
| 132 |
+
17_1822,17,1822,17-clt-hp,"entity: A city in Texas, USA is Dallas",2.5688390731811523,2.5688390731811523,0.2568839073181152,0.9,",",7,0.0027894973754882,7,31,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json,"Say ""X""",,1.0,False,
|
| 133 |
+
17_1822,17,1822,17-clt-hp,entity: The capital city of Texas is Austin,15.288778305053713,15.288778305053713,1.698753145005968,0.8888888888888888, is,8,0.0027894973754882,7,85,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 134 |
+
17_1822,17,1822,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027894973754882,7,138,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 135 |
+
17_1822,17,1822,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0027894973754882,7,192,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 136 |
+
17_1822,17,1822,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027894973754882,7,244,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, l'attivazione più forte è su is Austin",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 137 |
+
0_55815,0,55815,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,13,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 138 |
+
0_55815,0,55815,0-clt-hp,entity: The capital city of Texas is Austin,53.67196273803711,53.67196273803711,5.963551415337457,0.888888888888889, capital,4,0.0027363300323486,2,55,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": "" capital"", ""index"": 4, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 139 |
+
0_55815,0,55815,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027363300323486,2,119,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 140 |
+
0_55815,0,55815,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,57.75386428833008,57.75386428833008,3.2085480160183377,0.9444444444444444, capital,17,0.0027363300323486,2,160,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": "" capital"", ""index"": 17, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 141 |
+
0_55815,0,55815,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027363300323486,2,225,"""capital""",Semantic,unica attivazione solo su capital,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 142 |
+
22_81571,22,81571,22-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,49,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 143 |
+
22_81571,22,81571,22-clt-hp,entity: The capital city of Texas is Austin,27.45061683654785,27.45061683654785,3.0500685373942056,0.8888888888888888, is,8,0.002730906009674,7,100,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 144 |
+
22_81571,22,81571,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002730906009674,7,155,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 145 |
+
22_81571,22,81571,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.002730906009674,7,208,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 146 |
+
22_81571,22,81571,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002730906009674,7,261,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 147 |
+
0_40936,0,40936,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,12,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 148 |
+
0_40936,0,40936,0-clt-hp,entity: The capital city of Texas is Austin,76.25304412841797,76.25304412841797,8.472560458713108,0.888888888888889, of,6,0.0027021169662475,3,53,"""of""",Semantic,attivazioni significative solo su of,functional,"[{""token"": "" Texas"", ""index"": 7, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,1.0,False,
|
| 149 |
+
0_40936,0,40936,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0027021169662475,3,118,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 150 |
+
0_40936,0,40936,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,80.70610809326172,80.70610809326172,4.483672671847874,0.9444444444444444, of,10,0.0027021169662475,3,159,"""of""",Semantic,attivazioni significative solo su of,functional,"[{""token"": "" government"", ""index"": 11, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Dictionary,1.0,False,
|
| 151 |
+
0_40936,0,40936,0-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0027021169662475,3,224,"""of""",Semantic,attivazioni significative solo su of,semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 152 |
+
18_61980,18,61980,18-clt-hp,"entity: A city in Texas, USA is Dallas",14.10042667388916,14.10042667388916,1.410042667388916,0.9,",",7,0.0026986598968505,7,34,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json,"Say ""X""",,1.0,False,
|
| 153 |
+
18_61980,18,61980,18-clt-hp,entity: The capital city of Texas is Austin,32.00542449951172,32.00542449951172,3.556158277723524,0.8888888888888888, is,8,0.0026986598968505,7,87,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 154 |
+
18_61980,18,61980,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0026986598968505,7,140,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 155 |
+
18_61980,18,61980,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0026986598968505,7,193,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 156 |
+
18_61980,18,61980,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0026986598968505,7,246,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 157 |
+
17_98126,17,98126,17-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,33,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 158 |
+
17_98126,17,98126,17-clt-hp,entity: The capital city of Texas is Austin,20.15220642089844,25.09380292892456,2.7882003254360623,0.861642925484099, is,8,0.0024870038032531,7,84,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 159 |
+
17_98126,17,98126,17-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0024870038032531,7,139,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 160 |
+
17_98126,17,98126,17-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,20.67333602905273,54.458144187927246,3.025452454884847,0.8536543666376291, the,16,0.0024870038032531,7,190,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 161 |
+
17_98126,17,98126,17-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0024870038032531,7,245,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'is' prima di Capital, altra attivazione poco più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 162 |
+
12_87969,12,87969,12-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,24,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 163 |
+
12_87969,12,87969,12-clt-hp,entity: The capital city of Texas is Austin,15.27625846862793,15.27625846862793,1.69736205206977,0.8888888888888888, is,8,0.0023558735847473,7,76,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 164 |
+
12_87969,12,87969,12-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023558735847473,7,130,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 165 |
+
12_87969,12,87969,12-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,30.10682678222656,84.44636726379395,4.691464847988552,0.8441727226212316, the,16,0.0023558735847473,7,182,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 166 |
+
12_87969,12,87969,12-clt-hp,relationship: the state in which a city is located is the state containing,7.160322189331055,7.160322189331055,0.5114515849522182,0.9285714285714286, the,12,0.0023558735847473,7,235,"Say ""Capital""","Say ""X""","attivazione più forte su token funzionale 'the' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" state"", ""index"": 13, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 167 |
+
22_74186,22,74186,22-clt-hp,"entity: A city in Texas, USA is Dallas",8.636338233947754,8.636338233947754,0.8636338233947753,0.9,",",7,0.0023505687713623,7,47,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" USA"", ""index"": 8, ""distance"": 1, ""direction"": ""forward""}, {""token"": "" Texas"", ""index"": 6, ""distance"": 1, ""direction"": ""backward""}]",json,"Say ""X""",,1.0,False,
|
| 168 |
+
22_74186,22,74186,22-clt-hp,entity: The capital city of Texas is Austin,0.5329599380493164,0.5329599380493164,0.0592177708943684,0.888888888888889, is,8,0.0023505687713623,7,102,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 169 |
+
22_74186,22,74186,22-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023505687713623,7,154,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 170 |
+
22_74186,22,74186,22-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023505687713623,7,207,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 171 |
+
22_74186,22,74186,22-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023505687713623,7,260,"Say ""Austin""","Say ""X""","è sicuramente una feature sayX:attivazione solo su token funzionali (',' e 'is) la virgola sta tra Texas e USA, is è prima di austin, è un caso forse particolare l'attivazione più forte è sulla virgola tra luoghi americani ma potrebbe essere una differenziazione successiva",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 172 |
+
18_56027,18,56027,18-clt-hp,"entity: A city in Texas, USA is Dallas",34.67882537841797,34.67882537841797,3.467882537841797,0.9, Dallas,10,0.0023038387298583,7,35,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": "" Dallas"", ""index"": 10, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 173 |
+
18_56027,18,56027,18-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,90,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 174 |
+
18_56027,18,56027,18-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0023038387298583,7,143,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 175 |
+
18_56027,18,56027,18-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0023038387298583,7,196,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 176 |
+
18_56027,18,56027,18-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0023038387298583,7,249,"""Dallas""",Semantic,"Unica attivazione forte su Dallas, che è anche un embedding del prompt di partenza",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 177 |
+
21_16875,21,16875,21-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,42,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 178 |
+
21_16875,21,16875,21-clt-hp,entity: The capital city of Texas is Austin,17.112422943115234,17.112422943115234,1.901380327012804,0.8888888888888888, is,8,0.0021759271621704,7,96,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 179 |
+
21_16875,21,16875,21-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0021759271621704,7,148,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 180 |
+
21_16875,21,16875,21-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0021759271621704,7,201,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 181 |
+
21_16875,21,16875,21-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.0021759271621704,7,254,"Say ""Austin""","Say ""X""",unica attivazione su token funzionale 'is' prima di 'Austin',semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 182 |
+
0_37567,0,37567,0-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,11,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 183 |
+
0_37567,0,37567,0-clt-hp,entity: The capital city of Texas is Austin,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,66,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 184 |
+
0_37567,0,37567,0-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.0020866394042968,5,117,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 185 |
+
0_37567,0,37567,0-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,0.0,0.0,0.0,0.0,attribute,1,0.0020866394042968,5,172,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": ""attribute"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 186 |
+
0_37567,0,37567,0-clt-hp,relationship: the state in which a city is located is the state containing,41.10612106323242,41.10612106323242,2.9361515045166016,0.9285714285714286, containing,14,0.0020866394042968,5,217,"""containing""",Semantic,unica attivazione solo su containing,semantic,"[{""token"": "" containing"", ""index"": 14, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Dictionary,1.0,False,
|
| 187 |
+
7_3144,7,3144,7-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,21,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7471177650382277,False,
|
| 188 |
+
7_3144,7,3144,7-clt-hp,entity: The capital city of Texas is Austin,14.262575149536133,18.0198335647583,2.002203729417589,0.8596183572443643, is,8,0.002021312713623,7,72,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,Semantic,Concept,0.7471177650382277,False,
|
| 189 |
+
7_3144,7,3144,7-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.002021312713623,7,126,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7471177650382277,False,
|
| 190 |
+
7_3144,7,3144,7-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,19.09012985229492,91.89447498321532,5.10524861017863,0.73257129995033, seat,9,0.002021312713623,7,178,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": "" seat"", ""index"": 9, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7471177650382277,False,
|
| 191 |
+
7_3144,7,3144,7-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.002021312713623,7,231,"""seat""",Semantic,"non è una feature sayX: attivazione più debole su token funzionale 'is' prima di 'Austin, presenza di attivazione forte su token semantico Seat",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,Semantic,Concept,0.7471177650382277,False,
|
| 192 |
+
19_13946,19,13946,19-clt-hp,"entity: A city in Texas, USA is Dallas",0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,38,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 193 |
+
19_13946,19,13946,19-clt-hp,entity: The capital city of Texas is Austin,45.02559280395508,45.02559280395508,5.002843644883898,0.888888888888889, is,8,0.001940906047821,7,91,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" Austin"", ""index"": 9, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 194 |
+
19_13946,19,13946,19-clt-hp,entity: A state in the United States is Texas,0.0,0.0,0.0,0.0,entity,1,0.001940906047821,7,144,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""entity"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|
| 195 |
+
19_13946,19,13946,19-clt-hp,attribute: The primary city serving as the seat of government for a state is the capital city,66.8328628540039,118.54381847381592,6.585767692989773,0.901459141330271, the,16,0.001940906047821,7,197,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",functional,"[{""token"": "" capital"", ""index"": 17, ""distance"": 1, ""direction"": ""forward""}]",json,"Say ""X""",,1.0,False,
|
| 196 |
+
19_13946,19,13946,19-clt-hp,relationship: the state in which a city is located is the state containing,0.0,0.0,0.0,0.0,relationship,1,0.001940906047821,7,250,"Say ""Capital""","Say ""X""","attivazione nettamente più forte su token funzionale 'is' prima di Capital, altra attivazione più lieve su token funzionale 'is' prima di 'Austin' parola semanticante vicina'",semantic,"[{""token"": ""relationship"", ""index"": 1, ""distance"": 0, ""direction"": ""self""}]",n/a,"Say ""X""",,1.0,False,
|