Week 8 of 8 · Networks × language

Putting it all together

Seven weeks of tools, and today no new method. Today is about the final project: what it is, why it looks the way it does, and everything we can do to help you make the best one possible.

Before class

1 · Today is different

No new method, no explorables, no exercises to grind through. The day runs in three blocks, and the page is only one of them.

WhenWhatWhere
09:00–09:10Welcome, and the go-nuts highlight from week 7Auditorium 43
09:10–11:00Workshop: finding undocumented APIs, with our guest Piotr Sapiezynski (Section 4)Auditorium 43
11:00–12:00Read this page, Sections 2–7, with your groupwherever you like
12:00–13:00Lunch
13:00–13:10A pep talkAuditorium 43
13:10–16:00One big brainstorm: your group, a whiteboard, and Lasse, the TAs and me moving around the room (Section 8)Auditorium 43 and the rooms around it
13:10–14:00In parallel: the group bazaar, for anyone still looking for a groupthe front of Auditorium 43
before 16:00Register your group on DTU Learn

Lasse hosts the morning; I am around starting at 13:00.

Seven weeks ago you didn't know much about networks. Now you can build one from links or from text, find its communities, rank its nodes, embed its documents, measure sentiment, and extract the people mentioned on every page. And you have an agent that will run any of it while you get coffee. That last part changes what the rest of the course is about. When I taught this class before, the bottleneck was getting the code to work. Now the bottleneck is deciding what is worth running, and finding data worth running it on.

2 · The exam: what, how, why

The final project is the exam. It counts for 50% of your grade, it runs over weeks 9–13 on a dataset you pick, and here is what I am asking for.

The formalia in one box: the project checklist on the front page.

What you deliver.

How it is graded. The project gets a single score on the course's 0–3 scale, paper and presentation together. Each of us who reads your paper scores it 0–3 in each of the categories below, with a comment, and after the presentations we meet and agree on the one number you get. The categories, so you know what we look for:

Why it looks like this. Look at your group's go-nuts posts. Seven weeks, seven analyses, each one more than I could have asked of a student group a couple of years ago. You have proven you can create near infinite analyses - and I hope you have realized how much awesomeness you are capable of putting together. But the project and the exam deliberately do not reward more of that.

The exam format is chosen to grade two things:

  1. Can you pick an interesting problem? And
  2. Can you communicate it clearly?

A plain template with no room to spare means you lose a lot of the advantage that comes from the agents: flashy designs, volume, volume, volume. You cannot pile up endless nice-looking analyses, because they do not fit in the template, and a reader who sees six pages of everything can easily tell that you didn't focus.

The paper is about the one thing agents still cannot fully do for you: deciding which question is worth six pages. Just like a real scientific paper, a six-page paper is a great format for a single question, the analyses that support it, and reflections about how your methods impacted your findings. You have to carefully choose the two or three figures that carry the story.

The presentation part is about testing whether you know your stuff. If your agent wrote the pipeline, each of you still has to be able to say what it does, why the numbers are right, etc. We will ask whoever we like, so everyone in the group must be able to explain everything in the paper.

The timeline.

WhenWhat
Today, 13:00–16:00The group bazaar and in parallel, the brainstorm: your candidate projects, cut down to one slide, discussed with Lasse, a TA or me; group registered on Learn before you leave
Wed 4 NovTest 2 in the morning; the first project session after: dataset locked, question drafted
Wed 11 Nov, 18 Nov, 25 NovProject period: we are in the room, come with questions
Fri 27 Nov, 23:59Hand-in on DTU Learn: the paper (PDF), the three slides (PDF) and the half-page reflection (PDF)
Wed 2 DecPresentations: three slides, three minutes, questions

Frequently asked

Can we use methods not covered in class? Yes, but the project is about showcasing what you've learned, so it should center on the network science and NLP tools from the course.

Is our dataset too small? If it is around 50 nodes, probably, unless the text or the time dimension is unusually rich. Ask this afternoon.

Do the six pages include figures? Yes. Everything, including references, fits in six pages of the template.

Can we combine datasets? Please do. Section 5 says why.

What goes on the three slides? Whatever pitches the project best in three minutes; most groups use one for the question and data, one for the main figure, one for what it means and what they checked. The deck is a plain PDF, no animations, since we leaf through everyone's in one file.

Can we change groups after today? Yes, until 4 November; update the registration on Learn.

What about terms of service, for data we collect ourselves? Collect gently (rate limits, pauses), keep what you collected and when.

3 · The best possible project

The point of today is simple: we want to support you in making the best possible project. That is the spine of the day.

As I see it, the best possible project has three parts, and today has one block for each.

4 · Workshop: finding undocumented APIs

We kick off with a guest. Piotr Sapiezynski is an assistant professor at DTU Compute and an assistant research professor at Northeastern University. He audits online platforms and their algorithms, working with other researchers, journalists and NGOs, and his results have e.g. fed into a $5 billion FTC settlement with Facebook. With the journalist Leon Yin he edits Inspect Element, an online book that teaches journalists and researchers to find and use the APIs websites use behind the scenes. This morning he teaches the chapter that matters most for your project. In his words:

You're probably already familiar with many APIs that come with a documentation and maybe even a tutorial. You might not yet know that most APIs are undocumented and hidden in plain sight. Being able to find them can provide a rich, reliable, and scalable method of building your own datasets. In this class you will learn how to find undocumented APIs in the wild, how to automate collecting data through them, and how they've been used by researchers and investigative journalists.

Workshop material

5 · The coolest dataset you can find

Here is why Piotr opens the day.

Every group in this room can download a Wikipedia category. Every group can find the same ten "network datasets" with the same ten Google searches, and I have read the papers that come out of them. The single biggest advantage a project can have is a dataset with an insight worth digging out of it, and after this morning you will learn about ways of finding insanely interesting data that most people do not know exists.

Think about what you looked at on your phone this week. The streaming service that recommends shows, the app that lists concerts in Copenhagen, the second-hand marketplace, the running app with its routes and kudos, the game with its match history, the recipe site including reviews, the real-estate listings, the sports site with every lineup since 1990. Each one of those pages is filled by a request you can probably see, copy, strip down and loop. Behind many of these apps you'll find a dataset with people in it, sometimes connections between them, and text they wrote, and few of them have been studied. Perfect for this class. Piotr's case studies are the proof: a YouTube ad-keyword blocklist found by watching which searches returned an empty response (how they did it), Amazon's own brands listed by a filter nobody documented, and a million internet-service plans collected in two days (the method). Those were investigations. Yours is a project, but the strategy is the same: find the request, and the dataset is yours.

Many other sources of data. Ambitious scraping of undocumented APIs is not the only way to go. There are many conventional datasets online that have carried great projects, and a familiar source with a fresh question beats a rare source with none. Some places to start:

More in the Goodies.

Combine datasets. This used to be a complicated/an impossible aspect: multiple sources, multiple formats, multiple sets of names that never quite match. With an agent, the joining is usually more like an afternoon. Lyrics plus collaboration credits, a character wiki plus the episode transcripts, a parliament's speeches plus its voting records, a subreddit plus the Wikipedia pages its users link to, the concert listings plus the setlists plus the artists' pages. The richest projects I have seen fused two datasets that nobody had put together, and the fusion itself was the first finding. Only the name resolution is still yours to check (recall week 7, Section 5): remember that two sources that both mention Stark have to agree on which one.

The dataset questions. Before you fall in love with a question, make sure the data can carry it. A dataset is worth your five weeks if:

8.1 — Three datasets, on paper 🧠 Learn

Here are three candidate project datasets, described the way a group might describe them next week.

  1. The full English Wikipedia: every article, every link, every word.
  2. The 41 characters in our favorite TV series: a fan wiki with one page per character and a "relationships" section.
  3. Every speech in the Danish parliament 2010–2024: about 400,000 speeches by about 600 members, with party, date, and who spoke right before whom.

For each one, think about the five questions above and write one sentence per part. Then say which of the three you would pick, and what you would do to the other two to make them workable (subset, crawl deeper, change the unit, fuse with a second source). There is a defensible answer for all three, and the point is the reasoning.

6 · Asking the right question

Now for tips about asking a good research question.

The question comes before the method. "We ran Louvain and word2vec on the corpus" is not a question. "Do the characters who are structurally central in the link network also sit at the center of the story, in the text?" is one. Notice that the second version tells you which methods to use. The first tells you nothing about why.

But it's complicated. Because sometimes the best questions arrive because you see that a method makes it possible to ask a new and interesting question. So don't be blind to the fact that methods can inspire good questions!

And also know that the VERY best questions arise from playing with the data. From iteration. In my own research I usually

And you are allowed to do that too. You are not bound by your initial idea. Allow it to develop as you work with data. Agents make those iterations cheaper and faster. Just remember that you need to have a clean and beautiful story when you're done. Then you put that story in the paper ;)

Say what your analyses actually measure. Modularity measures how grouped a partition is, not how right. A sentiment score measures what a lexicon or a classifier does on your text, not how a character feels. Cosine similarity between embeddings measures shared context in the training data, not shared meaning in your domain. Every analysis in your paper needs one sentence that says what it captures and one that says what it misses.

Validate your choices. Compare against a null (week 2), against another method (week 4), against a hand-labeled sample (week 7). If a model produced the number, you check the model on examples you read yourself, and you report the agreement. A result without a check is a claim about your software, not about the world.

More on building a story. This point expands on what I ended on when I was writing about iterating to the right question above.

When you write your project, build one single story, not a pile of techniques. Every figure should answer part of your question ... or set it up. If a figure does neither, you probably don't need it. If you get your story perfect, a reader can say what you found in a single sentence after reading your abstract (and every section after that should make the sentence more believable).

Know what makes an analysis convincing. It is not the method (sorry about repeating this so many times, but it's because it's a mistake that so many students make), it is the combination: a clear question, a measurement that fits it, a check that the measurement works, a comparison that rules out the boring explanation, and a limitation you found yourself before the reader did. A thing that I've written many times across the weekly lectures: your entire pipeline going from raw data to big complicated models and measures impacts your answer. Be aware of that in your writing and when you interpret and explain your results.

From an AI-drafted report

We applied Louvain community detection, LDA topic modeling, sentiment analysis, named entity recognition, and semantic search to the Marvel corpus. The results show rich structure: Louvain found 9 communities (modularity 0.38), LDA found 12 topics, and the average sentiment was 0.12. These findings demonstrate that the network and the text are deeply interconnected, which confirms our hypothesis.

Five methods, three numbers, zero questions. The modularity has no null (a shuffled Marvel scores 0.25, so 0.38 is modest). The 12 topics were never compared to the 9 communities, so "deeply interconnected" is asserted, not shown. The average sentiment of 0.12 is a property of the lexicon on Wikipedia prose, and nothing in the paragraph tells you what it was checked against. And "confirms our hypothesis" is the tell: no hypothesis was stated.

Here's a more precise description: We asked whether the link communities and the text topics group the same characters. They agree above chance (NMI 0.31 against 0.05 for shuffled labels), and the disagreements concentrate in the 40 characters who appear in several team books. Sentiment did not separate the groups, and our lexicon agreed with our own labels on only 61% of a 50-sentence sample, so we do not interpret it.

8.2 — Which is the better question? 🧠 Learn

  1. Take the three go-nuts posts your group is proudest of. For each, write the question it answered in one sentence. If you cannot, write the question it should have answered.
  2. For each question, name the measurement that answered it and write one sentence on what that measurement captures and one on what it misses.
  3. Pick the one post where a check was missing (a null, a second method, a hand-labeled sample). Say which check, and what result would have made you retract the post.
  4. Rewrite the AI-drafted paragraph above for your best post: the same three-sentence honest version, with your numbers.

7 · Writing the report

I'm basically asking you to write a scientific paper. That's why I chose this format. The format is PNAS's own: start from the PNAS template on Overleaf on day one, and write into it, so you always know how much room you have left. Before writing anything, watch this.

The anatomy of a paper, section by section, and what each section is for. Watch it before you start writing, and again when you think you are done.

The sections, and what each one is for:

Figures carry the paper. Three good figures beat eight. A figure of a network with a thousand nodes is a decoration; a figure that shows your effect against its null is a result. Every caption says what is plotted, what the comparison is, and what the reader should see.

Author contributions must be specific. "All group members contributed equally" is not a contribution statement. Who collected the data, who built which analysis, who did the hand labeling, who wrote which section.

8 · The afternoon: a brainstorm

The afternoon is not an exercise and it is not a go-nuts post. It is three hours of human thinking about the most interesting project your group could possibly build, with the people who will grade it walking around to think with you.

I start the session with a Group Bazaar and there's a reason for that. I really don't think you should do this project alone.

The best ideas arise when human brains meet resistance, and a brain with no one to argue with produces its first idea and keeps it. Working in groups of three is ideal in my opinion (see front page for full details). If you are one or two people right now, I recommend that you go to the front of the room to fill out the group.

The bazaar basically works like a market: if you have an idea and need people, write it on the board with your name; if you have people and want an idea, read the board; if you are a pair that wants a third, say so out loud. Talk to strangers, and merge.

Everyone who already has a group skips this and starts the brainstorm straight away. By 14:00 everybody sits with the people they will write the paper with.

Here's the plan (you don't have to follow it exactly — the times below are just a guide)

13:00–13:10, a pep talk. I say a few words about what I have seen work, and what I have seen fail.

13:10–14:00, the group bazaar, at the front of the room. See description above.

13:10–14:50, brainstorm. The agent is excellent at producing and bad at wanting; the wanting is yours, and it is the part of the project we grade. So for this stretch, I recommend no screens except for quick research. Start from the people in the room: what do you each care about that has people in it, connections between them, and text they wrote? What did you see this morning that is secretly a dataset? What would you genuinely love to know the answer to, and who else would care? Aim for ten ideas on the board, and don't judge too harshly yet. Crazy is good.

14:50–15:30, deeper research. Laptops open. Pick the three ideas the group is most excited about and send your agent out as a scout: find the data, estimate the size, pull a sample, list what is on the nodes, check whether the page is fed by an API you can see. Every idea that survives this has a dataset you have actually touched and a question written as one sentence.

15:30–16:00, the final cut, and the registration. Run the two tests from this page on each survivor: the five questions about a dataset from Section 5 and the five rules from Section 6. Kill two of the three. For the one that is left, cut until you have exactly this on one slide:

Then, before you leave: register your group on DTU Learn. We plan the final session, its rooms and its timing from that list, so a group that is not registered is a group we do not know exists.

And don't forget to register your group on DTU Learn.

And did I mention that you need to register your group on DTU Learn before you leave? It's important.

Come and talk, all afternoon. Lasse, the TAs and I are in the room the whole time, and this is what we are there for. Grab one of us at any stage: with ten ideas on the board, with three scouted, or with the slide. No sign-up, no schedule, no presentation; a conversation at your table. You are not being graded and chatting with us is the fastest way to find out whether your question is a project, a figure, or a go-nuts post, before you spend five weeks on it.

Keep the slide and the two ideas you killed. Bring the slide to the first project session on 4 November, and the two killed ideas are your insurance (see the Goodies).

Essentials

There are no new terms this week. The Essentials are the judgment calls, written down so you can carry them into the project; none of them is on Test 2. Every one of them refers back to a method you already own.

The final project in total
a six-page scientific paper in the PNAS LaTeX template (references included, link above), three slides and an ungraded half-page reflection, handed in on Learn by Friday 27 November; a three-minute presentation with questions on 2 December; 50% of the grade, one 0–3 score for paper and presentation together, on the choice of problem, the checks, the clarity of the story, and how it holds up under questioning.
The question comes before the method
a project statement names something you want to know, and the method is whatever answers it. "We ran X" is a method; "does A predict B, and where does it fail?" is a question.
The best questions come from iteration
start from a question, run the analysis, discover it was the wrong question, ask a better one, and repeat until the question and the data fit. Then write the paper as if you had asked the final question all along; you are allowed to, as long as the story you end with is clean.
What your analysis measures
every measurement captures something specific and misses something specific: modularity scores how grouped, not how right; a sentiment score is a lexicon's or a classifier's behavior on your text; embedding similarity is shared context in training data. One sentence each, in the paper.
Validate
check a measurement against a null (shuffle), a second method (NMI, agreement), or a hand-labeled sample (precision, κ). If a model produced the number, you report how well the model did on examples you read.
One story
every figure answers the question or sets it up. The finding fits in one sentence, and the sections make the sentence believable.
Convincing
a clear question, a measurement that fits it, a check that it works, a comparison that rules out the boring explanation, and a limitation you found yourself.
The dataset test
both halves present (links and text); a few hundred to a few thousand nodes; obtainable in a day; a domain you care about; something unknown about it.
Text as attribute · text as network
two ways to join the halves. A text measurement placed on nodes is an attribute, tested with a shuffle; entities extracted from text and connected by co-occurrence are a second network, tested by reading a sample of its edges.
Undocumented API
the request a web page makes to fill itself with data, visible in the browser's Network tab; found, copied, stripped to its essentials, and looped from Python, it is a dataset builder. Not on the test.

Test 2 covers weeks 5–7

Wednesday 4 November in building 303A, Auditoriums 42 and 43, the same rooms as Test 1: be there by 08:10, and the test runs 08:30–09:30 sharp. Same shape as Test 1: pen and paper, closed book, multiple-choice questions and short written tasks. Everything on the test is in the Essentials bands and "On Test 2" lists of the three language weeks: week 5 · week 6 · week 7. Nothing from this week is on it, neither the API workshop nor the project pages, so this is one week with nothing to revise.

Goodies

Everything above is the course. Everything below is for the student who finished the page and wants more. Nothing here is on the test; all of it is worth your time.

The eight steps, for when the workshop is a memory

The tutorial half of the chapter, compressed. (1) Open the developer console. (2) Click the Network tab. (3) Filter by Fetch/XHR and read the Domain and File columns to guess what each request does. (4) Click a request, read the response, and check it against what the page shows; search for a string you can see on screen. (5) Right-click the request and Copy as cURL. (6) Paste it into a cURL-to-requests converter and run the Python. (7) Strip the request down: drop every header and parameter it still works without, keep the authentication and the inputs you want to vary. (8) Wrap it in a function, loop over your inputs with a pause between calls, and load the results into pandas. Then the same care you learned for models: respect rate limits, keep the request that works, and write down exactly what you collected and when, because the site will change and your Methods section has to say what the paper was built on.

Where datasets live

Places groups have found good networks-with-text before, in no particular order. Wikipedia categories and lists (the crawl from week 1 works on any of them). Fan wikis on Fandom, which have an API like Wikipedia's. Bluesky, which has an open, documented API and a firehose. Reddit, through the archives or the official API: users, subreddits, comments as text. Song lyrics plus collaboration credits from Genius or MusicBrainz. Parliamentary records: the Danish Folketing publishes every speech with speaker and party; the UK Hansard and the US Congressional Record likewise. Scientific papers through OpenAlex (week 4's exercise 4.4 shows the API): citations as links, abstracts as text. GitHub: repositories, contributors, README files. Podcasts and their guests; TV series and their character wikis; recipes and their ingredients. And, from this morning, every website that fills a list from an endpoint you can now find. The best datasets usually come from a hobby someone in the group already has.

The road not taken

Keep the two candidates you killed this afternoon. Around week 12, about a third of the groups discover that the survivor's dataset has a hole, or the effect is not there. A group that wrote down its alternatives switches in a day. A group that did not starts over. Negative results are also fine projects, by the way, if the check that produced them is convincing.

← All weeks