Tải bản đầy đủ (.pdf) (23 trang)

NHẬN DẠNG TIẾNG NÓI TIẾNG VIỆT SỬ DỤNG MÔ HÌNH MARKOV ẨN

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.04 MB, 23 trang )

21st Computer Science Seminar
SE1-T3-1

MỤC LỤC
Trang
MỤC LỤC 1
PHẦN I: ĐẶT VẤN ĐỀ 2
PHẦN II: NỘI DUNG 3
I. LÝ THUYẾT CHUNG 3
1. Lý thuyết về tiếng nói 3
2.
Một số đặc điểm
ngữ âm
tiếng
Vi

t
3
3. Lý
thuyết về
âm vị 5
3.1.
Định nghĩa âm
vị 5
3.2.
Chức năng
của âm vị 6
3.3. Tách âm vị
và xác định
âm vị trên
chuỗi


sóng âm 6
II. MÔ HÌNH MARKOR ẨN VÀ NHẬN DẠNG TIẾNG NÓI 8
1. Giới thiệu về mô hình Markov ẩn: 8
2. Ba vấn đề thiết yếu của HMM 8
2.1 Tìm chuổi chuyển trạng thái tốt nhất – Thuật toán Viterbi : 9
2.2 Ước lượng tham số xác xuất cho HMM – Thuật toán Baum-Welch 10
3. Tiền xử lý tín hiệu : 12
3.1 Cải thiện tín hiệu – bộ lọc Wiener: 13
3.2 Cắt khung tín hiệu : 13
3.3 Phân tích Fourier – biến đổi Fourier rời rạc: 15
3.4 Xác định phổ Mel 15
3.5 Biến đổi Cosine rời rạc trên tần số Mel (Discrete Cosine Transform):
16
TÀI LIỆU THAM KHẢO 17
21st Computer Science Seminar
SE1-T3-2

PHẦN I: ĐẶT VẤN ĐỀ
Nhận dạng tiếng nói đã phát triển rất mạnh mẽ trong những năm gần đây của thế
kỷ trước. Đặc biệt năm 1997, IBM và Dragon System cùng nhau tung ra sản phẩm nhận
dạng tiếng nói của mình. Những sản phẩm này gây tiếng vang lớn và có thể xem như cột
mốc cho quá trình nghiên cứu nhận dạng tiếng nói.
Qua việc học tập môn học Lý Thuyết Nhận Dạng, chúng em đã được tiếp cận với
những kiến thức lý thuyết cũng như các ứng dụng thực tế của nó. Nhận dạng tiếng nói
Tiếng Việt hiện nay là một lĩnh vực đang được nghiên cứu bởi các nhà khoa học và cũng
đã đạt được một số kết quả nhất định. Để nhận dạng được Tiếng Việt thì ta có thể sử
dụng nhiều mô hình nhưng mô hình được ứng dụng nhiều và cho kết quả tốt là mô hình
Hidden Markov (HMM). Để có thể hiểu thật rõ về mô hình HMM chúng em xin chọn đề
tài “NHẬN DẠNG TIẾNG NÓI TIẾNG VIỆT SỬ DỤNG MÔ HÌNH MARKOV
ẨN”.

Xin chân thành cám ơn Tiến sĩ Nguễn Đăng Bình đã truyền đạt kiến thức cũng
như có những ý kiến quý báu giúp chúng em hoàn thành tiểu luận này.
Tuy đã rất cố gắng song bài viết không tránh khỏi những thiếu sót. Chúng em rất
mong nhận được sự đóng góp ý kiến của quý thầy/cô và các anh chị cùng lớp để bài viết
hoàn thiện hơn.
Chúng em xin chân thành cám ơn.
21st Computer Science Seminar
SE1-T3-3

PHẦN II: NỘI DUNG
I. LÝ THUYẾT CHUNG
1. Lý thuyết về tiếng nói
Mục đích của tiếng nói là truyền thông tin. Có một số đặc trưng cho việc truyền
tiếng nói. Theo lý thuyết thông tin, tiếng nói có thể biểu diển dưới dạng nội dung thông
báo hoặc thông tin. Một cách đặc trưng khác là tiếng nói biễu diễn dưới dạng tín hiệu
mang thông tin thông báo. Mặc dù các quan điểm lý thuyết của thông tin đống vai trò chủ
đạo trong các hệ thống truyền tin phức tạp, ta sẽ thấy là biễu diễn tiếng nói dựa trên dạng
sóng hoặc mô hình tham số được sử dụng chính trong các ứng dụng thực tế.
Để xét quá trình thông tin tiếng nói, đầu tiên nên coi thông báo như một dạng trừu
tượng nào đó trong đầu người nói. Qua quá trình phúc tạp tạo âm, thông tin trong thông
báo này được chuyển trực tiếp thành tín hiệu âm học. Thông tin thông báo có thể được
biểu diễn dưới một số dạng khác nhau trong quá trình tạo tiếng nói. Chẳng hạn, thông tin
thông báo lúc đầu được chuyển thành tập hợp các tín hiệu thần kinh điều khiển có chế
phát âm (đó là chuyển động của lưỡi, môi, dây thanh âm…). Bộ máy phát âm chuyển
động tương ứng với các tín hiệu thần kinh này để tạo ra dãy các điệu bộ, mà kết quả cuối
cùng là dạng sóng âm chứa thông tin trong thông báo gốc.
Thông tin được thông báo bằng tiếng nói về bản chất là rời rạc, có thể biểu diễn
bởi việc dán các phần tử ở một tập hợp hữu hạn các ký hiệu. Các ký hiệu mà mỗi âm có
thể được phân loại ra gọi là các âm vị (phoneme). Mỗi ngôn ngữ có tập hợp các âm vị
riêng của nó, con số mẫu mực là khoảng từ 30 đến 50. Ví dụ tiếng Anh có thể biểu diễn

bằng khoảng 42 âm vị, tiếng Việt khoảng 33 âm vị ( 12 nguyên âm : a, ă, â, o, u… và 21
phụ âm: k, l, m, ph …).
Trong lý thuyết thông tin người ta còn xét tốc độ truyền thông tin. Với tiếng nói,
lưu ý đến các giới hạn vật lý của tốc độ chuyển động của bộ máy phát âm, đánh giá thô
của tốc độ thông tin là con người tạo ra tiếng nói với tốc độ trung bình khoảng 10 âm vị
trong 1 giây. Nếu mỗi âm vị biễu diễn bằng một số nhị phân thì mã số 6 bit là quá đủ để
biểu diễn tất cả các âm vị tiếng Anh. Với tốc độ trung bình khoảng 10 âm vị trên giây và
bỏ qua tương tác giữa cặp âm vị liền kề, ta có ước lượng 60 bit/giây cho tốc độ thông tin
trung bình của tiếng nói. Nói cách khác là lượng viết ra của tiếng nói chứa thông tin
tương đương với 60 bit/giây ở tốc độ nói chuẩn. Dĩ nhiên, cận dưới của nội dung thông
tin xác thực trong tiếng nói được coi là cao hơn tốc độ này. Ước lượng trên không tín đến
các nhân tố như trạng thái của người nói, tốc độ nói, âm hưởng của tiếng nói,v. v…
2.
Một số đặc điểm
ngữ âm
tiếng
Vi

t

Một đặc điểm
dễ thấy là tiếng Việt là ngôn ngữ
đơn âm (monosyllable
- mỗi từ
đơn
chỉ
có một âm tiết), không biến
hình
(cách
đọc, cách

ghi
âm không thay
đổi trong bất cứ tình
huống ngữ pháp nào). Tiếng Việt hoàn toàn khác với các ngôn ngữ Ấn-Âu
như tiếng
Anh,
tiếng Pháp là các ngôn ngữ
đa âm, biến
hình.
21st Computer Science Seminar
SE1-T3-4

Nhìn về mặt ghi âm: âm tiết tiếng Việt có cấu tạo chung là: phụ âm-vần. Ví dụ âm tin
có phụ âm t, vần in. Phụ âm là một âm vị và âm vị này liên kết rất lỏng lẻo với phần còn lại
của âm tiết
(hiện tượng
nói lái).
Vần trong tiếng Việt lại
được
cấu tạo từ các âm vị nhỏ
hơn, trong đó
có một âm vị
chính là nguyên âm.
Hình sau là
phổ
tín hiệu của âm
tiết
“ba”.
Chúng ta có thể
quan sát và phân biệt rõ

miền nhiễu nền, miền phổ của phụ âm b và nguyên âm a
(miền đậm hơn
là có
mật độ năng
lượng lớn
hơn).

Quan sát phổ các âm
tiết tương tự
chúng ta có thể rút ra kết luận: các phụ âm và
nguyên
âm đều phân biệt với nhau rất rõ qua sự phân bố
năng
l
ượng
tại các miền tần số, ví
dụ: phụ âm ở tần số thấp,
năng lượng
nhỏ,
nguyên
âm có năng
lượng
lớn ở cả vùng tần số
cao. Vùng không có tín hiệu tiếng nói (nhiễu nền và khoảng
lặng) có năng
l
ượng
thấp và chỉ
tập trung ở các tần
số

rất thấp.
Các nguyên âm có tần phổ (spectrum) khác nhau khá rõ. Hình sau minh hoạ sự khác
nhau về phổ của 5
nguyên
âm cơ bản. Miền đậm là miền có mật độ năng
lượng
cao.
21st Computer Science Seminar
SE1-T3-5


Theo tác giả
Đoàn
Thiện Thuật , xét về mặt ngữ âm-âm vị học âm tiết tiếng
Việt

lược đồ như
sau:

Thanh
điệu
Âm đầu
Vần
Âm
đệm
Âm
chính
Âm cuối
Lược đồ
cho thấy âm tiết tiếng Việt có cấu trúc rõ ràng,

ổn định.
L
ược

đồ
còn cho
thấy tiếng Việt là ngôn ngữ có
thanh điệu.
Hệ
thống thanh
điệu gồm 6 thanh: bằng,
huyền,
sắc,
hỏi, ngã, nặng.
Thanh điệu
trong âm tiết là âm vị
siêu đoạn
tính (thể hiển trên toàn bộ âm tiết). Do
đó
đặc trưng
về
thanh
điệu thể hiện trong tín hiệu
tiếng
nói
không

nét như
các thành phần khác
của âm tiết.

Sự khác biệt về cách phát âm tiếng Việt rất rõ rệt theo giới, lứa tuổi và
đặc
biệt là
theo vị
trí
địa lí (giọng miền Bắc, miền Trung và miền Nam khác nhau rất nhiều).
3. Lý
thuyết về
âm vị
3.1.
Định nghĩa âm
vị

nhiều cách
đ

nh

nghĩa âm
vị khác nhau:
Theo cuốn Ngữ âm học tiếng Việt hiện đại, NXBGD 1972, nhóm tác giả Cù Đình
Tú thì
âm
vị là “đơn vị nhỏ nhất của ngữ âm có mang chức năng phân biệt nghĩa và nhận
diện từ”.
21st Computer Science Seminar
SE1-T3-6

Theo cuốn ngữ âm tiếng Việt
của Đoàn

Thiện Thuật thì âm vị là “tổng thể các nét
khu biệt, được xuất hiện đồng thời (được con người tri giác theo trật tự trước sau) và có
chức năng khu biệt vỏ âm thanh của từ hoặc hình vị”.
Theo Giáo

Cao Xuân Hạo,
những
cách
đ

nh

nghĩa trên
còn có những chổ
chưa thỏa
đáng:

m
ang

tính chất ấn tượng
chủ
nghĩa, có
sự lầm lẫn về cách tri giác
tính đồng
thời, kế tiếp”


theo ông
thì

âm
vị là “đơn vị khu biệt âm thanh nhỏ nhất có thể tham gia vào thế đối
lập âm vị học về trật tự thời gian”, hoặc âm vị là đơn vị âm vị học tuyến tính nhỏ nhất.
Theo
Đinh Lê
Thư

Nguyễn
Văn Huệ, “người ta thường định nghĩa âm vị là đơn vị
nhỏ nhất của cơ cấu âm thanh ngôn ngữ, dùng để cấu tạo và phân biệt hình thức ngữ âm
của những đơn vị có nghĩa của ngôn ngữ từ và hình vị. Ví dụ: các từ tôi và đôi, ta và đa
trong tiếng Việt phân biệt nhau bởi các âm vị /t/ và /đ/. Nếu thay âm vị này bằng một âm vị
khác trong cùng một âm tiết sẽ làm cho âm tiết đó thay đổi về nghĩa hoặc mất nghĩa. Ví dụ,
ta có từ “toàn”, nếu thay âm vị /t/ bằng âm vị /h/, thì sẽ được “hoàn” có nghĩa khác”.
3.2.
Chức năng
của âm vị
Các âm vị trên nguyên tắc
nhất
định phải có sự khác nhau, ít nhất là về
một
đặc
trưng
nào đó. Chính nhờ
sự khác biệt này mà các âm vị có thể tạo ra sự khác biệt về hình thức âm
thanh của hình vị và từ, tạo nên những tín hiệu khác
biệt đối
với sự cảm thụ
của con
ngư


i.

Theo đó, âm
vị có 2 chức
năng

bản:
chức
năng
khu biệt vỏ âm thanh của hình vị và từ, và
chức
năng
cấu tạo nên những thành tố của
đơn
vị

nghĩa.
3.3. Tách âm vị
và xác định
âm vị trên
chuỗi
sóng âm
Số
lượng
từ trong mỗi ngôn ngữ
đều
rất lớn. Xây dựng hệ nhận dạng theo từ có khả
năng
phân biệt số

lượng
từ
đó quả
là một thách thức. Thay vào đó,
người
ta
nghĩ
ra
cách
xây
dựng hệ nhận dạng dựa
trên hướng
tiếp cận âm vị.
Theo
đó
,
chỉ cần nhận dạng khoảng vài
chục âm vị
sẽ

thể
nhận
dạng được
toàn
bộ
từ của một ngôn ngữ (Theo thống kê, số âm vị
trong một ngôn ngữ
dao
động từ khoảng 20
đến

60). Và
đây cũng chính

hướng
tiếp cận
đúng
đắn cho nhận dạng tiếng nói tiếng
Việt.
Tuy
nhiên, người
ta lại
gặp khó khăn khác, đó

tách âm
vị và xác định âm vị trên chuỗi sóng âm: Cho một dãy tín hiệu
tiếng
nói đã
thu
sẵn.
Nhiệm vụ của chúng ta là tìm ranh giới của tất cả các âm vị và cho biết âm vị
đó

âm
vị
g

.
Chưa
nói
đến

khả
năng thực
hiện công việc
đó bằng
máy, ngay cả
con người
vẫn có thể bị
nhầm lẫn khi tách âm vị bằng tay do ranh giới giữa các âm vị
thư

ng
mập mờ và hay
chồng lấp lên nhau. Cả khi 2 âm vị thuộc 2 âm tiết khác nhau, nếu đứng kế nhau vẫn có thể
xảy ra sự chồng lấp. Vì vậy, công việc tách âm vị trên
chuỗi
sóng âm chỉ
mang tính tương
đối.
Những thuận lợi và khó khăn đối với nhận dạng tiếng nói tiếng Việt
Thuận lợi
Những đặc điểm
ngữ âm tiếng Việt cho thấy nhận dạng tiếng nói tiếng Việt có một
số
thuận lợi sau:
21st Computer Science Seminar
SE1-T3-7

 Tiếng Việt là ngôn ngữ
đơn
âm, số

lượng
âm tiết không quá lớn. Điều này sẽ giúp
hệ nhận
dạng
xác định ranh giới các âm tiết dễ
dàng hơn nhiều.
Đối với hệ nhận dạng các ngôn
ngữ Ấn-Âu (tiếng Anh,
tiếng
Pháp ) xác định ranh giới âm tiết (endpoint detection) là
vấn đề rất khó và ảnh
hưởng
lớn đến kết quả nhận dạng.
 Tiếng Việt là ngôn ngữ không biến hình từ. Âm tiết tiếng Việt ổn định, có cấu
trúc rõ
ràng.
Đặc biệt không có 2 âm
tiết nào
đọc giống nhau mà viết khác
nhau.
Điều này
sẽ dễ dàng cho việc xây dựng các mô hình âm tiết trong nhận
dạng; đồng
thời việc
chuyển từ phiên âm sang từ vựng (lexical decoding) sẽ đơn
giản hơn
so với các ngôn ngữ
Ấn-Âu. Việc
chuyển
từ phiên âm sang từ

vựng
cũng là một
vấn đề khó khăn trong nhận
dạng
các ngôn ngữ

n-Âu.

Khó khăn

Ngoài những thuận lợi trên, nhận dạng tiếng nói tiếng
Việt cũng gặp
rất nhiều
khó
khăn như
sau:
 Tiếng Việt là ngôn ngữ có
thanh
đ
i

u
(6
thanh). Thanh
điệu là âm vị siêu
đoạn
tính,
đặc trưng
về
thanh

điệu thể hiện trong tín hiệu tiếng nói không rõ nét
như các thành phần
khác của âm tiết.
 Cách phát âm tiếng
Việt thay đổi
nhiều theo vị trí địa lí.
Giọng
đ

a

phư
ơng
trong
tiếng Việt
rất đa dạng
(mỗi miền có một
giọng đặc
t

ng).

 Hệ thống ngữ pháp, ngữ
nghĩa
tiếng Việt rất phức tạp,
rất khó để
áp dụng vào hệ
nhận dạng với mục đích
tăng
hiệu

năng
nhận dạng. Hệ thống phiên âm
cũng chưa thống
nhất.
 Các nghiên cứu về nhận dạng tiếng
Việt cũng chưa nhiều
và ít phổ biến. Đặc
biệt
khó
khăn
lớn nhất là hiện nay
chưa
có một bộ dữ liệu chuẩn cho việc huấn luyện và kiểm tra
các
hệ
thống nhận dạng tiếng Việt.
21st Computer Science Seminar
SE1-T3-8

II. MÔ HÌNH MARKOR ẨN VÀ NHẬN DẠNG TIẾNG NÓI
1. Giới thiệu về mô hình Markov ẩn:
Mô hình Markov ẩn (Hidden Markov Model _ HMM) là một mô hình thống kê
trong đó hệ thống được mô hình hóa là một quá trình Markov với các tham số không biết
trước và nhiệm vụ là xác định các tham số ẩn từ các tham số quan sát được.
Khác với chuỗi Markov, Mô hình HMM có các đặc điểm sau:
 Từ 1 trạng thái có thể phát sinh ra hơn một sự kiện (còn gọi là quan sát).
 Chuỗi quan sát là hàm xác suất của trạng thái.
 Có thể tính toán xác suất của các chuỗi trạng thái khác nhau từ một chuỗi
quan sát.
Vậy Mô hình HMM phát sinh ra các quan sát. Khi ở trạng thái Xi, có xác suất.

P(o1) để phát sinh sự kiện 1, xác suất P(o2) để phát sinh sự kiện 2,
Các thành phần cơ bản của mô hình HMM:
•N là số trạng thái của mô hình, ký hiệu trạng thái ở thời điểm t là q
t
và o
t
là quan
sát tại thời điểm t.
•M là số lượng các quan sát phân biệt. Các ký hiệu quan sát tương ứng với tín
hiệu mà hệ thống đang mô tả. Ta ký hiệu tập các quan sát là
V ={v1, v2, v3, ,vM}, đối với tín hiệu tiếng nói, vi là (đặc trưng thứ i) mã của
vector đặc trưng.
•A = {aij} là ma trận phân phối xác suất chuyển trạng thái, với aij là xác
suất chuyển từ trạng thái i ở thời điểm t sang trạng thái j ở thời điểm t+1.
Aij = P{qt = j | qt-1 = i} , với 1≤ i, j ≤ N
•B = {bj(k)} là ma trận phân phối xác suất các ký hiệu quan sát, trong đó bj(k) là
xác suất nhận được ký hiệu quan sát vk ở trạng thái j:
Bj(k) = P{ot = vk | qt = j} ,với 1 ≤ k ≤ M, j = 1, 2, N
•π = {πi} là ma trận phân phối trạng thái ban đầu trong đó πi là xác suất của mô
hình ở trạng thái i tại thời điểm ban đầu t =1: πi = P{q1 = i} 1 ≤ i ≤ N . Như vậy để mô
tả đầy đủ một mô hình HMM cần phải có số trạng thái N, tập V gồm M ký hiệu quan sát,
ma trận xác suất chuyển trạng thái A, ma trận xác suất các ký hiệu quan sát được B và
ma trận xác suất trạng thái ban đầu π, đồng thời mô hình HMM cũng tuân theo các ràng
buộc thống kê:
Để thuận tiện, ta dùng ký hiệu λ = (A, B, π) chỉ tập tham số của mô hình, tập tham
số này xác định một giá trị xác suất cho dãy quan sát O là P(O | λ).
2. Ba vấn đề thiết yếu của HMM
21st Computer Science Seminar
SE1-T3-9


Giả sử cho một HMMs λ=(A, B) và chuỗi quan sát O= O
1
, O
2
,…, O
n
Tất cả các
ứng dụng dựa trên mô hình Markov ẩn sẽ phải giải quyết 3 vấn đề cơ bản sau:
i. Vấn đề tính toán: Làm sao để tính được P(O|λ) (xác suất của việc xuất hiện
chuỗi quan sát O trong mô hình HMMs) với khối lượng tính toán tối thiểu.
ii.Vấn đề ước lượng tham số cho HMM: Vấn đề này được đặt ra trong quá trình
huấn luyện. Chúng ta sẽ xác định được các mô hình λ dựa vào dữ liệu huấn luyện. Làm
sao xác đình được các tham số của mô hình HMM λ=(A,B) sao cho P(O|S,λ) (hoặc
P(O,S|λ) là lớn nhất.
iii. Vấn đề Decoding(nhận dạng): Cho một mô hình HMM λ đã được huấn
luyện. Làm sao tình được chuỗi trạng thái S= s
1
, s
2
,…, s
T
tương ứng với chuỗi quan sát
O P(O,S|λ), sao cho xác suất của chuỗi trạng thái của chuỗi quan sát O trùng với chuỗi S
là lớn nhất.
2.1 Tìm chuổi chuyển trạng thái tốt nhất – Thuật toán Viterbi :
Trong bài toán 3, nếu cho trước chuỗi quan sát O = (o1, o2, ,oT) và mô hình λ=
(A, B, π), ta cần xác định chuỗi trạng thái Q = {q1, q2, , qT} tương ứng là phù hợp nhất,
đây chính là chuỗi chuyển trạng thái tốt nhất, điều này có nghĩa là phải tính:
Q* = arg max P(Q | O, λ ) = arg max P(Q, O | λ )
Có một số điều kiện có thể cho việc tìm kiếm chuỗi trạng thái phù hợp nhất. Nó

chọn các trạng thái riêng lẻ phù hợp nhất tại thời điểm khi một ký hiệu quan sát được
phát ra. Thuật toán Viterbi dùng cho nhận dạng tiếng nói.
Đặt λ t(i) là xác suất của mô hình phát ra ký hiệu quan sát ot là trạng thái thứ i của
chuỗi quan sát O.
λ t(i) = P(qt = qi | O) Nó dễ dàng nhận được:
λ
t
(i) = αt(i) βt(i) / P( O ), với i =1, , N , t =1, , T
Sau đó tại mỗi thời điểm, chúng ta có thể chọn trạng thái q
t
mà nó làm cực đại λ
t
(i).
qt = arg max {λ t(i)}
Thuật toán Viterbi:
Thuật toán Viterbi vận hành trên một đồ thị HMM để chọn chuỗi trạng thái mà nó
phù hợp cao nhất với chuỗi quan sát được, thuật toán Viterbi tránh được sự tìm kiếm trên
một không gian lớn và làm giảm chi phí tính toán.
Đặt δ t(i) là xác suất lớn nhất của chuỗi trạng thái có chiều dài t mà kết thúc ở
trạng thái thứ i và sinh ra sinh ra quan sát đầu tiên t.
δ t(i) = max{P(q1, q2, , qt-1 ; o1, o2, , ot | qt = qi ).}
Thuật toán Viterbi là thuật toán qui hoạch động có các bước sau:
21st Computer Science Seminar
SE1-T3-
10

Bước 1_Khởi tạo:
δ1(i) = pi bi(o1)
ψ1(i) = 0 , i =1, , N
Bước 2_Lặp lại:

For t = 1 to T-1
δt (j) = max i [δt - 1(i) aij] b j (ot)
ψt(j) = arg max i [δt - 1(i) aij]
Endfor
Bước 3_Kết thúc:
P* = max i [δT(i )]
Q
*
T
= arg max i [δT(i )]
Bước 4_Kết quả, ta được chuỗi trạng thái quay lui:
Q
*
t
= ψ
t+1
(Q
*

t+1
), với t = T-1, T-2, … , 1
2.2 Ước lượng tham số xác xuất cho HMM – Thuật toán Baum-Welch
Bài toán 2 của mô hình HMM là làm sao hiệu chỉnh tham số của mô hình
λ = (A, B, π) để cực đại hóa xác suất P(O | λ) sinh ra O.
Để giải quyết bài toán 2 chúng ta cần một phương pháp hiệu chỉnh các tham số
lambda để tối đa hóa khả năng của tập huấn luyện. Hiện tại chưa có cách nào xác định
các giá trị trong mô hình để có được xác suất chuỗi quan sát tối đa, mà chúng ta chỉ có
thể ước lượng được một cực đại cục bộ bằng cách dùng thuật toán Baum- Welch (hay
còn gọi là thuật toán Forward-Backward). Thuật toán Baum-Welch được dùng nhằm hạn
chế sự “bùng nổ” tính toán và bảo đảm sự hội tụ cục bộ được dùng trong huấn luyện.



Bài toán 2, làm sao hiệu chỉnh tham số của mô hình.
Thuật toán Baum-Welch:
Bước 1: Xác suất duyệt qua 1 cạnh: từ trạng thái i tại thời điểm t đến trạng thái j
tại thời điểm t + 1.
21st Computer Science Seminar
SE1-T3-
11




là xác suất sở hữu hai trạng thái i và trạng thái j.
Bước 2: Xác suất của trạng thái i tại thời điểm t:


Ta có được các tham số ước lượng
Xác suất trạng thái i là trạng thái bắt đầu πi:

Xác xuất chuyển trạng thái:
21st Computer Science Seminar
SE1-T3-
12




Xác xuất phát ra:


3. Tiền xử lý tín hiệu :
Tiền xử lý là một quá trình xử lý trước tín hiệu tiếng nói, nhằm mục đích làm
sạch tín hiệu để có những thông tin cần thiết cho hệ thống nhận dạng tiếng nói. Các giai
đoạn của qui trình tiền xử lý được sắp xếp thứ tự như sau:
• Giai đoạn làm nổi tín hiệu (Pre – Emphasis). Thực hiện bộ lọc để làm nổi tín
hiệu, loại bỏ các tín hiệu không cần thiết, loại bỏ các nhiễu và giữ lại tín hiệu quan trọng
của tiếng nói. Giai đoạn này sử dụng các bộ lọc điển hình như bộ lọc Wiener.
• Cắt khung tín hiệu bằng cách dùng hàm cửa sổ Hamming.
• Phân tích Fourier. Thực hiện phép biến đổi Fourier rời rạc trên từng khung tín
hiệu để thu về các độ lớn phổ tín hiệu.
• Xác định phổ Mel. Thực hiện chuyển đổi từ tần số Hz sang tần số Mel bằng
cách lấy logarithm của phổ tín hiệu thu được từ biến đổi Fourier.
• Tính hệ số Mel Cepstrum để xác định các hệ số đặc trưng cho tín hiệu tiếng nói.
Các hệ số này được gọi là Mel Frequency Cepstrum Coefficients – MFCC.
• Biến đổi Cosine rời rạc trên tần số Mel






21st Computer Science Seminar
SE1-T3-
13





Biểu diễn tín hiệu tiếng nói từ tín hiệu liên tục sang tín hiệu rời rạc.

Quá trình tiền xử lý là không thể bỏ qua và sẽ nâng cao đáng kể chất lượng nhận
dạng.
3.1 Cải thiện tín hiệu – bộ lọc Wiener:
Đây là giai đoạn đầu tiên của quá trình tiền xử lý, tín hiệu tiếng nói đầu vào sẽ
được đưa qua các hệ thống bậc thấp chính là các bộ lọc FIR để làm phẳng phổ tín hiệu.
Bộ lọc Wiener có mục đích làm giảm lượng tiếng ồn trong tín hiệu bằng so sánh với một
ước lượng không nhiễu mong muốn. Bộ lọc Wiener được xây dựng cho việc ánh xạ tín
hiệu đầu vào thành tín hiệu kết quả sao cho gần giống với tín hiệu mong đợi nhất
Công thức cơ bản của bộ lọc Winer

Tín hiệu đầu vào của bộ lọc là y(m).
Tích số wy(m) là kết quả của bộ lọc.
Với là bình phương tối thiểu ước lượng sai số của tín hiệu mong muốn
x(m). Trong công thức trên m là chỉ số thời gian rời rạc,
yT = [y(m), y(m-1),…,y(m – P –1)] là tín hiệu đầu vào vào của bộ lọc. Vector
tham số wT = [w0, w1,…,wP-1] là vector hệ số của bộ lọc Wiener. Về mặt giải thuật, để
thực hiện lọc tín hiệu cần hai quá trình xen kẽ nhau giữa phép xoắn và tích trong vector.
3.2 Cắt khung tín hiệu :
Tín hiệu sau khi được cải thiện bằng bộ lọc Wiener sẽ được chia thành các khung,
mỗi một khung chứa N mẫu, các khung có độ dài xác định, thông thường vào khoảng 10
~ 30 ms. Có nhiều cách cắt khung tín hiệu khác nhau như cửa sổ Kaiser, cửa sổ
Blackman, cửa sổ Hamming, cửa sổ Cosin…, mỗi cách cắt khung tín hiệu tương ứng với
một hàm cửa sổ.
Như vậy, khung chính là số mẫu thu được trong thời gian khảo sát (vào khoảng
25ms). Một ngữ âm được hình thành từ nhiều khung và các khung này có thể nằm chồng
lên nhau. Tuy nhiên, vùng chồng lấp giữa các khung không được vượt quá 75% diện tích
khung để đảm bảo tính chính xác. Mục đích việc cắt khung tín hiệu do tiếng nói có dạng
21st Computer Science Seminar
SE1-T3-
14


sóng và liên tục theo thời gian, để thực hiện quá trình xử lý trên dãy tín hiệu này là điều
không thể vì nó thay đổi quá nhanh.



Cắt khung tín hiệu.
Phương pháp để xử lý là chúng ta sẽ phân tích phổ trong những khoảng thời gian
ngắn trên những khung liên tiếp được cập nhật theo chu kỳ. Cắt khung tín hiệu bằng cửa
sổ Hamming nhằm khắc phục hiện tượng không mong muốn Gibbs và làm mịn các cạnh.
Tiếp đến, mỗi khung sẽ được nhân với hàm cửa sổ Hamming để thực hiện biến
đổi Fourier rời rạc trên từng khung. Quá trình này nhằm tối thiểu hóa số điểm gián đoạn
tại các vị trí bắt đầu và kết thúc khung.

Trong đó N chính là kích thước của khung, bằng hai lần tần số cao nhất của tín
hiệu.

21st Computer Science Seminar
SE1-T3-
15

3.3 Phân tích Fourier – biến đổi Fourier rời rạc:
Bước kế tiếp sau khi cắt khung tín hiệu là xác định độ lớn phổ tín hiệu trên từng
khung bằng cách thực hiện biến đổi Fourier rời rạc.
Tín hiệu tiếng nói trong thế giới thực ở dạng sóng liên tục theo chu kỳ, sóng này
là tổng hợp của các sóng đường hình sin rời rạc có tần số, biên độ khác nhau, và pha của
tín hiệu hình sin có tần số f tương ứng với biểu diễn đặc tính tần số, vì vậy tín hiệu có thể
dùng để tổng hợp trở lại các tín hiệu hình sin ban đầu thông qua biến đổi Fourier. Có 4
loại biến đổi Fourier tương ứng với 4 loại tín hiệu :
• Biến đổi Fourier (Fourier transform) dùng cho loại tín hiệu không chu kỳ.

• Chuỗi Fourier (Fourier series) dùng cho loại tín hiệu liên tục có chu kỳ.
• Biến đổi Fourier thời gian rời rạc (Discrete time Fourier transform) dùng cho
loại tín hiệu rời rạc không chu kỳ.
• Biến đổi Fourier rời rạc (Discrete Fourier transform DFT) dùng cho loại tín
hiệu rời rạc có chu kỳ.
3.4 Xác định phổ Mel
Tín hiệu tiếng nói thu được vốn có kích thước lớn, máy tính không thể xử lý nhận
dạng trên mốt khối lượng dữ liệu như vậy. Để giải quyết vấn đề này, người ta chỉ rút
trích ra và xử lý những thông tin cần thiết nhất từ dãy tín hiệu thu được. Các thông tin
được trích ra được gọi là đặc trưng của tín hiệu gốc, các đặc trưng này có thể chia thành
nhiều nhóm khác nhau:
Nhóm 1: Các đặc trưng trích ra nhờ mô phỏng theo mô hình bộ máy phát âm của
con người. Nhóm này sử dụng phương pháp dự báo tuyến tính để có được các đặc trưng.
Nhóm 2: Các đặc trưng âm học khác nhau về cao độ, âm điệu, dấu, vị trí nhấn,…,
nhóm này thích hợp với nhận dạng tiếng nói khi đang nói, xử lý thanh điệu, tâm trạng
người nói,….
Nhóm 3: Đặc trưng trích ra dựa vào phương pháp phân tích cepstral và phổ âm
(spectral). Phương pháp phổ biến được sử dụng và trình bày trong tiểu luận là
phương pháp tần số Mel Frequency Cepstral Coefficients (MFCC).
Tín hiệu tiếng nói chứa các tông (tone) với các tần số khác nhau. Trong thực tế
tần số f của mỗi tông này được do bằng Hz. Đối với các tông có tần số thấp hơn 1000 Hz,
tai người nghe với thang âm tuyến tính (linear scale). Ngược lại, đối với các tông có tần
số cao hơn 1000 Hz thì nghe với thang âm loga (logarithmic scale). Năm 1940, Stevens
và Wolkman dựa trên nghiên cứu về tri thức thính giác của con người đã đưa ra định
nghĩa về Mel và tần số Mel như sau:
Mel là đơn vị đo của một cao độ (Pitch) nghe được hoặc là tần số của một tông
(tone). Tần số mel (Mel Fequency) là một tần số tuyến tính nằm trong khoảng dưới 1000
21st Computer Science Seminar
SE1-T3-
16


Hz và một tần số logarithmic trên 1000 Hz. Phần lớn năng lượng của tín hiệu tiếng nói
nằm ở khoảng tần số thấp (dưới 1000Hz).
Sử dụng công thức sắp xỉ (Young et al, 1997) dưới đây để tính Mel cho một tần
số f cho trước:

Sau khi chuyển đổi sang tần số Mel, phổ tín hiệu chứa ít thông tin hơn, chỉ giữ lại
những tần số thấp trong ngưỡng nghe của con người và loại bỏ những thông tin không
cần thiết.
3.5 Biến đổi Cosine rời rạc trên tần số Mel (Discrete Cosine Transform):
Với biến đổi Fourier ta sử dụng cả hàm sine và cosine để mô tả tín hiệu, còn với
biến đổi cosine ta chỉ dùng hàm cosine cho mô tả. Giai đoạn cuối cùng của tiền xử lý
tiếng nói, chúng ta áp dụng biến đổi cosine rời rạc để xác định phổ Mel (Mel Cepstrum).
Có nghĩa là chúng ta sẽ chuyển đổi giá trị logarithm của phổ Mel từ miền tần số quay
ngược về miền thời gian sử dụng biến đổi Cosine rời rạc. Kết quả của quá trình này là thu
được hệ số tần số Mel Cepstrum. Các hệ số này đều là các số thực, trong đó hệ số đầu
tiên C0 chính là tín hiệu tiếng nói đầu vào nên bị loại bỏ. Toàn bộ quá trình xử lý Front-
end trên còn được gọi là block MFCCs.
Công thức biến đổi Cosine rời rạc sau đây được áp dụng để tìm ra hệ số của tần số
Mel:

Với n= 0, 1, , L – 1, C là các hệ số phổ Mel.
Tập hợp các hệ số tần số Mel Cepstrum trên được gọi là một vector ngữ âm
(vector acoustic). Các vector ngữ âm này được sử dụng để biểu diễn và nhận dạng tiếng
nói. Vì thế, mỗi tín hiệu tiếng nói ở đầu vào sẽ được chuyển đổi theo thứ tự trên thành
một vector ngữ âm. Vector ngữ âm được sử dụng trong rất nhiều công nghệ nhận dạng
tiếng nói như Dynamic Time Warpping (DTW), Hidden Makov Modeling (HMM),
Vector Quantization(VQ) Ở đây, sử dụng mô hình HMM, các hệ số là các số thực đặc
trưng cho tông và cao độ tiếng nói, đóng vai trò như một chuổi trạng thái trong mô hình
HMM.

21st Computer Science Seminar
SE1-T3-
17

TÀI LIỆU THAM KHẢO
Functional Dependencies in Fuzzy Databases
Brian
Hartlieb



ABSTRACT

Integrity constraints play a critical role in a logical database
design in which data dependencies are of more interest. One of
the most important data dependencies is the functional
dependency in relational databases, representing the dependency
relationships among attribute values in a relation. We will
examine the two most popular frameworks for extending classical
Functional Dependencies into Fuzzy Functional Dependencies.
We will examine some of the extensions made to the classical
relational data model that attempt to tackle the challenges of
incorporating fuzzy logic. While the frameworks’ foundational
premises are different, the similarities are so strong, that a
unification model may emerge in the future.

Keywords
functional dependency, fuzzy functional dependency, relational
database, fuzzy database.


1. INTRODUCTION
This paper deals with the application of fuzzy logic in a relational
database environment with the objective of showing how the
definition of classical functional dependency (FD) has been
extended in to a fuzzy functional dependency (FFD).

The paper is organized as follows. In Section 2, the paper deals
with some of the basic definitions and concepts of fuzzy logic. In
Sections 3, we introduce the two major classes of fuzzy relational
data models. In Section 4 and section 5, the two main approaches
of fuzzy functional dependency frameworks are described.
Finally, some concluding remarks.
This concept was called Fuzziness and the theory was called
Fuzzy Set Theory.

While there are many types of uncertainty, Fuzzy set theory
attempts to address only one aspect of uncertainty. It would seem
beneficial to database systems, if it could incorporate fuzzy logic.
Databases that use crisp and non-crisp data can beneficial from
use of a query language that uses Fuzzy logic. A branch of fuzzy
set theory is the use of “hedging” adjectives. A query language
that provides the use of these adjectives will provide a more
natural language for the user, than traditional SQL. It could be
said that purpose of a fuzzy database is to provide an intelligent
interface to a relational database system by facilitating
approximate query handling and producing approximate answers
when exact data may not be unavailable. [3] As an example
consider a student record database system. We want to find bright
and young students in the whole batch. For a crisp system we
would specify the query as


PROJECT (Student_Name)
WHERE 19

AGE

23 and 3

GPA

4


But this system has a major flaw. Consider a student, Bob whose
age is 24 and has a good GPA of 4 out of 4. He should have been
selected but is not. It is because of the rigid boundary conditions
set by the crisp logic of the query. In fuzzy logic, we would
specify two fuzzy sets, YOUNG (fig.1a) and GPA (fig.1b), and
each student will have some membership grade associated with
the two sets. So according Bob will have a non–zero membership
grade although it will be less than other students in the age group
19-23. Hence Bob will now be included in the result set to be
considered. Bob now satisfies the query to some extent, which is
represented by his membership grade. [4]
2. BACKGROUND
Databases are one form of modeling the real world. A world that
is imprecise and vague. Database models can be either precise or
imprecise. Query languages are designed to express the user’s
retrieval requests in either a crisp manner or not. Most database
models today are crisp. A crisp database model is one that is

highly quantifiable - all relationships are fixed and all attributes
have one value. The classical approach to uncertainty in databases
is to reduce retrieval to 3-value logic. Each database object is

1



0 18 19 23 24

Figure 1. (a) Young (b) GPA

2.1 Fuzzy Definitions


1



0 3 3.5 4
surely, maybe, or surely-not, in response to a query.

Several extensions have been brought to the relational data model
to capture the imprecise parts of the real world. In general there
are two approaches. The approaches differ mainly in the method
they use, while still being based on the work of a single man,
Lotfi A. Zadeh, father of fuzzy logic. The first approach is the
similarity-based approach, first introduced by Zadeh in1970. [1]
The second approach was later introduced by Zadeh in 1978 [2]
Zadeh explained how a possibility distribution can be used in

conjunction with his earlier work of fuzzy sets. Zadeh’s initial
work introduced a theory whose objects fuzzy sets are sets with
boundaries that are not precise and the membership in this fuzzy
set is not a matter of true or false, but rather a matter of degree.
When A is a fuzzy set and x is a relevant object, the proposition
“x is a member of A” is not necessarily either true or false, as
required by the two-valued logic, but it may be true only to some
degree, the degree to which x is actually a member of A, is a real
number in the interval [0, 1]. Theoretically, if X is a collection of
objects denoted generically by x, then a fuzzy set F in X is a set
of ordered pairs,
F = {(x, µF(x)) | x ε X}
µF(x) is called the membership function (or grade of membership)
of x in F that maps X to the membership space M. The range of
the membership function is a subset of the nonnegative real
numbers whose supremum is finite.
21st Computer Science Seminar
SE1-T3-
18

2.2 Fuzzy Set Operators and Fuzzy Logic
For crisp sets, the basic operations are, namely,

Union, OR
Intersection, AND
Complement, NOT

Fuzzy sets have defined fuzzy operators that allow the
manipulation of the fuzzy sets. There are fuzzy complements,
intersection and union operators but they are not uniquely

defined. However there is an important distinction between
traditional set logic and fuzzy set theory. In traditional set theory
there is a distinction between the union operation of sets and OR
operator, was well as in the case of intersection and AND
operator. But in fuzzy theory there is no such distinction between
the logical and set operators;
Fuzzy union

Fuzzy OR
Fuzzy intersection

Fuzzy AND

Fuzzy complement

Fuzzy NOT


Some standard fuzzy operations are:

Fuzzy Complement,
~A(x) = 1 - A(x)
Fuzzy Union,


1



0 a b c d


Figure 3. Possibility Distribution for a Linguistic Term
SMALL for the Linguistic Variable HEIGHT

There are four parameters associated with a linguistic term as a,
b, c and d as shown in the Fig. 3. For the range [b,c] the
membership value is 1.0, while for the range [a, b] and [c, d] the
membership value remains between [0.0, 1.0].

This example, introduces fuzzy sets and linguistic terms on the
attribute domains and linguistic variables (e.g. on the attribute
domain AGE we may define fuzzy sets as YOUNG, MIDDLE
and OLD). [3]


YOUNG MIDDLE OLD
1
(A

B)(x) = max[A(x), B(x)].

Fuzzy Intersection,


0 a
Y
b
Y



c
Y
, a
M


d
Y
, b
M


c
M
, a
O


b
O
, d
M


c
O
d
O

(A∩B)(x) = min[A(x), B(x)].



Data can be classified as crisp, when there is no vagueness in the
information (e.g., X = 13). With Fuzzy data, there is vagueness in
the information and this can be further divided into two types as:

(1) Approximate Value: The information data is not totally
vague and there is some approximate value, which is known
and the data, lies near that value (e.g., 10 < X < 15). These
are considered have a triangular shaped possibility
distribution as shown below

1



0 -d X d

Figure 2. Possibility Distribution for an approximate
value. (Approximately X)

The parameter, d gives the range around which the
information value lies.

(2) Linguistic Variable: A linguistic variable is a variable
that apart from representing a fuzzy number also represents
linguistic concepts interpreted in a particular context. Each
linguistic variable is defined in terms of a variable which
either has a physical interpretation (speed, weight etc.) or
any other numerical variable (salary, absences, GPA etc.)


The information in this case is totally vague and we associate a
fuzzy set with the information. A linguistic term is the name
given to the fuzzy set (e.g., X is SMALL). These are considered
have a trapezoidal shaped possibility distribution as shown below
Figure 4. Age

3. APPROCH AND METHODOLOGY
There have been many extensions developed for fuzzy relational
data model. These extensions can be classified into two
categories: The similarity-based and the possibility-based models.
In a similarity-based model, some similarity relationships are
specified for some attributes so that values of these attributes may
be grouped into similarity classes. Each similarity class contains
values that are similar to each other to, and above a given degree.
Thus they are indistinct, and form an uncertain representation of a
real-world value. In a possibility-based model, an ill-known data
is represented by a possibility distribution which describes the
possibility for each crisp attribute value to be the actual value of
the data. In both types of models, membership degrees may be
associated with tuples of a fuzzy relation.

Integrity constraints play a critical role in a logical database
design. Among these constraints, data dependencies are of most
interest. Various types of data dependencies such as functional
and multivalued dependencies are used for the design of classical
relational schema that are conceptually meaningful and free of
certain anomalies. For example, if one attribute determines
another, we say that there exists a functional dependency between
these attributes. Functional dependencies in databases relate the

values of one set of attributes to the values of another set. Fuzzy
functional dependencies can represent the dependency
relationships among attribute values in fuzzy relations, such as
“the salary almost depends on the job position and experience.”
[5]

We will review the two main approaches used at extending
relational functional dependencies into fuzzy functional
21st Computer Science Seminar
SE1-T3-
19

dependencies. These two approaches are the similarity-based
approach, and possibility-based approach.

4. THE POSSIBLIITY-BASED APPROACH
In a relational data model that can support imprecise information,
it is necessary to accommodate two types of impreciseness, the
impreciseness in data values and impreciseness in the association
among data values. As an example of impreciseness in data
values, consider the Employee(Name, Salary) database, where
Salary of an employee, John, may be known to the extent that it
lies in the range $60,000-80,000, or may be known that John has a
“high salary.” Similarly, as an example of impreciseness in the
association among data values, let Likes(Student, Course)
represent how much a student likes a particular course. Here the
data values may be precisely known, but the degree to which a
student, John, likes the course DBMS, is imprecise. It is not
difficult to envision examples where both ambiguity in data
values as well as impreciseness in the association among them are

both present. [6]

Fuzzy data is represented by possibility distributions and a grade
of membership is used to represent the association between
values. Also this grade of membership may itself be a possibility
distribution. Fuzzy similarity relations facilitate the estimation of
the extent to which possible values of an attribute can be regarded
as being interchangeable. By introducing an extra element, e, for
the situations where a nonzero possibility can mean the non-
applicability of an attribute. The traditional null value no longer
has to mean that an attribute is completely unknown. It has also
been proposed that possibility distributions be used to represent
fuzzy values as well as uncertainty, when concerning the value of
an attribute. [5]

Depending on the complexity of dom(A
i
), i = 1, . . . , n, we
classify fuzzy relations into two categories. In type-l, fuzzy
relations, dom(A
i
) can only be a fuzzy set (or a classical set). A
type-l fuzzy relation may be considered as a first-level extension
of classical relations, where we will be able to capture the
impreciseness in the association among entities. The type-2 fuzzy
relations provide further generalization by allowing dom(A
i
) to be
even a set of fuzzy sets (or possibility distributions). By enlarging
dom(A

i
), type-2 relations enable us to represent a wider type of
impreciseness in data values. Such relations can be considered as
a second-level generalization of classical relations. For example,
Type-2 allows a domain that hold both numerical and linguistic
values; we may define the domain AGE as positive integers, and
functions for YOUNG, MIDDLE and OLD. The three functions
will convert the values of YOUNG, MIDDLE and OLD to
numerical values. [6]

4.1 Fuzzy Integrity Constraints
The integrity constraints in relational database systems can be
broadly classified into two groups:

(1) Domain dependency: Domain dependency restricts
admissible domain values of the attributes, e.g., “age of an
employee is less than 65 years,” or “no one is 10 feet tall.”
(2) Data dependency: Data dependency requires that if
some tuples in the database fulfill certain equalities, then
either some other tuples must also exist in the database, or
some values of the given tuples must be equal. [6]
As we generalize relational database systems to deal with fuzzy, it
will be necessary to consider integrity constraints that involve
fuzzy constructs. Thus in a relation PLAYERS(Name, Age,
Height, Sport, Income), an integrity constraint may be stated as,
“Most basketball players are tall,” or “Many baseball players have
high income.” These integrity constraints impose restrictions on
the admissible values of height or income of the basketball or
tennis players, respectively. Similarly, as an example of a fuzzy
data dependency, consider the relation scheme

EMPLOYEE(Name, Department, Job, Experience, Salary), where
an integrity constraint may be stated as “in any department
employees having similar jobs and experience must have almost
equal salary.” [6]

4.2 Fuzzy Functional Dependencies
In the fuzzy domain, equality of domain values defines a fuzzy
proposition and may even be specified as “approximately equal,”
“more or less equal,” etc. For instance, a fuzzy data dependency
in the relation EMPLOYEE(Name, Job, Experience, Salary) can
be stated as “Job and Experience more or less determines Salary.”
[6]

There are two families of approaches where possibility-based
attribute values are compared for “equality”. The classification is
based on the nature of comparison between two ill-known values.
In one approach the comparison is made in terms of
representations (i.e., the result is a degree to which the two
underlying fuzzy sets are equal). One interpretation of this FFD
is: "when two tuples have the same value (or representation) on
X, they should have the same value (or representation) on Y".
This FFD may contain tuples whose X-representations share some
more or less possible values while they do not share a single value
in the Y-representations.

In the other approach the comparison is made in terms of values
(i.e., its result is degree of possibility of the equality between two
ill-known values.) The interpretation of this FFD is: "when two
tuples have the same value (or representation) on X, they should
have the same value (or representation) on Y”. This FFD uses a

critical threshold value, which is undecided and remains arbitrary
to the design. [7]

4.3 Inference Rules
An important concept related to data dependencies is the concept
of inference rules. Given a set of dependencies, inference rules
introduce other dependencies that are logical consequences of the
given dependencies. These rules are dependency generators and
so they are closely related to the definition and semantics of the
dependencies. Given a set of data dependencies that hold on a
database, it is often possible to derive other data dependencies
that also hold on the same database. An important point to make
for the inference rules is that they can only be useful if the
dependencies they generate form a sound and complete set. By
sound, we mean that the generated dependency is valid in all
relation instances provided the given set of inferences is also
valid. By complete, we mean that all of the valid dependencies
can be generated using only these rules. Thus, when defining the
dependencies and their inference rules, it is crucial that the
dependencies are well defined in terms of definition and
semantics, and their inference rules are sound and complete.
21st Computer Science Seminar
SE1-T3-
20

In particular, we focus on the establishment of inference rules for
the following reasons:

(1) By the inference rules, we sometimes get simpler
functional dependencies than the original ones. It is

convenient to use simpler functional dependencies whenever
possible in order to infer actual values of unknown values.
(2) We can obtain minimal sets of functional dependency by
using inference rules. In integrity checking, if we can use the
minimal sets of functional dependencies, we are free from
excessive evaluations.
(3) When we obtain functional dependencies by data mining
or knowledge discovery, we can get another functional
dependency by using the inference rules.
The inference rules for classical FDs are Armstrong’s 3-value
logic axioms which are sound and complete. [8]

Armstrong’s inference rules [9]

Al. Reflexivity
If Y

X, then X

Y.

A2. Augmentation
If X

Y, then X

XY.

A3. Transitivity
If X


Y and Y

Z, then X

Z.
As augmentation, “If X →Y, X Z →YZ” is sometimes used, which
is deduced from A1-A3. Some useful inference rules deduced
from Armstrong’s inference rules

D1. Union
If X →Y and X

Z, then X

Y Z.

D2. Decomposition
If X

Y Z, then X

Y and X

Z.

Fuzzy inference rules [6]

By extending Armstrong’s rules to a multivalued logic system.


FFl. Reflexivity
If Y

X, then X →
F
Y.

FF2. Augmentation
If X →
F
Y, then XZ →
F
YZ.

FF3. Transitivity
If X →
F
Y and Y →
F
Z, then X →
F
Z.

FF4. Union
If X →
F
Y and X →
F
Z, then X →
F

Y Z.

FF5. Decomposition
If X →
F
Y Z, then X →
F
Y and X →
F
Z.

FF6. Generalized augmentation
If X →
F
Y and X

U and V

X Y, then U →
F
V.


5. THE SIMILARITY-BASED APPROACH
The similarity-based fuzzy relational model is not an extension to
the original relational model, but actually a generalization of it. It
allows a set of values for an attribute rather than only atomic
values, and replaces the identity concept with a similarity
concept.


The similarity-based relational model allows a set of values for a
single attribute providing that all the values are from the same
domain. The model, allows multiple values, while keeping the
property of a strongly typed attribute value present in the classical
relational model. This property is useful for query processing and
Update operations. If the attribute value is precise and crisp, then
the value is atomic, if it is imprecise and inexact, then a set of
values that are similar to this value are stated in place of it. The
level of similarity among the values is defined by the explicitly
defined similarity relation for the domain of the attribute values.

Similarity relations are useful for describing how similar two
elements from the same domain are. A similarity relation, s(x,y),
for a given domain D, is a mapping of every pair of elements in
the domain onto the unit interval [0,1]. The identity relation used
in non-fuzzy relational databases Identity relation is a special case
of this similarity relation. [5]

Similarity relations are useful for describing how similar two
elements from the same domain are, as the name implies. Given
two elements, the similarity relation maps these two elements into
an element in the interval [0, 1]. The more similar two elements
are, the higher the value of the mapped element. If the two
elements are the same, that is, if we compare an element with
itself, the mapped element is 1, the highest possible value. An
ordinary relation is considered to be a similarity relation when it
satisfies the three conditions stated below.
Definition 5.1. A similarity relation is a mapping s: D X D → [0,
1] such that for x, y, z


D,


s(x, x) =1 (reflexivity)
s(x, y) = s(y, x) (symmetry)
s(x, z)

max
y

D
(min s(x, y) , s(y, z))) (max-min

transitivity)

Example 5.1 For a domain D, we have D= s{a, b, c, d}. We
define a relationship s for domain D, such that;

s
a
b
c
d
a
b
c
d
1
0
0

0
0
8
0
0
8
1
1
0.7
0
0
0.7
1

Relation s satisfies the three conditions stated in Definition 5.1.
Thus, it is a similarity relation.
21st Computer Science Seminar
SE1-T3-
21

F
Example 5.2. The equivalence classes induced by s in Example
2.1 are;

the conformance of them. The conformance is defined both on a
single attribute and on a set of attributes.

[1, 0.8):
[0.8, 0.7):
[0.7, 0):

0:

{a}, {b}, {c}, {d}.
{a, b}, {c}, {d}.
{a, b}, {c, d}.
{a, b, c, d}

For precise FFDs, the similarity of Y values has to be greater than
or equal to the similarity of X values, where similarity is
measured in terms of conformance. For imprecise FFDs, the
impreciseness of the dependency is a threshold on the similarity
of Y values, thus weakening the dependency. [5] The FFDs should
also be checked whenever tuples are inserted into the fuzzy
relational database or they are modified, so that the integrity
Example 5.3. This is the instance of fuzzy relation car and the
similarity relations of its attribute domains. [5]

Type Color price
constraints imposed by these FFDs are not violated. [8] The
definition of the FFD turns into: “if t[X] is similar to t’[X], t[Y] is
also similar to t’[Y]. The similarity between Y values is greater or
equal to the similarity between X values.” This dependency is
shown as X→
F
Y. A typical example of such a dependency is:

t
1
{sportscar}


t
2
{wagon}
t
3
{truck}
t
4
{wagon}
{blue, green}
{red}
{blue}
{green}
{expensive}
{modest, affordable}
{modest, affordable}
{expensive}
‘‘employees with similar experiences must have similar salaries.’’
In this case, while the values of attributes experience and salary
may be imprecise, the defined dependency is precise which can
be noticed from the ‘‘must have’’ clause in the example. This
definition of FFDs still has some missing point, which is the case
where the dependency itself is imprecise. An example to this kind
of FFD is: ‘‘the intelligence level of a person more or less
TYPE S W T

determines the degree of success,’’ where the ‘‘more or less’’

Sportscar (S) 1 0
Wagon (W) 0 1

Truck (T) 0 0
0
clause makes the dependency imprecise. Assume that there are
0
two people with identical intelligence levels, and the first person
is very successful. We cannot conclude that the second person
1
will be very successful, too, but we can state that the success level
of the second person will be ‘‘more or less similar’’ to the success
level of the first person, so a change in definition has to be made
COLOR B G R
in order to accommodate the imprecise FFDs in addition to

Blue (B)
Green(G)
Red (R)
1
0.7
0
0.7
1
0
0
precise FFDs. One way to do this is to accept the linguistic
strength in the dependency as a threshold value for example, the
0
dependency ‘‘employees with similar experiences must have

1
similar salaries’’ has linguistic strength 1, and the dependency


‘‘the intelligence level of a person more or less determines the
degree of success’’ has linguistic strength (0.6). We choose this


PRICE C A M A
method to describe imprecise FFDs as well as precise ones. This
threshold value naturally determines the strength of the
Cheap (C) 1 0.3 0.3 0
dependency. Thus, this value will be
θ
called the strength of the

Modest (M)
Affordable(A)

0.3
0.3

1
0.8

0.8 0
1 0

FFD, shown as
X→
θ
Y. [6]


Expensive (E) 0 0 0 1

5.1 Fuzzy Functional Dependencies
Fuzzy functional dependencies reflect some kind of semantic
knowledge about attribute subsets of the real world. FFDs are
used to design similarity-based fuzzy databases where data
redundancy and update anomalies are reduced. In a fuzzy
relational data model, the degree of “X determines Y” may not
necessarily be 1 as in the crisp case. Naturally, a value ranging
over the interval [0, 1] may be accepted. Then the definition of
FFD turns into “similar Y values correspond to similar X values.”
[5]

FFDs are functional constraints that are specified among the
attributes of a fuzzy relation schema. The similarity-based
relational model compares two attributes by measuring the
closeness of the values in terms of the explicitly declared
similarity relation of the attribute domain. The degree of
closeness between two tuples in a fuzzy relation instance is called
5.2 Inference Rules
For the similarity-based fuzzy model, we must examine inference
rules under two interpretations of functional dependencies. Under
the interpretation corresponding to using Godel’s multivalued
logic system, Armstrong’s inference rules are sound and complete
for any functional dependency with no weights, and the extended
inference rules of Armstrong’s ones are sound and complete for
any functional dependency with weights. On the other hand,
under the interpretation corresponding to using Diens’
multivalued logic system, Armstrong’s inference rules are sound
and complete for functional dependencies with identity relations

and no weights, and the extended inference rules of Armstrong’s
ones are sound and complete for functional dependencies with
identity relations and weights. However, Armstrong’s inference
rules and their extended inference rules are not sound for
functional dependencies with resemblance relations and no
weights and with resemblance relations and weights, respectively.
In these cases, another sound inference rules hold. (Armstrong,
Diens, and Godel, where mathematicians who worked separately
on 3-value and/or multivalued logic systems.) [9]
NHÓM THỰC HIỆN: NHÓM 4 – LỚP KHMT KHÓA 2011 - 2013

Trang 3
6. CONCLUSION
Like the classical databases, the fuzzy databases not properly
designed suffer from the problems of data redundancy and update anomalies. To provide a good fuzzy relational database
design, the concept of FFD is used to define the fuzzy normal forms and dependency-preserving and lossless join properties. In
this article, we reviewed the two leading frameworks for Fuzzy relational databases, the similarity-based approach, and
possibility-based approach. Zadeh’s fuzzy logic models are the bases for both approaches. While the possibility-based model
came later, work has continued on both approaches by a number of researchers. Both approaches have a number of parallels,
and similarities. As far as Fuzzy functional dependencies are defined in both approaches, most of the problems have been
addressed. There seems to be no major advantage to using one approach over the other. It is clear that, based on these basic
fuzzy relational models; there maybe one type of extended fuzzy relational model, where possibility distributions and
resemblance relations arise in relational databases simultaneously. In the Future that is a good possibility that a single universal
Fuzzy relational database model be proposed.

7. REFERENCES
[1] Zadeh, L.A. Similarity relations and fuzzy orderings. Inform.
Sci., 3(2), 1970. 177-200
[2] Zadeh, L.A. Fuzzy sets as a basis for a theory of possibility.
Fuzzy Sets Syst., 1(1), 1978. 3-28.

[3] Ma, Z. M., Zhang, W. J., Ma, W. Y., Mili1, F., Data Dependencies in Extended Possibility-Based Fuzzy Relational
Databases. INTERNATIONAL JOURNAL OF INTELLIGENT SYSTEMS, VOL. 17, Wiley Periodicals, Inc. DOI:
10.1002/int.1088. 2002. 321–332
NHÓM THỰC HIỆN: NHÓM 4 – LỚP KHMT KHÓA 2011 - 2013

Trang 4
[4] Bedi, Punam, Kaur, Harmeet, Malhotra, Ankit, Fuzzy Dimension To Databases. Published at the 37
th
National
Convention of Computer Society of India, Bangalore, India, November 2002
[5] Bahar, Adnan, Yazici, Adnan. Normalization and Lossless Join Decomposition of Similarity-Based Fuzzy Relational
Databases. INTERNATIONAL JOURNAL OF INTELLIGENT SYSTEMS, VOL. 19, Wiley Periodicals, Inc. DOI
10.1002/int.20029. 2004. 885–917
[6] Raju, KVSVN and Majumdar, AK, Fuzzy functional dependencies and lossless join decomposition of fuzzy
relational database systems. ACM Trans Database Syst
1988.129–166.
[7] Wang, Shyue-Liang, Tsai, Jenn-Shing, Hong, Tzung-Pei.
Mining Functional Dependencies from Fuzzy Relational
Databases. SAC'00 March 19-21 Como, Italy ACM 1-58113-
239-5/00/003. 2000.
[8] Wang, Shyue-Liang, Shen, Ju-Wen, Hong, Tzung-Pei Hong, Chang, Bill C.H. Incremental Discovery of Functional
Dependencies From Similarity-Based Fuzzy Relational Databases Using Partitions. IFSA World Congress and 20th
NAFIPS International Conference, 2001. Joint 9th, Volume:
3, 25-28 July 2001. 1322-1326.
[9] Nakata, Michinori. Functional Dependencies in Fuzzy Databases. 1997 First International Conference on Knowledge-
Based Intelligent Electronic Systems, 21-23 May
1997, Adelaide, Australia. Editor, L.C. Jain. 1997.

×