LING5006

LING5006 · 115-1 計算語言學與語言學理論LING5006 · Computational Linguistics and Linguistic Theory

大型語言模型的語言學基礎Linguistic Foundations of Large Language Models

LLMs are Languaging the World! 除了自然語言本身就是協調認知、工具、代理人與行動的機制 (language as orchestration),大型語言模型正在重新工程化語言,使其從表徵世界的媒介,轉化為協調認知與行動的基礎層 (language re-engineering)。這是一門從語言與認知的角度,探討大型語言模型的基礎原理的課程。每個主題的介紹,都搭配一個語言學觀點對照。對於有一點語言學背景與AI背景的學生比較容易上手。無期中考;但有四份實作作業與一個期末專案。LLMs are Languaging the World! Besides being a mechanism for coordinating cognition, tools, agents, and action (language as orchestration), large language models are re-engineering language from a medium of representation into an orchestration layer for cognition and action (language re-engineering). This is a course that explores the foundational principles of large language models from a linguistic and cognitive perspective. Each topic is introduced with a linguistic perspective. It is designed for students with a background in linguistics and AI. No midterm; four assignments and a final project.

授課教師
謝舒凱
課程助教
陳品而、陳韋伶、連大成
上課時間
每週三 3,4,5 (10:20~13:10)
人文 B113-2
學期
2026 年 9 月 10 日 – 12 月 24 日
課程網站
https://lopentu.github.io/courses/cllt2026/
Instructor
Shu-Kai Hsieh
Teaching Assistant
Pin-er Chen, Wei-ling Chen, Da-cheng Lian
Meetings
Wednesdays, 10:20~13:10
Humanities Building 113-2
Dates
September 10 – December 24, 2026
Course Website
https://lopentu.github.io/courses/cllt2026/

課程綱要Course outline

主題Topics

課程拆成六個模組,每個模組同時包含一組技術主題與一組語言學對照。Six modules. Each pairs a set of engineering topics with its linguistic counterpart.

01

單位、表徵與兩種語言觀Units, representations and two views of language

W01–W04

  • 工具環境熟悉:AI 助手、Colab、編輯器與版本控制
  • NLP 與語言學的分合史:從模組化管線處理到端到端
  • 詞元化與語言預設;語言單位與構式語法
  • 語意表徵:符碼指涉與使用分布假說;從 word2vec 到脈絡嵌入
  • Environment setup: AI assistants, Colab, editors, version control
  • NLP and linguistics: from modular processing pipelines to end-to-end
  • Tokenization and language priors; linguistic units and Construction Grammar
  • Semantic representation: symbolic reference and language use distributional hypothesis; from word2vec to contextual embeddings
02

訓練架構、對齊與提示Architecture, alignment and prompting

W05–W06

  • Transformer:自注意力作為一種結構假設
  • 微調與 LoRA;RLHF 與對齊訓練
  • 語料庫、語域與言談分析
  • Prompt、脈絡工程與 agent harness
  • 自然語言作為介面/編譯器:vibe coding 與 skill writing
  • Training architecture: transformers, self-attention as a structural hypothesis
  • Fine-tuning, LoRA, RLHF and alignment training
  • Corpora, register and discourse analysis
  • Prompts, context engineering and agent harnesses
  • Natural language as interface/compiler: vibe coding and skill writing
03

推理與記憶Reasoning and memory

W07–W08

  • 思維鏈、測試階段計算與推理模型
  • 語言與推理:把思考說出來為什麼有效
  • 組合性的極限與失敗模式
  • 脈絡視窗、檢索增強與長期記憶架構
  • 從認知科學看人類與機器記憶
  • Chain-of-thought, test-time compute, reasoning models
  • Language and reasoning: why thinking out loud helps
  • Limits of compositionality and characteristic failures
  • Context windows, retrieval augmentation, long-term memory
  • From cognitive science to human and machine memory
04

多模態與具身認知Multimodality and embodied cognition

W09–W11

  • 語音模型:自監督表徵與轉寫
  • 音韻、韻律與跨模態感知議題
  • 視覺語言模型與圖文對齊
  • 具身 AI 與世界模型
  • 接地認知與本體論(例如:沒有身體能否懂「重」?)
  • Speech models: self-supervised representations and transcription
  • Phonology, prosody and cross-modal perception issues
  • Vision-language models and image–text alignment
  • Embodied AI and world models
  • Grounded cognition and ontologies (e.g., can a bodiless model know heavy?)
05

效率、代理人與治理Efficiency, agents and governance

W12–W14

  • 蒸餾、量化與本地算力
  • 效率與語言不平等:低資源語言的處境
  • 多代理人溝通:協定、工具與共同基礎
  • 語用學與合作原則;代理人語言的浮現
  • 治理、安全與評估;人機社會語言學
  • Distillation and quantization, local AI
  • Efficiency and linguistic inequality: low-resource languages
  • Multi-agent communication: protocols, tools, common ground
  • Pragmatics, cooperation and emergent agent languages
  • Governance, safety, evaluation; human–AI sociolinguistics
06

機制可解釋性與心智問題Mechanistic interpretability and questions of mind

W15–W16

  • 電路、特徵與稀疏自編碼器
  • LLM 神經語言學 (例如:找到一條語法電路算不算找到語法?)
  • 可解釋性用於安全稽核
  • 功能性情緒與內部表徵
  • 語言、情緒與意識
  • Circuits, features and sparse autoencoders
  • Neurolinguistics of LLMs (e.g., is a grammar circuit grammar?)
  • Interpretability for safety auditing
  • Functional emotions and internal representations
  • Language, emotion, consciousness

可能的延伸討論:語言習得與資料效率的對照;書寫系統與詞元化;台灣語言與文化的語料建置與評測。Possible discussions: language acquisition versus data efficiency; writing systems and tokenization; corpus building and evaluation for the languages of Taiwan.

十六週Sixteen weeks

進度與進行方式Schedule and format

每週都有講解與實習討論時間。每週上課前,請儘量閱讀相關閱讀材料。Each week: lecture and discussion. Please read the related readings before each session.

W01 · 09/10
工具與環境:AI 帳號、Colab、編輯器Setup: AI accounts, Colab, editors 課程導論:兩種語言觀的對話Course intro: two ways of looking at language 這學期我們試著用不同角度來解讀 LLM:使用者、工程師與語言學家What perspectives do we read LLMs from: user, engineer, or linguist? lab 1: 請在助教的協助下完成 AI 帳號 (Google Gemini) 學生免費方案申請,課堂上一起把計算環境確認。lab 1: Apply for the AI account (Google Gemini) student free tier during class; we confirm the computing environment together.
W02 · 09/17
NLP 與語言學的分合史NLP and linguistics: a history of divergence 模組化與背後的語言觀點Modularity and linguistic perspectives 從管線到端到端,NLP 丟掉了哪些語言學假設 ?Moving to end-to-end systems, which linguistic assumptions did NLP drop — and rightly so? lab 2: TBAlab 2: TBA
W03 · 09/24
詞元化:BPE、WordPiece、SentencePieceTokenization: BPE, WordPiece, SentencePieceA1 作業A1 作業 語言單位與構式語法Linguistic units and Construction Grammar 詞元不是詞、也不是語素 — 那它到底是什麼?A token is not a word, a morpheme. So what is it? lab 3: TBAlab 3: TBA
W04 · 10/01
向量表徵:從 word2vec 到脈絡化嵌入Embeddings: from word2vec to contextual representations 語意表徵是什麼意思 ?Semantic representation 分布假說能多大程度的表徵語意?剩下的部分是誰在分擔?How much meaning can distribution carry, and who does the rest? lab 4: TBAlab 4: TBA
W05 · 10/08
Transformer、微調與對齊Transformers, fine-tuning and alignmentA1 繳交A1 dueA2 作業A2 作業 語料庫、句法與言談分析Corpora, syntax and discourse analysis RLHF 訓練出來的語域是誰的語域?對齊算不算是一種語言規範化?評測工具是什麼?Whose register does RLHF produce? Is alignment a form of linguistic standardization? What are the evaluation tools? lab 5: TBAlab 5: TBA
W06 · 10/15
語言工程:prompt、context、harness、loops 與 graph engineeringLanguage Re-engineering: Prompts, context, harness, loops and graph engineering 自然語言作為程式語言:vibe coding 與 skill writingNatural language as programming language: vibe coding and skill writing 大型語言模型正在重新工程化語言,使其從表徵世界的媒介,轉化為協調認知與行動的基礎層。LLMs are re-engineering language from a medium of representation into an orchestration layer for cognition and action. lab 6: TBAlab 6: TBA
W07 · 10/22
推理:CoT、測試階段計算與推理模型Reasoning: chain-of-thought, test-time compute, reasoning models 語言與推理:把思考說出來為什麼有效Language and reasoning: why thinking out loud helps 把思考說出來為什麼會讓答案變準?那還算是思考嗎?Why does thinking out loud improve answers — and is it still thinking? lab 7: TBAlab 7: TBA
W08 · 10/29
記憶:脈絡視窗、RAG 與長期記憶Memory: context windows, RAG, long-term memoryA2 繳交A2 dueA3 作業A3 作業 語言與記憶:從認知科學看人類與機器記憶Language and memory: from cognitive science to human and machine memory 檢索式記憶像不像人的記憶?人類回憶其實是重建而非調閱。Is retrieval like human memory? Human recall reconstructs rather than retrieves. lab 8: TBAlab 8: TBA
W09 · 11/05
多模態(一):語音模型Multimodal I: speech models 語音、韻律與聽覺感知Speech, prosody and auditory perception 語音模型是先辨音再解義,還是根本沒有音位這一層?Do speech models recognize sounds then meanings, or is there no phonemic level? lab 9: TBAlab 9: TBA
W10 · 11/12
多模態(二):視覺與跨模態對齊Multimodal II: vision and cross-modal alignment 多模態語言與指涉Multimodal language and reference 圖文對齊學到的是指涉關係,還是只是共現統計?Does image–text alignment learn reference, or only co-occurrence? ICAIF 11/14–17;本週前後的截止日已預留緩衝。ICAIF Nov 14–17; deadlines around this week have buffer.
W11 · 11/19
具身 AI 與世界模型Embodied AI and world modelsA3 繳交A3 dueA4 作業A4 作業 具身認知與本體論Embodied cognition and ontologies 沒有身體的模型,能不能懂「重」「近」「痛」這種詞?Can a model without a body understand heavy, near, painful?
W12 · 11/26
小模型與本地 AI:蒸餾與量化Small models and local AI: distillation and quantization期末提案Proposal due 推理加速、效率與語言不平等Inference efficiency and linguistic inequality 當運算變便宜,低資源語言會被照顧到,還是被更快地拋下?As compute gets cheaper, are low-resource languages served or left behind faster? 教師日本東大參訪 11/25–28,本週助教上課。Instructor travelling Nov 25–28. Assistant teaching this week.
W13 · 12/03
多代理人(一):溝通與協作Multi-agent systems I: communication and collaboration 語用學與協定;語言、決策與行動Pragmatics and protocols; language, decision and action 代理人之間的協定需不需要合作原則?還是它們會發明自己的?Do agent protocols need Gricean cooperation, or will agents invent their own? NeurIPS 12/6–12,本週課後不另安排 office hours。NeurIPS Dec 6–12; no extra office hours this week.
W14 · 12/10
多代理人(二):治理、安全與評估Multi-agent systems II: governance, safety and evaluationA4 繳交A4 due 人機社會語言學、多輪對話與代理人語言Human–AI sociolinguistics, multi-turn dialogue, emergent languages 跟模型講話久了,是誰被誰影響?After enough turns with a model, who accommodates to whom? PACLIC 12/10–12,本週非同步或安排客座講者。PACLIC Dec 10–12. Asynchronous session or guest speaker.
W15 · 12/17
機制可解釋性(一):電路與特徵Mechanistic interpretability I: circuits and features LLM 神經語言學The neurolinguistics of LLMs 在模型裡找到一條主謂一致的電路,算不算找到了語法?If we find an agreement circuit inside a model, have we found grammar?
W16 · 12/24
機制可解釋性(二):安全稽核與功能性情緒Mechanistic interpretability II: safety audits and functional emotions期末發表Presentations 語言、情緒與意識Language, emotion and consciousness 若模型內部有一個穩定對應「焦慮」的表徵,我們該怎麼描述它?If a stable internal representation tracks anxiety, how should we describe it? 期末發表;書面報告 Week 17 前上傳。Final presentations; written reports due Week 17.

持續增補Working list

閱讀文獻Readings

依模組分組。未標「選讀」者為指定閱讀;每週擇一撰寫閱讀短評即可。Grouped by module. Items not marked optional are assigned; one response per week is enough.

01

單位、表徵與兩種語言觀Units, representations and two views of language

02

訓練架構、對齊與提示Architecture, alignment and prompting

03

推理與記憶Reasoning and memory

04

多模態與具身認知Multimodality and embodied cognition

05

效率、代理人與治理Efficiency, agents and governance

06

機制可解釋性與心智問題Mechanistic interpretability and questions of mind

評分Assessment

評量與作業Grading and assignments

20%

課堂參與Participation

課堂討論、閱讀短評(150–300 字,任選 8 週)。Discussion, reading responses (150–300 words, any 8 weeks).

40%

四份作業Four assignments

每份 10%:程式碼呈現你做了什麼,分析呈現你判斷了什麼,兩者都算分。10% each: the code shows what you built, the analysis shows what you concluded.

40%

期末專案Final project

提案、課堂發表、書面報告。無期中考、無期末考。Proposal, presentation, written report. No midterm, no final exam.

四份作業 (內容暫定)Four assignments (tentative)

A1

詞元切分探測Tokenization probe

比較 BPE、WordPiece、SentencePiece 在中文、英文與一種形態豐富語言上的切分。統計 fertility、蒐集被切壞的構式與詞綴,論證模型的詞彙單位在哪裡與語言學的詞彙單位是否一致。Compare BPE, WordPiece and SentencePiece on Chinese, English and one morphologically rich language. Report fertility, collect mangled constructions and affixes, and argue where the model's lexical unit parts ways with the linguist's.

出題 W03 · 09/24 / 繳交 W05 · 10/08 / Colab notebook + 800 字分析Out W03 · 09/24 / due W05 · 10/08 / Colab notebook + 800-word analysis

A2

語意空間探測Probing the semantic space

取開源模型各層表徵,設計 probing 任務檢驗多義、同義、隱喻或詞類訊息藏在哪一層。自建至少 60 筆測試集,並說明你的標註標準。Extract layer-wise representations and design probing tasks for polysemy, synonymy, metaphor or part-of-speech. Build a 60-item test set and document your annotation criteria.

出題 W05 · 10/08 / 繳交 W08 · 10/29 / Notebook + 測試集 + 圖表Out W05 · 10/08 / due W08 · 10/29 / Notebook + dataset + figures

A3

會記事、會推理的代理人An agent that remembers and reasons

實作具工具呼叫與外部記憶的 agent harness,處理一個語言學任務(語料標註、田野資料整理、語法判斷蒐集)。自訂 20 題評測集並報告失敗案例。Build an agent harness with tool use and external memory for a linguistic task (annotation, field-data cleanup, grammaticality judgments). Write a 20-item eval and report failure cases.

出題 W08 · 10/29 / 繳交 W11 · 11/19 / 程式碼 + eval 結果 + 錯誤分析Out W08 · 10/29 / due W11 · 11/19 / Code + eval results + error analysis

A4

把模型搬回自己的電腦Bring the model home

在本機或 Colab 免費額度量化並部署一個小模型(≤4B),測量延遲、記憶體與品質的取捨;或改做一個多模態任務的誤差分析。Quantize and deploy a small model (≤4B) locally or on free Colab and measure the latency–memory–quality trade-off; or submit an error analysis of a multimodal task.

出題 W11 · 11/19 / 繳交 W14 · 12/10 / 部署紀錄 + 量測表 + 心得Out W11 · 11/19 / due W14 · 12/10 / Deployment log + measurements + reflection

佔學期成績 40%40% of the grade

期末專案Final project

一人或兩人一組。題目自訂,但必須同時說得出工程做法與語言學意義。Solo or pairs. Any topic, provided you can state both the engineering method and the linguistic stake.

  • 提案Proposal
    W12 · 11/26
    一頁:問題、資料、方法、你要說服的對象。One page: question, data, method, the audience you want to convince.
  • 中期簡報Midpoint
    W13–W14
    課堂五分鐘進度報告,同儕互評。Five-minute presentation in class, peer feedback.
  • 發表Presentation
    W16 · 12/24
    12 分鐘報告 + 5 分鐘問答。12-minute talk plus 5-minute Q&A.
  • 書面報告Written report
    week 17
    6–10 頁,含程式碼連結與失敗紀錄。6–10 pages, with code link and a record of what failed.

沒有頭緒的話,可以往這些方向想If you're stuck, consider these directions

  • 為一個低資源語言或台灣本土語言做詞元切分診斷報告
  • 用可解釋性工具追一條語法現象的電路(一致關係、否定極性項、量詞)
  • 把一份田野語料轉成可用的評測集,並測三個模型
  • 多代理人對話模擬:合作原則會不會自發浮現
  • 本地小模型 + RAG 的語言學課程助教,並誠實評估它的錯誤
  • A tokenization diagnostic for a low-resource or Taiwanese local language
  • Trace the circuit behind one grammatical phenomenon (agreement, NPI licensing, classifiers)
  • Turn field data into a usable benchmark and test three models on it
  • Multi-agent dialogue: do Gricean maxims emerge on their own?
  • A local small model with RAG as a linguistics TA, honestly evaluated

課程資料Course materials

講義與錄影Lectures

  • Lecture 01工具與環境Setup and tools 老師演講參考 ↗Teacher’s slides ↗
  • Lecture 02NLP 與語言學NLP and linguistics 投影片與錄影稍後上傳slides and recording to come
  • Lecture 03詞元化Tokenization 投影片與錄影稍後上傳slides and recording to come

修課須知Before you enrol

課堂規則Policies and expectations

AI 使用政策Use of AI

本課鼓勵你在所有作業中使用 AI 工具 — 這是課程主題,不用反而奇怪。唯一要求是誠實:每份作業附一段〈AI 使用說明〉,寫清楚你用了什麼、問了什麼、哪裡採信、哪裡推翻它。缺這段說明視為未完成;貼上未經檢證的模型輸出又不揭露,以學術不誠實處理。You are encouraged to use AI tools on every assignment — it is the subject of the course. The one requirement is honesty: attach an “AI use note” stating what you used, what you asked, what you accepted and what you overrode. Work without it is incomplete; undisclosed unverified output is dishonesty.

繳交與遲交Submission and late work

作業於截止日 23:59 前上傳,遲交視為未完成。遇到真正的困難請提前來信告知。Due at 23:59 on the due date. Late work is considered incomplete. If something serious comes up, email ahead

無障礙與需求Accessibility

若你需要任何調整(字幕、延長時間、替代作業形式),請於第三週前告訴我,我們一起安排。If you need accommodations — captions, extra time, alternative formats — tell me by week 3.

工具與環境Tools

Python 3.11 + Colab(免費額度足以完成所有作業)、Hugging Face transformers/tokenizers、llama.cpp 或 Ollama(W12)、Git 與 GitHub(作業以 repo 連結繳交)。Python 3.11 with Colab (the free tier covers every assignment), Hugging Face transformers and tokenizers, llama.cpp or Ollama (W12), Git and GitHub (assignments are submitted as repo links).